OpenSSL merge from 2.2
[kai/samba.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --enable-debug          turn on debugging [default=no]"
17 ac_help="$ac_help
18   --enable-developer      turn on developer warnings and debugging [default=no]"
19 ac_help="$ac_help
20   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
21 ac_help="$ac_help
22   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
23 ac_help="$ac_help
24   --with-smbwrapper       Include SMB wrapper support (default=no) "
25 ac_help="$ac_help
26   --with-afs              Include AFS support (default=no) "
27 ac_help="$ac_help
28   --with-dce-dfs          Include DCE/DFS support (default=no)"
29 ac_help="$ac_help
30   --with-krb4=base-dir    Include Kerberos IV support (default=no)"
31 ac_help="$ac_help
32   --with-krb5=base-dir    Include Kerberos 5 support (default=no)"
33 ac_help="$ac_help
34   --with-automount        Include AUTOMOUNT support (default=no)"
35 ac_help="$ac_help
36   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
37 ac_help="$ac_help
38   --with-pam              Include PAM password database support (default=no)"
39 ac_help="$ac_help
40   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
41 ac_help="$ac_help
42   --with-tdbsam           Include experimental TDB SAM support (default=no)"
43 ac_help="$ac_help
44   --with-ldapsam          Include experimental LDAP SAM support (default=no)"
45 ac_help="$ac_help
46   --with-nisplussam       Include NISPLUS SAM support (default=no)"
47 ac_help="$ac_help
48   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
49 ac_help="$ac_help
50   --with-ssl              Include SSL support (default=no)
51   --with-sslinc=DIR          Where the SSL includes are (defaults to /usr/local/ssl/include)
52   --with-ssllib=DIR          Where the SSL libraries are (defaults to /usr/local/ssl/lib)"
53 ac_help="$ac_help
54   --with-syslog           Include experimental SYSLOG support (default=no)"
55 ac_help="$ac_help
56   --with-profiling-data   Include gathering source code profile information (default=no)"
57 ac_help="$ac_help
58   --with-quotas           Include experimental disk-quota support (default=no)"
59 ac_help="$ac_help
60   --with-utmp             Include experimental utmp accounting (default=no)"
61 ac_help="$ac_help
62   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
63 ac_help="$ac_help
64   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
65 ac_help="$ac_help
66   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
67 ac_help="$ac_help
68   --with-i18n-swat        Use i18n'ed SWAT
69   --without-i18n-swat     Don't use i18n'ed SWAT (default)"
70 ac_help="$ac_help
71   --with-swat-def-lang=LN default SWAT language for old web browsers (empty)"
72 ac_help="$ac_help
73   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
74 ac_help="$ac_help
75   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
76 ac_help="$ac_help
77   --with-acl-support      Include ACL support (default=no)"
78 ac_help="$ac_help
79   --with-winbind          Build winbind (default, if supported by OS)"
80 ac_help="$ac_help
81   --disable-nls           do not use Native Language Support"
82
83 # Initialize some variables set by options.
84 # The variables have the same names as the options, with
85 # dashes changed to underlines.
86 build=NONE
87 cache_file=./config.cache
88 exec_prefix=NONE
89 host=NONE
90 no_create=
91 nonopt=NONE
92 no_recursion=
93 prefix=NONE
94 program_prefix=NONE
95 program_suffix=NONE
96 program_transform_name=s,x,x,
97 silent=
98 site=
99 srcdir=
100 target=NONE
101 verbose=
102 x_includes=NONE
103 x_libraries=NONE
104 bindir='${exec_prefix}/bin'
105 sbindir='${exec_prefix}/sbin'
106 libexecdir='${exec_prefix}/libexec'
107 datadir='${prefix}/share'
108 sysconfdir='${prefix}/etc'
109 sharedstatedir='${prefix}/com'
110 localstatedir='${prefix}/var'
111 libdir='${exec_prefix}/lib'
112 includedir='${prefix}/include'
113 oldincludedir='/usr/include'
114 infodir='${prefix}/info'
115 mandir='${prefix}/man'
116
117 # Initialize some other variables.
118 subdirs=
119 MFLAGS= MAKEFLAGS=
120 SHELL=${CONFIG_SHELL-/bin/sh}
121 # Maximum number of lines to put in a shell here document.
122 ac_max_here_lines=12
123
124 ac_prev=
125 for ac_option
126 do
127
128   # If the previous option needs an argument, assign it.
129   if test -n "$ac_prev"; then
130     eval "$ac_prev=\$ac_option"
131     ac_prev=
132     continue
133   fi
134
135   case "$ac_option" in
136   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
137   *) ac_optarg= ;;
138   esac
139
140   # Accept the important Cygnus configure options, so we can diagnose typos.
141
142   case "$ac_option" in
143
144   -bindir | --bindir | --bindi | --bind | --bin | --bi)
145     ac_prev=bindir ;;
146   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
147     bindir="$ac_optarg" ;;
148
149   -build | --build | --buil | --bui | --bu)
150     ac_prev=build ;;
151   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
152     build="$ac_optarg" ;;
153
154   -cache-file | --cache-file | --cache-fil | --cache-fi \
155   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
156     ac_prev=cache_file ;;
157   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
158   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
159     cache_file="$ac_optarg" ;;
160
161   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
162     ac_prev=datadir ;;
163   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
164   | --da=*)
165     datadir="$ac_optarg" ;;
166
167   -disable-* | --disable-*)
168     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
169     # Reject names that are not valid shell variable names.
170     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
171       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
172     fi
173     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
174     eval "enable_${ac_feature}=no" ;;
175
176   -enable-* | --enable-*)
177     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
178     # Reject names that are not valid shell variable names.
179     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
180       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
181     fi
182     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
183     case "$ac_option" in
184       *=*) ;;
185       *) ac_optarg=yes ;;
186     esac
187     eval "enable_${ac_feature}='$ac_optarg'" ;;
188
189   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
190   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
191   | --exec | --exe | --ex)
192     ac_prev=exec_prefix ;;
193   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
194   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
195   | --exec=* | --exe=* | --ex=*)
196     exec_prefix="$ac_optarg" ;;
197
198   -gas | --gas | --ga | --g)
199     # Obsolete; use --with-gas.
200     with_gas=yes ;;
201
202   -help | --help | --hel | --he)
203     # Omit some internal or obsolete options to make the list less imposing.
204     # This message is too long to be a string in the A/UX 3.1 sh.
205     cat << EOF
206 Usage: configure [options] [host]
207 Options: [defaults in brackets after descriptions]
208 Configuration:
209   --cache-file=FILE       cache test results in FILE
210   --help                  print this message
211   --no-create             do not create output files
212   --quiet, --silent       do not print \`checking...' messages
213   --version               print the version of autoconf that created configure
214 Directory and file names:
215   --prefix=PREFIX         install architecture-independent files in PREFIX
216                           [$ac_default_prefix]
217   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
218                           [same as prefix]
219   --bindir=DIR            user executables in DIR [EPREFIX/bin]
220   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
221   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
222   --datadir=DIR           read-only architecture-independent data in DIR
223                           [PREFIX/share]
224   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
225   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
226                           [PREFIX/com]
227   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
228   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
229   --includedir=DIR        C header files in DIR [PREFIX/include]
230   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
231   --infodir=DIR           info documentation in DIR [PREFIX/info]
232   --mandir=DIR            man documentation in DIR [PREFIX/man]
233   --srcdir=DIR            find the sources in DIR [configure dir or ..]
234   --program-prefix=PREFIX prepend PREFIX to installed program names
235   --program-suffix=SUFFIX append SUFFIX to installed program names
236   --program-transform-name=PROGRAM
237                           run sed PROGRAM on installed program names
238 EOF
239     cat << EOF
240 Host type:
241   --build=BUILD           configure for building on BUILD [BUILD=HOST]
242   --host=HOST             configure for HOST [guessed]
243   --target=TARGET         configure for TARGET [TARGET=HOST]
244 Features and packages:
245   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
246   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
247   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
248   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
249   --x-includes=DIR        X include files are in DIR
250   --x-libraries=DIR       X library files are in DIR
251 EOF
252     if test -n "$ac_help"; then
253       echo "--enable and --with options recognized:$ac_help"
254     fi
255     exit 0 ;;
256
257   -host | --host | --hos | --ho)
258     ac_prev=host ;;
259   -host=* | --host=* | --hos=* | --ho=*)
260     host="$ac_optarg" ;;
261
262   -includedir | --includedir | --includedi | --included | --include \
263   | --includ | --inclu | --incl | --inc)
264     ac_prev=includedir ;;
265   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
266   | --includ=* | --inclu=* | --incl=* | --inc=*)
267     includedir="$ac_optarg" ;;
268
269   -infodir | --infodir | --infodi | --infod | --info | --inf)
270     ac_prev=infodir ;;
271   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
272     infodir="$ac_optarg" ;;
273
274   -libdir | --libdir | --libdi | --libd)
275     ac_prev=libdir ;;
276   -libdir=* | --libdir=* | --libdi=* | --libd=*)
277     libdir="$ac_optarg" ;;
278
279   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
280   | --libexe | --libex | --libe)
281     ac_prev=libexecdir ;;
282   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
283   | --libexe=* | --libex=* | --libe=*)
284     libexecdir="$ac_optarg" ;;
285
286   -localstatedir | --localstatedir | --localstatedi | --localstated \
287   | --localstate | --localstat | --localsta | --localst \
288   | --locals | --local | --loca | --loc | --lo)
289     ac_prev=localstatedir ;;
290   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
291   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
292   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
293     localstatedir="$ac_optarg" ;;
294
295   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
296     ac_prev=mandir ;;
297   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
298     mandir="$ac_optarg" ;;
299
300   -nfp | --nfp | --nf)
301     # Obsolete; use --without-fp.
302     with_fp=no ;;
303
304   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
305   | --no-cr | --no-c)
306     no_create=yes ;;
307
308   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
309   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
310     no_recursion=yes ;;
311
312   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
313   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
314   | --oldin | --oldi | --old | --ol | --o)
315     ac_prev=oldincludedir ;;
316   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
317   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
318   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
319     oldincludedir="$ac_optarg" ;;
320
321   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
322     ac_prev=prefix ;;
323   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
324     prefix="$ac_optarg" ;;
325
326   -program-prefix | --program-prefix | --program-prefi | --program-pref \
327   | --program-pre | --program-pr | --program-p)
328     ac_prev=program_prefix ;;
329   -program-prefix=* | --program-prefix=* | --program-prefi=* \
330   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
331     program_prefix="$ac_optarg" ;;
332
333   -program-suffix | --program-suffix | --program-suffi | --program-suff \
334   | --program-suf | --program-su | --program-s)
335     ac_prev=program_suffix ;;
336   -program-suffix=* | --program-suffix=* | --program-suffi=* \
337   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
338     program_suffix="$ac_optarg" ;;
339
340   -program-transform-name | --program-transform-name \
341   | --program-transform-nam | --program-transform-na \
342   | --program-transform-n | --program-transform- \
343   | --program-transform | --program-transfor \
344   | --program-transfo | --program-transf \
345   | --program-trans | --program-tran \
346   | --progr-tra | --program-tr | --program-t)
347     ac_prev=program_transform_name ;;
348   -program-transform-name=* | --program-transform-name=* \
349   | --program-transform-nam=* | --program-transform-na=* \
350   | --program-transform-n=* | --program-transform-=* \
351   | --program-transform=* | --program-transfor=* \
352   | --program-transfo=* | --program-transf=* \
353   | --program-trans=* | --program-tran=* \
354   | --progr-tra=* | --program-tr=* | --program-t=*)
355     program_transform_name="$ac_optarg" ;;
356
357   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
358   | -silent | --silent | --silen | --sile | --sil)
359     silent=yes ;;
360
361   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
362     ac_prev=sbindir ;;
363   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
364   | --sbi=* | --sb=*)
365     sbindir="$ac_optarg" ;;
366
367   -sharedstatedir | --sharedstatedir | --sharedstatedi \
368   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
369   | --sharedst | --shareds | --shared | --share | --shar \
370   | --sha | --sh)
371     ac_prev=sharedstatedir ;;
372   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
373   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
374   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
375   | --sha=* | --sh=*)
376     sharedstatedir="$ac_optarg" ;;
377
378   -site | --site | --sit)
379     ac_prev=site ;;
380   -site=* | --site=* | --sit=*)
381     site="$ac_optarg" ;;
382
383   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
384     ac_prev=srcdir ;;
385   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
386     srcdir="$ac_optarg" ;;
387
388   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
389   | --syscon | --sysco | --sysc | --sys | --sy)
390     ac_prev=sysconfdir ;;
391   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
392   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
393     sysconfdir="$ac_optarg" ;;
394
395   -target | --target | --targe | --targ | --tar | --ta | --t)
396     ac_prev=target ;;
397   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
398     target="$ac_optarg" ;;
399
400   -v | -verbose | --verbose | --verbos | --verbo | --verb)
401     verbose=yes ;;
402
403   -version | --version | --versio | --versi | --vers)
404     echo "configure generated by autoconf version 2.13"
405     exit 0 ;;
406
407   -with-* | --with-*)
408     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
409     # Reject names that are not valid shell variable names.
410     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
411       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
412     fi
413     ac_package=`echo $ac_package| sed 's/-/_/g'`
414     case "$ac_option" in
415       *=*) ;;
416       *) ac_optarg=yes ;;
417     esac
418     eval "with_${ac_package}='$ac_optarg'" ;;
419
420   -without-* | --without-*)
421     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
422     # Reject names that are not valid shell variable names.
423     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
424       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
425     fi
426     ac_package=`echo $ac_package| sed 's/-/_/g'`
427     eval "with_${ac_package}=no" ;;
428
429   --x)
430     # Obsolete; use --with-x.
431     with_x=yes ;;
432
433   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
434   | --x-incl | --x-inc | --x-in | --x-i)
435     ac_prev=x_includes ;;
436   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
437   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
438     x_includes="$ac_optarg" ;;
439
440   -x-libraries | --x-libraries | --x-librarie | --x-librari \
441   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
442     ac_prev=x_libraries ;;
443   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
444   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
445     x_libraries="$ac_optarg" ;;
446
447   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
448     ;;
449
450   *)
451     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
452       echo "configure: warning: $ac_option: invalid host type" 1>&2
453     fi
454     if test "x$nonopt" != xNONE; then
455       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
456     fi
457     nonopt="$ac_option"
458     ;;
459
460   esac
461 done
462
463 if test -n "$ac_prev"; then
464   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
465 fi
466
467 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
468
469 # File descriptor usage:
470 # 0 standard input
471 # 1 file creation
472 # 2 errors and warnings
473 # 3 some systems may open it to /dev/tty
474 # 4 used on the Kubota Titan
475 # 6 checking for... messages and results
476 # 5 compiler messages saved in config.log
477 if test "$silent" = yes; then
478   exec 6>/dev/null
479 else
480   exec 6>&1
481 fi
482 exec 5>./config.log
483
484 echo "\
485 This file contains any messages produced by compilers while
486 running configure, to aid debugging if configure makes a mistake.
487 " 1>&5
488
489 # Strip out --no-create and --no-recursion so they do not pile up.
490 # Also quote any args containing shell metacharacters.
491 ac_configure_args=
492 for ac_arg
493 do
494   case "$ac_arg" in
495   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
496   | --no-cr | --no-c) ;;
497   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
498   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
499   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
500   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
501   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
502   esac
503 done
504
505 # NLS nuisances.
506 # Only set these to C if already set.  These must not be set unconditionally
507 # because not all systems understand e.g. LANG=C (notably SCO).
508 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
509 # Non-C LC_CTYPE values break the ctype check.
510 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
511 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
512 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
513 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
514
515 # confdefs.h avoids OS command line length limits that DEFS can exceed.
516 rm -rf conftest* confdefs.h
517 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
518 echo > confdefs.h
519
520 # A filename unique to this package, relative to the directory that
521 # configure is in, which we can look for to find out if srcdir is correct.
522 ac_unique_file=include/includes.h
523
524 # Find the source files, if location was not specified.
525 if test -z "$srcdir"; then
526   ac_srcdir_defaulted=yes
527   # Try the directory containing this script, then its parent.
528   ac_prog=$0
529   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
530   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
531   srcdir=$ac_confdir
532   if test ! -r $srcdir/$ac_unique_file; then
533     srcdir=..
534   fi
535 else
536   ac_srcdir_defaulted=no
537 fi
538 if test ! -r $srcdir/$ac_unique_file; then
539   if test "$ac_srcdir_defaulted" = yes; then
540     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
541   else
542     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
543   fi
544 fi
545 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
546
547 # Prefer explicitly selected file to automatically selected ones.
548 if test -z "$CONFIG_SITE"; then
549   if test "x$prefix" != xNONE; then
550     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
551   else
552     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
553   fi
554 fi
555 for ac_site_file in $CONFIG_SITE; do
556   if test -r "$ac_site_file"; then
557     echo "loading site script $ac_site_file"
558     . "$ac_site_file"
559   fi
560 done
561
562 if test -r "$cache_file"; then
563   echo "loading cache $cache_file"
564   . $cache_file
565 else
566   echo "creating cache $cache_file"
567   > $cache_file
568 fi
569
570 ac_ext=c
571 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
572 ac_cpp='$CPP $CPPFLAGS'
573 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
574 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
575 cross_compiling=$ac_cv_prog_cc_cross
576
577 ac_exeext=
578 ac_objext=o
579 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
580   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
581   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
582     ac_n= ac_c='
583 ' ac_t='        '
584   else
585     ac_n=-n ac_c= ac_t=
586   fi
587 else
588   ac_n= ac_c='\c' ac_t=
589 fi
590
591
592
593 # we want to be compatibe with older versions of Samba
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611 # compile with optimisation and without debugging by default
612 CFLAGS="-O ${CFLAGS}"
613
614 # Check whether --enable-debug or --disable-debug was given.
615 if test "${enable_debug+set}" = set; then
616   enableval="$enable_debug"
617   if eval "test x$enable_debug = xyes"; then
618         CFLAGS="${CFLAGS} -g"
619     fi
620 fi
621
622
623 # Check whether --enable-developer or --disable-developer was given.
624 if test "${enable_developer+set}" = set; then
625   enableval="$enable_developer"
626   if eval "test x$enable_developer = xyes"; then
627         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
628     fi
629 fi
630
631
632 # Extract the first word of "gcc", so it can be a program name with args.
633 set dummy gcc; ac_word=$2
634 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
635 echo "configure:636: checking for $ac_word" >&5
636 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
637   echo $ac_n "(cached) $ac_c" 1>&6
638 else
639   if test -n "$CC"; then
640   ac_cv_prog_CC="$CC" # Let the user override the test.
641 else
642   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
643   ac_dummy="$PATH"
644   for ac_dir in $ac_dummy; do
645     test -z "$ac_dir" && ac_dir=.
646     if test -f $ac_dir/$ac_word; then
647       ac_cv_prog_CC="gcc"
648       break
649     fi
650   done
651   IFS="$ac_save_ifs"
652 fi
653 fi
654 CC="$ac_cv_prog_CC"
655 if test -n "$CC"; then
656   echo "$ac_t""$CC" 1>&6
657 else
658   echo "$ac_t""no" 1>&6
659 fi
660
661 if test -z "$CC"; then
662   # Extract the first word of "cc", so it can be a program name with args.
663 set dummy cc; ac_word=$2
664 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
665 echo "configure:666: checking for $ac_word" >&5
666 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
667   echo $ac_n "(cached) $ac_c" 1>&6
668 else
669   if test -n "$CC"; then
670   ac_cv_prog_CC="$CC" # Let the user override the test.
671 else
672   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
673   ac_prog_rejected=no
674   ac_dummy="$PATH"
675   for ac_dir in $ac_dummy; do
676     test -z "$ac_dir" && ac_dir=.
677     if test -f $ac_dir/$ac_word; then
678       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
679         ac_prog_rejected=yes
680         continue
681       fi
682       ac_cv_prog_CC="cc"
683       break
684     fi
685   done
686   IFS="$ac_save_ifs"
687 if test $ac_prog_rejected = yes; then
688   # We found a bogon in the path, so make sure we never use it.
689   set dummy $ac_cv_prog_CC
690   shift
691   if test $# -gt 0; then
692     # We chose a different compiler from the bogus one.
693     # However, it has the same basename, so the bogon will be chosen
694     # first if we set CC to just the basename; use the full file name.
695     shift
696     set dummy "$ac_dir/$ac_word" "$@"
697     shift
698     ac_cv_prog_CC="$@"
699   fi
700 fi
701 fi
702 fi
703 CC="$ac_cv_prog_CC"
704 if test -n "$CC"; then
705   echo "$ac_t""$CC" 1>&6
706 else
707   echo "$ac_t""no" 1>&6
708 fi
709
710   if test -z "$CC"; then
711     case "`uname -s`" in
712     *win32* | *WIN32*)
713       # Extract the first word of "cl", so it can be a program name with args.
714 set dummy cl; ac_word=$2
715 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
716 echo "configure:717: checking for $ac_word" >&5
717 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
718   echo $ac_n "(cached) $ac_c" 1>&6
719 else
720   if test -n "$CC"; then
721   ac_cv_prog_CC="$CC" # Let the user override the test.
722 else
723   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
724   ac_dummy="$PATH"
725   for ac_dir in $ac_dummy; do
726     test -z "$ac_dir" && ac_dir=.
727     if test -f $ac_dir/$ac_word; then
728       ac_cv_prog_CC="cl"
729       break
730     fi
731   done
732   IFS="$ac_save_ifs"
733 fi
734 fi
735 CC="$ac_cv_prog_CC"
736 if test -n "$CC"; then
737   echo "$ac_t""$CC" 1>&6
738 else
739   echo "$ac_t""no" 1>&6
740 fi
741  ;;
742     esac
743   fi
744   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
745 fi
746
747 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
748 echo "configure:749: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
749
750 ac_ext=c
751 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
752 ac_cpp='$CPP $CPPFLAGS'
753 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
754 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
755 cross_compiling=$ac_cv_prog_cc_cross
756
757 cat > conftest.$ac_ext << EOF
758
759 #line 760 "configure"
760 #include "confdefs.h"
761
762 main(){return(0);}
763 EOF
764 if { (eval echo configure:765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
765   ac_cv_prog_cc_works=yes
766   # If we can't run a trivial program, we are probably using a cross compiler.
767   if (./conftest; exit) 2>/dev/null; then
768     ac_cv_prog_cc_cross=no
769   else
770     ac_cv_prog_cc_cross=yes
771   fi
772 else
773   echo "configure: failed program was:" >&5
774   cat conftest.$ac_ext >&5
775   ac_cv_prog_cc_works=no
776 fi
777 rm -fr conftest*
778 ac_ext=c
779 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
780 ac_cpp='$CPP $CPPFLAGS'
781 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
782 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
783 cross_compiling=$ac_cv_prog_cc_cross
784
785 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
786 if test $ac_cv_prog_cc_works = no; then
787   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
788 fi
789 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
790 echo "configure:791: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
791 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
792 cross_compiling=$ac_cv_prog_cc_cross
793
794 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
795 echo "configure:796: checking whether we are using GNU C" >&5
796 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
797   echo $ac_n "(cached) $ac_c" 1>&6
798 else
799   cat > conftest.c <<EOF
800 #ifdef __GNUC__
801   yes;
802 #endif
803 EOF
804 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
805   ac_cv_prog_gcc=yes
806 else
807   ac_cv_prog_gcc=no
808 fi
809 fi
810
811 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
812
813 if test $ac_cv_prog_gcc = yes; then
814   GCC=yes
815 else
816   GCC=
817 fi
818
819 ac_test_CFLAGS="${CFLAGS+set}"
820 ac_save_CFLAGS="$CFLAGS"
821 CFLAGS=
822 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
823 echo "configure:824: checking whether ${CC-cc} accepts -g" >&5
824 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
825   echo $ac_n "(cached) $ac_c" 1>&6
826 else
827   echo 'void f(){}' > conftest.c
828 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
829   ac_cv_prog_cc_g=yes
830 else
831   ac_cv_prog_cc_g=no
832 fi
833 rm -f conftest*
834
835 fi
836
837 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
838 if test "$ac_test_CFLAGS" = set; then
839   CFLAGS="$ac_save_CFLAGS"
840 elif test $ac_cv_prog_cc_g = yes; then
841   if test "$GCC" = yes; then
842     CFLAGS="-g -O2"
843   else
844     CFLAGS="-g"
845   fi
846 else
847   if test "$GCC" = yes; then
848     CFLAGS="-O2"
849   else
850     CFLAGS=
851   fi
852 fi
853
854 ac_aux_dir=
855 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
856   if test -f $ac_dir/install-sh; then
857     ac_aux_dir=$ac_dir
858     ac_install_sh="$ac_aux_dir/install-sh -c"
859     break
860   elif test -f $ac_dir/install.sh; then
861     ac_aux_dir=$ac_dir
862     ac_install_sh="$ac_aux_dir/install.sh -c"
863     break
864   fi
865 done
866 if test -z "$ac_aux_dir"; then
867   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
868 fi
869 ac_config_guess=$ac_aux_dir/config.guess
870 ac_config_sub=$ac_aux_dir/config.sub
871 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
872
873 # Find a good install program.  We prefer a C program (faster),
874 # so one script is as good as another.  But avoid the broken or
875 # incompatible versions:
876 # SysV /etc/install, /usr/sbin/install
877 # SunOS /usr/etc/install
878 # IRIX /sbin/install
879 # AIX /bin/install
880 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
881 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
882 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
883 # ./install, which can be erroneously created by make from ./install.sh.
884 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
885 echo "configure:886: checking for a BSD compatible install" >&5
886 if test -z "$INSTALL"; then
887 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
888   echo $ac_n "(cached) $ac_c" 1>&6
889 else
890     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
891   for ac_dir in $PATH; do
892     # Account for people who put trailing slashes in PATH elements.
893     case "$ac_dir/" in
894     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
895     *)
896       # OSF1 and SCO ODT 3.0 have their own names for install.
897       # Don't use installbsd from OSF since it installs stuff as root
898       # by default.
899       for ac_prog in ginstall scoinst install; do
900         if test -f $ac_dir/$ac_prog; then
901           if test $ac_prog = install &&
902             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
903             # AIX install.  It has an incompatible calling convention.
904             :
905           else
906             ac_cv_path_install="$ac_dir/$ac_prog -c"
907             break 2
908           fi
909         fi
910       done
911       ;;
912     esac
913   done
914   IFS="$ac_save_IFS"
915
916 fi
917   if test "${ac_cv_path_install+set}" = set; then
918     INSTALL="$ac_cv_path_install"
919   else
920     # As a last resort, use the slow shell script.  We don't cache a
921     # path for INSTALL within a source directory, because that will
922     # break other packages using the cache if that directory is
923     # removed, or if the path is relative.
924     INSTALL="$ac_install_sh"
925   fi
926 fi
927 echo "$ac_t""$INSTALL" 1>&6
928
929 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
930 # It thinks the first close brace ends the variable substitution.
931 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
932
933 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
934
935 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
936
937 for ac_prog in mawk gawk nawk awk
938 do
939 # Extract the first word of "$ac_prog", so it can be a program name with args.
940 set dummy $ac_prog; ac_word=$2
941 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
942 echo "configure:943: checking for $ac_word" >&5
943 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
944   echo $ac_n "(cached) $ac_c" 1>&6
945 else
946   if test -n "$AWK"; then
947   ac_cv_prog_AWK="$AWK" # Let the user override the test.
948 else
949   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
950   ac_dummy="$PATH"
951   for ac_dir in $ac_dummy; do
952     test -z "$ac_dir" && ac_dir=.
953     if test -f $ac_dir/$ac_word; then
954       ac_cv_prog_AWK="$ac_prog"
955       break
956     fi
957   done
958   IFS="$ac_save_ifs"
959 fi
960 fi
961 AWK="$ac_cv_prog_AWK"
962 if test -n "$AWK"; then
963   echo "$ac_t""$AWK" 1>&6
964 else
965   echo "$ac_t""no" 1>&6
966 fi
967
968 test -n "$AWK" && break
969 done
970
971
972 if test "x$CC" != xcc; then
973   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
974 echo "configure:975: checking whether $CC and cc understand -c and -o together" >&5
975 else
976   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
977 echo "configure:978: checking whether cc understands -c and -o together" >&5
978 fi
979 set dummy $CC; ac_cc="`echo $2 |
980                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
981 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
982   echo $ac_n "(cached) $ac_c" 1>&6
983 else
984   echo 'foo(){}' > conftest.c
985 # Make sure it works both with $CC and with simple cc.
986 # We do the test twice because some compilers refuse to overwrite an
987 # existing .o file with -o, though they will create one.
988 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
989 if { (eval echo configure:990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
990    test -f conftest.o && { (eval echo configure:991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
991 then
992   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
993   if test "x$CC" != xcc; then
994     # Test first that cc exists at all.
995     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
996       ac_try='cc -c conftest.c -o conftest.o 1>&5'
997       if { (eval echo configure:998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
998          test -f conftest.o && { (eval echo configure:999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
999       then
1000         # cc works too.
1001         :
1002       else
1003         # cc exists but doesn't like -o.
1004         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1005       fi
1006     fi
1007   fi
1008 else
1009   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1010 fi
1011 rm -f conftest*
1012
1013 fi
1014 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1015   echo "$ac_t""yes" 1>&6
1016 else
1017   echo "$ac_t""no" 1>&6
1018   cat >> confdefs.h <<\EOF
1019 #define NO_MINUS_C_MINUS_O 1
1020 EOF
1021
1022 fi
1023
1024 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1025       BROKEN_CC=
1026 else
1027       BROKEN_CC=#
1028 fi
1029
1030
1031 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1032 echo "configure:1033: checking that the C compiler understands volatile" >&5
1033 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1034   echo $ac_n "(cached) $ac_c" 1>&6
1035 else
1036   
1037     cat > conftest.$ac_ext <<EOF
1038 #line 1039 "configure"
1039 #include "confdefs.h"
1040 #include <sys/types.h>
1041 int main() {
1042 volatile int i = 0
1043 ; return 0; }
1044 EOF
1045 if { (eval echo configure:1046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1046   rm -rf conftest*
1047   samba_cv_volatile=yes
1048 else
1049   echo "configure: failed program was:" >&5
1050   cat conftest.$ac_ext >&5
1051   rm -rf conftest*
1052   samba_cv_volatile=no
1053 fi
1054 rm -f conftest*
1055 fi
1056
1057 echo "$ac_t""$samba_cv_volatile" 1>&6
1058 if test x"$samba_cv_volatile" = x"yes"; then
1059    cat >> confdefs.h <<\EOF
1060 #define HAVE_VOLATILE 1
1061 EOF
1062
1063 fi
1064
1065
1066
1067 # Do some error checking and defaulting for the host and target type.
1068 # The inputs are:
1069 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1070 #
1071 # The rules are:
1072 # 1. You are not allowed to specify --host, --target, and nonopt at the
1073 #    same time.
1074 # 2. Host defaults to nonopt.
1075 # 3. If nonopt is not specified, then host defaults to the current host,
1076 #    as determined by config.guess.
1077 # 4. Target and build default to nonopt.
1078 # 5. If nonopt is not specified, then target and build default to host.
1079
1080 # The aliases save the names the user supplied, while $host etc.
1081 # will get canonicalized.
1082 case $host---$target---$nonopt in
1083 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1084 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1085 esac
1086
1087
1088 # Make sure we can run config.sub.
1089 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1090 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1091 fi
1092
1093 echo $ac_n "checking host system type""... $ac_c" 1>&6
1094 echo "configure:1095: checking host system type" >&5
1095
1096 host_alias=$host
1097 case "$host_alias" in
1098 NONE)
1099   case $nonopt in
1100   NONE)
1101     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1102     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1103     fi ;;
1104   *) host_alias=$nonopt ;;
1105   esac ;;
1106 esac
1107
1108 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1109 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1110 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1111 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1112 echo "$ac_t""$host" 1>&6
1113
1114 echo $ac_n "checking target system type""... $ac_c" 1>&6
1115 echo "configure:1116: checking target system type" >&5
1116
1117 target_alias=$target
1118 case "$target_alias" in
1119 NONE)
1120   case $nonopt in
1121   NONE) target_alias=$host_alias ;;
1122   *) target_alias=$nonopt ;;
1123   esac ;;
1124 esac
1125
1126 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1127 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1128 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1129 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1130 echo "$ac_t""$target" 1>&6
1131
1132 echo $ac_n "checking build system type""... $ac_c" 1>&6
1133 echo "configure:1134: checking build system type" >&5
1134
1135 build_alias=$build
1136 case "$build_alias" in
1137 NONE)
1138   case $nonopt in
1139   NONE) build_alias=$host_alias ;;
1140   *) build_alias=$nonopt ;;
1141   esac ;;
1142 esac
1143
1144 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1145 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1146 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1147 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1148 echo "$ac_t""$build" 1>&6
1149
1150 test "$host_alias" != "$target_alias" &&
1151   test "$program_prefix$program_suffix$program_transform_name" = \
1152     NONENONEs,x,x, &&
1153   program_prefix=${target_alias}-
1154
1155
1156   case "$host_os" in
1157         *irix6*) cat >> confdefs.h <<\EOF
1158 #include <standards.h>
1159 EOF
1160
1161         ;;
1162 esac
1163
1164
1165     
1166     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1167 echo "configure:1168: checking config.cache system type" >&5
1168     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1169          test x"$ac_cv_host_system_type" != x"$host"; } ||
1170        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1171          test x"$ac_cv_build_system_type" != x"$build"; } ||
1172        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1173          test x"$ac_cv_target_system_type" != x"$target"; }; then
1174         echo "$ac_t""different" 1>&6
1175         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1176     else
1177         echo "$ac_t""same" 1>&6
1178     fi
1179     ac_cv_host_system_type="$host"
1180     ac_cv_build_system_type="$build"
1181     ac_cv_target_system_type="$target"
1182
1183
1184 #
1185 # Config CPPFLAG settings for strange OS's that must be set
1186 # before other tests.
1187 #
1188 case "$host_os" in
1189 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1190     *hpux*)
1191       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1192 echo "configure:1193: checking whether ${CC-cc} accepts -Ae" >&5
1193 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1194   echo $ac_n "(cached) $ac_c" 1>&6
1195 else
1196   echo 'void f(){}' > conftest.c
1197 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1198   ac_cv_prog_cc_Ae=yes
1199 else
1200   ac_cv_prog_cc_Ae=no
1201 fi
1202 rm -f conftest*
1203
1204 fi
1205
1206 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1207       # mmap on HPUX is completely broken...
1208       cat >> confdefs.h <<\EOF
1209 #define MMAP_BLACKLIST 1
1210 EOF
1211
1212       if test $ac_cv_prog_cc_Ae = yes; then
1213         CPPFLAGS="$CPPFLAGS -Ae"
1214       fi
1215 #
1216 # Defines needed for HPUX support.
1217 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1218 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1219 #
1220       case `uname -r` in
1221                         *9*|*10*)
1222                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1223                                 cat >> confdefs.h <<\EOF
1224 #define USE_BOTH_CRYPT_CALLS 1
1225 EOF
1226
1227                                 ;;
1228                         *11*)
1229                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1230                                 cat >> confdefs.h <<\EOF
1231 #define USE_BOTH_CRYPT_CALLS 1
1232 EOF
1233
1234                                 ;;
1235       esac
1236       ;;
1237 #
1238 # AIX4.x doesn't even admit to having large
1239 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1240 #
1241     *aix4*)
1242           echo "$ac_t""enabling large file support" 1>&6
1243       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1244       ;;    
1245 #
1246 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1247 # to the existance of large files..
1248 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1249 # recommendations on large file support, however it makes the
1250 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1251 # recommendation makes the compile fail on gcc2.7. JRA.
1252 #
1253         *solaris*)
1254                 case `uname -r` in
1255                         5.0*|5.1*|5.2*|5.3*|5.5*)
1256                                 echo "$ac_t""no large file support" 1>&6
1257                                 ;;
1258                         5.*)
1259                         echo "$ac_t""enabling large file support" 1>&6
1260                         if test "$ac_cv_prog_gcc" = yes; then
1261                                 ${CC-cc} -v >conftest.c 2>&1
1262                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1263                                 rm -fr conftest.c
1264                                 case "$ac_cv_gcc_compiler_version_number" in
1265                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1266                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1267                                                 ;;
1268                                         *)
1269                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1270                                                 ;;
1271                                 esac
1272                         else
1273                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1274                         fi
1275                         ;;
1276                 esac
1277                 ;;
1278 #
1279 # Tests needed for SINIX large file support.
1280 #
1281     *sysv4*)
1282       if test $host = mips-sni-sysv4 ; then
1283         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1284 echo "configure:1285: checking for LFS support" >&5
1285         old_CPPFLAGS="$CPPFLAGS"
1286         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1287         if test "$cross_compiling" = yes; then
1288   SINIX_LFS_SUPPORT=cross
1289 else
1290   cat > conftest.$ac_ext <<EOF
1291 #line 1292 "configure"
1292 #include "confdefs.h"
1293
1294 #include <unistd.h>
1295 main () {
1296 #if _LFS64_LARGEFILE == 1
1297 exit(0);
1298 #else
1299 exit(1);
1300 #endif
1301 }
1302 EOF
1303 if { (eval echo configure:1304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1304 then
1305   SINIX_LFS_SUPPORT=yes
1306 else
1307   echo "configure: failed program was:" >&5
1308   cat conftest.$ac_ext >&5
1309   rm -fr conftest*
1310   SINIX_LFS_SUPPORT=no
1311 fi
1312 rm -fr conftest*
1313 fi
1314
1315         CPPFLAGS="$old_CPPFLAGS"
1316         if test x$SINIX_LFS_SUPPORT = xyes ; then
1317           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1318           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1319           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1320           LIBS="`getconf LFS64_LIBS` $LIBS"
1321         fi
1322       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1323       fi
1324     ;;
1325
1326 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1327 #
1328     *linux*)
1329         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1330 echo "configure:1331: checking for LFS support" >&5
1331         old_CPPFLAGS="$CPPFLAGS"
1332         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1333        if test "$cross_compiling" = yes; then
1334   LINUX_LFS_SUPPORT=cross
1335 else
1336   cat > conftest.$ac_ext <<EOF
1337 #line 1338 "configure"
1338 #include "confdefs.h"
1339
1340 #include <unistd.h>
1341 #include <sys/utsname.h>
1342 main() {
1343 #if _LFS64_LARGEFILE == 1
1344        struct utsname uts;
1345        char *release;
1346        int major, minor;
1347
1348        /* Ensure this is glibc 2.2 or higher */
1349 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1350        int libc_major = __GLIBC__;
1351        int libc_minor = __GLIBC_MINOR__;
1352
1353        if (libc_major < 2)
1354               exit(1);
1355        if (libc_minor < 2)
1356               exit(1);
1357 #endif
1358
1359        /* Ensure this is kernel 2.4 or higher */
1360
1361        uname(&uts);
1362        release = uts.release;
1363        major = atoi(strsep(&release, "."));
1364        minor = atoi(strsep(&release, "."));
1365
1366        if (major > 2 || (major == 2 && minor > 3))
1367                exit(0);
1368        exit(1);
1369 #else
1370        exit(1);
1371 #endif
1372 }
1373
1374 EOF
1375 if { (eval echo configure:1376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1376 then
1377   LINUX_LFS_SUPPORT=yes
1378 else
1379   echo "configure: failed program was:" >&5
1380   cat conftest.$ac_ext >&5
1381   rm -fr conftest*
1382   LINUX_LFS_SUPPORT=no
1383 fi
1384 rm -fr conftest*
1385 fi
1386
1387         CPPFLAGS="$old_CPPFLAGS"
1388         if test x$LINUX_LFS_SUPPORT = xyes ; then
1389           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1390         fi
1391        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1392                 ;;
1393
1394     *hurd*)
1395         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1396 echo "configure:1397: checking for LFS support" >&5
1397         old_CPPFLAGS="$CPPFLAGS"
1398         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1399         if test "$cross_compiling" = yes; then
1400   GLIBC_LFS_SUPPORT=cross
1401 else
1402   cat > conftest.$ac_ext <<EOF
1403 #line 1404 "configure"
1404 #include "confdefs.h"
1405
1406 #include <unistd.h>
1407 main () {
1408 #if _LFS64_LARGEFILE == 1
1409 exit(0);
1410 #else
1411 exit(1);
1412 #endif
1413 }
1414 EOF
1415 if { (eval echo configure:1416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1416 then
1417   GLIBC_LFS_SUPPORT=yes
1418 else
1419   echo "configure: failed program was:" >&5
1420   cat conftest.$ac_ext >&5
1421   rm -fr conftest*
1422   GLIBC_LFS_SUPPORT=no
1423 fi
1424 rm -fr conftest*
1425 fi
1426
1427         CPPFLAGS="$old_CPPFLAGS"
1428         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1429           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1430         fi
1431       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1432     ;;
1433
1434 esac
1435
1436 echo $ac_n "checking for inline""... $ac_c" 1>&6
1437 echo "configure:1438: checking for inline" >&5
1438 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1439   echo $ac_n "(cached) $ac_c" 1>&6
1440 else
1441   ac_cv_c_inline=no
1442 for ac_kw in inline __inline__ __inline; do
1443   cat > conftest.$ac_ext <<EOF
1444 #line 1445 "configure"
1445 #include "confdefs.h"
1446
1447 int main() {
1448 } $ac_kw foo() {
1449 ; return 0; }
1450 EOF
1451 if { (eval echo configure:1452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1452   rm -rf conftest*
1453   ac_cv_c_inline=$ac_kw; break
1454 else
1455   echo "configure: failed program was:" >&5
1456   cat conftest.$ac_ext >&5
1457 fi
1458 rm -f conftest*
1459 done
1460
1461 fi
1462
1463 echo "$ac_t""$ac_cv_c_inline" 1>&6
1464 case "$ac_cv_c_inline" in
1465   inline | yes) ;;
1466   no) cat >> confdefs.h <<\EOF
1467 #define inline 
1468 EOF
1469  ;;
1470   *)  cat >> confdefs.h <<EOF
1471 #define inline $ac_cv_c_inline
1472 EOF
1473  ;;
1474 esac
1475
1476 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1477 echo "configure:1478: checking how to run the C preprocessor" >&5
1478 # On Suns, sometimes $CPP names a directory.
1479 if test -n "$CPP" && test -d "$CPP"; then
1480   CPP=
1481 fi
1482 if test -z "$CPP"; then
1483 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1484   echo $ac_n "(cached) $ac_c" 1>&6
1485 else
1486     # This must be in double quotes, not single quotes, because CPP may get
1487   # substituted into the Makefile and "${CC-cc}" will confuse make.
1488   CPP="${CC-cc} -E"
1489   # On the NeXT, cc -E runs the code through the compiler's parser,
1490   # not just through cpp.
1491   cat > conftest.$ac_ext <<EOF
1492 #line 1493 "configure"
1493 #include "confdefs.h"
1494 #include <assert.h>
1495 Syntax Error
1496 EOF
1497 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1498 { (eval echo configure:1499: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1499 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1500 if test -z "$ac_err"; then
1501   :
1502 else
1503   echo "$ac_err" >&5
1504   echo "configure: failed program was:" >&5
1505   cat conftest.$ac_ext >&5
1506   rm -rf conftest*
1507   CPP="${CC-cc} -E -traditional-cpp"
1508   cat > conftest.$ac_ext <<EOF
1509 #line 1510 "configure"
1510 #include "confdefs.h"
1511 #include <assert.h>
1512 Syntax Error
1513 EOF
1514 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1515 { (eval echo configure:1516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1516 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1517 if test -z "$ac_err"; then
1518   :
1519 else
1520   echo "$ac_err" >&5
1521   echo "configure: failed program was:" >&5
1522   cat conftest.$ac_ext >&5
1523   rm -rf conftest*
1524   CPP="${CC-cc} -nologo -E"
1525   cat > conftest.$ac_ext <<EOF
1526 #line 1527 "configure"
1527 #include "confdefs.h"
1528 #include <assert.h>
1529 Syntax Error
1530 EOF
1531 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1532 { (eval echo configure:1533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1533 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1534 if test -z "$ac_err"; then
1535   :
1536 else
1537   echo "$ac_err" >&5
1538   echo "configure: failed program was:" >&5
1539   cat conftest.$ac_ext >&5
1540   rm -rf conftest*
1541   CPP=/lib/cpp
1542 fi
1543 rm -f conftest*
1544 fi
1545 rm -f conftest*
1546 fi
1547 rm -f conftest*
1548   ac_cv_prog_CPP="$CPP"
1549 fi
1550   CPP="$ac_cv_prog_CPP"
1551 else
1552   ac_cv_prog_CPP="$CPP"
1553 fi
1554 echo "$ac_t""$CPP" 1>&6
1555
1556 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1557 echo "configure:1558: checking for ANSI C header files" >&5
1558 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1559   echo $ac_n "(cached) $ac_c" 1>&6
1560 else
1561   cat > conftest.$ac_ext <<EOF
1562 #line 1563 "configure"
1563 #include "confdefs.h"
1564 #include <stdlib.h>
1565 #include <stdarg.h>
1566 #include <string.h>
1567 #include <float.h>
1568 EOF
1569 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1570 { (eval echo configure:1571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1571 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1572 if test -z "$ac_err"; then
1573   rm -rf conftest*
1574   ac_cv_header_stdc=yes
1575 else
1576   echo "$ac_err" >&5
1577   echo "configure: failed program was:" >&5
1578   cat conftest.$ac_ext >&5
1579   rm -rf conftest*
1580   ac_cv_header_stdc=no
1581 fi
1582 rm -f conftest*
1583
1584 if test $ac_cv_header_stdc = yes; then
1585   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1586 cat > conftest.$ac_ext <<EOF
1587 #line 1588 "configure"
1588 #include "confdefs.h"
1589 #include <string.h>
1590 EOF
1591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1592   egrep "memchr" >/dev/null 2>&1; then
1593   :
1594 else
1595   rm -rf conftest*
1596   ac_cv_header_stdc=no
1597 fi
1598 rm -f conftest*
1599
1600 fi
1601
1602 if test $ac_cv_header_stdc = yes; then
1603   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1604 cat > conftest.$ac_ext <<EOF
1605 #line 1606 "configure"
1606 #include "confdefs.h"
1607 #include <stdlib.h>
1608 EOF
1609 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1610   egrep "free" >/dev/null 2>&1; then
1611   :
1612 else
1613   rm -rf conftest*
1614   ac_cv_header_stdc=no
1615 fi
1616 rm -f conftest*
1617
1618 fi
1619
1620 if test $ac_cv_header_stdc = yes; then
1621   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1622 if test "$cross_compiling" = yes; then
1623   :
1624 else
1625   cat > conftest.$ac_ext <<EOF
1626 #line 1627 "configure"
1627 #include "confdefs.h"
1628 #include <ctype.h>
1629 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1630 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1631 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1632 int main () { int i; for (i = 0; i < 256; i++)
1633 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1634 exit (0); }
1635
1636 EOF
1637 if { (eval echo configure:1638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1638 then
1639   :
1640 else
1641   echo "configure: failed program was:" >&5
1642   cat conftest.$ac_ext >&5
1643   rm -fr conftest*
1644   ac_cv_header_stdc=no
1645 fi
1646 rm -fr conftest*
1647 fi
1648
1649 fi
1650 fi
1651
1652 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1653 if test $ac_cv_header_stdc = yes; then
1654   cat >> confdefs.h <<\EOF
1655 #define STDC_HEADERS 1
1656 EOF
1657
1658 fi
1659
1660 ac_header_dirent=no
1661 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1662 do
1663 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1664 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1665 echo "configure:1666: checking for $ac_hdr that defines DIR" >&5
1666 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1667   echo $ac_n "(cached) $ac_c" 1>&6
1668 else
1669   cat > conftest.$ac_ext <<EOF
1670 #line 1671 "configure"
1671 #include "confdefs.h"
1672 #include <sys/types.h>
1673 #include <$ac_hdr>
1674 int main() {
1675 DIR *dirp = 0;
1676 ; return 0; }
1677 EOF
1678 if { (eval echo configure:1679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1679   rm -rf conftest*
1680   eval "ac_cv_header_dirent_$ac_safe=yes"
1681 else
1682   echo "configure: failed program was:" >&5
1683   cat conftest.$ac_ext >&5
1684   rm -rf conftest*
1685   eval "ac_cv_header_dirent_$ac_safe=no"
1686 fi
1687 rm -f conftest*
1688 fi
1689 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1690   echo "$ac_t""yes" 1>&6
1691     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1692   cat >> confdefs.h <<EOF
1693 #define $ac_tr_hdr 1
1694 EOF
1695  ac_header_dirent=$ac_hdr; break
1696 else
1697   echo "$ac_t""no" 1>&6
1698 fi
1699 done
1700 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1701 if test $ac_header_dirent = dirent.h; then
1702 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1703 echo "configure:1704: checking for opendir in -ldir" >&5
1704 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1705 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1706   echo $ac_n "(cached) $ac_c" 1>&6
1707 else
1708   ac_save_LIBS="$LIBS"
1709 LIBS="-ldir  $LIBS"
1710 cat > conftest.$ac_ext <<EOF
1711 #line 1712 "configure"
1712 #include "confdefs.h"
1713 /* Override any gcc2 internal prototype to avoid an error.  */
1714 /* We use char because int might match the return type of a gcc2
1715     builtin and then its argument prototype would still apply.  */
1716 char opendir();
1717
1718 int main() {
1719 opendir()
1720 ; return 0; }
1721 EOF
1722 if { (eval echo configure:1723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1723   rm -rf conftest*
1724   eval "ac_cv_lib_$ac_lib_var=yes"
1725 else
1726   echo "configure: failed program was:" >&5
1727   cat conftest.$ac_ext >&5
1728   rm -rf conftest*
1729   eval "ac_cv_lib_$ac_lib_var=no"
1730 fi
1731 rm -f conftest*
1732 LIBS="$ac_save_LIBS"
1733
1734 fi
1735 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1736   echo "$ac_t""yes" 1>&6
1737   LIBS="$LIBS -ldir"
1738 else
1739   echo "$ac_t""no" 1>&6
1740 fi
1741
1742 else
1743 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1744 echo "configure:1745: checking for opendir in -lx" >&5
1745 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1746 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1747   echo $ac_n "(cached) $ac_c" 1>&6
1748 else
1749   ac_save_LIBS="$LIBS"
1750 LIBS="-lx  $LIBS"
1751 cat > conftest.$ac_ext <<EOF
1752 #line 1753 "configure"
1753 #include "confdefs.h"
1754 /* Override any gcc2 internal prototype to avoid an error.  */
1755 /* We use char because int might match the return type of a gcc2
1756     builtin and then its argument prototype would still apply.  */
1757 char opendir();
1758
1759 int main() {
1760 opendir()
1761 ; return 0; }
1762 EOF
1763 if { (eval echo configure:1764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1764   rm -rf conftest*
1765   eval "ac_cv_lib_$ac_lib_var=yes"
1766 else
1767   echo "configure: failed program was:" >&5
1768   cat conftest.$ac_ext >&5
1769   rm -rf conftest*
1770   eval "ac_cv_lib_$ac_lib_var=no"
1771 fi
1772 rm -f conftest*
1773 LIBS="$ac_save_LIBS"
1774
1775 fi
1776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1777   echo "$ac_t""yes" 1>&6
1778   LIBS="$LIBS -lx"
1779 else
1780   echo "$ac_t""no" 1>&6
1781 fi
1782
1783 fi
1784
1785 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1786 echo "configure:1787: checking whether time.h and sys/time.h may both be included" >&5
1787 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1788   echo $ac_n "(cached) $ac_c" 1>&6
1789 else
1790   cat > conftest.$ac_ext <<EOF
1791 #line 1792 "configure"
1792 #include "confdefs.h"
1793 #include <sys/types.h>
1794 #include <sys/time.h>
1795 #include <time.h>
1796 int main() {
1797 struct tm *tp;
1798 ; return 0; }
1799 EOF
1800 if { (eval echo configure:1801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1801   rm -rf conftest*
1802   ac_cv_header_time=yes
1803 else
1804   echo "configure: failed program was:" >&5
1805   cat conftest.$ac_ext >&5
1806   rm -rf conftest*
1807   ac_cv_header_time=no
1808 fi
1809 rm -f conftest*
1810 fi
1811
1812 echo "$ac_t""$ac_cv_header_time" 1>&6
1813 if test $ac_cv_header_time = yes; then
1814   cat >> confdefs.h <<\EOF
1815 #define TIME_WITH_SYS_TIME 1
1816 EOF
1817
1818 fi
1819
1820 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1821 echo "configure:1822: checking for sys/wait.h that is POSIX.1 compatible" >&5
1822 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1823   echo $ac_n "(cached) $ac_c" 1>&6
1824 else
1825   cat > conftest.$ac_ext <<EOF
1826 #line 1827 "configure"
1827 #include "confdefs.h"
1828 #include <sys/types.h>
1829 #include <sys/wait.h>
1830 #ifndef WEXITSTATUS
1831 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1832 #endif
1833 #ifndef WIFEXITED
1834 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1835 #endif
1836 int main() {
1837 int s;
1838 wait (&s);
1839 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1840 ; return 0; }
1841 EOF
1842 if { (eval echo configure:1843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1843   rm -rf conftest*
1844   ac_cv_header_sys_wait_h=yes
1845 else
1846   echo "configure: failed program was:" >&5
1847   cat conftest.$ac_ext >&5
1848   rm -rf conftest*
1849   ac_cv_header_sys_wait_h=no
1850 fi
1851 rm -f conftest*
1852 fi
1853
1854 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1855 if test $ac_cv_header_sys_wait_h = yes; then
1856   cat >> confdefs.h <<\EOF
1857 #define HAVE_SYS_WAIT_H 1
1858 EOF
1859
1860 fi
1861
1862 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1863 do
1864 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1865 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1866 echo "configure:1867: checking for $ac_hdr" >&5
1867 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1868   echo $ac_n "(cached) $ac_c" 1>&6
1869 else
1870   cat > conftest.$ac_ext <<EOF
1871 #line 1872 "configure"
1872 #include "confdefs.h"
1873 #include <$ac_hdr>
1874 EOF
1875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1876 { (eval echo configure:1877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1878 if test -z "$ac_err"; then
1879   rm -rf conftest*
1880   eval "ac_cv_header_$ac_safe=yes"
1881 else
1882   echo "$ac_err" >&5
1883   echo "configure: failed program was:" >&5
1884   cat conftest.$ac_ext >&5
1885   rm -rf conftest*
1886   eval "ac_cv_header_$ac_safe=no"
1887 fi
1888 rm -f conftest*
1889 fi
1890 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1891   echo "$ac_t""yes" 1>&6
1892     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1893   cat >> confdefs.h <<EOF
1894 #define $ac_tr_hdr 1
1895 EOF
1896  
1897 else
1898   echo "$ac_t""no" 1>&6
1899 fi
1900 done
1901
1902 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1903 do
1904 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1905 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1906 echo "configure:1907: checking for $ac_hdr" >&5
1907 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1908   echo $ac_n "(cached) $ac_c" 1>&6
1909 else
1910   cat > conftest.$ac_ext <<EOF
1911 #line 1912 "configure"
1912 #include "confdefs.h"
1913 #include <$ac_hdr>
1914 EOF
1915 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1916 { (eval echo configure:1917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1917 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1918 if test -z "$ac_err"; then
1919   rm -rf conftest*
1920   eval "ac_cv_header_$ac_safe=yes"
1921 else
1922   echo "$ac_err" >&5
1923   echo "configure: failed program was:" >&5
1924   cat conftest.$ac_ext >&5
1925   rm -rf conftest*
1926   eval "ac_cv_header_$ac_safe=no"
1927 fi
1928 rm -f conftest*
1929 fi
1930 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1931   echo "$ac_t""yes" 1>&6
1932     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1933   cat >> confdefs.h <<EOF
1934 #define $ac_tr_hdr 1
1935 EOF
1936  
1937 else
1938   echo "$ac_t""no" 1>&6
1939 fi
1940 done
1941
1942 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1943 do
1944 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1945 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1946 echo "configure:1947: checking for $ac_hdr" >&5
1947 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1948   echo $ac_n "(cached) $ac_c" 1>&6
1949 else
1950   cat > conftest.$ac_ext <<EOF
1951 #line 1952 "configure"
1952 #include "confdefs.h"
1953 #include <$ac_hdr>
1954 EOF
1955 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1956 { (eval echo configure:1957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1957 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1958 if test -z "$ac_err"; then
1959   rm -rf conftest*
1960   eval "ac_cv_header_$ac_safe=yes"
1961 else
1962   echo "$ac_err" >&5
1963   echo "configure: failed program was:" >&5
1964   cat conftest.$ac_ext >&5
1965   rm -rf conftest*
1966   eval "ac_cv_header_$ac_safe=no"
1967 fi
1968 rm -f conftest*
1969 fi
1970 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1971   echo "$ac_t""yes" 1>&6
1972     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1973   cat >> confdefs.h <<EOF
1974 #define $ac_tr_hdr 1
1975 EOF
1976  
1977 else
1978   echo "$ac_t""no" 1>&6
1979 fi
1980 done
1981
1982 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
1983 do
1984 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1985 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1986 echo "configure:1987: checking for $ac_hdr" >&5
1987 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1988   echo $ac_n "(cached) $ac_c" 1>&6
1989 else
1990   cat > conftest.$ac_ext <<EOF
1991 #line 1992 "configure"
1992 #include "confdefs.h"
1993 #include <$ac_hdr>
1994 EOF
1995 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1996 { (eval echo configure:1997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1997 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1998 if test -z "$ac_err"; then
1999   rm -rf conftest*
2000   eval "ac_cv_header_$ac_safe=yes"
2001 else
2002   echo "$ac_err" >&5
2003   echo "configure: failed program was:" >&5
2004   cat conftest.$ac_ext >&5
2005   rm -rf conftest*
2006   eval "ac_cv_header_$ac_safe=no"
2007 fi
2008 rm -f conftest*
2009 fi
2010 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2011   echo "$ac_t""yes" 1>&6
2012     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2013   cat >> confdefs.h <<EOF
2014 #define $ac_tr_hdr 1
2015 EOF
2016  
2017 else
2018   echo "$ac_t""no" 1>&6
2019 fi
2020 done
2021
2022 for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h
2023 do
2024 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2025 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2026 echo "configure:2027: checking for $ac_hdr" >&5
2027 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2028   echo $ac_n "(cached) $ac_c" 1>&6
2029 else
2030   cat > conftest.$ac_ext <<EOF
2031 #line 2032 "configure"
2032 #include "confdefs.h"
2033 #include <$ac_hdr>
2034 EOF
2035 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2036 { (eval echo configure:2037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2037 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2038 if test -z "$ac_err"; then
2039   rm -rf conftest*
2040   eval "ac_cv_header_$ac_safe=yes"
2041 else
2042   echo "$ac_err" >&5
2043   echo "configure: failed program was:" >&5
2044   cat conftest.$ac_ext >&5
2045   rm -rf conftest*
2046   eval "ac_cv_header_$ac_safe=no"
2047 fi
2048 rm -f conftest*
2049 fi
2050 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2051   echo "$ac_t""yes" 1>&6
2052     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2053   cat >> confdefs.h <<EOF
2054 #define $ac_tr_hdr 1
2055 EOF
2056  
2057 else
2058   echo "$ac_t""no" 1>&6
2059 fi
2060 done
2061
2062 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2063 do
2064 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2065 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2066 echo "configure:2067: checking for $ac_hdr" >&5
2067 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2068   echo $ac_n "(cached) $ac_c" 1>&6
2069 else
2070   cat > conftest.$ac_ext <<EOF
2071 #line 2072 "configure"
2072 #include "confdefs.h"
2073 #include <$ac_hdr>
2074 EOF
2075 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2076 { (eval echo configure:2077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2077 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2078 if test -z "$ac_err"; then
2079   rm -rf conftest*
2080   eval "ac_cv_header_$ac_safe=yes"
2081 else
2082   echo "$ac_err" >&5
2083   echo "configure: failed program was:" >&5
2084   cat conftest.$ac_ext >&5
2085   rm -rf conftest*
2086   eval "ac_cv_header_$ac_safe=no"
2087 fi
2088 rm -f conftest*
2089 fi
2090 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2091   echo "$ac_t""yes" 1>&6
2092     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2093   cat >> confdefs.h <<EOF
2094 #define $ac_tr_hdr 1
2095 EOF
2096  
2097 else
2098   echo "$ac_t""no" 1>&6
2099 fi
2100 done
2101
2102 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2103 do
2104 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2105 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2106 echo "configure:2107: checking for $ac_hdr" >&5
2107 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2108   echo $ac_n "(cached) $ac_c" 1>&6
2109 else
2110   cat > conftest.$ac_ext <<EOF
2111 #line 2112 "configure"
2112 #include "confdefs.h"
2113 #include <$ac_hdr>
2114 EOF
2115 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2116 { (eval echo configure:2117: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2117 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2118 if test -z "$ac_err"; then
2119   rm -rf conftest*
2120   eval "ac_cv_header_$ac_safe=yes"
2121 else
2122   echo "$ac_err" >&5
2123   echo "configure: failed program was:" >&5
2124   cat conftest.$ac_ext >&5
2125   rm -rf conftest*
2126   eval "ac_cv_header_$ac_safe=no"
2127 fi
2128 rm -f conftest*
2129 fi
2130 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2131   echo "$ac_t""yes" 1>&6
2132     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2133   cat >> confdefs.h <<EOF
2134 #define $ac_tr_hdr 1
2135 EOF
2136  
2137 else
2138   echo "$ac_t""no" 1>&6
2139 fi
2140 done
2141
2142 for ac_hdr in security/pam_modules.h security/_pam_macros.h
2143 do
2144 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2145 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2146 echo "configure:2147: checking for $ac_hdr" >&5
2147 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2148   echo $ac_n "(cached) $ac_c" 1>&6
2149 else
2150   cat > conftest.$ac_ext <<EOF
2151 #line 2152 "configure"
2152 #include "confdefs.h"
2153 #include <$ac_hdr>
2154 EOF
2155 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2156 { (eval echo configure:2157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2157 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2158 if test -z "$ac_err"; then
2159   rm -rf conftest*
2160   eval "ac_cv_header_$ac_safe=yes"
2161 else
2162   echo "$ac_err" >&5
2163   echo "configure: failed program was:" >&5
2164   cat conftest.$ac_ext >&5
2165   rm -rf conftest*
2166   eval "ac_cv_header_$ac_safe=no"
2167 fi
2168 rm -f conftest*
2169 fi
2170 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2171   echo "$ac_t""yes" 1>&6
2172     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2173   cat >> confdefs.h <<EOF
2174 #define $ac_tr_hdr 1
2175 EOF
2176  
2177 else
2178   echo "$ac_t""no" 1>&6
2179 fi
2180 done
2181
2182
2183 #
2184 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2185 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2186 #
2187 case "$host_os" in
2188     *hpux*)
2189                 cat > conftest.$ac_ext <<EOF
2190 #line 2191 "configure"
2191 #include "confdefs.h"
2192 #include <shadow.h>
2193 int main() {
2194 struct spwd testme
2195 ; return 0; }
2196 EOF
2197 if { (eval echo configure:2198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2198   rm -rf conftest*
2199   ac_cv_header_shadow_h=yes
2200 else
2201   echo "configure: failed program was:" >&5
2202   cat conftest.$ac_ext >&5
2203   rm -rf conftest*
2204   ac_cv_header_shadow_h=no
2205 fi
2206 rm -f conftest*
2207                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2208                    cat >> confdefs.h <<\EOF
2209 #define HAVE_SHADOW_H 1
2210 EOF
2211
2212                 fi
2213         ;;
2214 esac
2215 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2216 do
2217 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2218 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2219 echo "configure:2220: checking for $ac_hdr" >&5
2220 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2221   echo $ac_n "(cached) $ac_c" 1>&6
2222 else
2223   cat > conftest.$ac_ext <<EOF
2224 #line 2225 "configure"
2225 #include "confdefs.h"
2226 #include <$ac_hdr>
2227 EOF
2228 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2229 { (eval echo configure:2230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2230 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2231 if test -z "$ac_err"; then
2232   rm -rf conftest*
2233   eval "ac_cv_header_$ac_safe=yes"
2234 else
2235   echo "$ac_err" >&5
2236   echo "configure: failed program was:" >&5
2237   cat conftest.$ac_ext >&5
2238   rm -rf conftest*
2239   eval "ac_cv_header_$ac_safe=no"
2240 fi
2241 rm -f conftest*
2242 fi
2243 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2244   echo "$ac_t""yes" 1>&6
2245     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2246   cat >> confdefs.h <<EOF
2247 #define $ac_tr_hdr 1
2248 EOF
2249  
2250 else
2251   echo "$ac_t""no" 1>&6
2252 fi
2253 done
2254
2255 for ac_hdr in nss.h nss_common.h sys/security.h security/pam_appl.h security/pam_modules.h
2256 do
2257 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2258 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2259 echo "configure:2260: checking for $ac_hdr" >&5
2260 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2261   echo $ac_n "(cached) $ac_c" 1>&6
2262 else
2263   cat > conftest.$ac_ext <<EOF
2264 #line 2265 "configure"
2265 #include "confdefs.h"
2266 #include <$ac_hdr>
2267 EOF
2268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2269 { (eval echo configure:2270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2271 if test -z "$ac_err"; then
2272   rm -rf conftest*
2273   eval "ac_cv_header_$ac_safe=yes"
2274 else
2275   echo "$ac_err" >&5
2276   echo "configure: failed program was:" >&5
2277   cat conftest.$ac_ext >&5
2278   rm -rf conftest*
2279   eval "ac_cv_header_$ac_safe=no"
2280 fi
2281 rm -f conftest*
2282 fi
2283 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2284   echo "$ac_t""yes" 1>&6
2285     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2286   cat >> confdefs.h <<EOF
2287 #define $ac_tr_hdr 1
2288 EOF
2289  
2290 else
2291   echo "$ac_t""no" 1>&6
2292 fi
2293 done
2294
2295 for ac_hdr in stropts.h poll.h
2296 do
2297 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2298 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2299 echo "configure:2300: checking for $ac_hdr" >&5
2300 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2301   echo $ac_n "(cached) $ac_c" 1>&6
2302 else
2303   cat > conftest.$ac_ext <<EOF
2304 #line 2305 "configure"
2305 #include "confdefs.h"
2306 #include <$ac_hdr>
2307 EOF
2308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2309 { (eval echo configure:2310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2310 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2311 if test -z "$ac_err"; then
2312   rm -rf conftest*
2313   eval "ac_cv_header_$ac_safe=yes"
2314 else
2315   echo "$ac_err" >&5
2316   echo "configure: failed program was:" >&5
2317   cat conftest.$ac_ext >&5
2318   rm -rf conftest*
2319   eval "ac_cv_header_$ac_safe=no"
2320 fi
2321 rm -f conftest*
2322 fi
2323 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2324   echo "$ac_t""yes" 1>&6
2325     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2326   cat >> confdefs.h <<EOF
2327 #define $ac_tr_hdr 1
2328 EOF
2329  
2330 else
2331   echo "$ac_t""no" 1>&6
2332 fi
2333 done
2334
2335 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2336 do
2337 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2338 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2339 echo "configure:2340: checking for $ac_hdr" >&5
2340 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2341   echo $ac_n "(cached) $ac_c" 1>&6
2342 else
2343   cat > conftest.$ac_ext <<EOF
2344 #line 2345 "configure"
2345 #include "confdefs.h"
2346 #include <$ac_hdr>
2347 EOF
2348 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2349 { (eval echo configure:2350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2350 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2351 if test -z "$ac_err"; then
2352   rm -rf conftest*
2353   eval "ac_cv_header_$ac_safe=yes"
2354 else
2355   echo "$ac_err" >&5
2356   echo "configure: failed program was:" >&5
2357   cat conftest.$ac_ext >&5
2358   rm -rf conftest*
2359   eval "ac_cv_header_$ac_safe=no"
2360 fi
2361 rm -f conftest*
2362 fi
2363 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2364   echo "$ac_t""yes" 1>&6
2365     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2366   cat >> confdefs.h <<EOF
2367 #define $ac_tr_hdr 1
2368 EOF
2369  
2370 else
2371   echo "$ac_t""no" 1>&6
2372 fi
2373 done
2374
2375 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2376 do
2377 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2378 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2379 echo "configure:2380: checking for $ac_hdr" >&5
2380 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2381   echo $ac_n "(cached) $ac_c" 1>&6
2382 else
2383   cat > conftest.$ac_ext <<EOF
2384 #line 2385 "configure"
2385 #include "confdefs.h"
2386 #include <$ac_hdr>
2387 EOF
2388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2389 { (eval echo configure:2390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2390 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2391 if test -z "$ac_err"; then
2392   rm -rf conftest*
2393   eval "ac_cv_header_$ac_safe=yes"
2394 else
2395   echo "$ac_err" >&5
2396   echo "configure: failed program was:" >&5
2397   cat conftest.$ac_ext >&5
2398   rm -rf conftest*
2399   eval "ac_cv_header_$ac_safe=no"
2400 fi
2401 rm -f conftest*
2402 fi
2403 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2404   echo "$ac_t""yes" 1>&6
2405     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2406   cat >> confdefs.h <<EOF
2407 #define $ac_tr_hdr 1
2408 EOF
2409  
2410 else
2411   echo "$ac_t""no" 1>&6
2412 fi
2413 done
2414
2415
2416 # For experimental utmp support (lastlog on some BSD-like systems)
2417 for ac_hdr in utmp.h utmpx.h lastlog.h
2418 do
2419 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2420 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2421 echo "configure:2422: checking for $ac_hdr" >&5
2422 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2423   echo $ac_n "(cached) $ac_c" 1>&6
2424 else
2425   cat > conftest.$ac_ext <<EOF
2426 #line 2427 "configure"
2427 #include "confdefs.h"
2428 #include <$ac_hdr>
2429 EOF
2430 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2431 { (eval echo configure:2432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2432 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2433 if test -z "$ac_err"; then
2434   rm -rf conftest*
2435   eval "ac_cv_header_$ac_safe=yes"
2436 else
2437   echo "$ac_err" >&5
2438   echo "configure: failed program was:" >&5
2439   cat conftest.$ac_ext >&5
2440   rm -rf conftest*
2441   eval "ac_cv_header_$ac_safe=no"
2442 fi
2443 rm -f conftest*
2444 fi
2445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2446   echo "$ac_t""yes" 1>&6
2447     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2448   cat >> confdefs.h <<EOF
2449 #define $ac_tr_hdr 1
2450 EOF
2451  
2452 else
2453   echo "$ac_t""no" 1>&6
2454 fi
2455 done
2456
2457  
2458 # For quotas on Veritas VxFS filesystems
2459 for ac_hdr in sys/fs/vx_quota.h
2460 do
2461 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2462 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2463 echo "configure:2464: checking for $ac_hdr" >&5
2464 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2465   echo $ac_n "(cached) $ac_c" 1>&6
2466 else
2467   cat > conftest.$ac_ext <<EOF
2468 #line 2469 "configure"
2469 #include "confdefs.h"
2470 #include <$ac_hdr>
2471 EOF
2472 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2473 { (eval echo configure:2474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2474 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2475 if test -z "$ac_err"; then
2476   rm -rf conftest*
2477   eval "ac_cv_header_$ac_safe=yes"
2478 else
2479   echo "$ac_err" >&5
2480   echo "configure: failed program was:" >&5
2481   cat conftest.$ac_ext >&5
2482   rm -rf conftest*
2483   eval "ac_cv_header_$ac_safe=no"
2484 fi
2485 rm -f conftest*
2486 fi
2487 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2488   echo "$ac_t""yes" 1>&6
2489     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2490   cat >> confdefs.h <<EOF
2491 #define $ac_tr_hdr 1
2492 EOF
2493  
2494 else
2495   echo "$ac_t""no" 1>&6
2496 fi
2497 done
2498
2499
2500 echo $ac_n "checking size of int""... $ac_c" 1>&6
2501 echo "configure:2502: checking size of int" >&5
2502 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2503   echo $ac_n "(cached) $ac_c" 1>&6
2504 else
2505   if test "$cross_compiling" = yes; then
2506   ac_cv_sizeof_int=cross
2507 else
2508   cat > conftest.$ac_ext <<EOF
2509 #line 2510 "configure"
2510 #include "confdefs.h"
2511 #include <stdio.h>
2512 main()
2513 {
2514   FILE *f=fopen("conftestval", "w");
2515   if (!f) exit(1);
2516   fprintf(f, "%d\n", sizeof(int));
2517   exit(0);
2518 }
2519 EOF
2520 if { (eval echo configure:2521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2521 then
2522   ac_cv_sizeof_int=`cat conftestval`
2523 else
2524   echo "configure: failed program was:" >&5
2525   cat conftest.$ac_ext >&5
2526   rm -fr conftest*
2527   ac_cv_sizeof_int=0
2528 fi
2529 rm -fr conftest*
2530 fi
2531
2532 fi
2533 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2534 cat >> confdefs.h <<EOF
2535 #define SIZEOF_INT $ac_cv_sizeof_int
2536 EOF
2537
2538
2539 echo $ac_n "checking size of long""... $ac_c" 1>&6
2540 echo "configure:2541: checking size of long" >&5
2541 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2542   echo $ac_n "(cached) $ac_c" 1>&6
2543 else
2544   if test "$cross_compiling" = yes; then
2545   ac_cv_sizeof_long=cross
2546 else
2547   cat > conftest.$ac_ext <<EOF
2548 #line 2549 "configure"
2549 #include "confdefs.h"
2550 #include <stdio.h>
2551 main()
2552 {
2553   FILE *f=fopen("conftestval", "w");
2554   if (!f) exit(1);
2555   fprintf(f, "%d\n", sizeof(long));
2556   exit(0);
2557 }
2558 EOF
2559 if { (eval echo configure:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2560 then
2561   ac_cv_sizeof_long=`cat conftestval`
2562 else
2563   echo "configure: failed program was:" >&5
2564   cat conftest.$ac_ext >&5
2565   rm -fr conftest*
2566   ac_cv_sizeof_long=0
2567 fi
2568 rm -fr conftest*
2569 fi
2570
2571 fi
2572 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2573 cat >> confdefs.h <<EOF
2574 #define SIZEOF_LONG $ac_cv_sizeof_long
2575 EOF
2576
2577
2578 echo $ac_n "checking size of short""... $ac_c" 1>&6
2579 echo "configure:2580: checking size of short" >&5
2580 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2581   echo $ac_n "(cached) $ac_c" 1>&6
2582 else
2583   if test "$cross_compiling" = yes; then
2584   ac_cv_sizeof_short=cross
2585 else
2586   cat > conftest.$ac_ext <<EOF
2587 #line 2588 "configure"
2588 #include "confdefs.h"
2589 #include <stdio.h>
2590 main()
2591 {
2592   FILE *f=fopen("conftestval", "w");
2593   if (!f) exit(1);
2594   fprintf(f, "%d\n", sizeof(short));
2595   exit(0);
2596 }
2597 EOF
2598 if { (eval echo configure:2599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2599 then
2600   ac_cv_sizeof_short=`cat conftestval`
2601 else
2602   echo "configure: failed program was:" >&5
2603   cat conftest.$ac_ext >&5
2604   rm -fr conftest*
2605   ac_cv_sizeof_short=0
2606 fi
2607 rm -fr conftest*
2608 fi
2609
2610 fi
2611 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2612 cat >> confdefs.h <<EOF
2613 #define SIZEOF_SHORT $ac_cv_sizeof_short
2614 EOF
2615
2616
2617
2618 echo $ac_n "checking for working const""... $ac_c" 1>&6
2619 echo "configure:2620: checking for working const" >&5
2620 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2621   echo $ac_n "(cached) $ac_c" 1>&6
2622 else
2623   cat > conftest.$ac_ext <<EOF
2624 #line 2625 "configure"
2625 #include "confdefs.h"
2626
2627 int main() {
2628
2629 /* Ultrix mips cc rejects this.  */
2630 typedef int charset[2]; const charset x;
2631 /* SunOS 4.1.1 cc rejects this.  */
2632 char const *const *ccp;
2633 char **p;
2634 /* NEC SVR4.0.2 mips cc rejects this.  */
2635 struct point {int x, y;};
2636 static struct point const zero = {0,0};
2637 /* AIX XL C 1.02.0.0 rejects this.
2638    It does not let you subtract one const X* pointer from another in an arm
2639    of an if-expression whose if-part is not a constant expression */
2640 const char *g = "string";
2641 ccp = &g + (g ? g-g : 0);
2642 /* HPUX 7.0 cc rejects these. */
2643 ++ccp;
2644 p = (char**) ccp;
2645 ccp = (char const *const *) p;
2646 { /* SCO 3.2v4 cc rejects this.  */
2647   char *t;
2648   char const *s = 0 ? (char *) 0 : (char const *) 0;
2649
2650   *t++ = 0;
2651 }
2652 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2653   int x[] = {25, 17};
2654   const int *foo = &x[0];
2655   ++foo;
2656 }
2657 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2658   typedef const int *iptr;
2659   iptr p = 0;
2660   ++p;
2661 }
2662 { /* AIX XL C 1.02.0.0 rejects this saying
2663      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2664   struct s { int j; const int *ap[3]; };
2665   struct s *b; b->j = 5;
2666 }
2667 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2668   const int foo = 10;
2669 }
2670
2671 ; return 0; }
2672 EOF
2673 if { (eval echo configure:2674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2674   rm -rf conftest*
2675   ac_cv_c_const=yes
2676 else
2677   echo "configure: failed program was:" >&5
2678   cat conftest.$ac_ext >&5
2679   rm -rf conftest*
2680   ac_cv_c_const=no
2681 fi
2682 rm -f conftest*
2683 fi
2684
2685 echo "$ac_t""$ac_cv_c_const" 1>&6
2686 if test $ac_cv_c_const = no; then
2687   cat >> confdefs.h <<\EOF
2688 #define const 
2689 EOF
2690
2691 fi
2692
2693 echo $ac_n "checking for inline""... $ac_c" 1>&6
2694 echo "configure:2695: checking for inline" >&5
2695 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2696   echo $ac_n "(cached) $ac_c" 1>&6
2697 else
2698   ac_cv_c_inline=no
2699 for ac_kw in inline __inline__ __inline; do
2700   cat > conftest.$ac_ext <<EOF
2701 #line 2702 "configure"
2702 #include "confdefs.h"
2703
2704 int main() {
2705 } $ac_kw foo() {
2706 ; return 0; }
2707 EOF
2708 if { (eval echo configure:2709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2709   rm -rf conftest*
2710   ac_cv_c_inline=$ac_kw; break
2711 else
2712   echo "configure: failed program was:" >&5
2713   cat conftest.$ac_ext >&5
2714 fi
2715 rm -f conftest*
2716 done
2717
2718 fi
2719
2720 echo "$ac_t""$ac_cv_c_inline" 1>&6
2721 case "$ac_cv_c_inline" in
2722   inline | yes) ;;
2723   no) cat >> confdefs.h <<\EOF
2724 #define inline 
2725 EOF
2726  ;;
2727   *)  cat >> confdefs.h <<EOF
2728 #define inline $ac_cv_c_inline
2729 EOF
2730  ;;
2731 esac
2732
2733 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2734 echo "configure:2735: checking whether byte ordering is bigendian" >&5
2735 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2736   echo $ac_n "(cached) $ac_c" 1>&6
2737 else
2738   ac_cv_c_bigendian=unknown
2739 # See if sys/param.h defines the BYTE_ORDER macro.
2740 cat > conftest.$ac_ext <<EOF
2741 #line 2742 "configure"
2742 #include "confdefs.h"
2743 #include <sys/types.h>
2744 #include <sys/param.h>
2745 int main() {
2746
2747 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2748  bogus endian macros
2749 #endif
2750 ; return 0; }
2751 EOF
2752 if { (eval echo configure:2753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2753   rm -rf conftest*
2754   # It does; now see whether it defined to BIG_ENDIAN or not.
2755 cat > conftest.$ac_ext <<EOF
2756 #line 2757 "configure"
2757 #include "confdefs.h"
2758 #include <sys/types.h>
2759 #include <sys/param.h>
2760 int main() {
2761
2762 #if BYTE_ORDER != BIG_ENDIAN
2763  not big endian
2764 #endif
2765 ; return 0; }
2766 EOF
2767 if { (eval echo configure:2768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2768   rm -rf conftest*
2769   ac_cv_c_bigendian=yes
2770 else
2771   echo "configure: failed program was:" >&5
2772   cat conftest.$ac_ext >&5
2773   rm -rf conftest*
2774   ac_cv_c_bigendian=no
2775 fi
2776 rm -f conftest*
2777 else
2778   echo "configure: failed program was:" >&5
2779   cat conftest.$ac_ext >&5
2780 fi
2781 rm -f conftest*
2782 if test $ac_cv_c_bigendian = unknown; then
2783 if test "$cross_compiling" = yes; then
2784     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2785 else
2786   cat > conftest.$ac_ext <<EOF
2787 #line 2788 "configure"
2788 #include "confdefs.h"
2789 main () {
2790   /* Are we little or big endian?  From Harbison&Steele.  */
2791   union
2792   {
2793     long l;
2794     char c[sizeof (long)];
2795   } u;
2796   u.l = 1;
2797   exit (u.c[sizeof (long) - 1] == 1);
2798 }
2799 EOF
2800 if { (eval echo configure:2801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2801 then
2802   ac_cv_c_bigendian=no
2803 else
2804   echo "configure: failed program was:" >&5
2805   cat conftest.$ac_ext >&5
2806   rm -fr conftest*
2807   ac_cv_c_bigendian=yes
2808 fi
2809 rm -fr conftest*
2810 fi
2811
2812 fi
2813 fi
2814
2815 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2816 if test $ac_cv_c_bigendian = yes; then
2817   cat >> confdefs.h <<\EOF
2818 #define WORDS_BIGENDIAN 1
2819 EOF
2820
2821 fi
2822
2823 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2824 echo "configure:2825: checking whether char is unsigned" >&5
2825 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2826   echo $ac_n "(cached) $ac_c" 1>&6
2827 else
2828   if test "$GCC" = yes; then
2829   # GCC predefines this symbol on systems where it applies.
2830 cat > conftest.$ac_ext <<EOF
2831 #line 2832 "configure"
2832 #include "confdefs.h"
2833 #ifdef __CHAR_UNSIGNED__
2834   yes
2835 #endif
2836
2837 EOF
2838 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2839   egrep "yes" >/dev/null 2>&1; then
2840   rm -rf conftest*
2841   ac_cv_c_char_unsigned=yes
2842 else
2843   rm -rf conftest*
2844   ac_cv_c_char_unsigned=no
2845 fi
2846 rm -f conftest*
2847
2848 else
2849 if test "$cross_compiling" = yes; then
2850     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2851 else
2852   cat > conftest.$ac_ext <<EOF
2853 #line 2854 "configure"
2854 #include "confdefs.h"
2855 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2856 #if !defined(__STDC__) || __STDC__ != 1
2857 #define volatile
2858 #endif
2859 main() {
2860   volatile char c = 255; exit(c < 0);
2861 }
2862 EOF
2863 if { (eval echo configure:2864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2864 then
2865   ac_cv_c_char_unsigned=yes
2866 else
2867   echo "configure: failed program was:" >&5
2868   cat conftest.$ac_ext >&5
2869   rm -fr conftest*
2870   ac_cv_c_char_unsigned=no
2871 fi
2872 rm -fr conftest*
2873 fi
2874
2875 fi
2876 fi
2877
2878 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2879 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2880   cat >> confdefs.h <<\EOF
2881 #define __CHAR_UNSIGNED__ 1
2882 EOF
2883
2884 fi
2885
2886
2887 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2888 echo "configure:2889: checking return type of signal handlers" >&5
2889 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2890   echo $ac_n "(cached) $ac_c" 1>&6
2891 else
2892   cat > conftest.$ac_ext <<EOF
2893 #line 2894 "configure"
2894 #include "confdefs.h"
2895 #include <sys/types.h>
2896 #include <signal.h>
2897 #ifdef signal
2898 #undef signal
2899 #endif
2900 #ifdef __cplusplus
2901 extern "C" void (*signal (int, void (*)(int)))(int);
2902 #else
2903 void (*signal ()) ();
2904 #endif
2905
2906 int main() {
2907 int i;
2908 ; return 0; }
2909 EOF
2910 if { (eval echo configure:2911: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2911   rm -rf conftest*
2912   ac_cv_type_signal=void
2913 else
2914   echo "configure: failed program was:" >&5
2915   cat conftest.$ac_ext >&5
2916   rm -rf conftest*
2917   ac_cv_type_signal=int
2918 fi
2919 rm -f conftest*
2920 fi
2921
2922 echo "$ac_t""$ac_cv_type_signal" 1>&6
2923 cat >> confdefs.h <<EOF
2924 #define RETSIGTYPE $ac_cv_type_signal
2925 EOF
2926
2927
2928 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2929 echo "configure:2930: checking for uid_t in sys/types.h" >&5
2930 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2931   echo $ac_n "(cached) $ac_c" 1>&6
2932 else
2933   cat > conftest.$ac_ext <<EOF
2934 #line 2935 "configure"
2935 #include "confdefs.h"
2936 #include <sys/types.h>
2937 EOF
2938 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2939   egrep "uid_t" >/dev/null 2>&1; then
2940   rm -rf conftest*
2941   ac_cv_type_uid_t=yes
2942 else
2943   rm -rf conftest*
2944   ac_cv_type_uid_t=no
2945 fi
2946 rm -f conftest*
2947
2948 fi
2949
2950 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2951 if test $ac_cv_type_uid_t = no; then
2952   cat >> confdefs.h <<\EOF
2953 #define uid_t int
2954 EOF
2955
2956   cat >> confdefs.h <<\EOF
2957 #define gid_t int
2958 EOF
2959
2960 fi
2961
2962 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2963 echo "configure:2964: checking for mode_t" >&5
2964 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2965   echo $ac_n "(cached) $ac_c" 1>&6
2966 else
2967   cat > conftest.$ac_ext <<EOF
2968 #line 2969 "configure"
2969 #include "confdefs.h"
2970 #include <sys/types.h>
2971 #if STDC_HEADERS
2972 #include <stdlib.h>
2973 #include <stddef.h>
2974 #endif
2975 EOF
2976 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2977   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2978   rm -rf conftest*
2979   ac_cv_type_mode_t=yes
2980 else
2981   rm -rf conftest*
2982   ac_cv_type_mode_t=no
2983 fi
2984 rm -f conftest*
2985
2986 fi
2987 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2988 if test $ac_cv_type_mode_t = no; then
2989   cat >> confdefs.h <<\EOF
2990 #define mode_t int
2991 EOF
2992
2993 fi
2994
2995 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2996 echo "configure:2997: checking for off_t" >&5
2997 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2998   echo $ac_n "(cached) $ac_c" 1>&6
2999 else
3000   cat > conftest.$ac_ext <<EOF
3001 #line 3002 "configure"
3002 #include "confdefs.h"
3003 #include <sys/types.h>
3004 #if STDC_HEADERS
3005 #include <stdlib.h>
3006 #include <stddef.h>
3007 #endif
3008 EOF
3009 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3010   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3011   rm -rf conftest*
3012   ac_cv_type_off_t=yes
3013 else
3014   rm -rf conftest*
3015   ac_cv_type_off_t=no
3016 fi
3017 rm -f conftest*
3018
3019 fi
3020 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3021 if test $ac_cv_type_off_t = no; then
3022   cat >> confdefs.h <<\EOF
3023 #define off_t long
3024 EOF
3025
3026 fi
3027
3028 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3029 echo "configure:3030: checking for size_t" >&5
3030 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3031   echo $ac_n "(cached) $ac_c" 1>&6
3032 else
3033   cat > conftest.$ac_ext <<EOF
3034 #line 3035 "configure"
3035 #include "confdefs.h"
3036 #include <sys/types.h>
3037 #if STDC_HEADERS
3038 #include <stdlib.h>
3039 #include <stddef.h>
3040 #endif
3041 EOF
3042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3043   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3044   rm -rf conftest*
3045   ac_cv_type_size_t=yes
3046 else
3047   rm -rf conftest*
3048   ac_cv_type_size_t=no
3049 fi
3050 rm -f conftest*
3051
3052 fi
3053 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3054 if test $ac_cv_type_size_t = no; then
3055   cat >> confdefs.h <<\EOF
3056 #define size_t unsigned
3057 EOF
3058
3059 fi
3060
3061 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3062 echo "configure:3063: checking for pid_t" >&5
3063 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3064   echo $ac_n "(cached) $ac_c" 1>&6
3065 else
3066   cat > conftest.$ac_ext <<EOF
3067 #line 3068 "configure"
3068 #include "confdefs.h"
3069 #include <sys/types.h>
3070 #if STDC_HEADERS
3071 #include <stdlib.h>
3072 #include <stddef.h>
3073 #endif
3074 EOF
3075 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3076   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3077   rm -rf conftest*
3078   ac_cv_type_pid_t=yes
3079 else
3080   rm -rf conftest*
3081   ac_cv_type_pid_t=no
3082 fi
3083 rm -f conftest*
3084
3085 fi
3086 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3087 if test $ac_cv_type_pid_t = no; then
3088   cat >> confdefs.h <<\EOF
3089 #define pid_t int
3090 EOF
3091
3092 fi
3093
3094 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3095 echo "configure:3096: checking for st_rdev in struct stat" >&5
3096 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3097   echo $ac_n "(cached) $ac_c" 1>&6
3098 else
3099   cat > conftest.$ac_ext <<EOF
3100 #line 3101 "configure"
3101 #include "confdefs.h"
3102 #include <sys/types.h>
3103 #include <sys/stat.h>
3104 int main() {
3105 struct stat s; s.st_rdev;
3106 ; return 0; }
3107 EOF
3108 if { (eval echo configure:3109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3109   rm -rf conftest*
3110   ac_cv_struct_st_rdev=yes
3111 else
3112   echo "configure: failed program was:" >&5
3113   cat conftest.$ac_ext >&5
3114   rm -rf conftest*
3115   ac_cv_struct_st_rdev=no
3116 fi
3117 rm -f conftest*
3118 fi
3119
3120 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3121 if test $ac_cv_struct_st_rdev = yes; then
3122   cat >> confdefs.h <<\EOF
3123 #define HAVE_ST_RDEV 1
3124 EOF
3125
3126 fi
3127
3128 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3129 echo "configure:3130: checking for d_off in dirent" >&5
3130 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3131   echo $ac_n "(cached) $ac_c" 1>&6
3132 else
3133   cat > conftest.$ac_ext <<EOF
3134 #line 3135 "configure"
3135 #include "confdefs.h"
3136
3137 #include <unistd.h>
3138 #include <sys/types.h>
3139 #include <dirent.h>
3140 int main() {
3141 struct dirent d; d.d_off;
3142 ; return 0; }
3143 EOF
3144 if { (eval echo configure:3145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3145   rm -rf conftest*
3146   ac_cv_dirent_d_off=yes
3147 else
3148   echo "configure: failed program was:" >&5
3149   cat conftest.$ac_ext >&5
3150   rm -rf conftest*
3151   ac_cv_dirent_d_off=no
3152 fi
3153 rm -f conftest*
3154 fi
3155
3156 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3157 if test $ac_cv_dirent_d_off = yes; then
3158   cat >> confdefs.h <<\EOF
3159 #define HAVE_DIRENT_D_OFF 1
3160 EOF
3161
3162 fi
3163
3164 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3165 echo "configure:3166: checking for ino_t" >&5
3166 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3167   echo $ac_n "(cached) $ac_c" 1>&6
3168 else
3169   cat > conftest.$ac_ext <<EOF
3170 #line 3171 "configure"
3171 #include "confdefs.h"
3172 #include <sys/types.h>
3173 #if STDC_HEADERS
3174 #include <stdlib.h>
3175 #include <stddef.h>
3176 #endif
3177 EOF
3178 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3179   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3180   rm -rf conftest*
3181   ac_cv_type_ino_t=yes
3182 else
3183   rm -rf conftest*
3184   ac_cv_type_ino_t=no
3185 fi
3186 rm -f conftest*
3187
3188 fi
3189 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3190 if test $ac_cv_type_ino_t = no; then
3191   cat >> confdefs.h <<\EOF
3192 #define ino_t unsigned
3193 EOF
3194
3195 fi
3196
3197 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3198 echo "configure:3199: checking for loff_t" >&5
3199 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3200   echo $ac_n "(cached) $ac_c" 1>&6
3201 else
3202   cat > conftest.$ac_ext <<EOF
3203 #line 3204 "configure"
3204 #include "confdefs.h"
3205 #include <sys/types.h>
3206 #if STDC_HEADERS
3207 #include <stdlib.h>
3208 #include <stddef.h>
3209 #endif
3210 EOF
3211 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3212   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3213   rm -rf conftest*
3214   ac_cv_type_loff_t=yes
3215 else
3216   rm -rf conftest*
3217   ac_cv_type_loff_t=no
3218 fi
3219 rm -f conftest*
3220
3221 fi
3222 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3223 if test $ac_cv_type_loff_t = no; then
3224   cat >> confdefs.h <<\EOF
3225 #define loff_t off_t
3226 EOF
3227
3228 fi
3229
3230 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3231 echo "configure:3232: checking for offset_t" >&5
3232 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3233   echo $ac_n "(cached) $ac_c" 1>&6
3234 else
3235   cat > conftest.$ac_ext <<EOF
3236 #line 3237 "configure"
3237 #include "confdefs.h"
3238 #include <sys/types.h>
3239 #if STDC_HEADERS
3240 #include <stdlib.h>
3241 #include <stddef.h>
3242 #endif
3243 EOF
3244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3245   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3246   rm -rf conftest*
3247   ac_cv_type_offset_t=yes
3248 else
3249   rm -rf conftest*
3250   ac_cv_type_offset_t=no
3251 fi
3252 rm -f conftest*
3253
3254 fi
3255 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3256 if test $ac_cv_type_offset_t = no; then
3257   cat >> confdefs.h <<\EOF
3258 #define offset_t loff_t
3259 EOF
3260
3261 fi
3262
3263 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3264 echo "configure:3265: checking for ssize_t" >&5
3265 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3266   echo $ac_n "(cached) $ac_c" 1>&6
3267 else
3268   cat > conftest.$ac_ext <<EOF
3269 #line 3270 "configure"
3270 #include "confdefs.h"
3271 #include <sys/types.h>
3272 #if STDC_HEADERS
3273 #include <stdlib.h>
3274 #include <stddef.h>
3275 #endif
3276 EOF
3277 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3278   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3279   rm -rf conftest*
3280   ac_cv_type_ssize_t=yes
3281 else
3282   rm -rf conftest*
3283   ac_cv_type_ssize_t=no
3284 fi
3285 rm -f conftest*
3286
3287 fi
3288 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3289 if test $ac_cv_type_ssize_t = no; then
3290   cat >> confdefs.h <<\EOF
3291 #define ssize_t int
3292 EOF
3293
3294 fi
3295
3296 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3297 echo "configure:3298: checking for wchar_t" >&5
3298 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3299   echo $ac_n "(cached) $ac_c" 1>&6
3300 else
3301   cat > conftest.$ac_ext <<EOF
3302 #line 3303 "configure"
3303 #include "confdefs.h"
3304 #include <sys/types.h>
3305 #if STDC_HEADERS
3306 #include <stdlib.h>
3307 #include <stddef.h>
3308 #endif
3309 EOF
3310 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3311   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3312   rm -rf conftest*
3313   ac_cv_type_wchar_t=yes
3314 else
3315   rm -rf conftest*
3316   ac_cv_type_wchar_t=no
3317 fi
3318 rm -f conftest*
3319
3320 fi
3321 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3322 if test $ac_cv_type_wchar_t = no; then
3323   cat >> confdefs.h <<\EOF
3324 #define wchar_t unsigned short
3325 EOF
3326
3327 fi
3328
3329
3330 ############################################
3331 # for cups support we need libcups, and a handful of header files
3332
3333 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3334 echo "configure:3335: checking for httpConnect in -lcups" >&5
3335 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3336 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3337   echo $ac_n "(cached) $ac_c" 1>&6
3338 else
3339   ac_save_LIBS="$LIBS"
3340 LIBS="-lcups  $LIBS"
3341 cat > conftest.$ac_ext <<EOF
3342 #line 3343 "configure"
3343 #include "confdefs.h"
3344 /* Override any gcc2 internal prototype to avoid an error.  */
3345 /* We use char because int might match the return type of a gcc2
3346     builtin and then its argument prototype would still apply.  */
3347 char httpConnect();
3348
3349 int main() {
3350 httpConnect()
3351 ; return 0; }
3352 EOF
3353 if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3354   rm -rf conftest*
3355   eval "ac_cv_lib_$ac_lib_var=yes"
3356 else
3357   echo "configure: failed program was:" >&5
3358   cat conftest.$ac_ext >&5
3359   rm -rf conftest*
3360   eval "ac_cv_lib_$ac_lib_var=no"
3361 fi
3362 rm -f conftest*
3363 LIBS="$ac_save_LIBS"
3364
3365 fi
3366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3367   echo "$ac_t""yes" 1>&6
3368     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3369     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3370   cat >> confdefs.h <<EOF
3371 #define $ac_tr_lib 1
3372 EOF
3373
3374   LIBS="-lcups $LIBS"
3375
3376 else
3377   echo "$ac_t""no" 1>&6
3378 fi
3379
3380
3381 # I wonder if there is a nicer way of doing this?
3382
3383 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3384         for ac_hdr in cups/cups.h cups/language.h
3385 do
3386 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3387 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3388 echo "configure:3389: checking for $ac_hdr" >&5
3389 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3390   echo $ac_n "(cached) $ac_c" 1>&6
3391 else
3392   cat > conftest.$ac_ext <<EOF
3393 #line 3394 "configure"
3394 #include "confdefs.h"
3395 #include <$ac_hdr>
3396 EOF
3397 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3398 { (eval echo configure:3399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3399 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3400 if test -z "$ac_err"; then
3401   rm -rf conftest*
3402   eval "ac_cv_header_$ac_safe=yes"
3403 else
3404   echo "$ac_err" >&5
3405   echo "configure: failed program was:" >&5
3406   cat conftest.$ac_ext >&5
3407   rm -rf conftest*
3408   eval "ac_cv_header_$ac_safe=no"
3409 fi
3410 rm -f conftest*
3411 fi
3412 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3413   echo "$ac_t""yes" 1>&6
3414     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3415   cat >> confdefs.h <<EOF
3416 #define $ac_tr_hdr 1
3417 EOF
3418  
3419 else
3420   echo "$ac_t""no" 1>&6
3421 fi
3422 done
3423
3424         if x"$ac_cv_header_cups_cups_h" = x"yes"; then
3425                 if x"$ac_cv_header_cups_language_h" = x"yes"; then
3426                         cat >> confdefs.h <<\EOF
3427 #define HAVE_CUPS 1
3428 EOF
3429
3430                 fi
3431         fi
3432 fi
3433
3434 ############################################
3435 # we need libdl for PAM and the new VFS code
3436 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3437 echo "configure:3438: checking for dlopen in -ldl" >&5
3438 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3439 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3440   echo $ac_n "(cached) $ac_c" 1>&6
3441 else
3442   ac_save_LIBS="$LIBS"
3443 LIBS="-ldl  $LIBS"
3444 cat > conftest.$ac_ext <<EOF
3445 #line 3446 "configure"
3446 #include "confdefs.h"
3447 /* Override any gcc2 internal prototype to avoid an error.  */
3448 /* We use char because int might match the return type of a gcc2
3449     builtin and then its argument prototype would still apply.  */
3450 char dlopen();
3451
3452 int main() {
3453 dlopen()
3454 ; return 0; }
3455 EOF
3456 if { (eval echo configure:3457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3457   rm -rf conftest*
3458   eval "ac_cv_lib_$ac_lib_var=yes"
3459 else
3460   echo "configure: failed program was:" >&5
3461   cat conftest.$ac_ext >&5
3462   rm -rf conftest*
3463   eval "ac_cv_lib_$ac_lib_var=no"
3464 fi
3465 rm -f conftest*
3466 LIBS="$ac_save_LIBS"
3467
3468 fi
3469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3470   echo "$ac_t""yes" 1>&6
3471   LIBS="$LIBS -ldl";
3472         cat >> confdefs.h <<\EOF
3473 #define HAVE_LIBDL 1
3474 EOF
3475
3476 else
3477   echo "$ac_t""no" 1>&6
3478 fi
3479
3480
3481
3482 ############################################
3483 # check if the compiler can do immediate structures
3484 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3485 echo "configure:3486: checking for immediate structures" >&5
3486 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3487   echo $ac_n "(cached) $ac_c" 1>&6
3488 else
3489   
3490     cat > conftest.$ac_ext <<EOF
3491 #line 3492 "configure"
3492 #include "confdefs.h"
3493
3494 #include <stdio.h>
3495 int main() {
3496
3497    #define X_FOOBAR(x) ((FOOBAR) { x })
3498    typedef struct {unsigned x;} FOOBAR;
3499    FOOBAR f = X_FOOBAR(1);   
3500
3501 ; return 0; }
3502 EOF
3503 if { (eval echo configure:3504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3504   rm -rf conftest*
3505   samba_cv_immediate_structures=yes
3506 else
3507   echo "configure: failed program was:" >&5
3508   cat conftest.$ac_ext >&5
3509   rm -rf conftest*
3510   samba_cv_immediate_structures=no
3511 fi
3512 rm -f conftest*
3513 fi
3514
3515 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3516 if test x"$samba_cv_immediate_structures" = x"yes"; then
3517    cat >> confdefs.h <<\EOF
3518 #define HAVE_IMMEDIATE_STRUCTURES 1
3519 EOF
3520
3521 fi
3522
3523 ############################################
3524 # check for unix domain sockets
3525 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3526 echo "configure:3527: checking for unix domain sockets" >&5
3527 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3528   echo $ac_n "(cached) $ac_c" 1>&6
3529 else
3530   
3531     cat > conftest.$ac_ext <<EOF
3532 #line 3533 "configure"
3533 #include "confdefs.h"
3534
3535 #include <sys/types.h>
3536 #include <stdlib.h>
3537 #include <stddef.h>
3538 #include <sys/socket.h>
3539 #include <sys/un.h>
3540 int main() {
3541
3542   struct sockaddr_un sunaddr; 
3543   sunaddr.sun_family = AF_UNIX;
3544
3545 ; return 0; }
3546 EOF
3547 if { (eval echo configure:3548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3548   rm -rf conftest*
3549   samba_cv_unixsocket=yes
3550 else
3551   echo "configure: failed program was:" >&5
3552   cat conftest.$ac_ext >&5
3553   rm -rf conftest*
3554   samba_cv_unixsocket=no
3555 fi
3556 rm -f conftest*
3557 fi
3558
3559 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3560 if test x"$samba_cv_unixsocket" = x"yes"; then
3561    cat >> confdefs.h <<\EOF
3562 #define HAVE_UNIXSOCKET 1
3563 EOF
3564
3565 fi
3566
3567
3568 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3569 echo "configure:3570: checking for socklen_t type" >&5
3570 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3571   echo $ac_n "(cached) $ac_c" 1>&6
3572 else
3573   
3574     cat > conftest.$ac_ext <<EOF
3575 #line 3576 "configure"
3576 #include "confdefs.h"
3577
3578 #include <sys/types.h>
3579 #if STDC_HEADERS
3580 #include <stdlib.h>
3581 #include <stddef.h>
3582 #endif
3583 #include <sys/socket.h>
3584 int main() {
3585 socklen_t i = 0
3586 ; return 0; }
3587 EOF
3588 if { (eval echo configure:3589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3589   rm -rf conftest*
3590   samba_cv_socklen_t=yes
3591 else
3592   echo "configure: failed program was:" >&5
3593   cat conftest.$ac_ext >&5
3594   rm -rf conftest*
3595   samba_cv_socklen_t=no
3596 fi
3597 rm -f conftest*
3598 fi
3599
3600 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3601 if test x"$samba_cv_socklen_t" = x"yes"; then
3602    cat >> confdefs.h <<\EOF
3603 #define HAVE_SOCKLEN_T_TYPE 1
3604 EOF
3605
3606 fi
3607
3608 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3609 echo "configure:3610: checking for sig_atomic_t type" >&5
3610 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3611   echo $ac_n "(cached) $ac_c" 1>&6
3612 else
3613   
3614     cat > conftest.$ac_ext <<EOF
3615 #line 3616 "configure"
3616 #include "confdefs.h"
3617
3618 #include <sys/types.h>
3619 #if STDC_HEADERS
3620 #include <stdlib.h>
3621 #include <stddef.h>
3622 #endif
3623 #include <signal.h>
3624 int main() {
3625 sig_atomic_t i = 0
3626 ; return 0; }
3627 EOF
3628 if { (eval echo configure:3629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3629   rm -rf conftest*
3630   samba_cv_sig_atomic_t=yes
3631 else
3632   echo "configure: failed program was:" >&5
3633   cat conftest.$ac_ext >&5
3634   rm -rf conftest*
3635   samba_cv_sig_atomic_t=no
3636 fi
3637 rm -f conftest*
3638 fi
3639
3640 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3641 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3642    cat >> confdefs.h <<\EOF
3643 #define HAVE_SIG_ATOMIC_T_TYPE 1
3644 EOF
3645
3646 fi
3647
3648 # stupid headers have the functions but no declaration. grrrr.
3649
3650  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3651 echo "configure:3652: checking for errno declaration" >&5
3652 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3653   echo $ac_n "(cached) $ac_c" 1>&6
3654 else
3655   
3656     cat > conftest.$ac_ext <<EOF
3657 #line 3658 "configure"
3658 #include "confdefs.h"
3659 #include <errno.h>
3660 int main() {
3661 int i = (int)errno
3662 ; return 0; }
3663 EOF
3664 if { (eval echo configure:3665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3665   rm -rf conftest*
3666   ac_cv_have_errno_decl=yes
3667 else
3668   echo "configure: failed program was:" >&5
3669   cat conftest.$ac_ext >&5
3670   rm -rf conftest*
3671   ac_cv_have_errno_decl=no
3672 fi
3673 rm -f conftest*
3674 fi
3675
3676 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3677  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3678     cat >> confdefs.h <<\EOF
3679 #define HAVE_ERRNO_DECL 1
3680 EOF
3681
3682  fi
3683
3684
3685  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3686 echo "configure:3687: checking for setresuid declaration" >&5
3687 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3688   echo $ac_n "(cached) $ac_c" 1>&6
3689 else
3690   
3691     cat > conftest.$ac_ext <<EOF
3692 #line 3693 "configure"
3693 #include "confdefs.h"
3694 #include <unistd.h>
3695 int main() {
3696 int i = (int)setresuid
3697 ; return 0; }
3698 EOF
3699 if { (eval echo configure:3700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3700   rm -rf conftest*
3701   ac_cv_have_setresuid_decl=yes
3702 else
3703   echo "configure: failed program was:" >&5
3704   cat conftest.$ac_ext >&5
3705   rm -rf conftest*
3706   ac_cv_have_setresuid_decl=no
3707 fi
3708 rm -f conftest*
3709 fi
3710
3711 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3712  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3713     cat >> confdefs.h <<\EOF
3714 #define HAVE_SETRESUID_DECL 1
3715 EOF
3716
3717  fi
3718
3719
3720  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3721 echo "configure:3722: checking for setresgid declaration" >&5
3722 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3723   echo $ac_n "(cached) $ac_c" 1>&6
3724 else
3725   
3726     cat > conftest.$ac_ext <<EOF
3727 #line 3728 "configure"
3728 #include "confdefs.h"
3729 #include <unistd.h>
3730 int main() {
3731 int i = (int)setresgid
3732 ; return 0; }
3733 EOF
3734 if { (eval echo configure:3735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3735   rm -rf conftest*
3736   ac_cv_have_setresgid_decl=yes
3737 else
3738   echo "configure: failed program was:" >&5
3739   cat conftest.$ac_ext >&5
3740   rm -rf conftest*
3741   ac_cv_have_setresgid_decl=no
3742 fi
3743 rm -f conftest*
3744 fi
3745
3746 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3747  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3748     cat >> confdefs.h <<\EOF
3749 #define HAVE_SETRESGID_DECL 1
3750 EOF
3751
3752  fi
3753
3754
3755  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3756 echo "configure:3757: checking for asprintf declaration" >&5
3757 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3758   echo $ac_n "(cached) $ac_c" 1>&6
3759 else
3760   
3761     cat > conftest.$ac_ext <<EOF
3762 #line 3763 "configure"
3763 #include "confdefs.h"
3764 #include <stdio.h>
3765 int main() {
3766 int i = (int)asprintf
3767 ; return 0; }
3768 EOF
3769 if { (eval echo configure:3770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3770   rm -rf conftest*
3771   ac_cv_have_asprintf_decl=yes
3772 else
3773   echo "configure: failed program was:" >&5
3774   cat conftest.$ac_ext >&5
3775   rm -rf conftest*
3776   ac_cv_have_asprintf_decl=no
3777 fi
3778 rm -f conftest*
3779 fi
3780
3781 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3782  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3783     cat >> confdefs.h <<\EOF
3784 #define HAVE_ASPRINTF_DECL 1
3785 EOF
3786
3787  fi
3788
3789
3790  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3791 echo "configure:3792: checking for vasprintf declaration" >&5
3792 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3793   echo $ac_n "(cached) $ac_c" 1>&6
3794 else
3795   
3796     cat > conftest.$ac_ext <<EOF
3797 #line 3798 "configure"
3798 #include "confdefs.h"
3799 #include <stdio.h>
3800 int main() {
3801 int i = (int)vasprintf
3802 ; return 0; }
3803 EOF
3804 if { (eval echo configure:3805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3805   rm -rf conftest*
3806   ac_cv_have_vasprintf_decl=yes
3807 else
3808   echo "configure: failed program was:" >&5
3809   cat conftest.$ac_ext >&5
3810   rm -rf conftest*
3811   ac_cv_have_vasprintf_decl=no
3812 fi
3813 rm -f conftest*
3814 fi
3815
3816 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3817  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3818     cat >> confdefs.h <<\EOF
3819 #define HAVE_VASPRINTF_DECL 1
3820 EOF
3821
3822  fi
3823
3824
3825  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3826 echo "configure:3827: checking for vsnprintf declaration" >&5
3827 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3828   echo $ac_n "(cached) $ac_c" 1>&6
3829 else
3830   
3831     cat > conftest.$ac_ext <<EOF
3832 #line 3833 "configure"
3833 #include "confdefs.h"
3834 #include <stdio.h>
3835 int main() {
3836 int i = (int)vsnprintf
3837 ; return 0; }
3838 EOF
3839 if { (eval echo configure:3840: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3840   rm -rf conftest*
3841   ac_cv_have_vsnprintf_decl=yes
3842 else
3843   echo "configure: failed program was:" >&5
3844   cat conftest.$ac_ext >&5
3845   rm -rf conftest*
3846   ac_cv_have_vsnprintf_decl=no
3847 fi
3848 rm -f conftest*
3849 fi
3850
3851 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3852  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3853     cat >> confdefs.h <<\EOF
3854 #define HAVE_VSNPRINTF_DECL 1
3855 EOF
3856
3857  fi
3858
3859
3860  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3861 echo "configure:3862: checking for snprintf declaration" >&5
3862 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3863   echo $ac_n "(cached) $ac_c" 1>&6
3864 else
3865   
3866     cat > conftest.$ac_ext <<EOF
3867 #line 3868 "configure"
3868 #include "confdefs.h"
3869 #include <stdio.h>
3870 int main() {
3871 int i = (int)snprintf
3872 ; return 0; }
3873 EOF
3874 if { (eval echo configure:3875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3875   rm -rf conftest*
3876   ac_cv_have_snprintf_decl=yes
3877 else
3878   echo "configure: failed program was:" >&5
3879   cat conftest.$ac_ext >&5
3880   rm -rf conftest*
3881   ac_cv_have_snprintf_decl=no
3882 fi
3883 rm -f conftest*
3884 fi
3885
3886 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3887  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3888     cat >> confdefs.h <<\EOF
3889 #define HAVE_SNPRINTF_DECL 1
3890 EOF
3891
3892  fi
3893
3894
3895 # and glibc has setresuid under linux but the function does
3896 # nothing until kernel 2.1.44! very dumb.
3897 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3898 echo "configure:3899: checking for real setresuid" >&5
3899 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3900   echo $ac_n "(cached) $ac_c" 1>&6
3901 else
3902   
3903     if test "$cross_compiling" = yes; then
3904   samba_cv_have_setresuid=cross
3905 else
3906   cat > conftest.$ac_ext <<EOF
3907 #line 3908 "configure"
3908 #include "confdefs.h"
3909 #include <errno.h>
3910 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3911 EOF
3912 if { (eval echo configure:3913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3913 then
3914   samba_cv_have_setresuid=yes
3915 else
3916   echo "configure: failed program was:" >&5
3917   cat conftest.$ac_ext >&5
3918   rm -fr conftest*
3919   samba_cv_have_setresuid=no
3920 fi
3921 rm -fr conftest*
3922 fi
3923
3924 fi
3925
3926 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
3927 if test x"$samba_cv_have_setresuid" = x"yes"; then
3928     cat >> confdefs.h <<\EOF
3929 #define HAVE_SETRESUID 1
3930 EOF
3931
3932 fi
3933
3934 # Do the same check for setresguid...
3935 #
3936 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
3937 echo "configure:3938: checking for real setresgid" >&5
3938 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
3939   echo $ac_n "(cached) $ac_c" 1>&6
3940 else
3941   
3942     if test "$cross_compiling" = yes; then
3943   samba_cv_have_setresgid=cross
3944 else
3945   cat > conftest.$ac_ext <<EOF
3946 #line 3947 "configure"
3947 #include "confdefs.h"
3948 #include <unistd.h>
3949 #include <errno.h>
3950 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
3951 EOF
3952 if { (eval echo configure:3953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3953 then
3954   samba_cv_have_setresgid=yes
3955 else
3956   echo "configure: failed program was:" >&5
3957   cat conftest.$ac_ext >&5
3958   rm -fr conftest*
3959   samba_cv_have_setresgid=no
3960 fi
3961 rm -fr conftest*
3962 fi
3963
3964 fi
3965
3966 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
3967 if test x"$samba_cv_have_setresgid" = x"yes"; then
3968     cat >> confdefs.h <<\EOF
3969 #define HAVE_SETRESGID 1
3970 EOF
3971
3972 fi
3973
3974 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
3975 echo "configure:3976: checking for 8-bit clean memcmp" >&5
3976 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
3977   echo $ac_n "(cached) $ac_c" 1>&6
3978 else
3979   if test "$cross_compiling" = yes; then
3980   ac_cv_func_memcmp_clean=no
3981 else
3982   cat > conftest.$ac_ext <<EOF
3983 #line 3984 "configure"
3984 #include "confdefs.h"
3985
3986 main()
3987 {
3988   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
3989   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
3990 }
3991
3992 EOF
3993 if { (eval echo configure:3994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3994 then
3995   ac_cv_func_memcmp_clean=yes
3996 else
3997   echo "configure: failed program was:" >&5
3998   cat conftest.$ac_ext >&5
3999   rm -fr conftest*
4000   ac_cv_func_memcmp_clean=no
4001 fi
4002 rm -fr conftest*
4003 fi
4004
4005 fi
4006
4007 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4008 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4009
4010
4011 ###############################################
4012 # test for where we get crypt() from
4013 for ac_func in crypt
4014 do
4015 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4016 echo "configure:4017: checking for $ac_func" >&5
4017 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4018   echo $ac_n "(cached) $ac_c" 1>&6
4019 else
4020   cat > conftest.$ac_ext <<EOF
4021 #line 4022 "configure"
4022 #include "confdefs.h"
4023 /* System header to define __stub macros and hopefully few prototypes,
4024     which can conflict with char $ac_func(); below.  */
4025 #include <assert.h>
4026 /* Override any gcc2 internal prototype to avoid an error.  */
4027 /* We use char because int might match the return type of a gcc2
4028     builtin and then its argument prototype would still apply.  */
4029 char $ac_func();
4030
4031 int main() {
4032
4033 /* The GNU C library defines this for functions which it implements
4034     to always fail with ENOSYS.  Some functions are actually named
4035     something starting with __ and the normal name is an alias.  */
4036 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4037 choke me
4038 #else
4039 $ac_func();
4040 #endif
4041
4042 ; return 0; }
4043 EOF
4044 if { (eval echo configure:4045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4045   rm -rf conftest*
4046   eval "ac_cv_func_$ac_func=yes"
4047 else
4048   echo "configure: failed program was:" >&5
4049   cat conftest.$ac_ext >&5
4050   rm -rf conftest*
4051   eval "ac_cv_func_$ac_func=no"
4052 fi
4053 rm -f conftest*
4054 fi
4055
4056 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4057   echo "$ac_t""yes" 1>&6
4058     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4059   cat >> confdefs.h <<EOF
4060 #define $ac_tr_func 1
4061 EOF
4062  
4063 else
4064   echo "$ac_t""no" 1>&6
4065 fi
4066 done
4067
4068 if test x"$ac_cv_func_crypt" = x"no"; then
4069     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4070 echo "configure:4071: checking for crypt in -lcrypt" >&5
4071 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4072 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4073   echo $ac_n "(cached) $ac_c" 1>&6
4074 else
4075   ac_save_LIBS="$LIBS"
4076 LIBS="-lcrypt  $LIBS"
4077 cat > conftest.$ac_ext <<EOF
4078 #line 4079 "configure"
4079 #include "confdefs.h"
4080 /* Override any gcc2 internal prototype to avoid an error.  */
4081 /* We use char because int might match the return type of a gcc2
4082     builtin and then its argument prototype would still apply.  */
4083 char crypt();
4084
4085 int main() {
4086 crypt()
4087 ; return 0; }
4088 EOF
4089 if { (eval echo configure:4090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4090   rm -rf conftest*
4091   eval "ac_cv_lib_$ac_lib_var=yes"
4092 else
4093   echo "configure: failed program was:" >&5
4094   cat conftest.$ac_ext >&5
4095   rm -rf conftest*
4096   eval "ac_cv_lib_$ac_lib_var=no"
4097 fi
4098 rm -f conftest*
4099 LIBS="$ac_save_LIBS"
4100
4101 fi
4102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4103   echo "$ac_t""yes" 1>&6
4104   LIBS="$LIBS -lcrypt";
4105         cat >> confdefs.h <<\EOF
4106 #define HAVE_CRYPT 1
4107 EOF
4108
4109 else
4110   echo "$ac_t""no" 1>&6
4111 fi
4112
4113 fi
4114
4115
4116 ###############################################
4117 # Readline included by default unless explicitly asked not to
4118 test "${with_readline+set}" != "set" && with_readline=yes
4119
4120 # test for where we get readline() from
4121 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4122 echo "configure:4123: checking whether to use readline" >&5
4123 # Check whether --with-readline or --without-readline was given.
4124 if test "${with_readline+set}" = set; then
4125   withval="$with_readline"
4126     case "$with_readline" in
4127   yes)
4128     echo "$ac_t""yes" 1>&6
4129
4130     for ac_hdr in readline.h history.h readline/readline.h
4131 do
4132 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4133 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4134 echo "configure:4135: checking for $ac_hdr" >&5
4135 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4136   echo $ac_n "(cached) $ac_c" 1>&6
4137 else
4138   cat > conftest.$ac_ext <<EOF
4139 #line 4140 "configure"
4140 #include "confdefs.h"
4141 #include <$ac_hdr>
4142 EOF
4143 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4144 { (eval echo configure:4145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4145 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4146 if test -z "$ac_err"; then
4147   rm -rf conftest*
4148   eval "ac_cv_header_$ac_safe=yes"
4149 else
4150   echo "$ac_err" >&5
4151   echo "configure: failed program was:" >&5
4152   cat conftest.$ac_ext >&5
4153   rm -rf conftest*
4154   eval "ac_cv_header_$ac_safe=no"
4155 fi
4156 rm -f conftest*
4157 fi
4158 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4159   echo "$ac_t""yes" 1>&6
4160     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4161   cat >> confdefs.h <<EOF
4162 #define $ac_tr_hdr 1
4163 EOF
4164  
4165 else
4166   echo "$ac_t""no" 1>&6
4167 fi
4168 done
4169
4170     for ac_hdr in readline/history.h
4171 do
4172 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4173 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4174 echo "configure:4175: checking for $ac_hdr" >&5
4175 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4176   echo $ac_n "(cached) $ac_c" 1>&6
4177 else
4178   cat > conftest.$ac_ext <<EOF
4179 #line 4180 "configure"
4180 #include "confdefs.h"
4181 #include <$ac_hdr>
4182 EOF
4183 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4184 { (eval echo configure:4185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4185 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4186 if test -z "$ac_err"; then
4187   rm -rf conftest*
4188   eval "ac_cv_header_$ac_safe=yes"
4189 else
4190   echo "$ac_err" >&5
4191   echo "configure: failed program was:" >&5
4192   cat conftest.$ac_ext >&5
4193   rm -rf conftest*
4194   eval "ac_cv_header_$ac_safe=no"
4195 fi
4196 rm -f conftest*
4197 fi
4198 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4199   echo "$ac_t""yes" 1>&6
4200     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4201   cat >> confdefs.h <<EOF
4202 #define $ac_tr_hdr 1
4203 EOF
4204  
4205 else
4206   echo "$ac_t""no" 1>&6
4207 fi
4208 done
4209
4210
4211     for ac_hdr in readline.h readline/readline.h
4212 do
4213 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4214 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4215 echo "configure:4216: checking for $ac_hdr" >&5
4216 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4217   echo $ac_n "(cached) $ac_c" 1>&6
4218 else
4219   cat > conftest.$ac_ext <<EOF
4220 #line 4221 "configure"
4221 #include "confdefs.h"
4222 #include <$ac_hdr>
4223 EOF
4224 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4225 { (eval echo configure:4226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4226 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4227 if test -z "$ac_err"; then
4228   rm -rf conftest*
4229   eval "ac_cv_header_$ac_safe=yes"
4230 else
4231   echo "$ac_err" >&5
4232   echo "configure: failed program was:" >&5
4233   cat conftest.$ac_ext >&5
4234   rm -rf conftest*
4235   eval "ac_cv_header_$ac_safe=no"
4236 fi
4237 rm -f conftest*
4238 fi
4239 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4240   echo "$ac_t""yes" 1>&6
4241     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4242   cat >> confdefs.h <<EOF
4243 #define $ac_tr_hdr 1
4244 EOF
4245  
4246       for termlib in ncurses curses termcap terminfo termlib; do
4247        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4248 echo "configure:4249: checking for tgetent in -l${termlib}" >&5
4249 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4250 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4251   echo $ac_n "(cached) $ac_c" 1>&6
4252 else
4253   ac_save_LIBS="$LIBS"
4254 LIBS="-l${termlib}  $LIBS"
4255 cat > conftest.$ac_ext <<EOF
4256 #line 4257 "configure"
4257 #include "confdefs.h"
4258 /* Override any gcc2 internal prototype to avoid an error.  */
4259 /* We use char because int might match the return type of a gcc2
4260     builtin and then its argument prototype would still apply.  */
4261 char tgetent();
4262
4263 int main() {
4264 tgetent()
4265 ; return 0; }
4266 EOF
4267 if { (eval echo configure:4268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4268   rm -rf conftest*
4269   eval "ac_cv_lib_$ac_lib_var=yes"
4270 else
4271   echo "configure: failed program was:" >&5
4272   cat conftest.$ac_ext >&5
4273   rm -rf conftest*
4274   eval "ac_cv_lib_$ac_lib_var=no"
4275 fi
4276 rm -f conftest*
4277 LIBS="$ac_save_LIBS"
4278
4279 fi
4280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4281   echo "$ac_t""yes" 1>&6
4282   TERMLIBS="-l${termlib}"; break
4283 else
4284   echo "$ac_t""no" 1>&6
4285 fi
4286
4287       done
4288       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4289 echo "configure:4290: checking for rl_callback_handler_install in -lreadline" >&5
4290 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4291 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4292   echo $ac_n "(cached) $ac_c" 1>&6
4293 else
4294   ac_save_LIBS="$LIBS"
4295 LIBS="-lreadline $TERMLIBS $LIBS"
4296 cat > conftest.$ac_ext <<EOF
4297 #line 4298 "configure"
4298 #include "confdefs.h"
4299 /* Override any gcc2 internal prototype to avoid an error.  */
4300 /* We use char because int might match the return type of a gcc2
4301     builtin and then its argument prototype would still apply.  */
4302 char rl_callback_handler_install();
4303
4304 int main() {
4305 rl_callback_handler_install()
4306 ; return 0; }
4307 EOF
4308 if { (eval echo configure:4309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4309   rm -rf conftest*
4310   eval "ac_cv_lib_$ac_lib_var=yes"
4311 else
4312   echo "configure: failed program was:" >&5
4313   cat conftest.$ac_ext >&5
4314   rm -rf conftest*
4315   eval "ac_cv_lib_$ac_lib_var=no"
4316 fi
4317 rm -f conftest*
4318 LIBS="$ac_save_LIBS"
4319
4320 fi
4321 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4322   echo "$ac_t""yes" 1>&6
4323   TERMLIBS="-lreadline $TERMLIBS"
4324        cat >> confdefs.h <<\EOF
4325 #define HAVE_LIBREADLINE 1
4326 EOF
4327
4328        break
4329 else
4330   echo "$ac_t""no" 1>&6
4331 TERMLIBS=
4332 fi
4333
4334 else
4335   echo "$ac_t""no" 1>&6
4336 fi
4337 done
4338
4339     ;;
4340   no)
4341     echo "$ac_t""no" 1>&6
4342     ;;
4343   *)
4344     echo "$ac_t""yes" 1>&6
4345
4346     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4347     # alternate readline path
4348     _ldflags=${LDFLAGS}
4349     _cppflags=${CPPFLAGS}
4350
4351     # Add additional search path
4352     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4353     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4354
4355     for ac_hdr in readline.h history.h readline/readline.h
4356 do
4357 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4358 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4359 echo "configure:4360: checking for $ac_hdr" >&5
4360 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4361   echo $ac_n "(cached) $ac_c" 1>&6
4362 else
4363   cat > conftest.$ac_ext <<EOF
4364 #line 4365 "configure"
4365 #include "confdefs.h"
4366 #include <$ac_hdr>
4367 EOF
4368 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4369 { (eval echo configure:4370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4370 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4371 if test -z "$ac_err"; then
4372   rm -rf conftest*
4373   eval "ac_cv_header_$ac_safe=yes"
4374 else
4375   echo "$ac_err" >&5
4376   echo "configure: failed program was:" >&5
4377   cat conftest.$ac_ext >&5
4378   rm -rf conftest*
4379   eval "ac_cv_header_$ac_safe=no"
4380 fi
4381 rm -f conftest*
4382 fi
4383 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4384   echo "$ac_t""yes" 1>&6
4385     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4386   cat >> confdefs.h <<EOF
4387 #define $ac_tr_hdr 1
4388 EOF
4389  
4390 else
4391   echo "$ac_t""no" 1>&6
4392 fi
4393 done
4394
4395     for ac_hdr in readline/history.h
4396 do
4397 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4398 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4399 echo "configure:4400: checking for $ac_hdr" >&5
4400 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4401   echo $ac_n "(cached) $ac_c" 1>&6
4402 else
4403   cat > conftest.$ac_ext <<EOF
4404 #line 4405 "configure"
4405 #include "confdefs.h"
4406 #include <$ac_hdr>
4407 EOF
4408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4409 { (eval echo configure:4410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4411 if test -z "$ac_err"; then
4412   rm -rf conftest*
4413   eval "ac_cv_header_$ac_safe=yes"
4414 else
4415   echo "$ac_err" >&5
4416   echo "configure: failed program was:" >&5
4417   cat conftest.$ac_ext >&5
4418   rm -rf conftest*
4419   eval "ac_cv_header_$ac_safe=no"
4420 fi
4421 rm -f conftest*
4422 fi
4423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4424   echo "$ac_t""yes" 1>&6
4425     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4426   cat >> confdefs.h <<EOF
4427 #define $ac_tr_hdr 1
4428 EOF
4429  
4430 else
4431   echo "$ac_t""no" 1>&6
4432 fi
4433 done
4434
4435
4436     for ac_hdr in readline.h readline/readline.h
4437 do
4438 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4439 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4440 echo "configure:4441: checking for $ac_hdr" >&5
4441 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4442   echo $ac_n "(cached) $ac_c" 1>&6
4443 else
4444   cat > conftest.$ac_ext <<EOF
4445 #line 4446 "configure"
4446 #include "confdefs.h"
4447 #include <$ac_hdr>
4448 EOF
4449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4450 { (eval echo configure:4451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4452 if test -z "$ac_err"; then
4453   rm -rf conftest*
4454   eval "ac_cv_header_$ac_safe=yes"
4455 else
4456   echo "$ac_err" >&5
4457   echo "configure: failed program was:" >&5
4458   cat conftest.$ac_ext >&5
4459   rm -rf conftest*
4460   eval "ac_cv_header_$ac_safe=no"
4461 fi
4462 rm -f conftest*
4463 fi
4464 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4465   echo "$ac_t""yes" 1>&6
4466     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4467   cat >> confdefs.h <<EOF
4468 #define $ac_tr_hdr 1
4469 EOF
4470  
4471       for termlib in ncurses curses termcap terminfo termlib; do
4472        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4473 echo "configure:4474: checking for tgetent in -l${termlib}" >&5
4474 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4475 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4476   echo $ac_n "(cached) $ac_c" 1>&6
4477 else
4478   ac_save_LIBS="$LIBS"
4479 LIBS="-l${termlib}  $LIBS"
4480 cat > conftest.$ac_ext <<EOF
4481 #line 4482 "configure"
4482 #include "confdefs.h"
4483 /* Override any gcc2 internal prototype to avoid an error.  */
4484 /* We use char because int might match the return type of a gcc2
4485     builtin and then its argument prototype would still apply.  */
4486 char tgetent();
4487
4488 int main() {
4489 tgetent()
4490 ; return 0; }
4491 EOF
4492 if { (eval echo configure:4493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4493   rm -rf conftest*
4494   eval "ac_cv_lib_$ac_lib_var=yes"
4495 else
4496   echo "configure: failed program was:" >&5
4497   cat conftest.$ac_ext >&5
4498   rm -rf conftest*
4499   eval "ac_cv_lib_$ac_lib_var=no"
4500 fi
4501 rm -f conftest*
4502 LIBS="$ac_save_LIBS"
4503
4504 fi
4505 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4506   echo "$ac_t""yes" 1>&6
4507   TERMLIBS="-l${termlib}"; break
4508 else
4509   echo "$ac_t""no" 1>&6
4510 fi
4511
4512       done
4513       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4514 echo "configure:4515: checking for rl_callback_handler_install in -lreadline" >&5
4515 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4516 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4517   echo $ac_n "(cached) $ac_c" 1>&6
4518 else
4519   ac_save_LIBS="$LIBS"
4520 LIBS="-lreadline $TERMLIBS $LIBS"
4521 cat > conftest.$ac_ext <<EOF
4522 #line 4523 "configure"
4523 #include "confdefs.h"
4524 /* Override any gcc2 internal prototype to avoid an error.  */
4525 /* We use char because int might match the return type of a gcc2
4526     builtin and then its argument prototype would still apply.  */
4527 char rl_callback_handler_install();
4528
4529 int main() {
4530 rl_callback_handler_install()
4531 ; return 0; }
4532 EOF
4533 if { (eval echo configure:4534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4534   rm -rf conftest*
4535   eval "ac_cv_lib_$ac_lib_var=yes"
4536 else
4537   echo "configure: failed program was:" >&5
4538   cat conftest.$ac_ext >&5
4539   rm -rf conftest*
4540   eval "ac_cv_lib_$ac_lib_var=no"
4541 fi
4542 rm -f conftest*
4543 LIBS="$ac_save_LIBS"
4544
4545 fi
4546 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4547   echo "$ac_t""yes" 1>&6
4548   TERMLDFLAGS="-L$with_readline/lib"
4549        TERMCPPFLAGS="-I$with_readline/include"
4550        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4551        TERMLIBS="-lreadline $TERMLIBS"
4552        cat >> confdefs.h <<\EOF
4553 #define HAVE_LIBREADLINE 1
4554 EOF
4555
4556        break
4557 else
4558   echo "$ac_t""no" 1>&6
4559 TERMLIBS= CPPFLAGS=$_cppflags
4560 fi
4561
4562 else
4563   echo "$ac_t""no" 1>&6
4564 fi
4565 done
4566
4567
4568     LDFLAGS=$_ldflags
4569     ;;
4570   esac
4571 else
4572   echo "$ac_t""no" 1>&6
4573
4574 fi
4575
4576
4577
4578
4579 # The following test taken from the cvs sources
4580 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4581 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4582 # libsocket.so which has a bad implementation of gethostbyname (it
4583 # only looks in /etc/hosts), so we only look for -lsocket if we need
4584 # it.
4585 for ac_func in connect
4586 do
4587 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4588 echo "configure:4589: checking for $ac_func" >&5
4589 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4590   echo $ac_n "(cached) $ac_c" 1>&6
4591 else
4592   cat > conftest.$ac_ext <<EOF
4593 #line 4594 "configure"
4594 #include "confdefs.h"
4595 /* System header to define __stub macros and hopefully few prototypes,
4596     which can conflict with char $ac_func(); below.  */
4597 #include <assert.h>
4598 /* Override any gcc2 internal prototype to avoid an error.  */
4599 /* We use char because int might match the return type of a gcc2
4600     builtin and then its argument prototype would still apply.  */
4601 char $ac_func();
4602
4603 int main() {
4604
4605 /* The GNU C library defines this for functions which it implements
4606     to always fail with ENOSYS.  Some functions are actually named
4607     something starting with __ and the normal name is an alias.  */
4608 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4609 choke me
4610 #else
4611 $ac_func();
4612 #endif
4613
4614 ; return 0; }
4615 EOF
4616 if { (eval echo configure:4617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4617   rm -rf conftest*
4618   eval "ac_cv_func_$ac_func=yes"
4619 else
4620   echo "configure: failed program was:" >&5
4621   cat conftest.$ac_ext >&5
4622   rm -rf conftest*
4623   eval "ac_cv_func_$ac_func=no"
4624 fi
4625 rm -f conftest*
4626 fi
4627
4628 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4629   echo "$ac_t""yes" 1>&6
4630     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4631   cat >> confdefs.h <<EOF
4632 #define $ac_tr_func 1
4633 EOF
4634  
4635 else
4636   echo "$ac_t""no" 1>&6
4637 fi
4638 done
4639
4640 if test x"$ac_cv_func_connect" = x"no"; then
4641     case "$LIBS" in
4642     *-lnsl*) ;;
4643     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4644 echo "configure:4645: checking for printf in -lnsl_s" >&5
4645 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4646 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4647   echo $ac_n "(cached) $ac_c" 1>&6
4648 else
4649   ac_save_LIBS="$LIBS"
4650 LIBS="-lnsl_s  $LIBS"
4651 cat > conftest.$ac_ext <<EOF
4652 #line 4653 "configure"
4653 #include "confdefs.h"
4654 /* Override any gcc2 internal prototype to avoid an error.  */
4655 /* We use char because int might match the return type of a gcc2
4656     builtin and then its argument prototype would still apply.  */
4657 char printf();
4658
4659 int main() {
4660 printf()
4661 ; return 0; }
4662 EOF
4663 if { (eval echo configure:4664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4664   rm -rf conftest*
4665   eval "ac_cv_lib_$ac_lib_var=yes"
4666 else
4667   echo "configure: failed program was:" >&5
4668   cat conftest.$ac_ext >&5
4669   rm -rf conftest*
4670   eval "ac_cv_lib_$ac_lib_var=no"
4671 fi
4672 rm -f conftest*
4673 LIBS="$ac_save_LIBS"
4674
4675 fi
4676 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4677   echo "$ac_t""yes" 1>&6
4678     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4679     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4680   cat >> confdefs.h <<EOF
4681 #define $ac_tr_lib 1
4682 EOF
4683
4684   LIBS="-lnsl_s $LIBS"
4685
4686 else
4687   echo "$ac_t""no" 1>&6
4688 fi
4689  ;;
4690     esac
4691     case "$LIBS" in
4692     *-lnsl*) ;;
4693     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4694 echo "configure:4695: checking for printf in -lnsl" >&5
4695 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4696 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4697   echo $ac_n "(cached) $ac_c" 1>&6
4698 else
4699   ac_save_LIBS="$LIBS"
4700 LIBS="-lnsl  $LIBS"
4701 cat > conftest.$ac_ext <<EOF
4702 #line 4703 "configure"
4703 #include "confdefs.h"
4704 /* Override any gcc2 internal prototype to avoid an error.  */
4705 /* We use char because int might match the return type of a gcc2
4706     builtin and then its argument prototype would still apply.  */
4707 char printf();
4708
4709 int main() {
4710 printf()
4711 ; return 0; }
4712 EOF
4713 if { (eval echo configure:4714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4714   rm -rf conftest*
4715   eval "ac_cv_lib_$ac_lib_var=yes"
4716 else
4717   echo "configure: failed program was:" >&5
4718   cat conftest.$ac_ext >&5
4719   rm -rf conftest*
4720   eval "ac_cv_lib_$ac_lib_var=no"
4721 fi
4722 rm -f conftest*
4723 LIBS="$ac_save_LIBS"
4724
4725 fi
4726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4727   echo "$ac_t""yes" 1>&6
4728     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4729     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4730   cat >> confdefs.h <<EOF
4731 #define $ac_tr_lib 1
4732 EOF
4733
4734   LIBS="-lnsl $LIBS"
4735
4736 else
4737   echo "$ac_t""no" 1>&6
4738 fi
4739  ;;
4740     esac
4741     case "$LIBS" in
4742     *-lsocket*) ;;
4743     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4744 echo "configure:4745: checking for connect in -lsocket" >&5
4745 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4746 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4747   echo $ac_n "(cached) $ac_c" 1>&6
4748 else
4749   ac_save_LIBS="$LIBS"
4750 LIBS="-lsocket  $LIBS"
4751 cat > conftest.$ac_ext <<EOF
4752 #line 4753 "configure"
4753 #include "confdefs.h"
4754 /* Override any gcc2 internal prototype to avoid an error.  */
4755 /* We use char because int might match the return type of a gcc2
4756     builtin and then its argument prototype would still apply.  */
4757 char connect();
4758
4759 int main() {
4760 connect()
4761 ; return 0; }
4762 EOF
4763 if { (eval echo configure:4764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4764   rm -rf conftest*
4765   eval "ac_cv_lib_$ac_lib_var=yes"
4766 else
4767   echo "configure: failed program was:" >&5
4768   cat conftest.$ac_ext >&5
4769   rm -rf conftest*
4770   eval "ac_cv_lib_$ac_lib_var=no"
4771 fi
4772 rm -f conftest*
4773 LIBS="$ac_save_LIBS"
4774
4775 fi
4776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4777   echo "$ac_t""yes" 1>&6
4778     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4779     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4780   cat >> confdefs.h <<EOF
4781 #define $ac_tr_lib 1
4782 EOF
4783
4784   LIBS="-lsocket $LIBS"
4785
4786 else
4787   echo "$ac_t""no" 1>&6
4788 fi
4789  ;;
4790     esac
4791     case "$LIBS" in
4792     *-linet*) ;;
4793     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4794 echo "configure:4795: checking for connect in -linet" >&5
4795 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4796 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4797   echo $ac_n "(cached) $ac_c" 1>&6
4798 else
4799   ac_save_LIBS="$LIBS"
4800 LIBS="-linet  $LIBS"
4801 cat > conftest.$ac_ext <<EOF
4802 #line 4803 "configure"
4803 #include "confdefs.h"
4804 /* Override any gcc2 internal prototype to avoid an error.  */
4805 /* We use char because int might match the return type of a gcc2
4806     builtin and then its argument prototype would still apply.  */
4807 char connect();
4808
4809 int main() {
4810 connect()
4811 ; return 0; }
4812 EOF
4813 if { (eval echo configure:4814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4814   rm -rf conftest*
4815   eval "ac_cv_lib_$ac_lib_var=yes"
4816 else
4817   echo "configure: failed program was:" >&5
4818   cat conftest.$ac_ext >&5
4819   rm -rf conftest*
4820   eval "ac_cv_lib_$ac_lib_var=no"
4821 fi
4822 rm -f conftest*
4823 LIBS="$ac_save_LIBS"
4824
4825 fi
4826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4827   echo "$ac_t""yes" 1>&6
4828     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4829     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4830   cat >> confdefs.h <<EOF
4831 #define $ac_tr_lib 1
4832 EOF
4833
4834   LIBS="-linet $LIBS"
4835
4836 else
4837   echo "$ac_t""no" 1>&6
4838 fi
4839  ;;
4840     esac
4841             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4842        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4843         # ac_cv_func_connect=yes
4844         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4845         cat >> confdefs.h <<\EOF
4846 #define HAVE_CONNECT 1
4847 EOF
4848
4849     fi
4850 fi
4851
4852 ###############################################
4853 # test for where we get get_yp_default_domain() from
4854 for ac_func in yp_get_default_domain
4855 do
4856 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4857 echo "configure:4858: checking for $ac_func" >&5
4858 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4859   echo $ac_n "(cached) $ac_c" 1>&6
4860 else
4861   cat > conftest.$ac_ext <<EOF
4862 #line 4863 "configure"
4863 #include "confdefs.h"
4864 /* System header to define __stub macros and hopefully few prototypes,
4865     which can conflict with char $ac_func(); below.  */
4866 #include <assert.h>
4867 /* Override any gcc2 internal prototype to avoid an error.  */
4868 /* We use char because int might match the return type of a gcc2
4869     builtin and then its argument prototype would still apply.  */
4870 char $ac_func();
4871
4872 int main() {
4873
4874 /* The GNU C library defines this for functions which it implements
4875     to always fail with ENOSYS.  Some functions are actually named
4876     something starting with __ and the normal name is an alias.  */
4877 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4878 choke me
4879 #else
4880 $ac_func();
4881 #endif
4882
4883 ; return 0; }
4884 EOF
4885 if { (eval echo configure:4886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4886   rm -rf conftest*
4887   eval "ac_cv_func_$ac_func=yes"
4888 else
4889   echo "configure: failed program was:" >&5
4890   cat conftest.$ac_ext >&5
4891   rm -rf conftest*
4892   eval "ac_cv_func_$ac_func=no"
4893 fi
4894 rm -f conftest*
4895 fi
4896
4897 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4898   echo "$ac_t""yes" 1>&6
4899     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4900   cat >> confdefs.h <<EOF
4901 #define $ac_tr_func 1
4902 EOF
4903  
4904 else
4905   echo "$ac_t""no" 1>&6
4906 fi
4907 done
4908
4909 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
4910         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
4911 echo "configure:4912: checking for yp_get_default_domain in -lnsl" >&5
4912 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
4913 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4914   echo $ac_n "(cached) $ac_c" 1>&6
4915 else
4916   ac_save_LIBS="$LIBS"
4917 LIBS="-lnsl  $LIBS"
4918 cat > conftest.$ac_ext <<EOF
4919 #line 4920 "configure"
4920 #include "confdefs.h"
4921 /* Override any gcc2 internal prototype to avoid an error.  */
4922 /* We use char because int might match the return type of a gcc2
4923     builtin and then its argument prototype would still apply.  */
4924 char yp_get_default_domain();
4925
4926 int main() {
4927 yp_get_default_domain()
4928 ; return 0; }
4929 EOF
4930 if { (eval echo configure:4931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4931   rm -rf conftest*
4932   eval "ac_cv_lib_$ac_lib_var=yes"
4933 else
4934   echo "configure: failed program was:" >&5
4935   cat conftest.$ac_ext >&5
4936   rm -rf conftest*
4937   eval "ac_cv_lib_$ac_lib_var=no"
4938 fi
4939 rm -f conftest*
4940 LIBS="$ac_save_LIBS"
4941
4942 fi
4943 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4944   echo "$ac_t""yes" 1>&6
4945   LIBS="$LIBS -lnsl";
4946         cat >> confdefs.h <<\EOF
4947 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
4948 EOF
4949
4950 else
4951   echo "$ac_t""no" 1>&6
4952 fi
4953  
4954 fi
4955
4956 # Check if we have execl, if not we need to compile smbrun.
4957 for ac_func in execl
4958 do
4959 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4960 echo "configure:4961: checking for $ac_func" >&5
4961 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4962   echo $ac_n "(cached) $ac_c" 1>&6
4963 else
4964   cat > conftest.$ac_ext <<EOF
4965 #line 4966 "configure"
4966 #include "confdefs.h"
4967 /* System header to define __stub macros and hopefully few prototypes,
4968     which can conflict with char $ac_func(); below.  */
4969 #include <assert.h>
4970 /* Override any gcc2 internal prototype to avoid an error.  */
4971 /* We use char because int might match the return type of a gcc2
4972     builtin and then its argument prototype would still apply.  */
4973 char $ac_func();
4974
4975 int main() {
4976
4977 /* The GNU C library defines this for functions which it implements
4978     to always fail with ENOSYS.  Some functions are actually named
4979     something starting with __ and the normal name is an alias.  */
4980 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4981 choke me
4982 #else
4983 $ac_func();
4984 #endif
4985
4986 ; return 0; }
4987 EOF
4988 if { (eval echo configure:4989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4989   rm -rf conftest*
4990   eval "ac_cv_func_$ac_func=yes"
4991 else
4992   echo "configure: failed program was:" >&5
4993   cat conftest.$ac_ext >&5
4994   rm -rf conftest*
4995   eval "ac_cv_func_$ac_func=no"
4996 fi
4997 rm -f conftest*
4998 fi
4999
5000 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5001   echo "$ac_t""yes" 1>&6
5002     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5003   cat >> confdefs.h <<EOF
5004 #define $ac_tr_func 1
5005 EOF
5006  
5007 else
5008   echo "$ac_t""no" 1>&6
5009 fi
5010 done
5011
5012 if test x"$ac_cv_func_execl" = x"no"; then
5013     RUNPROG="bin/smbrun"
5014 else
5015     RUNPROG=""
5016 fi
5017
5018 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
5019 do
5020 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5021 echo "configure:5022: checking for $ac_func" >&5
5022 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5023   echo $ac_n "(cached) $ac_c" 1>&6
5024 else
5025   cat > conftest.$ac_ext <<EOF
5026 #line 5027 "configure"
5027 #include "confdefs.h"
5028 /* System header to define __stub macros and hopefully few prototypes,
5029     which can conflict with char $ac_func(); below.  */
5030 #include <assert.h>
5031 /* Override any gcc2 internal prototype to avoid an error.  */
5032 /* We use char because int might match the return type of a gcc2
5033     builtin and then its argument prototype would still apply.  */
5034 char $ac_func();
5035
5036 int main() {
5037
5038 /* The GNU C library defines this for functions which it implements
5039     to always fail with ENOSYS.  Some functions are actually named
5040     something starting with __ and the normal name is an alias.  */
5041 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5042 choke me
5043 #else
5044 $ac_func();
5045 #endif
5046
5047 ; return 0; }
5048 EOF
5049 if { (eval echo configure:5050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5050   rm -rf conftest*
5051   eval "ac_cv_func_$ac_func=yes"
5052 else
5053   echo "configure: failed program was:" >&5
5054   cat conftest.$ac_ext >&5
5055   rm -rf conftest*
5056   eval "ac_cv_func_$ac_func=no"
5057 fi
5058 rm -f conftest*
5059 fi
5060
5061 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5062   echo "$ac_t""yes" 1>&6
5063     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5064   cat >> confdefs.h <<EOF
5065 #define $ac_tr_func 1
5066 EOF
5067  
5068 else
5069   echo "$ac_t""no" 1>&6
5070 fi
5071 done
5072
5073 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset
5074 do
5075 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5076 echo "configure:5077: checking for $ac_func" >&5
5077 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5078   echo $ac_n "(cached) $ac_c" 1>&6
5079 else
5080   cat > conftest.$ac_ext <<EOF
5081 #line 5082 "configure"
5082 #include "confdefs.h"
5083 /* System header to define __stub macros and hopefully few prototypes,
5084     which can conflict with char $ac_func(); below.  */
5085 #include <assert.h>
5086 /* Override any gcc2 internal prototype to avoid an error.  */
5087 /* We use char because int might match the return type of a gcc2
5088     builtin and then its argument prototype would still apply.  */
5089 char $ac_func();
5090
5091 int main() {
5092
5093 /* The GNU C library defines this for functions which it implements
5094     to always fail with ENOSYS.  Some functions are actually named
5095     something starting with __ and the normal name is an alias.  */
5096 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5097 choke me
5098 #else
5099 $ac_func();
5100 #endif
5101
5102 ; return 0; }
5103 EOF
5104 if { (eval echo configure:5105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5105   rm -rf conftest*
5106   eval "ac_cv_func_$ac_func=yes"
5107 else
5108   echo "configure: failed program was:" >&5
5109   cat conftest.$ac_ext >&5
5110   rm -rf conftest*
5111   eval "ac_cv_func_$ac_func=no"
5112 fi
5113 rm -f conftest*
5114 fi
5115
5116 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5117   echo "$ac_t""yes" 1>&6
5118     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5119   cat >> confdefs.h <<EOF
5120 #define $ac_tr_func 1
5121 EOF
5122  
5123 else
5124   echo "$ac_t""no" 1>&6
5125 fi
5126 done
5127
5128 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5129 do
5130 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5131 echo "configure:5132: checking for $ac_func" >&5
5132 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5133   echo $ac_n "(cached) $ac_c" 1>&6
5134 else
5135   cat > conftest.$ac_ext <<EOF
5136 #line 5137 "configure"
5137 #include "confdefs.h"
5138 /* System header to define __stub macros and hopefully few prototypes,
5139     which can conflict with char $ac_func(); below.  */
5140 #include <assert.h>
5141 /* Override any gcc2 internal prototype to avoid an error.  */
5142 /* We use char because int might match the return type of a gcc2
5143     builtin and then its argument prototype would still apply.  */
5144 char $ac_func();
5145
5146 int main() {
5147
5148 /* The GNU C library defines this for functions which it implements
5149     to always fail with ENOSYS.  Some functions are actually named
5150     something starting with __ and the normal name is an alias.  */
5151 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5152 choke me
5153 #else
5154 $ac_func();
5155 #endif
5156
5157 ; return 0; }
5158 EOF
5159 if { (eval echo configure:5160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5160   rm -rf conftest*
5161   eval "ac_cv_func_$ac_func=yes"
5162 else
5163   echo "configure: failed program was:" >&5
5164   cat conftest.$ac_ext >&5
5165   rm -rf conftest*
5166   eval "ac_cv_func_$ac_func=no"
5167 fi
5168 rm -f conftest*
5169 fi
5170
5171 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5172   echo "$ac_t""yes" 1>&6
5173     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5174   cat >> confdefs.h <<EOF
5175 #define $ac_tr_func 1
5176 EOF
5177  
5178 else
5179   echo "$ac_t""no" 1>&6
5180 fi
5181 done
5182
5183 for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
5184 do
5185 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5186 echo "configure:5187: checking for $ac_func" >&5
5187 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5188   echo $ac_n "(cached) $ac_c" 1>&6
5189 else
5190   cat > conftest.$ac_ext <<EOF
5191 #line 5192 "configure"
5192 #include "confdefs.h"
5193 /* System header to define __stub macros and hopefully few prototypes,
5194     which can conflict with char $ac_func(); below.  */
5195 #include <assert.h>
5196 /* Override any gcc2 internal prototype to avoid an error.  */
5197 /* We use char because int might match the return type of a gcc2
5198     builtin and then its argument prototype would still apply.  */
5199 char $ac_func();
5200
5201 int main() {
5202
5203 /* The GNU C library defines this for functions which it implements
5204     to always fail with ENOSYS.  Some functions are actually named
5205     something starting with __ and the normal name is an alias.  */
5206 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5207 choke me
5208 #else
5209 $ac_func();
5210 #endif
5211
5212 ; return 0; }
5213 EOF
5214 if { (eval echo configure:5215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5215   rm -rf conftest*
5216   eval "ac_cv_func_$ac_func=yes"
5217 else
5218   echo "configure: failed program was:" >&5
5219   cat conftest.$ac_ext >&5
5220   rm -rf conftest*
5221   eval "ac_cv_func_$ac_func=no"
5222 fi
5223 rm -f conftest*
5224 fi
5225
5226 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5227   echo "$ac_t""yes" 1>&6
5228     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5229   cat >> confdefs.h <<EOF
5230 #define $ac_tr_func 1
5231 EOF
5232  
5233 else
5234   echo "$ac_t""no" 1>&6
5235 fi
5236 done
5237
5238 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5239 do
5240 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5241 echo "configure:5242: checking for $ac_func" >&5
5242 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5243   echo $ac_n "(cached) $ac_c" 1>&6
5244 else
5245   cat > conftest.$ac_ext <<EOF
5246 #line 5247 "configure"
5247 #include "confdefs.h"
5248 /* System header to define __stub macros and hopefully few prototypes,
5249     which can conflict with char $ac_func(); below.  */
5250 #include <assert.h>
5251 /* Override any gcc2 internal prototype to avoid an error.  */
5252 /* We use char because int might match the return type of a gcc2
5253     builtin and then its argument prototype would still apply.  */
5254 char $ac_func();
5255
5256 int main() {
5257
5258 /* The GNU C library defines this for functions which it implements
5259     to always fail with ENOSYS.  Some functions are actually named
5260     something starting with __ and the normal name is an alias.  */
5261 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5262 choke me
5263 #else
5264 $ac_func();
5265 #endif
5266
5267 ; return 0; }
5268 EOF
5269 if { (eval echo configure:5270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5270   rm -rf conftest*
5271   eval "ac_cv_func_$ac_func=yes"
5272 else
5273   echo "configure: failed program was:" >&5
5274   cat conftest.$ac_ext >&5
5275   rm -rf conftest*
5276   eval "ac_cv_func_$ac_func=no"
5277 fi
5278 rm -f conftest*
5279 fi
5280
5281 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5282   echo "$ac_t""yes" 1>&6
5283     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5284   cat >> confdefs.h <<EOF
5285 #define $ac_tr_func 1
5286 EOF
5287  
5288 else
5289   echo "$ac_t""no" 1>&6
5290 fi
5291 done
5292
5293 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5294 do
5295 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5296 echo "configure:5297: checking for $ac_func" >&5
5297 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5298   echo $ac_n "(cached) $ac_c" 1>&6
5299 else
5300   cat > conftest.$ac_ext <<EOF
5301 #line 5302 "configure"
5302 #include "confdefs.h"
5303 /* System header to define __stub macros and hopefully few prototypes,
5304     which can conflict with char $ac_func(); below.  */
5305 #include <assert.h>
5306 /* Override any gcc2 internal prototype to avoid an error.  */
5307 /* We use char because int might match the return type of a gcc2
5308     builtin and then its argument prototype would still apply.  */
5309 char $ac_func();
5310
5311 int main() {
5312
5313 /* The GNU C library defines this for functions which it implements
5314     to always fail with ENOSYS.  Some functions are actually named
5315     something starting with __ and the normal name is an alias.  */
5316 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5317 choke me
5318 #else
5319 $ac_func();
5320 #endif
5321
5322 ; return 0; }
5323 EOF
5324 if { (eval echo configure:5325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5325   rm -rf conftest*
5326   eval "ac_cv_func_$ac_func=yes"
5327 else
5328   echo "configure: failed program was:" >&5
5329   cat conftest.$ac_ext >&5
5330   rm -rf conftest*
5331   eval "ac_cv_func_$ac_func=no"
5332 fi
5333 rm -f conftest*
5334 fi
5335
5336 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5337   echo "$ac_t""yes" 1>&6
5338     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5339   cat >> confdefs.h <<EOF
5340 #define $ac_tr_func 1
5341 EOF
5342  
5343 else
5344   echo "$ac_t""no" 1>&6
5345 fi
5346 done
5347
5348 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5349 do
5350 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5351 echo "configure:5352: checking for $ac_func" >&5
5352 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5353   echo $ac_n "(cached) $ac_c" 1>&6
5354 else
5355   cat > conftest.$ac_ext <<EOF
5356 #line 5357 "configure"
5357 #include "confdefs.h"
5358 /* System header to define __stub macros and hopefully few prototypes,
5359     which can conflict with char $ac_func(); below.  */
5360 #include <assert.h>
5361 /* Override any gcc2 internal prototype to avoid an error.  */
5362 /* We use char because int might match the return type of a gcc2
5363     builtin and then its argument prototype would still apply.  */
5364 char $ac_func();
5365
5366 int main() {
5367
5368 /* The GNU C library defines this for functions which it implements
5369     to always fail with ENOSYS.  Some functions are actually named
5370     something starting with __ and the normal name is an alias.  */
5371 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5372 choke me
5373 #else
5374 $ac_func();
5375 #endif
5376
5377 ; return 0; }
5378 EOF
5379 if { (eval echo configure:5380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5380   rm -rf conftest*
5381   eval "ac_cv_func_$ac_func=yes"
5382 else
5383   echo "configure: failed program was:" >&5
5384   cat conftest.$ac_ext >&5
5385   rm -rf conftest*
5386   eval "ac_cv_func_$ac_func=no"
5387 fi
5388 rm -f conftest*
5389 fi
5390
5391 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5392   echo "$ac_t""yes" 1>&6
5393     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5394   cat >> confdefs.h <<EOF
5395 #define $ac_tr_func 1
5396 EOF
5397  
5398 else
5399   echo "$ac_t""no" 1>&6
5400 fi
5401 done
5402
5403 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5404 do
5405 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5406 echo "configure:5407: checking for $ac_func" >&5
5407 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5408   echo $ac_n "(cached) $ac_c" 1>&6
5409 else
5410   cat > conftest.$ac_ext <<EOF
5411 #line 5412 "configure"
5412 #include "confdefs.h"
5413 /* System header to define __stub macros and hopefully few prototypes,
5414     which can conflict with char $ac_func(); below.  */
5415 #include <assert.h>
5416 /* Override any gcc2 internal prototype to avoid an error.  */
5417 /* We use char because int might match the return type of a gcc2
5418     builtin and then its argument prototype would still apply.  */
5419 char $ac_func();
5420
5421 int main() {
5422
5423 /* The GNU C library defines this for functions which it implements
5424     to always fail with ENOSYS.  Some functions are actually named
5425     something starting with __ and the normal name is an alias.  */
5426 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5427 choke me
5428 #else
5429 $ac_func();
5430 #endif
5431
5432 ; return 0; }
5433 EOF
5434 if { (eval echo configure:5435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5435   rm -rf conftest*
5436   eval "ac_cv_func_$ac_func=yes"
5437 else
5438   echo "configure: failed program was:" >&5
5439   cat conftest.$ac_ext >&5
5440   rm -rf conftest*
5441   eval "ac_cv_func_$ac_func=no"
5442 fi
5443 rm -f conftest*
5444 fi
5445
5446 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5447   echo "$ac_t""yes" 1>&6
5448     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5449   cat >> confdefs.h <<EOF
5450 #define $ac_tr_func 1
5451 EOF
5452  
5453 else
5454   echo "$ac_t""no" 1>&6
5455 fi
5456 done
5457
5458 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5459 do
5460 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5461 echo "configure:5462: checking for $ac_func" >&5
5462 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5463   echo $ac_n "(cached) $ac_c" 1>&6
5464 else
5465   cat > conftest.$ac_ext <<EOF
5466 #line 5467 "configure"
5467 #include "confdefs.h"
5468 /* System header to define __stub macros and hopefully few prototypes,
5469     which can conflict with char $ac_func(); below.  */
5470 #include <assert.h>
5471 /* Override any gcc2 internal prototype to avoid an error.  */
5472 /* We use char because int might match the return type of a gcc2
5473     builtin and then its argument prototype would still apply.  */
5474 char $ac_func();
5475
5476 int main() {
5477
5478 /* The GNU C library defines this for functions which it implements
5479     to always fail with ENOSYS.  Some functions are actually named
5480     something starting with __ and the normal name is an alias.  */
5481 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5482 choke me
5483 #else
5484 $ac_func();
5485 #endif
5486
5487 ; return 0; }
5488 EOF
5489 if { (eval echo configure:5490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5490   rm -rf conftest*
5491   eval "ac_cv_func_$ac_func=yes"
5492 else
5493   echo "configure: failed program was:" >&5
5494   cat conftest.$ac_ext >&5
5495   rm -rf conftest*
5496   eval "ac_cv_func_$ac_func=no"
5497 fi
5498 rm -f conftest*
5499 fi
5500
5501 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5502   echo "$ac_t""yes" 1>&6
5503     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5504   cat >> confdefs.h <<EOF
5505 #define $ac_tr_func 1
5506 EOF
5507  
5508 else
5509   echo "$ac_t""no" 1>&6
5510 fi
5511 done
5512
5513 # setbuffer is needed for smbtorture
5514 for ac_func in setbuffer
5515 do
5516 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5517 echo "configure:5518: checking for $ac_func" >&5
5518 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5519   echo $ac_n "(cached) $ac_c" 1>&6
5520 else
5521   cat > conftest.$ac_ext <<EOF
5522 #line 5523 "configure"
5523 #include "confdefs.h"
5524 /* System header to define __stub macros and hopefully few prototypes,
5525     which can conflict with char $ac_func(); below.  */
5526 #include <assert.h>
5527 /* Override any gcc2 internal prototype to avoid an error.  */
5528 /* We use char because int might match the return type of a gcc2
5529     builtin and then its argument prototype would still apply.  */
5530 char $ac_func();
5531
5532 int main() {
5533
5534 /* The GNU C library defines this for functions which it implements
5535     to always fail with ENOSYS.  Some functions are actually named
5536     something starting with __ and the normal name is an alias.  */
5537 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5538 choke me
5539 #else
5540 $ac_func();
5541 #endif
5542
5543 ; return 0; }
5544 EOF
5545 if { (eval echo configure:5546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5546   rm -rf conftest*
5547   eval "ac_cv_func_$ac_func=yes"
5548 else
5549   echo "configure: failed program was:" >&5
5550   cat conftest.$ac_ext >&5
5551   rm -rf conftest*
5552   eval "ac_cv_func_$ac_func=no"
5553 fi
5554 rm -f conftest*
5555 fi
5556
5557 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5558   echo "$ac_t""yes" 1>&6
5559     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5560   cat >> confdefs.h <<EOF
5561 #define $ac_tr_func 1
5562 EOF
5563  
5564 else
5565   echo "$ac_t""no" 1>&6
5566 fi
5567 done
5568
5569
5570 # syscall() is needed for smbwrapper.
5571 for ac_func in syscall
5572 do
5573 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5574 echo "configure:5575: checking for $ac_func" >&5
5575 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5576   echo $ac_n "(cached) $ac_c" 1>&6
5577 else
5578   cat > conftest.$ac_ext <<EOF
5579 #line 5580 "configure"
5580 #include "confdefs.h"
5581 /* System header to define __stub macros and hopefully few prototypes,
5582     which can conflict with char $ac_func(); below.  */
5583 #include <assert.h>
5584 /* Override any gcc2 internal prototype to avoid an error.  */
5585 /* We use char because int might match the return type of a gcc2
5586     builtin and then its argument prototype would still apply.  */
5587 char $ac_func();
5588
5589 int main() {
5590
5591 /* The GNU C library defines this for functions which it implements
5592     to always fail with ENOSYS.  Some functions are actually named
5593     something starting with __ and the normal name is an alias.  */
5594 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5595 choke me
5596 #else
5597 $ac_func();
5598 #endif
5599
5600 ; return 0; }
5601 EOF
5602 if { (eval echo configure:5603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5603   rm -rf conftest*
5604   eval "ac_cv_func_$ac_func=yes"
5605 else
5606   echo "configure: failed program was:" >&5
5607   cat conftest.$ac_ext >&5
5608   rm -rf conftest*
5609   eval "ac_cv_func_$ac_func=no"
5610 fi
5611 rm -f conftest*
5612 fi
5613
5614 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5615   echo "$ac_t""yes" 1>&6
5616     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5617   cat >> confdefs.h <<EOF
5618 #define $ac_tr_func 1
5619 EOF
5620  
5621 else
5622   echo "$ac_t""no" 1>&6
5623 fi
5624 done
5625
5626
5627 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5628 do
5629 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5630 echo "configure:5631: checking for $ac_func" >&5
5631 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5632   echo $ac_n "(cached) $ac_c" 1>&6
5633 else
5634   cat > conftest.$ac_ext <<EOF
5635 #line 5636 "configure"
5636 #include "confdefs.h"
5637 /* System header to define __stub macros and hopefully few prototypes,
5638     which can conflict with char $ac_func(); below.  */
5639 #include <assert.h>
5640 /* Override any gcc2 internal prototype to avoid an error.  */
5641 /* We use char because int might match the return type of a gcc2
5642     builtin and then its argument prototype would still apply.  */
5643 char $ac_func();
5644
5645 int main() {
5646
5647 /* The GNU C library defines this for functions which it implements
5648     to always fail with ENOSYS.  Some functions are actually named
5649     something starting with __ and the normal name is an alias.  */
5650 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5651 choke me
5652 #else
5653 $ac_func();
5654 #endif
5655
5656 ; return 0; }
5657 EOF
5658 if { (eval echo configure:5659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5659   rm -rf conftest*
5660   eval "ac_cv_func_$ac_func=yes"
5661 else
5662   echo "configure: failed program was:" >&5
5663   cat conftest.$ac_ext >&5
5664   rm -rf conftest*
5665   eval "ac_cv_func_$ac_func=no"
5666 fi
5667 rm -f conftest*
5668 fi
5669
5670 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5671   echo "$ac_t""yes" 1>&6
5672     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5673   cat >> confdefs.h <<EOF
5674 #define $ac_tr_func 1
5675 EOF
5676  
5677 else
5678   echo "$ac_t""no" 1>&6
5679 fi
5680 done
5681
5682 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5683 do
5684 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5685 echo "configure:5686: checking for $ac_func" >&5
5686 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5687   echo $ac_n "(cached) $ac_c" 1>&6
5688 else
5689   cat > conftest.$ac_ext <<EOF
5690 #line 5691 "configure"
5691 #include "confdefs.h"
5692 /* System header to define __stub macros and hopefully few prototypes,
5693     which can conflict with char $ac_func(); below.  */
5694 #include <assert.h>
5695 /* Override any gcc2 internal prototype to avoid an error.  */
5696 /* We use char because int might match the return type of a gcc2
5697     builtin and then its argument prototype would still apply.  */
5698 char $ac_func();
5699
5700 int main() {
5701
5702 /* The GNU C library defines this for functions which it implements
5703     to always fail with ENOSYS.  Some functions are actually named
5704     something starting with __ and the normal name is an alias.  */
5705 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5706 choke me
5707 #else
5708 $ac_func();
5709 #endif
5710
5711 ; return 0; }
5712 EOF
5713 if { (eval echo configure:5714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5714   rm -rf conftest*
5715   eval "ac_cv_func_$ac_func=yes"
5716 else
5717   echo "configure: failed program was:" >&5
5718   cat conftest.$ac_ext >&5
5719   rm -rf conftest*
5720   eval "ac_cv_func_$ac_func=no"
5721 fi
5722 rm -f conftest*
5723 fi
5724
5725 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5726   echo "$ac_t""yes" 1>&6
5727     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5728   cat >> confdefs.h <<EOF
5729 #define $ac_tr_func 1
5730 EOF
5731  
5732 else
5733   echo "$ac_t""no" 1>&6
5734 fi
5735 done
5736
5737 for ac_func in __getcwd _getcwd
5738 do
5739 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5740 echo "configure:5741: checking for $ac_func" >&5
5741 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5742   echo $ac_n "(cached) $ac_c" 1>&6
5743 else
5744   cat > conftest.$ac_ext <<EOF
5745 #line 5746 "configure"
5746 #include "confdefs.h"
5747 /* System header to define __stub macros and hopefully few prototypes,
5748     which can conflict with char $ac_func(); below.  */
5749 #include <assert.h>
5750 /* Override any gcc2 internal prototype to avoid an error.  */
5751 /* We use char because int might match the return type of a gcc2
5752     builtin and then its argument prototype would still apply.  */
5753 char $ac_func();
5754
5755 int main() {
5756
5757 /* The GNU C library defines this for functions which it implements
5758     to always fail with ENOSYS.  Some functions are actually named
5759     something starting with __ and the normal name is an alias.  */
5760 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5761 choke me
5762 #else
5763 $ac_func();
5764 #endif
5765
5766 ; return 0; }
5767 EOF
5768 if { (eval echo configure:5769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5769   rm -rf conftest*
5770   eval "ac_cv_func_$ac_func=yes"
5771 else
5772   echo "configure: failed program was:" >&5
5773   cat conftest.$ac_ext >&5
5774   rm -rf conftest*
5775   eval "ac_cv_func_$ac_func=no"
5776 fi
5777 rm -f conftest*
5778 fi
5779
5780 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5781   echo "$ac_t""yes" 1>&6
5782     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5783   cat >> confdefs.h <<EOF
5784 #define $ac_tr_func 1
5785 EOF
5786  
5787 else
5788   echo "$ac_t""no" 1>&6
5789 fi
5790 done
5791
5792 for ac_func in __xstat __fxstat __lxstat
5793 do
5794 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5795 echo "configure:5796: checking for $ac_func" >&5
5796 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5797   echo $ac_n "(cached) $ac_c" 1>&6
5798 else
5799   cat > conftest.$ac_ext <<EOF
5800 #line 5801 "configure"
5801 #include "confdefs.h"
5802 /* System header to define __stub macros and hopefully few prototypes,
5803     which can conflict with char $ac_func(); below.  */
5804 #include <assert.h>
5805 /* Override any gcc2 internal prototype to avoid an error.  */
5806 /* We use char because int might match the return type of a gcc2
5807     builtin and then its argument prototype would still apply.  */
5808 char $ac_func();
5809
5810 int main() {
5811
5812 /* The GNU C library defines this for functions which it implements
5813     to always fail with ENOSYS.  Some functions are actually named
5814     something starting with __ and the normal name is an alias.  */
5815 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5816 choke me
5817 #else
5818 $ac_func();
5819 #endif
5820
5821 ; return 0; }
5822 EOF
5823 if { (eval echo configure:5824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5824   rm -rf conftest*
5825   eval "ac_cv_func_$ac_func=yes"
5826 else
5827   echo "configure: failed program was:" >&5
5828   cat conftest.$ac_ext >&5
5829   rm -rf conftest*
5830   eval "ac_cv_func_$ac_func=no"
5831 fi
5832 rm -f conftest*
5833 fi
5834
5835 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5836   echo "$ac_t""yes" 1>&6
5837     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5838   cat >> confdefs.h <<EOF
5839 #define $ac_tr_func 1
5840 EOF
5841  
5842 else
5843   echo "$ac_t""no" 1>&6
5844 fi
5845 done
5846
5847 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
5848 do
5849 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5850 echo "configure:5851: checking for $ac_func" >&5
5851 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5852   echo $ac_n "(cached) $ac_c" 1>&6
5853 else
5854   cat > conftest.$ac_ext <<EOF
5855 #line 5856 "configure"
5856 #include "confdefs.h"
5857 /* System header to define __stub macros and hopefully few prototypes,
5858     which can conflict with char $ac_func(); below.  */
5859 #include <assert.h>
5860 /* Override any gcc2 internal prototype to avoid an error.  */
5861 /* We use char because int might match the return type of a gcc2
5862     builtin and then its argument prototype would still apply.  */
5863 char $ac_func();
5864
5865 int main() {
5866
5867 /* The GNU C library defines this for functions which it implements
5868     to always fail with ENOSYS.  Some functions are actually named
5869     something starting with __ and the normal name is an alias.  */
5870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5871 choke me
5872 #else
5873 $ac_func();
5874 #endif
5875
5876 ; return 0; }
5877 EOF
5878 if { (eval echo configure:5879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5879   rm -rf conftest*
5880   eval "ac_cv_func_$ac_func=yes"
5881 else
5882   echo "configure: failed program was:" >&5
5883   cat conftest.$ac_ext >&5
5884   rm -rf conftest*
5885   eval "ac_cv_func_$ac_func=no"
5886 fi
5887 rm -f conftest*
5888 fi
5889
5890 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5891   echo "$ac_t""yes" 1>&6
5892     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5893   cat >> confdefs.h <<EOF
5894 #define $ac_tr_func 1
5895 EOF
5896  
5897 else
5898   echo "$ac_t""no" 1>&6
5899 fi
5900 done
5901
5902 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
5903 do
5904 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5905 echo "configure:5906: checking for $ac_func" >&5
5906 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5907   echo $ac_n "(cached) $ac_c" 1>&6
5908 else
5909   cat > conftest.$ac_ext <<EOF
5910 #line 5911 "configure"
5911 #include "confdefs.h"
5912 /* System header to define __stub macros and hopefully few prototypes,
5913     which can conflict with char $ac_func(); below.  */
5914 #include <assert.h>
5915 /* Override any gcc2 internal prototype to avoid an error.  */
5916 /* We use char because int might match the return type of a gcc2
5917     builtin and then its argument prototype would still apply.  */
5918 char $ac_func();
5919
5920 int main() {
5921
5922 /* The GNU C library defines this for functions which it implements
5923     to always fail with ENOSYS.  Some functions are actually named
5924     something starting with __ and the normal name is an alias.  */
5925 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5926 choke me
5927 #else
5928 $ac_func();
5929 #endif
5930
5931 ; return 0; }
5932 EOF
5933 if { (eval echo configure:5934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5934   rm -rf conftest*
5935   eval "ac_cv_func_$ac_func=yes"
5936 else
5937   echo "configure: failed program was:" >&5
5938   cat conftest.$ac_ext >&5
5939   rm -rf conftest*
5940   eval "ac_cv_func_$ac_func=no"
5941 fi
5942 rm -f conftest*
5943 fi
5944
5945 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5946   echo "$ac_t""yes" 1>&6
5947     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5948   cat >> confdefs.h <<EOF
5949 #define $ac_tr_func 1
5950 EOF
5951  
5952 else
5953   echo "$ac_t""no" 1>&6
5954 fi
5955 done
5956
5957 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
5958 do
5959 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5960 echo "configure:5961: checking for $ac_func" >&5
5961 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5962   echo $ac_n "(cached) $ac_c" 1>&6
5963 else
5964   cat > conftest.$ac_ext <<EOF
5965 #line 5966 "configure"
5966 #include "confdefs.h"
5967 /* System header to define __stub macros and hopefully few prototypes,
5968     which can conflict with char $ac_func(); below.  */
5969 #include <assert.h>
5970 /* Override any gcc2 internal prototype to avoid an error.  */
5971 /* We use char because int might match the return type of a gcc2
5972     builtin and then its argument prototype would still apply.  */
5973 char $ac_func();
5974
5975 int main() {
5976
5977 /* The GNU C library defines this for functions which it implements
5978     to always fail with ENOSYS.  Some functions are actually named
5979     something starting with __ and the normal name is an alias.  */
5980 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5981 choke me
5982 #else
5983 $ac_func();
5984 #endif
5985
5986 ; return 0; }
5987 EOF
5988 if { (eval echo configure:5989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5989   rm -rf conftest*
5990   eval "ac_cv_func_$ac_func=yes"
5991 else
5992   echo "configure: failed program was:" >&5
5993   cat conftest.$ac_ext >&5
5994   rm -rf conftest*
5995   eval "ac_cv_func_$ac_func=no"
5996 fi
5997 rm -f conftest*
5998 fi
5999
6000 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6001   echo "$ac_t""yes" 1>&6
6002     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6003   cat >> confdefs.h <<EOF
6004 #define $ac_tr_func 1
6005 EOF
6006  
6007 else
6008   echo "$ac_t""no" 1>&6
6009 fi
6010 done
6011
6012 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6013 do
6014 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6015 echo "configure:6016: checking for $ac_func" >&5
6016 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6017   echo $ac_n "(cached) $ac_c" 1>&6
6018 else
6019   cat > conftest.$ac_ext <<EOF
6020 #line 6021 "configure"
6021 #include "confdefs.h"
6022 /* System header to define __stub macros and hopefully few prototypes,
6023     which can conflict with char $ac_func(); below.  */
6024 #include <assert.h>
6025 /* Override any gcc2 internal prototype to avoid an error.  */
6026 /* We use char because int might match the return type of a gcc2
6027     builtin and then its argument prototype would still apply.  */
6028 char $ac_func();
6029
6030 int main() {
6031
6032 /* The GNU C library defines this for functions which it implements
6033     to always fail with ENOSYS.  Some functions are actually named
6034     something starting with __ and the normal name is an alias.  */
6035 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6036 choke me
6037 #else
6038 $ac_func();
6039 #endif
6040
6041 ; return 0; }
6042 EOF
6043 if { (eval echo configure:6044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6044   rm -rf conftest*
6045   eval "ac_cv_func_$ac_func=yes"
6046 else
6047   echo "configure: failed program was:" >&5
6048   cat conftest.$ac_ext >&5
6049   rm -rf conftest*
6050   eval "ac_cv_func_$ac_func=no"
6051 fi
6052 rm -f conftest*
6053 fi
6054
6055 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6056   echo "$ac_t""yes" 1>&6
6057     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6058   cat >> confdefs.h <<EOF
6059 #define $ac_tr_func 1
6060 EOF
6061  
6062 else
6063   echo "$ac_t""no" 1>&6
6064 fi
6065 done
6066
6067 for ac_func in _write __write _fork __fork
6068 do
6069 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6070 echo "configure:6071: checking for $ac_func" >&5
6071 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6072   echo $ac_n "(cached) $ac_c" 1>&6
6073 else
6074   cat > conftest.$ac_ext <<EOF
6075 #line 6076 "configure"
6076 #include "confdefs.h"
6077 /* System header to define __stub macros and hopefully few prototypes,
6078     which can conflict with char $ac_func(); below.  */
6079 #include <assert.h>
6080 /* Override any gcc2 internal prototype to avoid an error.  */
6081 /* We use char because int might match the return type of a gcc2
6082     builtin and then its argument prototype would still apply.  */
6083 char $ac_func();
6084
6085 int main() {
6086
6087 /* The GNU C library defines this for functions which it implements
6088     to always fail with ENOSYS.  Some functions are actually named
6089     something starting with __ and the normal name is an alias.  */
6090 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6091 choke me
6092 #else
6093 $ac_func();
6094 #endif
6095
6096 ; return 0; }
6097 EOF
6098 if { (eval echo configure:6099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6099   rm -rf conftest*
6100   eval "ac_cv_func_$ac_func=yes"
6101 else
6102   echo "configure: failed program was:" >&5
6103   cat conftest.$ac_ext >&5
6104   rm -rf conftest*
6105   eval "ac_cv_func_$ac_func=no"
6106 fi
6107 rm -f conftest*
6108 fi
6109
6110 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6111   echo "$ac_t""yes" 1>&6
6112     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6113   cat >> confdefs.h <<EOF
6114 #define $ac_tr_func 1
6115 EOF
6116  
6117 else
6118   echo "$ac_t""no" 1>&6
6119 fi
6120 done
6121
6122 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6123 do
6124 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6125 echo "configure:6126: checking for $ac_func" >&5
6126 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6127   echo $ac_n "(cached) $ac_c" 1>&6
6128 else
6129   cat > conftest.$ac_ext <<EOF
6130 #line 6131 "configure"
6131 #include "confdefs.h"
6132 /* System header to define __stub macros and hopefully few prototypes,
6133     which can conflict with char $ac_func(); below.  */
6134 #include <assert.h>
6135 /* Override any gcc2 internal prototype to avoid an error.  */
6136 /* We use char because int might match the return type of a gcc2
6137     builtin and then its argument prototype would still apply.  */
6138 char $ac_func();
6139
6140 int main() {
6141
6142 /* The GNU C library defines this for functions which it implements
6143     to always fail with ENOSYS.  Some functions are actually named
6144     something starting with __ and the normal name is an alias.  */
6145 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6146 choke me
6147 #else
6148 $ac_func();
6149 #endif
6150
6151 ; return 0; }
6152 EOF
6153 if { (eval echo configure:6154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6154   rm -rf conftest*
6155   eval "ac_cv_func_$ac_func=yes"
6156 else
6157   echo "configure: failed program was:" >&5
6158   cat conftest.$ac_ext >&5
6159   rm -rf conftest*
6160   eval "ac_cv_func_$ac_func=no"
6161 fi
6162 rm -f conftest*
6163 fi
6164
6165 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6166   echo "$ac_t""yes" 1>&6
6167     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6168   cat >> confdefs.h <<EOF
6169 #define $ac_tr_func 1
6170 EOF
6171  
6172 else
6173   echo "$ac_t""no" 1>&6
6174 fi
6175 done
6176
6177 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6178 do
6179 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6180 echo "configure:6181: checking for $ac_func" >&5
6181 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6182   echo $ac_n "(cached) $ac_c" 1>&6
6183 else
6184   cat > conftest.$ac_ext <<EOF
6185 #line 6186 "configure"
6186 #include "confdefs.h"
6187 /* System header to define __stub macros and hopefully few prototypes,
6188     which can conflict with char $ac_func(); below.  */
6189 #include <assert.h>
6190 /* Override any gcc2 internal prototype to avoid an error.  */
6191 /* We use char because int might match the return type of a gcc2
6192     builtin and then its argument prototype would still apply.  */
6193 char $ac_func();
6194
6195 int main() {
6196
6197 /* The GNU C library defines this for functions which it implements
6198     to always fail with ENOSYS.  Some functions are actually named
6199     something starting with __ and the normal name is an alias.  */
6200 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6201 choke me
6202 #else
6203 $ac_func();
6204 #endif
6205
6206 ; return 0; }
6207 EOF
6208 if { (eval echo configure:6209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6209   rm -rf conftest*
6210   eval "ac_cv_func_$ac_func=yes"
6211 else
6212   echo "configure: failed program was:" >&5
6213   cat conftest.$ac_ext >&5
6214   rm -rf conftest*
6215   eval "ac_cv_func_$ac_func=no"
6216 fi
6217 rm -f conftest*
6218 fi
6219
6220 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6221   echo "$ac_t""yes" 1>&6
6222     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6223   cat >> confdefs.h <<EOF
6224 #define $ac_tr_func 1
6225 EOF
6226  
6227 else
6228   echo "$ac_t""no" 1>&6
6229 fi
6230 done
6231
6232 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6233 do
6234 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6235 echo "configure:6236: checking for $ac_func" >&5
6236 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6237   echo $ac_n "(cached) $ac_c" 1>&6
6238 else
6239   cat > conftest.$ac_ext <<EOF
6240 #line 6241 "configure"
6241 #include "confdefs.h"
6242 /* System header to define __stub macros and hopefully few prototypes,
6243     which can conflict with char $ac_func(); below.  */
6244 #include <assert.h>
6245 /* Override any gcc2 internal prototype to avoid an error.  */
6246 /* We use char because int might match the return type of a gcc2
6247     builtin and then its argument prototype would still apply.  */
6248 char $ac_func();
6249
6250 int main() {
6251
6252 /* The GNU C library defines this for functions which it implements
6253     to always fail with ENOSYS.  Some functions are actually named
6254     something starting with __ and the normal name is an alias.  */
6255 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6256 choke me
6257 #else
6258 $ac_func();
6259 #endif
6260
6261 ; return 0; }
6262 EOF
6263 if { (eval echo configure:6264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6264   rm -rf conftest*
6265   eval "ac_cv_func_$ac_func=yes"
6266 else
6267   echo "configure: failed program was:" >&5
6268   cat conftest.$ac_ext >&5
6269   rm -rf conftest*
6270   eval "ac_cv_func_$ac_func=no"
6271 fi
6272 rm -f conftest*
6273 fi
6274
6275 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6276   echo "$ac_t""yes" 1>&6
6277     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6278   cat >> confdefs.h <<EOF
6279 #define $ac_tr_func 1
6280 EOF
6281  
6282 else
6283   echo "$ac_t""no" 1>&6
6284 fi
6285 done
6286
6287 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6288 do
6289 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6290 echo "configure:6291: checking for $ac_func" >&5
6291 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6292   echo $ac_n "(cached) $ac_c" 1>&6
6293 else
6294   cat > conftest.$ac_ext <<EOF
6295 #line 6296 "configure"
6296 #include "confdefs.h"
6297 /* System header to define __stub macros and hopefully few prototypes,
6298     which can conflict with char $ac_func(); below.  */
6299 #include <assert.h>
6300 /* Override any gcc2 internal prototype to avoid an error.  */
6301 /* We use char because int might match the return type of a gcc2
6302     builtin and then its argument prototype would still apply.  */
6303 char $ac_func();
6304
6305 int main() {
6306
6307 /* The GNU C library defines this for functions which it implements
6308     to always fail with ENOSYS.  Some functions are actually named
6309     something starting with __ and the normal name is an alias.  */
6310 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6311 choke me
6312 #else
6313 $ac_func();
6314 #endif
6315
6316 ; return 0; }
6317 EOF
6318 if { (eval echo configure:6319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6319   rm -rf conftest*
6320   eval "ac_cv_func_$ac_func=yes"
6321 else
6322   echo "configure: failed program was:" >&5
6323   cat conftest.$ac_ext >&5
6324   rm -rf conftest*
6325   eval "ac_cv_func_$ac_func=no"
6326 fi
6327 rm -f conftest*
6328 fi
6329
6330 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6331   echo "$ac_t""yes" 1>&6
6332     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6333   cat >> confdefs.h <<EOF
6334 #define $ac_tr_func 1
6335 EOF
6336  
6337 else
6338   echo "$ac_t""no" 1>&6
6339 fi
6340 done
6341
6342 for ac_func in open64 _open64 __open64 creat64
6343 do
6344 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6345 echo "configure:6346: checking for $ac_func" >&5
6346 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6347   echo $ac_n "(cached) $ac_c" 1>&6
6348 else
6349   cat > conftest.$ac_ext <<EOF
6350 #line 6351 "configure"
6351 #include "confdefs.h"
6352 /* System header to define __stub macros and hopefully few prototypes,
6353     which can conflict with char $ac_func(); below.  */
6354 #include <assert.h>
6355 /* Override any gcc2 internal prototype to avoid an error.  */
6356 /* We use char because int might match the return type of a gcc2
6357     builtin and then its argument prototype would still apply.  */
6358 char $ac_func();
6359
6360 int main() {
6361
6362 /* The GNU C library defines this for functions which it implements
6363     to always fail with ENOSYS.  Some functions are actually named
6364     something starting with __ and the normal name is an alias.  */
6365 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6366 choke me
6367 #else
6368 $ac_func();
6369 #endif
6370
6371 ; return 0; }
6372 EOF
6373 if { (eval echo configure:6374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6374   rm -rf conftest*
6375   eval "ac_cv_func_$ac_func=yes"
6376 else
6377   echo "configure: failed program was:" >&5
6378   cat conftest.$ac_ext >&5
6379   rm -rf conftest*
6380   eval "ac_cv_func_$ac_func=no"
6381 fi
6382 rm -f conftest*
6383 fi
6384
6385 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6386   echo "$ac_t""yes" 1>&6
6387     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6388   cat >> confdefs.h <<EOF
6389 #define $ac_tr_func 1
6390 EOF
6391  
6392 else
6393   echo "$ac_t""no" 1>&6
6394 fi
6395 done
6396
6397
6398 #
6399 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6400 #
6401
6402 if test x$ac_cv_func_stat64 = xno ; then
6403   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6404 echo "configure:6405: checking for stat64 in <sys/stat.h>" >&5
6405   cat > conftest.$ac_ext <<EOF
6406 #line 6407 "configure"
6407 #include "confdefs.h"
6408
6409 #if defined(HAVE_UNISTD_H)
6410 #include <unistd.h>
6411 #endif
6412 #include <sys/stat.h>
6413
6414 int main() {
6415 struct stat64 st64; exit(stat64(".",&st64));
6416 ; return 0; }
6417 EOF
6418 if { (eval echo configure:6419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6419   rm -rf conftest*
6420   ac_cv_func_stat64=yes
6421 else
6422   echo "configure: failed program was:" >&5
6423   cat conftest.$ac_ext >&5
6424 fi
6425 rm -f conftest*
6426   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6427   if test x$ac_cv_func_stat64 = xyes ; then
6428     cat >> confdefs.h <<\EOF
6429 #define HAVE_STAT64 1
6430 EOF
6431
6432   fi
6433 fi
6434
6435 if test x$ac_cv_func_lstat64 = xno ; then
6436   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6437 echo "configure:6438: checking for lstat64 in <sys/stat.h>" >&5
6438   cat > conftest.$ac_ext <<EOF
6439 #line 6440 "configure"
6440 #include "confdefs.h"
6441
6442 #if defined(HAVE_UNISTD_H)
6443 #include <unistd.h>
6444 #endif
6445 #include <sys/stat.h>
6446
6447 int main() {
6448 struct stat64 st64; exit(lstat64(".",&st64));
6449 ; return 0; }
6450 EOF
6451 if { (eval echo configure:6452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6452   rm -rf conftest*
6453   ac_cv_func_lstat64=yes
6454 else
6455   echo "configure: failed program was:" >&5
6456   cat conftest.$ac_ext >&5
6457 fi
6458 rm -f conftest*
6459   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6460   if test x$ac_cv_func_lstat64 = xyes ; then
6461     cat >> confdefs.h <<\EOF
6462 #define HAVE_LSTAT64 1
6463 EOF
6464
6465   fi
6466 fi
6467
6468 if test x$ac_cv_func_fstat64 = xno ; then
6469   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6470 echo "configure:6471: checking for fstat64 in <sys/stat.h>" >&5
6471   cat > conftest.$ac_ext <<EOF
6472 #line 6473 "configure"
6473 #include "confdefs.h"
6474
6475 #if defined(HAVE_UNISTD_H)
6476 #include <unistd.h>
6477 #endif
6478 #include <sys/stat.h>
6479
6480 int main() {
6481 struct stat64 st64; exit(fstat64(0,&st64));
6482 ; return 0; }
6483 EOF
6484 if { (eval echo configure:6485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6485   rm -rf conftest*
6486   ac_cv_func_fstat64=yes
6487 else
6488   echo "configure: failed program was:" >&5
6489   cat conftest.$ac_ext >&5
6490 fi
6491 rm -f conftest*
6492   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6493   if test x$ac_cv_func_fstat64 = xyes ; then
6494     cat >> confdefs.h <<\EOF
6495 #define HAVE_FSTAT64 1
6496 EOF
6497
6498   fi
6499 fi
6500
6501 #
6502 # If no strcasecmp, check for it in some known places
6503 # It is in -lresolv on ReliantUNIX and UnixWare
6504 #   -lresolve *must* follow -lnsl for name resolution to work properly
6505 #
6506
6507 if test x$ac_cv_func_strcasecmp = xno ; then
6508         echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
6509 echo "configure:6510: checking for strcasecmp in -lresolv" >&5
6510 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
6511 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6512   echo $ac_n "(cached) $ac_c" 1>&6
6513 else
6514   ac_save_LIBS="$LIBS"
6515 LIBS="-lresolv  $LIBS"
6516 cat > conftest.$ac_ext <<EOF
6517 #line 6518 "configure"
6518 #include "confdefs.h"
6519 /* Override any gcc2 internal prototype to avoid an error.  */
6520 /* We use char because int might match the return type of a gcc2
6521     builtin and then its argument prototype would still apply.  */
6522 char strcasecmp();
6523
6524 int main() {
6525 strcasecmp()
6526 ; return 0; }
6527 EOF
6528 if { (eval echo configure:6529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6529   rm -rf conftest*
6530   eval "ac_cv_lib_$ac_lib_var=yes"
6531 else
6532   echo "configure: failed program was:" >&5
6533   cat conftest.$ac_ext >&5
6534   rm -rf conftest*
6535   eval "ac_cv_lib_$ac_lib_var=no"
6536 fi
6537 rm -f conftest*
6538 LIBS="$ac_save_LIBS"
6539
6540 fi
6541 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6542   echo "$ac_t""yes" 1>&6
6543   LIBS="$LIBS -lresolv"
6544                 cat >> confdefs.h <<\EOF
6545 #define HAVE_STRCASECMP 1
6546 EOF
6547
6548 else
6549   echo "$ac_t""no" 1>&6
6550 fi
6551
6552 fi
6553
6554 #
6555 # Check for the functions putprpwnam, set_auth_parameters,
6556 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6557 # Needed for OSF1 and HPUX.
6558 #
6559
6560 case "$LIBS" in
6561   *-lsecurity*) for ac_func in putprpwnam
6562 do
6563 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6564 echo "configure:6565: checking for $ac_func" >&5
6565 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6566   echo $ac_n "(cached) $ac_c" 1>&6
6567 else
6568   cat > conftest.$ac_ext <<EOF
6569 #line 6570 "configure"
6570 #include "confdefs.h"
6571 /* System header to define __stub macros and hopefully few prototypes,
6572     which can conflict with char $ac_func(); below.  */
6573 #include <assert.h>
6574 /* Override any gcc2 internal prototype to avoid an error.  */
6575 /* We use char because int might match the return type of a gcc2
6576     builtin and then its argument prototype would still apply.  */
6577 char $ac_func();
6578
6579 int main() {
6580
6581 /* The GNU C library defines this for functions which it implements
6582     to always fail with ENOSYS.  Some functions are actually named
6583     something starting with __ and the normal name is an alias.  */
6584 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6585 choke me
6586 #else
6587 $ac_func();
6588 #endif
6589
6590 ; return 0; }
6591 EOF
6592 if { (eval echo configure:6593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6593   rm -rf conftest*
6594   eval "ac_cv_func_$ac_func=yes"
6595 else
6596   echo "configure: failed program was:" >&5
6597   cat conftest.$ac_ext >&5
6598   rm -rf conftest*
6599   eval "ac_cv_func_$ac_func=no"
6600 fi
6601 rm -f conftest*
6602 fi
6603
6604 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6605   echo "$ac_t""yes" 1>&6
6606     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6607   cat >> confdefs.h <<EOF
6608 #define $ac_tr_func 1
6609 EOF
6610  
6611 else
6612   echo "$ac_t""no" 1>&6
6613 fi
6614 done
6615  ;;
6616   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6617 echo "configure:6618: checking for putprpwnam in -lsecurity" >&5
6618 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6619 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6620   echo $ac_n "(cached) $ac_c" 1>&6
6621 else
6622   ac_save_LIBS="$LIBS"
6623 LIBS="-lsecurity  $LIBS"
6624 cat > conftest.$ac_ext <<EOF
6625 #line 6626 "configure"
6626 #include "confdefs.h"
6627 /* Override any gcc2 internal prototype to avoid an error.  */
6628 /* We use char because int might match the return type of a gcc2
6629     builtin and then its argument prototype would still apply.  */
6630 char putprpwnam();
6631
6632 int main() {
6633 putprpwnam()
6634 ; return 0; }
6635 EOF
6636 if { (eval echo configure:6637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6637   rm -rf conftest*
6638   eval "ac_cv_lib_$ac_lib_var=yes"
6639 else
6640   echo "configure: failed program was:" >&5
6641   cat conftest.$ac_ext >&5
6642   rm -rf conftest*
6643   eval "ac_cv_lib_$ac_lib_var=no"
6644 fi
6645 rm -f conftest*
6646 LIBS="$ac_save_LIBS"
6647
6648 fi
6649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6650   echo "$ac_t""yes" 1>&6
6651     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6652     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6653   cat >> confdefs.h <<EOF
6654 #define $ac_tr_lib 1
6655 EOF
6656
6657   LIBS="-lsecurity $LIBS"
6658
6659 else
6660   echo "$ac_t""no" 1>&6
6661 fi
6662  
6663      for ac_func in putprpwnam
6664 do
6665 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6666 echo "configure:6667: checking for $ac_func" >&5
6667 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6668   echo $ac_n "(cached) $ac_c" 1>&6
6669 else
6670   cat > conftest.$ac_ext <<EOF
6671 #line 6672 "configure"
6672 #include "confdefs.h"
6673 /* System header to define __stub macros and hopefully few prototypes,
6674     which can conflict with char $ac_func(); below.  */
6675 #include <assert.h>
6676 /* Override any gcc2 internal prototype to avoid an error.  */
6677 /* We use char because int might match the return type of a gcc2
6678     builtin and then its argument prototype would still apply.  */
6679 char $ac_func();
6680
6681 int main() {
6682
6683 /* The GNU C library defines this for functions which it implements
6684     to always fail with ENOSYS.  Some functions are actually named
6685     something starting with __ and the normal name is an alias.  */
6686 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6687 choke me
6688 #else
6689 $ac_func();
6690 #endif
6691
6692 ; return 0; }
6693 EOF
6694 if { (eval echo configure:6695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6695   rm -rf conftest*
6696   eval "ac_cv_func_$ac_func=yes"
6697 else
6698   echo "configure: failed program was:" >&5
6699   cat conftest.$ac_ext >&5
6700   rm -rf conftest*
6701   eval "ac_cv_func_$ac_func=no"
6702 fi
6703 rm -f conftest*
6704 fi
6705
6706 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6707   echo "$ac_t""yes" 1>&6
6708     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6709   cat >> confdefs.h <<EOF
6710 #define $ac_tr_func 1
6711 EOF
6712  
6713 else
6714   echo "$ac_t""no" 1>&6
6715 fi
6716 done
6717
6718   ;;
6719   esac
6720
6721 case "$LIBS" in
6722   *-lsec*) for ac_func in putprpwnam
6723 do
6724 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6725 echo "configure:6726: checking for $ac_func" >&5
6726 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6727   echo $ac_n "(cached) $ac_c" 1>&6
6728 else
6729   cat > conftest.$ac_ext <<EOF
6730 #line 6731 "configure"
6731 #include "confdefs.h"
6732 /* System header to define __stub macros and hopefully few prototypes,
6733     which can conflict with char $ac_func(); below.  */
6734 #include <assert.h>
6735 /* Override any gcc2 internal prototype to avoid an error.  */
6736 /* We use char because int might match the return type of a gcc2
6737     builtin and then its argument prototype would still apply.  */
6738 char $ac_func();
6739
6740 int main() {
6741
6742 /* The GNU C library defines this for functions which it implements
6743     to always fail with ENOSYS.  Some functions are actually named
6744     something starting with __ and the normal name is an alias.  */
6745 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6746 choke me
6747 #else
6748 $ac_func();
6749 #endif
6750
6751 ; return 0; }
6752 EOF
6753 if { (eval echo configure:6754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6754   rm -rf conftest*
6755   eval "ac_cv_func_$ac_func=yes"
6756 else
6757   echo "configure: failed program was:" >&5
6758   cat conftest.$ac_ext >&5
6759   rm -rf conftest*
6760   eval "ac_cv_func_$ac_func=no"
6761 fi
6762 rm -f conftest*
6763 fi
6764
6765 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6766   echo "$ac_t""yes" 1>&6
6767     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6768   cat >> confdefs.h <<EOF
6769 #define $ac_tr_func 1
6770 EOF
6771  
6772 else
6773   echo "$ac_t""no" 1>&6
6774 fi
6775 done
6776  ;;
6777   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6778 echo "configure:6779: checking for putprpwnam in -lsec" >&5
6779 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6780 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6781   echo $ac_n "(cached) $ac_c" 1>&6
6782 else
6783   ac_save_LIBS="$LIBS"
6784 LIBS="-lsec  $LIBS"
6785 cat > conftest.$ac_ext <<EOF
6786 #line 6787 "configure"
6787 #include "confdefs.h"
6788 /* Override any gcc2 internal prototype to avoid an error.  */
6789 /* We use char because int might match the return type of a gcc2
6790     builtin and then its argument prototype would still apply.  */
6791 char putprpwnam();
6792
6793 int main() {
6794 putprpwnam()
6795 ; return 0; }
6796 EOF
6797 if { (eval echo configure:6798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6798   rm -rf conftest*
6799   eval "ac_cv_lib_$ac_lib_var=yes"
6800 else
6801   echo "configure: failed program was:" >&5
6802   cat conftest.$ac_ext >&5
6803   rm -rf conftest*
6804   eval "ac_cv_lib_$ac_lib_var=no"
6805 fi
6806 rm -f conftest*
6807 LIBS="$ac_save_LIBS"
6808
6809 fi
6810 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6811   echo "$ac_t""yes" 1>&6
6812     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6813     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6814   cat >> confdefs.h <<EOF
6815 #define $ac_tr_lib 1
6816 EOF
6817
6818   LIBS="-lsec $LIBS"
6819
6820 else
6821   echo "$ac_t""no" 1>&6
6822 fi
6823  
6824      for ac_func in putprpwnam
6825 do
6826 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6827 echo "configure:6828: checking for $ac_func" >&5
6828 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6829   echo $ac_n "(cached) $ac_c" 1>&6
6830 else
6831   cat > conftest.$ac_ext <<EOF
6832 #line 6833 "configure"
6833 #include "confdefs.h"
6834 /* System header to define __stub macros and hopefully few prototypes,
6835     which can conflict with char $ac_func(); below.  */
6836 #include <assert.h>
6837 /* Override any gcc2 internal prototype to avoid an error.  */
6838 /* We use char because int might match the return type of a gcc2
6839     builtin and then its argument prototype would still apply.  */
6840 char $ac_func();
6841
6842 int main() {
6843
6844 /* The GNU C library defines this for functions which it implements
6845     to always fail with ENOSYS.  Some functions are actually named
6846     something starting with __ and the normal name is an alias.  */
6847 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6848 choke me
6849 #else
6850 $ac_func();
6851 #endif
6852
6853 ; return 0; }
6854 EOF
6855 if { (eval echo configure:6856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6856   rm -rf conftest*
6857   eval "ac_cv_func_$ac_func=yes"
6858 else
6859   echo "configure: failed program was:" >&5
6860   cat conftest.$ac_ext >&5
6861   rm -rf conftest*
6862   eval "ac_cv_func_$ac_func=no"
6863 fi
6864 rm -f conftest*
6865 fi
6866
6867 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6868   echo "$ac_t""yes" 1>&6
6869     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6870   cat >> confdefs.h <<EOF
6871 #define $ac_tr_func 1
6872 EOF
6873  
6874 else
6875   echo "$ac_t""no" 1>&6
6876 fi
6877 done
6878
6879   ;;
6880   esac
6881
6882
6883 case "$LIBS" in
6884   *-lsecurity*) for ac_func in set_auth_parameters
6885 do
6886 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6887 echo "configure:6888: checking for $ac_func" >&5
6888 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6889   echo $ac_n "(cached) $ac_c" 1>&6
6890 else
6891   cat > conftest.$ac_ext <<EOF
6892 #line 6893 "configure"
6893 #include "confdefs.h"
6894 /* System header to define __stub macros and hopefully few prototypes,
6895     which can conflict with char $ac_func(); below.  */
6896 #include <assert.h>
6897 /* Override any gcc2 internal prototype to avoid an error.  */
6898 /* We use char because int might match the return type of a gcc2
6899     builtin and then its argument prototype would still apply.  */
6900 char $ac_func();
6901
6902 int main() {
6903
6904 /* The GNU C library defines this for functions which it implements
6905     to always fail with ENOSYS.  Some functions are actually named
6906     something starting with __ and the normal name is an alias.  */
6907 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6908 choke me
6909 #else
6910 $ac_func();
6911 #endif
6912
6913 ; return 0; }
6914 EOF
6915 if { (eval echo configure:6916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6916   rm -rf conftest*
6917   eval "ac_cv_func_$ac_func=yes"
6918 else
6919   echo "configure: failed program was:" >&5
6920   cat conftest.$ac_ext >&5
6921   rm -rf conftest*
6922   eval "ac_cv_func_$ac_func=no"
6923 fi
6924 rm -f conftest*
6925 fi
6926
6927 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6928   echo "$ac_t""yes" 1>&6
6929     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6930   cat >> confdefs.h <<EOF
6931 #define $ac_tr_func 1
6932 EOF
6933  
6934 else
6935   echo "$ac_t""no" 1>&6
6936 fi
6937 done
6938  ;;
6939   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
6940 echo "configure:6941: checking for set_auth_parameters in -lsecurity" >&5
6941 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6942 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6943   echo $ac_n "(cached) $ac_c" 1>&6
6944 else
6945   ac_save_LIBS="$LIBS"
6946 LIBS="-lsecurity  $LIBS"
6947 cat > conftest.$ac_ext <<EOF
6948 #line 6949 "configure"
6949 #include "confdefs.h"
6950 /* Override any gcc2 internal prototype to avoid an error.  */
6951 /* We use char because int might match the return type of a gcc2
6952     builtin and then its argument prototype would still apply.  */
6953 char set_auth_parameters();
6954
6955 int main() {
6956 set_auth_parameters()
6957 ; return 0; }
6958 EOF
6959 if { (eval echo configure:6960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6960   rm -rf conftest*
6961   eval "ac_cv_lib_$ac_lib_var=yes"
6962 else
6963   echo "configure: failed program was:" >&5
6964   cat conftest.$ac_ext >&5
6965   rm -rf conftest*
6966   eval "ac_cv_lib_$ac_lib_var=no"
6967 fi
6968 rm -f conftest*
6969 LIBS="$ac_save_LIBS"
6970
6971 fi
6972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6973   echo "$ac_t""yes" 1>&6
6974     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6975     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6976   cat >> confdefs.h <<EOF
6977 #define $ac_tr_lib 1
6978 EOF
6979
6980   LIBS="-lsecurity $LIBS"
6981
6982 else
6983   echo "$ac_t""no" 1>&6
6984 fi
6985  
6986      for ac_func in set_auth_parameters
6987 do
6988 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6989 echo "configure:6990: checking for $ac_func" >&5
6990 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6991   echo $ac_n "(cached) $ac_c" 1>&6
6992 else
6993   cat > conftest.$ac_ext <<EOF
6994 #line 6995 "configure"
6995 #include "confdefs.h"
6996 /* System header to define __stub macros and hopefully few prototypes,
6997     which can conflict with char $ac_func(); below.  */
6998 #include <assert.h>
6999 /* Override any gcc2 internal prototype to avoid an error.  */
7000 /* We use char because int might match the return type of a gcc2
7001     builtin and then its argument prototype would still apply.  */
7002 char $ac_func();
7003
7004 int main() {
7005
7006 /* The GNU C library defines this for functions which it implements
7007     to always fail with ENOSYS.  Some functions are actually named
7008     something starting with __ and the normal name is an alias.  */
7009 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7010 choke me
7011 #else
7012 $ac_func();
7013 #endif
7014
7015 ; return 0; }
7016 EOF
7017 if { (eval echo configure:7018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7018   rm -rf conftest*
7019   eval "ac_cv_func_$ac_func=yes"
7020 else
7021   echo "configure: failed program was:" >&5
7022   cat conftest.$ac_ext >&5
7023   rm -rf conftest*
7024   eval "ac_cv_func_$ac_func=no"
7025 fi
7026 rm -f conftest*
7027 fi
7028
7029 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7030   echo "$ac_t""yes" 1>&6
7031     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7032   cat >> confdefs.h <<EOF
7033 #define $ac_tr_func 1
7034 EOF
7035  
7036 else
7037   echo "$ac_t""no" 1>&6
7038 fi
7039 done
7040
7041   ;;
7042   esac
7043
7044 case "$LIBS" in
7045   *-lsec*) for ac_func in set_auth_parameters
7046 do
7047 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7048 echo "configure:7049: checking for $ac_func" >&5
7049 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7050   echo $ac_n "(cached) $ac_c" 1>&6
7051 else
7052   cat > conftest.$ac_ext <<EOF
7053 #line 7054 "configure"
7054 #include "confdefs.h"
7055 /* System header to define __stub macros and hopefully few prototypes,
7056     which can conflict with char $ac_func(); below.  */
7057 #include <assert.h>
7058 /* Override any gcc2 internal prototype to avoid an error.  */
7059 /* We use char because int might match the return type of a gcc2
7060     builtin and then its argument prototype would still apply.  */
7061 char $ac_func();
7062
7063 int main() {
7064
7065 /* The GNU C library defines this for functions which it implements
7066     to always fail with ENOSYS.  Some functions are actually named
7067     something starting with __ and the normal name is an alias.  */
7068 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7069 choke me
7070 #else
7071 $ac_func();
7072 #endif
7073
7074 ; return 0; }
7075 EOF
7076 if { (eval echo configure:7077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7077   rm -rf conftest*
7078   eval "ac_cv_func_$ac_func=yes"
7079 else
7080   echo "configure: failed program was:" >&5
7081   cat conftest.$ac_ext >&5
7082   rm -rf conftest*
7083   eval "ac_cv_func_$ac_func=no"
7084 fi
7085 rm -f conftest*
7086 fi
7087
7088 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7089   echo "$ac_t""yes" 1>&6
7090     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7091   cat >> confdefs.h <<EOF
7092 #define $ac_tr_func 1
7093 EOF
7094  
7095 else
7096   echo "$ac_t""no" 1>&6
7097 fi
7098 done
7099  ;;
7100   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7101 echo "configure:7102: checking for set_auth_parameters in -lsec" >&5
7102 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7103 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7104   echo $ac_n "(cached) $ac_c" 1>&6
7105 else
7106   ac_save_LIBS="$LIBS"
7107 LIBS="-lsec  $LIBS"
7108 cat > conftest.$ac_ext <<EOF
7109 #line 7110 "configure"
7110 #include "confdefs.h"
7111 /* Override any gcc2 internal prototype to avoid an error.  */
7112 /* We use char because int might match the return type of a gcc2
7113     builtin and then its argument prototype would still apply.  */
7114 char set_auth_parameters();
7115
7116 int main() {
7117 set_auth_parameters()
7118 ; return 0; }
7119 EOF
7120 if { (eval echo configure:7121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7121   rm -rf conftest*
7122   eval "ac_cv_lib_$ac_lib_var=yes"
7123 else
7124   echo "configure: failed program was:" >&5
7125   cat conftest.$ac_ext >&5
7126   rm -rf conftest*
7127   eval "ac_cv_lib_$ac_lib_var=no"
7128 fi
7129 rm -f conftest*
7130 LIBS="$ac_save_LIBS"
7131
7132 fi
7133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7134   echo "$ac_t""yes" 1>&6
7135     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7136     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7137   cat >> confdefs.h <<EOF
7138 #define $ac_tr_lib 1
7139 EOF
7140
7141   LIBS="-lsec $LIBS"
7142
7143 else
7144   echo "$ac_t""no" 1>&6
7145 fi
7146  
7147      for ac_func in set_auth_parameters
7148 do
7149 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7150 echo "configure:7151: checking for $ac_func" >&5
7151 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7152   echo $ac_n "(cached) $ac_c" 1>&6
7153 else
7154   cat > conftest.$ac_ext <<EOF
7155 #line 7156 "configure"
7156 #include "confdefs.h"
7157 /* System header to define __stub macros and hopefully few prototypes,
7158     which can conflict with char $ac_func(); below.  */
7159 #include <assert.h>
7160 /* Override any gcc2 internal prototype to avoid an error.  */
7161 /* We use char because int might match the return type of a gcc2
7162     builtin and then its argument prototype would still apply.  */
7163 char $ac_func();
7164
7165 int main() {
7166
7167 /* The GNU C library defines this for functions which it implements
7168     to always fail with ENOSYS.  Some functions are actually named
7169     something starting with __ and the normal name is an alias.  */
7170 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7171 choke me
7172 #else
7173 $ac_func();
7174 #endif
7175
7176 ; return 0; }
7177 EOF
7178 if { (eval echo configure:7179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7179   rm -rf conftest*
7180   eval "ac_cv_func_$ac_func=yes"
7181 else
7182   echo "configure: failed program was:" >&5
7183   cat conftest.$ac_ext >&5
7184   rm -rf conftest*
7185   eval "ac_cv_func_$ac_func=no"
7186 fi
7187 rm -f conftest*
7188 fi
7189
7190 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7191   echo "$ac_t""yes" 1>&6
7192     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7193   cat >> confdefs.h <<EOF
7194 #define $ac_tr_func 1
7195 EOF
7196  
7197 else
7198   echo "$ac_t""no" 1>&6
7199 fi
7200 done
7201
7202   ;;
7203   esac
7204
7205
7206 # UnixWare 7.x has its getspnam in -lgen
7207 case "$LIBS" in
7208   *-lgen*) for ac_func in getspnam
7209 do
7210 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7211 echo "configure:7212: checking for $ac_func" >&5
7212 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7213   echo $ac_n "(cached) $ac_c" 1>&6
7214 else
7215   cat > conftest.$ac_ext <<EOF
7216 #line 7217 "configure"
7217 #include "confdefs.h"
7218 /* System header to define __stub macros and hopefully few prototypes,
7219     which can conflict with char $ac_func(); below.  */
7220 #include <assert.h>
7221 /* Override any gcc2 internal prototype to avoid an error.  */
7222 /* We use char because int might match the return type of a gcc2
7223     builtin and then its argument prototype would still apply.  */
7224 char $ac_func();
7225
7226 int main() {
7227
7228 /* The GNU C library defines this for functions which it implements
7229     to always fail with ENOSYS.  Some functions are actually named
7230     something starting with __ and the normal name is an alias.  */
7231 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7232 choke me
7233 #else
7234 $ac_func();
7235 #endif
7236
7237 ; return 0; }
7238 EOF
7239 if { (eval echo configure:7240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7240   rm -rf conftest*
7241   eval "ac_cv_func_$ac_func=yes"
7242 else
7243   echo "configure: failed program was:" >&5
7244   cat conftest.$ac_ext >&5
7245   rm -rf conftest*
7246   eval "ac_cv_func_$ac_func=no"
7247 fi
7248 rm -f conftest*
7249 fi
7250
7251 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7252   echo "$ac_t""yes" 1>&6
7253     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7254   cat >> confdefs.h <<EOF
7255 #define $ac_tr_func 1
7256 EOF
7257  
7258 else
7259   echo "$ac_t""no" 1>&6
7260 fi
7261 done
7262  ;;
7263   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7264 echo "configure:7265: checking for getspnam in -lgen" >&5
7265 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7266 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7267   echo $ac_n "(cached) $ac_c" 1>&6
7268 else
7269   ac_save_LIBS="$LIBS"
7270 LIBS="-lgen  $LIBS"
7271 cat > conftest.$ac_ext <<EOF
7272 #line 7273 "configure"
7273 #include "confdefs.h"
7274 /* Override any gcc2 internal prototype to avoid an error.  */
7275 /* We use char because int might match the return type of a gcc2
7276     builtin and then its argument prototype would still apply.  */
7277 char getspnam();
7278
7279 int main() {
7280 getspnam()
7281 ; return 0; }
7282 EOF
7283 if { (eval echo configure:7284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7284   rm -rf conftest*
7285   eval "ac_cv_lib_$ac_lib_var=yes"
7286 else
7287   echo "configure: failed program was:" >&5
7288   cat conftest.$ac_ext >&5
7289   rm -rf conftest*
7290   eval "ac_cv_lib_$ac_lib_var=no"
7291 fi
7292 rm -f conftest*
7293 LIBS="$ac_save_LIBS"
7294
7295 fi
7296 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7297   echo "$ac_t""yes" 1>&6
7298     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7299     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7300   cat >> confdefs.h <<EOF
7301 #define $ac_tr_lib 1
7302 EOF
7303
7304   LIBS="-lgen $LIBS"
7305
7306 else
7307   echo "$ac_t""no" 1>&6
7308 fi
7309  
7310      for ac_func in getspnam
7311 do
7312 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7313 echo "configure:7314: checking for $ac_func" >&5
7314 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7315   echo $ac_n "(cached) $ac_c" 1>&6
7316 else
7317   cat > conftest.$ac_ext <<EOF
7318 #line 7319 "configure"
7319 #include "confdefs.h"
7320 /* System header to define __stub macros and hopefully few prototypes,
7321     which can conflict with char $ac_func(); below.  */
7322 #include <assert.h>
7323 /* Override any gcc2 internal prototype to avoid an error.  */
7324 /* We use char because int might match the return type of a gcc2
7325     builtin and then its argument prototype would still apply.  */
7326 char $ac_func();
7327
7328 int main() {
7329
7330 /* The GNU C library defines this for functions which it implements
7331     to always fail with ENOSYS.  Some functions are actually named
7332     something starting with __ and the normal name is an alias.  */
7333 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7334 choke me
7335 #else
7336 $ac_func();
7337 #endif
7338
7339 ; return 0; }
7340 EOF
7341 if { (eval echo configure:7342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7342   rm -rf conftest*
7343   eval "ac_cv_func_$ac_func=yes"
7344 else
7345   echo "configure: failed program was:" >&5
7346   cat conftest.$ac_ext >&5
7347   rm -rf conftest*
7348   eval "ac_cv_func_$ac_func=no"
7349 fi
7350 rm -f conftest*
7351 fi
7352
7353 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7354   echo "$ac_t""yes" 1>&6
7355     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7356   cat >> confdefs.h <<EOF
7357 #define $ac_tr_func 1
7358 EOF
7359  
7360 else
7361   echo "$ac_t""no" 1>&6
7362 fi
7363 done
7364
7365   ;;
7366   esac
7367
7368
7369 case "$LIBS" in
7370   *-lsecurity*) for ac_func in getspnam
7371 do
7372 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7373 echo "configure:7374: checking for $ac_func" >&5
7374 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7375   echo $ac_n "(cached) $ac_c" 1>&6
7376 else
7377   cat > conftest.$ac_ext <<EOF
7378 #line 7379 "configure"
7379 #include "confdefs.h"
7380 /* System header to define __stub macros and hopefully few prototypes,
7381     which can conflict with char $ac_func(); below.  */
7382 #include <assert.h>
7383 /* Override any gcc2 internal prototype to avoid an error.  */
7384 /* We use char because int might match the return type of a gcc2
7385     builtin and then its argument prototype would still apply.  */
7386 char $ac_func();
7387
7388 int main() {
7389
7390 /* The GNU C library defines this for functions which it implements
7391     to always fail with ENOSYS.  Some functions are actually named
7392     something starting with __ and the normal name is an alias.  */
7393 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7394 choke me
7395 #else
7396 $ac_func();
7397 #endif
7398
7399 ; return 0; }
7400 EOF
7401 if { (eval echo configure:7402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7402   rm -rf conftest*
7403   eval "ac_cv_func_$ac_func=yes"
7404 else
7405   echo "configure: failed program was:" >&5
7406   cat conftest.$ac_ext >&5
7407   rm -rf conftest*
7408   eval "ac_cv_func_$ac_func=no"
7409 fi
7410 rm -f conftest*
7411 fi
7412
7413 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7414   echo "$ac_t""yes" 1>&6
7415     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7416   cat >> confdefs.h <<EOF
7417 #define $ac_tr_func 1
7418 EOF
7419  
7420 else
7421   echo "$ac_t""no" 1>&6
7422 fi
7423 done
7424  ;;
7425   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7426 echo "configure:7427: checking for getspnam in -lsecurity" >&5
7427 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7428 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7429   echo $ac_n "(cached) $ac_c" 1>&6
7430 else
7431   ac_save_LIBS="$LIBS"
7432 LIBS="-lsecurity  $LIBS"
7433 cat > conftest.$ac_ext <<EOF
7434 #line 7435 "configure"
7435 #include "confdefs.h"
7436 /* Override any gcc2 internal prototype to avoid an error.  */
7437 /* We use char because int might match the return type of a gcc2
7438     builtin and then its argument prototype would still apply.  */
7439 char getspnam();
7440
7441 int main() {
7442 getspnam()
7443 ; return 0; }
7444 EOF
7445 if { (eval echo configure:7446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7446   rm -rf conftest*
7447   eval "ac_cv_lib_$ac_lib_var=yes"
7448 else
7449   echo "configure: failed program was:" >&5
7450   cat conftest.$ac_ext >&5
7451   rm -rf conftest*
7452   eval "ac_cv_lib_$ac_lib_var=no"
7453 fi
7454 rm -f conftest*
7455 LIBS="$ac_save_LIBS"
7456
7457 fi
7458 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7459   echo "$ac_t""yes" 1>&6
7460     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7461     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7462   cat >> confdefs.h <<EOF
7463 #define $ac_tr_lib 1
7464 EOF
7465
7466   LIBS="-lsecurity $LIBS"
7467
7468 else
7469   echo "$ac_t""no" 1>&6
7470 fi
7471  
7472      for ac_func in getspnam
7473 do
7474 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7475 echo "configure:7476: checking for $ac_func" >&5
7476 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7477   echo $ac_n "(cached) $ac_c" 1>&6
7478 else
7479   cat > conftest.$ac_ext <<EOF
7480 #line 7481 "configure"
7481 #include "confdefs.h"
7482 /* System header to define __stub macros and hopefully few prototypes,
7483     which can conflict with char $ac_func(); below.  */
7484 #include <assert.h>
7485 /* Override any gcc2 internal prototype to avoid an error.  */
7486 /* We use char because int might match the return type of a gcc2
7487     builtin and then its argument prototype would still apply.  */
7488 char $ac_func();
7489
7490 int main() {
7491
7492 /* The GNU C library defines this for functions which it implements
7493     to always fail with ENOSYS.  Some functions are actually named
7494     something starting with __ and the normal name is an alias.  */
7495 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7496 choke me
7497 #else
7498 $ac_func();
7499 #endif
7500
7501 ; return 0; }
7502 EOF
7503 if { (eval echo configure:7504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7504   rm -rf conftest*
7505   eval "ac_cv_func_$ac_func=yes"
7506 else
7507   echo "configure: failed program was:" >&5
7508   cat conftest.$ac_ext >&5
7509   rm -rf conftest*
7510   eval "ac_cv_func_$ac_func=no"
7511 fi
7512 rm -f conftest*
7513 fi
7514
7515 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7516   echo "$ac_t""yes" 1>&6
7517     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7518   cat >> confdefs.h <<EOF
7519 #define $ac_tr_func 1
7520 EOF
7521  
7522 else
7523   echo "$ac_t""no" 1>&6
7524 fi
7525 done
7526
7527   ;;
7528   esac
7529
7530 case "$LIBS" in
7531   *-lsec*) for ac_func in getspnam
7532 do
7533 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7534 echo "configure:7535: checking for $ac_func" >&5
7535 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7536   echo $ac_n "(cached) $ac_c" 1>&6
7537 else
7538   cat > conftest.$ac_ext <<EOF
7539 #line 7540 "configure"
7540 #include "confdefs.h"
7541 /* System header to define __stub macros and hopefully few prototypes,
7542     which can conflict with char $ac_func(); below.  */
7543 #include <assert.h>
7544 /* Override any gcc2 internal prototype to avoid an error.  */
7545 /* We use char because int might match the return type of a gcc2
7546     builtin and then its argument prototype would still apply.  */
7547 char $ac_func();
7548
7549 int main() {
7550
7551 /* The GNU C library defines this for functions which it implements
7552     to always fail with ENOSYS.  Some functions are actually named
7553     something starting with __ and the normal name is an alias.  */
7554 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7555 choke me
7556 #else
7557 $ac_func();
7558 #endif
7559
7560 ; return 0; }
7561 EOF
7562 if { (eval echo configure:7563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7563   rm -rf conftest*
7564   eval "ac_cv_func_$ac_func=yes"
7565 else
7566   echo "configure: failed program was:" >&5
7567   cat conftest.$ac_ext >&5
7568   rm -rf conftest*
7569   eval "ac_cv_func_$ac_func=no"
7570 fi
7571 rm -f conftest*
7572 fi
7573
7574 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7575   echo "$ac_t""yes" 1>&6
7576     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7577   cat >> confdefs.h <<EOF
7578 #define $ac_tr_func 1
7579 EOF
7580  
7581 else
7582   echo "$ac_t""no" 1>&6
7583 fi
7584 done
7585  ;;
7586   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7587 echo "configure:7588: checking for getspnam in -lsec" >&5
7588 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7589 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7590   echo $ac_n "(cached) $ac_c" 1>&6
7591 else
7592   ac_save_LIBS="$LIBS"
7593 LIBS="-lsec  $LIBS"
7594 cat > conftest.$ac_ext <<EOF
7595 #line 7596 "configure"
7596 #include "confdefs.h"
7597 /* Override any gcc2 internal prototype to avoid an error.  */
7598 /* We use char because int might match the return type of a gcc2
7599     builtin and then its argument prototype would still apply.  */
7600 char getspnam();
7601
7602 int main() {
7603 getspnam()
7604 ; return 0; }
7605 EOF
7606 if { (eval echo configure:7607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7607   rm -rf conftest*
7608   eval "ac_cv_lib_$ac_lib_var=yes"
7609 else
7610   echo "configure: failed program was:" >&5
7611   cat conftest.$ac_ext >&5
7612   rm -rf conftest*
7613   eval "ac_cv_lib_$ac_lib_var=no"
7614 fi
7615 rm -f conftest*
7616 LIBS="$ac_save_LIBS"
7617
7618 fi
7619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7620   echo "$ac_t""yes" 1>&6
7621     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7622     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7623   cat >> confdefs.h <<EOF
7624 #define $ac_tr_lib 1
7625 EOF
7626
7627   LIBS="-lsec $LIBS"
7628
7629 else
7630   echo "$ac_t""no" 1>&6
7631 fi
7632  
7633      for ac_func in getspnam
7634 do
7635 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7636 echo "configure:7637: checking for $ac_func" >&5
7637 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7638   echo $ac_n "(cached) $ac_c" 1>&6
7639 else
7640   cat > conftest.$ac_ext <<EOF
7641 #line 7642 "configure"
7642 #include "confdefs.h"
7643 /* System header to define __stub macros and hopefully few prototypes,
7644     which can conflict with char $ac_func(); below.  */
7645 #include <assert.h>
7646 /* Override any gcc2 internal prototype to avoid an error.  */
7647 /* We use char because int might match the return type of a gcc2
7648     builtin and then its argument prototype would still apply.  */
7649 char $ac_func();
7650
7651 int main() {
7652
7653 /* The GNU C library defines this for functions which it implements
7654     to always fail with ENOSYS.  Some functions are actually named
7655     something starting with __ and the normal name is an alias.  */
7656 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7657 choke me
7658 #else
7659 $ac_func();
7660 #endif
7661
7662 ; return 0; }
7663 EOF
7664 if { (eval echo configure:7665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7665   rm -rf conftest*
7666   eval "ac_cv_func_$ac_func=yes"
7667 else
7668   echo "configure: failed program was:" >&5
7669   cat conftest.$ac_ext >&5
7670   rm -rf conftest*
7671   eval "ac_cv_func_$ac_func=no"
7672 fi
7673 rm -f conftest*
7674 fi
7675
7676 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7677   echo "$ac_t""yes" 1>&6
7678     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7679   cat >> confdefs.h <<EOF
7680 #define $ac_tr_func 1
7681 EOF
7682  
7683 else
7684   echo "$ac_t""no" 1>&6
7685 fi
7686 done
7687
7688   ;;
7689   esac
7690
7691
7692 case "$LIBS" in
7693   *-lsecurity*) for ac_func in bigcrypt
7694 do
7695 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7696 echo "configure:7697: checking for $ac_func" >&5
7697 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7698   echo $ac_n "(cached) $ac_c" 1>&6
7699 else
7700   cat > conftest.$ac_ext <<EOF
7701 #line 7702 "configure"
7702 #include "confdefs.h"
7703 /* System header to define __stub macros and hopefully few prototypes,
7704     which can conflict with char $ac_func(); below.  */
7705 #include <assert.h>
7706 /* Override any gcc2 internal prototype to avoid an error.  */
7707 /* We use char because int might match the return type of a gcc2
7708     builtin and then its argument prototype would still apply.  */
7709 char $ac_func();
7710
7711 int main() {
7712
7713 /* The GNU C library defines this for functions which it implements
7714     to always fail with ENOSYS.  Some functions are actually named
7715     something starting with __ and the normal name is an alias.  */
7716 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7717 choke me
7718 #else
7719 $ac_func();
7720 #endif
7721
7722 ; return 0; }
7723 EOF
7724 if { (eval echo configure:7725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7725   rm -rf conftest*
7726   eval "ac_cv_func_$ac_func=yes"
7727 else
7728   echo "configure: failed program was:" >&5
7729   cat conftest.$ac_ext >&5
7730   rm -rf conftest*
7731   eval "ac_cv_func_$ac_func=no"
7732 fi
7733 rm -f conftest*
7734 fi
7735
7736 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7737   echo "$ac_t""yes" 1>&6
7738     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7739   cat >> confdefs.h <<EOF
7740 #define $ac_tr_func 1
7741 EOF
7742  
7743 else
7744   echo "$ac_t""no" 1>&6
7745 fi
7746 done
7747  ;;
7748   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7749 echo "configure:7750: checking for bigcrypt in -lsecurity" >&5
7750 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7751 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7752   echo $ac_n "(cached) $ac_c" 1>&6
7753 else
7754   ac_save_LIBS="$LIBS"
7755 LIBS="-lsecurity  $LIBS"
7756 cat > conftest.$ac_ext <<EOF
7757 #line 7758 "configure"
7758 #include "confdefs.h"
7759 /* Override any gcc2 internal prototype to avoid an error.  */
7760 /* We use char because int might match the return type of a gcc2
7761     builtin and then its argument prototype would still apply.  */
7762 char bigcrypt();
7763
7764 int main() {
7765 bigcrypt()
7766 ; return 0; }
7767 EOF
7768 if { (eval echo configure:7769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7769   rm -rf conftest*
7770   eval "ac_cv_lib_$ac_lib_var=yes"
7771 else
7772   echo "configure: failed program was:" >&5
7773   cat conftest.$ac_ext >&5
7774   rm -rf conftest*
7775   eval "ac_cv_lib_$ac_lib_var=no"
7776 fi
7777 rm -f conftest*
7778 LIBS="$ac_save_LIBS"
7779
7780 fi
7781 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7782   echo "$ac_t""yes" 1>&6
7783     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7784     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7785   cat >> confdefs.h <<EOF
7786 #define $ac_tr_lib 1
7787 EOF
7788
7789   LIBS="-lsecurity $LIBS"
7790
7791 else
7792   echo "$ac_t""no" 1>&6
7793 fi
7794  
7795      for ac_func in bigcrypt
7796 do
7797 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7798 echo "configure:7799: checking for $ac_func" >&5
7799 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7800   echo $ac_n "(cached) $ac_c" 1>&6
7801 else
7802   cat > conftest.$ac_ext <<EOF
7803 #line 7804 "configure"
7804 #include "confdefs.h"
7805 /* System header to define __stub macros and hopefully few prototypes,
7806     which can conflict with char $ac_func(); below.  */
7807 #include <assert.h>
7808 /* Override any gcc2 internal prototype to avoid an error.  */
7809 /* We use char because int might match the return type of a gcc2
7810     builtin and then its argument prototype would still apply.  */
7811 char $ac_func();
7812
7813 int main() {
7814
7815 /* The GNU C library defines this for functions which it implements
7816     to always fail with ENOSYS.  Some functions are actually named
7817     something starting with __ and the normal name is an alias.  */
7818 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7819 choke me
7820 #else
7821 $ac_func();
7822 #endif
7823
7824 ; return 0; }
7825 EOF
7826 if { (eval echo configure:7827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7827   rm -rf conftest*
7828   eval "ac_cv_func_$ac_func=yes"
7829 else
7830   echo "configure: failed program was:" >&5
7831   cat conftest.$ac_ext >&5
7832   rm -rf conftest*
7833   eval "ac_cv_func_$ac_func=no"
7834 fi
7835 rm -f conftest*
7836 fi
7837
7838 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7839   echo "$ac_t""yes" 1>&6
7840     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7841   cat >> confdefs.h <<EOF
7842 #define $ac_tr_func 1
7843 EOF
7844  
7845 else
7846   echo "$ac_t""no" 1>&6
7847 fi
7848 done
7849
7850   ;;
7851   esac
7852
7853 case "$LIBS" in
7854   *-lsec*) for ac_func in bigcrypt
7855 do
7856 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7857 echo "configure:7858: checking for $ac_func" >&5
7858 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7859   echo $ac_n "(cached) $ac_c" 1>&6
7860 else
7861   cat > conftest.$ac_ext <<EOF
7862 #line 7863 "configure"
7863 #include "confdefs.h"
7864 /* System header to define __stub macros and hopefully few prototypes,
7865     which can conflict with char $ac_func(); below.  */
7866 #include <assert.h>
7867 /* Override any gcc2 internal prototype to avoid an error.  */
7868 /* We use char because int might match the return type of a gcc2
7869     builtin and then its argument prototype would still apply.  */
7870 char $ac_func();
7871
7872 int main() {
7873
7874 /* The GNU C library defines this for functions which it implements
7875     to always fail with ENOSYS.  Some functions are actually named
7876     something starting with __ and the normal name is an alias.  */
7877 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7878 choke me
7879 #else
7880 $ac_func();
7881 #endif
7882
7883 ; return 0; }
7884 EOF
7885 if { (eval echo configure:7886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7886   rm -rf conftest*
7887   eval "ac_cv_func_$ac_func=yes"
7888 else
7889   echo "configure: failed program was:" >&5
7890   cat conftest.$ac_ext >&5
7891   rm -rf conftest*
7892   eval "ac_cv_func_$ac_func=no"
7893 fi
7894 rm -f conftest*
7895 fi
7896
7897 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7898   echo "$ac_t""yes" 1>&6
7899     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7900   cat >> confdefs.h <<EOF
7901 #define $ac_tr_func 1
7902 EOF
7903  
7904 else
7905   echo "$ac_t""no" 1>&6
7906 fi
7907 done
7908  ;;
7909   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
7910 echo "configure:7911: checking for bigcrypt in -lsec" >&5
7911 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
7912 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7913   echo $ac_n "(cached) $ac_c" 1>&6
7914 else
7915   ac_save_LIBS="$LIBS"
7916 LIBS="-lsec  $LIBS"
7917 cat > conftest.$ac_ext <<EOF
7918 #line 7919 "configure"
7919 #include "confdefs.h"
7920 /* Override any gcc2 internal prototype to avoid an error.  */
7921 /* We use char because int might match the return type of a gcc2
7922     builtin and then its argument prototype would still apply.  */
7923 char bigcrypt();
7924
7925 int main() {
7926 bigcrypt()
7927 ; return 0; }
7928 EOF
7929 if { (eval echo configure:7930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7930   rm -rf conftest*
7931   eval "ac_cv_lib_$ac_lib_var=yes"
7932 else
7933   echo "configure: failed program was:" >&5
7934   cat conftest.$ac_ext >&5
7935   rm -rf conftest*
7936   eval "ac_cv_lib_$ac_lib_var=no"
7937 fi
7938 rm -f conftest*
7939 LIBS="$ac_save_LIBS"
7940
7941 fi
7942 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7943   echo "$ac_t""yes" 1>&6
7944     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7945     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7946   cat >> confdefs.h <<EOF
7947 #define $ac_tr_lib 1
7948 EOF
7949
7950   LIBS="-lsec $LIBS"
7951
7952 else
7953   echo "$ac_t""no" 1>&6
7954 fi
7955  
7956      for ac_func in bigcrypt
7957 do
7958 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7959 echo "configure:7960: checking for $ac_func" >&5
7960 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7961   echo $ac_n "(cached) $ac_c" 1>&6
7962 else
7963   cat > conftest.$ac_ext <<EOF
7964 #line 7965 "configure"
7965 #include "confdefs.h"
7966 /* System header to define __stub macros and hopefully few prototypes,
7967     which can conflict with char $ac_func(); below.  */
7968 #include <assert.h>
7969 /* Override any gcc2 internal prototype to avoid an error.  */
7970 /* We use char because int might match the return type of a gcc2
7971     builtin and then its argument prototype would still apply.  */
7972 char $ac_func();
7973
7974 int main() {
7975
7976 /* The GNU C library defines this for functions which it implements
7977     to always fail with ENOSYS.  Some functions are actually named
7978     something starting with __ and the normal name is an alias.  */
7979 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7980 choke me
7981 #else
7982 $ac_func();
7983 #endif
7984
7985 ; return 0; }
7986 EOF
7987 if { (eval echo configure:7988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7988   rm -rf conftest*
7989   eval "ac_cv_func_$ac_func=yes"
7990 else
7991   echo "configure: failed program was:" >&5
7992   cat conftest.$ac_ext >&5
7993   rm -rf conftest*
7994   eval "ac_cv_func_$ac_func=no"
7995 fi
7996 rm -f conftest*
7997 fi
7998
7999 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8000   echo "$ac_t""yes" 1>&6
8001     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8002   cat >> confdefs.h <<EOF
8003 #define $ac_tr_func 1
8004 EOF
8005  
8006 else
8007   echo "$ac_t""no" 1>&6
8008 fi
8009 done
8010
8011   ;;
8012   esac
8013
8014
8015 case "$LIBS" in
8016   *-lsecurity*) for ac_func in getprpwnam
8017 do
8018 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8019 echo "configure:8020: checking for $ac_func" >&5
8020 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8021   echo $ac_n "(cached) $ac_c" 1>&6
8022 else
8023   cat > conftest.$ac_ext <<EOF
8024 #line 8025 "configure"
8025 #include "confdefs.h"
8026 /* System header to define __stub macros and hopefully few prototypes,
8027     which can conflict with char $ac_func(); below.  */
8028 #include <assert.h>
8029 /* Override any gcc2 internal prototype to avoid an error.  */
8030 /* We use char because int might match the return type of a gcc2
8031     builtin and then its argument prototype would still apply.  */
8032 char $ac_func();
8033
8034 int main() {
8035
8036 /* The GNU C library defines this for functions which it implements
8037     to always fail with ENOSYS.  Some functions are actually named
8038     something starting with __ and the normal name is an alias.  */
8039 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8040 choke me
8041 #else
8042 $ac_func();
8043 #endif
8044
8045 ; return 0; }
8046 EOF
8047 if { (eval echo configure:8048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8048   rm -rf conftest*
8049   eval "ac_cv_func_$ac_func=yes"
8050 else
8051   echo "configure: failed program was:" >&5
8052   cat conftest.$ac_ext >&5
8053   rm -rf conftest*
8054   eval "ac_cv_func_$ac_func=no"
8055 fi
8056 rm -f conftest*
8057 fi
8058
8059 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8060   echo "$ac_t""yes" 1>&6
8061     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8062   cat >> confdefs.h <<EOF
8063 #define $ac_tr_func 1
8064 EOF
8065  
8066 else
8067   echo "$ac_t""no" 1>&6
8068 fi
8069 done
8070  ;;
8071   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8072 echo "configure:8073: checking for getprpwnam in -lsecurity" >&5
8073 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8074 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8075   echo $ac_n "(cached) $ac_c" 1>&6
8076 else
8077   ac_save_LIBS="$LIBS"
8078 LIBS="-lsecurity  $LIBS"
8079 cat > conftest.$ac_ext <<EOF
8080 #line 8081 "configure"
8081 #include "confdefs.h"
8082 /* Override any gcc2 internal prototype to avoid an error.  */
8083 /* We use char because int might match the return type of a gcc2
8084     builtin and then its argument prototype would still apply.  */
8085 char getprpwnam();
8086
8087 int main() {
8088 getprpwnam()
8089 ; return 0; }
8090 EOF
8091 if { (eval echo configure:8092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8092   rm -rf conftest*
8093   eval "ac_cv_lib_$ac_lib_var=yes"
8094 else
8095   echo "configure: failed program was:" >&5
8096   cat conftest.$ac_ext >&5
8097   rm -rf conftest*
8098   eval "ac_cv_lib_$ac_lib_var=no"
8099 fi
8100 rm -f conftest*
8101 LIBS="$ac_save_LIBS"
8102
8103 fi
8104 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8105   echo "$ac_t""yes" 1>&6
8106     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8107     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8108   cat >> confdefs.h <<EOF
8109 #define $ac_tr_lib 1
8110 EOF
8111
8112   LIBS="-lsecurity $LIBS"
8113
8114 else
8115   echo "$ac_t""no" 1>&6
8116 fi
8117  
8118      for ac_func in getprpwnam
8119 do
8120 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8121 echo "configure:8122: checking for $ac_func" >&5
8122 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8123   echo $ac_n "(cached) $ac_c" 1>&6
8124 else
8125   cat > conftest.$ac_ext <<EOF
8126 #line 8127 "configure"
8127 #include "confdefs.h"
8128 /* System header to define __stub macros and hopefully few prototypes,
8129     which can conflict with char $ac_func(); below.  */
8130 #include <assert.h>
8131 /* Override any gcc2 internal prototype to avoid an error.  */
8132 /* We use char because int might match the return type of a gcc2
8133     builtin and then its argument prototype would still apply.  */
8134 char $ac_func();
8135
8136 int main() {
8137
8138 /* The GNU C library defines this for functions which it implements
8139     to always fail with ENOSYS.  Some functions are actually named
8140     something starting with __ and the normal name is an alias.  */
8141 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8142 choke me
8143 #else
8144 $ac_func();
8145 #endif
8146
8147 ; return 0; }
8148 EOF
8149 if { (eval echo configure:8150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8150   rm -rf conftest*
8151   eval "ac_cv_func_$ac_func=yes"
8152 else
8153   echo "configure: failed program was:" >&5
8154   cat conftest.$ac_ext >&5
8155   rm -rf conftest*
8156   eval "ac_cv_func_$ac_func=no"
8157 fi
8158 rm -f conftest*
8159 fi
8160
8161 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8162   echo "$ac_t""yes" 1>&6
8163     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8164   cat >> confdefs.h <<EOF
8165 #define $ac_tr_func 1
8166 EOF
8167  
8168 else
8169   echo "$ac_t""no" 1>&6
8170 fi
8171 done
8172
8173   ;;
8174   esac
8175
8176 case "$LIBS" in
8177   *-lsec*) for ac_func in getprpwnam
8178 do
8179 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8180 echo "configure:8181: checking for $ac_func" >&5
8181 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8182   echo $ac_n "(cached) $ac_c" 1>&6
8183 else
8184   cat > conftest.$ac_ext <<EOF
8185 #line 8186 "configure"
8186 #include "confdefs.h"
8187 /* System header to define __stub macros and hopefully few prototypes,
8188     which can conflict with char $ac_func(); below.  */
8189 #include <assert.h>
8190 /* Override any gcc2 internal prototype to avoid an error.  */
8191 /* We use char because int might match the return type of a gcc2
8192     builtin and then its argument prototype would still apply.  */
8193 char $ac_func();
8194
8195 int main() {
8196
8197 /* The GNU C library defines this for functions which it implements
8198     to always fail with ENOSYS.  Some functions are actually named
8199     something starting with __ and the normal name is an alias.  */
8200 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8201 choke me
8202 #else
8203 $ac_func();
8204 #endif
8205
8206 ; return 0; }
8207 EOF
8208 if { (eval echo configure:8209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8209   rm -rf conftest*
8210   eval "ac_cv_func_$ac_func=yes"
8211 else
8212   echo "configure: failed program was:" >&5
8213   cat conftest.$ac_ext >&5
8214   rm -rf conftest*
8215   eval "ac_cv_func_$ac_func=no"
8216 fi
8217 rm -f conftest*
8218 fi
8219
8220 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8221   echo "$ac_t""yes" 1>&6
8222     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8223   cat >> confdefs.h <<EOF
8224 #define $ac_tr_func 1
8225 EOF
8226  
8227 else
8228   echo "$ac_t""no" 1>&6
8229 fi
8230 done
8231  ;;
8232   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8233 echo "configure:8234: checking for getprpwnam in -lsec" >&5
8234 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8235 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8236   echo $ac_n "(cached) $ac_c" 1>&6
8237 else
8238   ac_save_LIBS="$LIBS"
8239 LIBS="-lsec  $LIBS"
8240 cat > conftest.$ac_ext <<EOF
8241 #line 8242 "configure"
8242 #include "confdefs.h"
8243 /* Override any gcc2 internal prototype to avoid an error.  */
8244 /* We use char because int might match the return type of a gcc2
8245     builtin and then its argument prototype would still apply.  */
8246 char getprpwnam();
8247
8248 int main() {
8249 getprpwnam()
8250 ; return 0; }
8251 EOF
8252 if { (eval echo configure:8253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8253   rm -rf conftest*
8254   eval "ac_cv_lib_$ac_lib_var=yes"
8255 else
8256   echo "configure: failed program was:" >&5
8257   cat conftest.$ac_ext >&5
8258   rm -rf conftest*
8259   eval "ac_cv_lib_$ac_lib_var=no"
8260 fi
8261 rm -f conftest*
8262 LIBS="$ac_save_LIBS"
8263
8264 fi
8265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8266   echo "$ac_t""yes" 1>&6
8267     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8268     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8269   cat >> confdefs.h <<EOF
8270 #define $ac_tr_lib 1
8271 EOF
8272
8273   LIBS="-lsec $LIBS"
8274
8275 else
8276   echo "$ac_t""no" 1>&6
8277 fi
8278  
8279      for ac_func in getprpwnam
8280 do
8281 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8282 echo "configure:8283: checking for $ac_func" >&5
8283 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8284   echo $ac_n "(cached) $ac_c" 1>&6
8285 else
8286   cat > conftest.$ac_ext <<EOF
8287 #line 8288 "configure"
8288 #include "confdefs.h"
8289 /* System header to define __stub macros and hopefully few prototypes,
8290     which can conflict with char $ac_func(); below.  */
8291 #include <assert.h>
8292 /* Override any gcc2 internal prototype to avoid an error.  */
8293 /* We use char because int might match the return type of a gcc2
8294     builtin and then its argument prototype would still apply.  */
8295 char $ac_func();
8296
8297 int main() {
8298
8299 /* The GNU C library defines this for functions which it implements
8300     to always fail with ENOSYS.  Some functions are actually named
8301     something starting with __ and the normal name is an alias.  */
8302 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8303 choke me
8304 #else
8305 $ac_func();
8306 #endif
8307
8308 ; return 0; }
8309 EOF
8310 if { (eval echo configure:8311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8311   rm -rf conftest*
8312   eval "ac_cv_func_$ac_func=yes"
8313 else
8314   echo "configure: failed program was:" >&5
8315   cat conftest.$ac_ext >&5
8316   rm -rf conftest*
8317   eval "ac_cv_func_$ac_func=no"
8318 fi
8319 rm -f conftest*
8320 fi
8321
8322 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8323   echo "$ac_t""yes" 1>&6
8324     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8325   cat >> confdefs.h <<EOF
8326 #define $ac_tr_func 1
8327 EOF
8328  
8329 else
8330   echo "$ac_t""no" 1>&6
8331 fi
8332 done
8333
8334   ;;
8335   esac
8336
8337
8338 # this bit needs to be modified for each OS that is suported by
8339 # smbwrapper. You need to specify how to created a shared library and
8340 # how to compile C code to produce PIC object files
8341
8342 # these are the defaults, good for lots of systems
8343 HOST_OS="$host_os"
8344 LDSHFLAGS="-shared"
8345 SHLD="\${CC}"
8346 PICFLAG=""
8347 PICSUFFIX="po"
8348 POBAD_CC="#"
8349 SHLIBEXT="so"
8350 BLDSHARED="false"
8351
8352 # and these are for particular systems
8353 case "$host_os" in
8354                 *linux*)   cat >> confdefs.h <<\EOF
8355 #define LINUX 1
8356 EOF
8357
8358                         BLDSHARED="true"
8359                         LDSHFLAGS="-shared" 
8360                         PICFLAG="-fPIC"
8361                 ;;
8362                 *solaris*) cat >> confdefs.h <<\EOF
8363 #define SUNOS5 1
8364 EOF
8365
8366                         BLDSHARED="true"
8367                         LDSHFLAGS="-Wl,-h,\$@.so -G"
8368                         if test "${ac_cv_prog_CC}" = "gcc"; then
8369                                 PICFLAG="-fPIC"
8370                         else
8371                                 PICFLAG="-KPIC"
8372                                 POBAD_CC=""
8373                                 PICSUFFIX="po.o"
8374                         fi
8375                 ;;
8376                 *sunos*) cat >> confdefs.h <<\EOF
8377 #define SUNOS4 1
8378 EOF
8379
8380                         BLDSHARED="true"
8381                         LDSHFLAGS="-Wl,-h,\$@ -G"
8382                         PICFLAG="-KPIC"   # Is this correct for SunOS
8383                 ;;
8384                 *bsd*)  BLDSHARED="true"
8385                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8386                         PICFLAG="-fPIC"
8387                 ;;
8388                 *irix*) cat >> confdefs.h <<\EOF
8389 #define IRIX 1
8390 EOF
8391
8392                         case "$host_os" in
8393                         *irix6*) cat >> confdefs.h <<\EOF
8394 #define IRIX6 1
8395 EOF
8396
8397                         ;;
8398                         esac
8399                         ATTEMPT_WRAP32_BUILD=yes
8400                         BLDSHARED="true"
8401                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8402                         if test "${ac_cv_prog_CC}" = "gcc"; then
8403                                 PICFLAG="-fPIC"
8404                         else 
8405                                 PICFLAG="-KPIC"
8406                         fi
8407                 ;;
8408                 *aix*) cat >> confdefs.h <<\EOF
8409 #define AIX 1
8410 EOF
8411
8412                         BLDSHARED="true"
8413                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8414                         PICFLAG="-O2 -qmaxmem=6000"
8415                 ;;
8416                 *hpux*) cat >> confdefs.h <<\EOF
8417 #define HPUX 1
8418 EOF
8419
8420                         SHLIBEXT="sl"
8421                         # Use special PIC flags for the native HP-UX compiler.
8422                         if test $ac_cv_prog_cc_Ae = yes; then
8423                                 #BLDSHARED="true"
8424                                 LDSHFLAGS="-b -z +h \$@"
8425                                 PICFLAG="+z"
8426                         fi
8427                 ;;
8428                 *qnx*) cat >> confdefs.h <<\EOF
8429 #define QNX 1
8430 EOF
8431 ;;
8432                 *osf*) cat >> confdefs.h <<\EOF
8433 #define OSF1 1
8434 EOF
8435
8436                         BLDSHARED="true"
8437                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8438                         PICFLAG="-fPIC"
8439                 ;;
8440                 *sco*) cat >> confdefs.h <<\EOF
8441 #define SCO 1
8442 EOF
8443 ;;
8444                 *unixware*) cat >> confdefs.h <<\EOF
8445 #define UNIXWARE 1
8446 EOF
8447
8448                         BLDSHARED="true"
8449                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8450                         PICFLAG="-KPIC"
8451                 ;;
8452                 *next2*) cat >> confdefs.h <<\EOF
8453 #define NEXT2 1
8454 EOF
8455 ;;
8456                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8457 set dummy groff; ac_word=$2
8458 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8459 echo "configure:8460: checking for $ac_word" >&5
8460 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8461   echo $ac_n "(cached) $ac_c" 1>&6
8462 else
8463   if test -n "$ROFF"; then
8464   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8465 else
8466   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8467   ac_dummy="$PATH"
8468   for ac_dir in $ac_dummy; do
8469     test -z "$ac_dir" && ac_dir=.
8470     if test -f $ac_dir/$ac_word; then
8471       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8472       break
8473     fi
8474   done
8475   IFS="$ac_save_ifs"
8476 fi
8477 fi
8478 ROFF="$ac_cv_prog_ROFF"
8479 if test -n "$ROFF"; then
8480   echo "$ac_t""$ROFF" 1>&6
8481 else
8482   echo "$ac_t""no" 1>&6
8483 fi
8484 ;;
8485                 *sysv4*)
8486                         case "$host" in
8487                                 *-univel-*)     if  test "$GCC" != yes ; then
8488                                                                         cat >> confdefs.h <<\EOF
8489 #define HAVE_MEMSET 1
8490 EOF
8491
8492                                                                 fi
8493                                                                 LDSHFLAGS="-G"
8494                                 ;;
8495                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8496 #define RELIANTUNIX 1
8497 EOF
8498 ;;
8499                         esac
8500                         ;;
8501                 *sysv5*)
8502                         if  test "$GCC" != yes ; then
8503                                 cat >> confdefs.h <<\EOF
8504 #define HAVE_MEMSET 1
8505 EOF
8506
8507                         fi
8508                         LDSHFLAGS="-G"
8509                         ;;
8510 esac
8511
8512 # this updates our target list if we can build shared libs
8513 if test $BLDSHARED = true; then
8514    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
8515 else
8516    LIBSMBCLIENT_SHARED=
8517 fi
8518
8519 ################
8520
8521 echo $ac_n "checking for long long""... $ac_c" 1>&6
8522 echo "configure:8523: checking for long long" >&5
8523 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8524   echo $ac_n "(cached) $ac_c" 1>&6
8525 else
8526   
8527 if test "$cross_compiling" = yes; then
8528   samba_cv_have_longlong=cross
8529 else
8530   cat > conftest.$ac_ext <<EOF
8531 #line 8532 "configure"
8532 #include "confdefs.h"
8533 #include <stdio.h>
8534 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8535 EOF
8536 if { (eval echo configure:8537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8537 then
8538   samba_cv_have_longlong=yes
8539 else
8540   echo "configure: failed program was:" >&5
8541   cat conftest.$ac_ext >&5
8542   rm -fr conftest*
8543   samba_cv_have_longlong=no
8544 fi
8545 rm -fr conftest*
8546 fi
8547
8548 fi
8549
8550 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8551 if test x"$samba_cv_have_longlong" = x"yes"; then
8552     cat >> confdefs.h <<\EOF
8553 #define HAVE_LONGLONG 1
8554 EOF
8555
8556 fi
8557
8558 #
8559 # Check if the compiler supports the LL prefix on long long integers.
8560 # AIX needs this.
8561
8562 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8563 echo "configure:8564: checking for LL suffix on long long integers" >&5
8564 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8565   echo $ac_n "(cached) $ac_c" 1>&6
8566 else
8567   
8568     cat > conftest.$ac_ext <<EOF
8569 #line 8570 "configure"
8570 #include "confdefs.h"
8571 #include <stdio.h>
8572 int main() {
8573 long long i = 0x8000000000LL
8574 ; return 0; }
8575 EOF
8576 if { (eval echo configure:8577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8577   rm -rf conftest*
8578   samba_cv_compiler_supports_ll=yes
8579 else
8580   echo "configure: failed program was:" >&5
8581   cat conftest.$ac_ext >&5
8582   rm -rf conftest*
8583   samba_cv_compiler_supports_ll=no
8584 fi
8585 rm -f conftest*
8586 fi
8587
8588 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8589 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8590    cat >> confdefs.h <<\EOF
8591 #define COMPILER_SUPPORTS_LL 1
8592 EOF
8593
8594 fi
8595
8596   
8597 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8598 echo "configure:8599: checking for 64 bit off_t" >&5
8599 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8600   echo $ac_n "(cached) $ac_c" 1>&6
8601 else
8602   
8603 if test "$cross_compiling" = yes; then
8604   samba_cv_SIZEOF_OFF_T=cross
8605 else
8606   cat > conftest.$ac_ext <<EOF
8607 #line 8608 "configure"
8608 #include "confdefs.h"
8609 #include <stdio.h>
8610 #include <sys/stat.h>
8611 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8612 EOF
8613 if { (eval echo configure:8614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8614 then
8615   samba_cv_SIZEOF_OFF_T=yes
8616 else
8617   echo "configure: failed program was:" >&5
8618   cat conftest.$ac_ext >&5
8619   rm -fr conftest*
8620   samba_cv_SIZEOF_OFF_T=no
8621 fi
8622 rm -fr conftest*
8623 fi
8624
8625 fi
8626
8627 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8628 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8629     cat >> confdefs.h <<\EOF
8630 #define SIZEOF_OFF_T 8
8631 EOF
8632
8633 fi
8634
8635 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8636 echo "configure:8637: checking for off64_t" >&5
8637 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8638   echo $ac_n "(cached) $ac_c" 1>&6
8639 else
8640   
8641 if test "$cross_compiling" = yes; then
8642   samba_cv_HAVE_OFF64_T=cross
8643 else
8644   cat > conftest.$ac_ext <<EOF
8645 #line 8646 "configure"
8646 #include "confdefs.h"
8647
8648 #if defined(HAVE_UNISTD_H)
8649 #include <unistd.h>
8650 #endif
8651 #include <stdio.h>
8652 #include <sys/stat.h>
8653 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8654 EOF
8655 if { (eval echo configure:8656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8656 then
8657   samba_cv_HAVE_OFF64_T=yes
8658 else
8659   echo "configure: failed program was:" >&5
8660   cat conftest.$ac_ext >&5
8661   rm -fr conftest*
8662   samba_cv_HAVE_OFF64_T=no
8663 fi
8664 rm -fr conftest*
8665 fi
8666
8667 fi
8668
8669 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8670 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8671     cat >> confdefs.h <<\EOF
8672 #define HAVE_OFF64_T 1
8673 EOF
8674
8675 fi
8676
8677 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8678 echo "configure:8679: checking for 64 bit ino_t" >&5
8679 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8680   echo $ac_n "(cached) $ac_c" 1>&6
8681 else
8682   
8683 if test "$cross_compiling" = yes; then
8684   samba_cv_SIZEOF_INO_T=cross
8685 else
8686   cat > conftest.$ac_ext <<EOF
8687 #line 8688 "configure"
8688 #include "confdefs.h"
8689 #include <stdio.h>
8690 #include <sys/stat.h>
8691 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8692 EOF
8693 if { (eval echo configure:8694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8694 then
8695   samba_cv_SIZEOF_INO_T=yes
8696 else
8697   echo "configure: failed program was:" >&5
8698   cat conftest.$ac_ext >&5
8699   rm -fr conftest*
8700   samba_cv_SIZEOF_INO_T=no
8701 fi
8702 rm -fr conftest*
8703 fi
8704
8705 fi
8706
8707 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8708 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8709     cat >> confdefs.h <<\EOF
8710 #define SIZEOF_INO_T 8
8711 EOF
8712
8713 fi
8714
8715 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8716 echo "configure:8717: checking for ino64_t" >&5
8717 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8718   echo $ac_n "(cached) $ac_c" 1>&6
8719 else
8720   
8721 if test "$cross_compiling" = yes; then
8722   samba_cv_HAVE_INO64_T=cross
8723 else
8724   cat > conftest.$ac_ext <<EOF
8725 #line 8726 "configure"
8726 #include "confdefs.h"
8727
8728 #if defined(HAVE_UNISTD_H)
8729 #include <unistd.h>
8730 #endif
8731 #include <stdio.h>
8732 #include <sys/stat.h>
8733 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8734 EOF
8735 if { (eval echo configure:8736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8736 then
8737   samba_cv_HAVE_INO64_T=yes
8738 else
8739   echo "configure: failed program was:" >&5
8740   cat conftest.$ac_ext >&5
8741   rm -fr conftest*
8742   samba_cv_HAVE_INO64_T=no
8743 fi
8744 rm -fr conftest*
8745 fi
8746
8747 fi
8748
8749 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8750 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8751     cat >> confdefs.h <<\EOF
8752 #define HAVE_INO64_T 1
8753 EOF
8754
8755 fi
8756
8757 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8758 echo "configure:8759: checking for struct dirent64" >&5
8759 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8760   echo $ac_n "(cached) $ac_c" 1>&6
8761 else
8762   
8763 cat > conftest.$ac_ext <<EOF
8764 #line 8765 "configure"
8765 #include "confdefs.h"
8766
8767 #if defined(HAVE_UNISTD_H)
8768 #include <unistd.h>
8769 #endif
8770 #include <sys/types.h>
8771 #include <dirent.h>
8772 int main() {
8773 struct dirent64 de;
8774 ; return 0; }
8775 EOF
8776 if { (eval echo configure:8777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8777   rm -rf conftest*
8778   samba_cv_HAVE_STRUCT_DIRENT64=yes
8779 else
8780   echo "configure: failed program was:" >&5
8781   cat conftest.$ac_ext >&5
8782   rm -rf conftest*
8783   samba_cv_HAVE_STRUCT_DIRENT64=no
8784 fi
8785 rm -f conftest*
8786 fi
8787
8788 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
8789 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
8790     cat >> confdefs.h <<\EOF
8791 #define HAVE_STRUCT_DIRENT64 1
8792 EOF
8793
8794 fi
8795
8796 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
8797 echo "configure:8798: checking for unsigned char" >&5
8798 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
8799   echo $ac_n "(cached) $ac_c" 1>&6
8800 else
8801   
8802 if test "$cross_compiling" = yes; then
8803   samba_cv_HAVE_UNSIGNED_CHAR=cross
8804 else
8805   cat > conftest.$ac_ext <<EOF
8806 #line 8807 "configure"
8807 #include "confdefs.h"
8808 #include <stdio.h>
8809 main() { char c; c=250; exit((c > 0)?0:1); }
8810 EOF
8811 if { (eval echo configure:8812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8812 then
8813   samba_cv_HAVE_UNSIGNED_CHAR=yes
8814 else
8815   echo "configure: failed program was:" >&5
8816   cat conftest.$ac_ext >&5
8817   rm -fr conftest*
8818   samba_cv_HAVE_UNSIGNED_CHAR=no
8819 fi
8820 rm -fr conftest*
8821 fi
8822
8823 fi
8824
8825 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
8826 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
8827     cat >> confdefs.h <<\EOF
8828 #define HAVE_UNSIGNED_CHAR 1
8829 EOF
8830
8831 fi
8832
8833 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
8834 echo "configure:8835: checking for sin_len in sock" >&5
8835 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
8836   echo $ac_n "(cached) $ac_c" 1>&6
8837 else
8838   
8839 cat > conftest.$ac_ext <<EOF
8840 #line 8841 "configure"
8841 #include "confdefs.h"
8842 #include <sys/types.h>
8843 #include <sys/socket.h>
8844 #include <netinet/in.h>
8845 int main() {
8846 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
8847 ; return 0; }
8848 EOF
8849 if { (eval echo configure:8850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8850   rm -rf conftest*
8851   samba_cv_HAVE_SOCK_SIN_LEN=yes
8852 else
8853   echo "configure: failed program was:" >&5
8854   cat conftest.$ac_ext >&5
8855   rm -rf conftest*
8856   samba_cv_HAVE_SOCK_SIN_LEN=no
8857 fi
8858 rm -f conftest*
8859 fi
8860
8861 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
8862 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
8863     cat >> confdefs.h <<\EOF
8864 #define HAVE_SOCK_SIN_LEN 1
8865 EOF
8866
8867 fi
8868
8869 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
8870 echo "configure:8871: checking whether seekdir returns void" >&5
8871 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
8872   echo $ac_n "(cached) $ac_c" 1>&6
8873 else
8874   
8875 cat > conftest.$ac_ext <<EOF
8876 #line 8877 "configure"
8877 #include "confdefs.h"
8878 #include <sys/types.h>
8879 #include <dirent.h>
8880 void seekdir(DIR *d, long loc) { return; }
8881 int main() {
8882 return 0;
8883 ; return 0; }
8884 EOF
8885 if { (eval echo configure:8886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8886   rm -rf conftest*
8887   samba_cv_SEEKDIR_RETURNS_VOID=yes
8888 else
8889   echo "configure: failed program was:" >&5
8890   cat conftest.$ac_ext >&5
8891   rm -rf conftest*
8892   samba_cv_SEEKDIR_RETURNS_VOID=no
8893 fi
8894 rm -f conftest*
8895 fi
8896
8897 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
8898 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
8899     cat >> confdefs.h <<\EOF
8900 #define SEEKDIR_RETURNS_VOID 1
8901 EOF
8902
8903 fi
8904
8905 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
8906 echo "configure:8907: checking for __FILE__ macro" >&5
8907 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
8908   echo $ac_n "(cached) $ac_c" 1>&6
8909 else
8910   
8911 cat > conftest.$ac_ext <<EOF
8912 #line 8913 "configure"
8913 #include "confdefs.h"
8914 #include <stdio.h>
8915 int main() {
8916 printf("%s\n", __FILE__);
8917 ; return 0; }
8918 EOF
8919 if { (eval echo configure:8920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8920   rm -rf conftest*
8921   samba_cv_HAVE_FILE_MACRO=yes
8922 else
8923   echo "configure: failed program was:" >&5
8924   cat conftest.$ac_ext >&5
8925   rm -rf conftest*
8926   samba_cv_HAVE_FILE_MACRO=no
8927 fi
8928 rm -f conftest*
8929 fi
8930
8931 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
8932 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
8933     cat >> confdefs.h <<\EOF
8934 #define HAVE_FILE_MACRO 1
8935 EOF
8936
8937 fi
8938
8939 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
8940 echo "configure:8941: checking for __FUNCTION__ macro" >&5
8941 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
8942   echo $ac_n "(cached) $ac_c" 1>&6
8943 else
8944   
8945 cat > conftest.$ac_ext <<EOF
8946 #line 8947 "configure"
8947 #include "confdefs.h"
8948 #include <stdio.h>
8949 int main() {
8950 printf("%s\n", __FUNCTION__);
8951 ; return 0; }
8952 EOF
8953 if { (eval echo configure:8954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8954   rm -rf conftest*
8955   samba_cv_HAVE_FUNCTION_MACRO=yes
8956 else
8957   echo "configure: failed program was:" >&5
8958   cat conftest.$ac_ext >&5
8959   rm -rf conftest*
8960   samba_cv_HAVE_FUNCTION_MACRO=no
8961 fi
8962 rm -f conftest*
8963 fi
8964
8965 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
8966 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
8967     cat >> confdefs.h <<\EOF
8968 #define HAVE_FUNCTION_MACRO 1
8969 EOF
8970
8971 fi
8972
8973 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
8974 echo "configure:8975: checking if gettimeofday takes tz argument" >&5
8975 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
8976   echo $ac_n "(cached) $ac_c" 1>&6
8977 else
8978   
8979 if test "$cross_compiling" = yes; then
8980   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
8981 else
8982   cat > conftest.$ac_ext <<EOF
8983 #line 8984 "configure"
8984 #include "confdefs.h"
8985
8986 #include <sys/time.h>
8987 #include <unistd.h>
8988 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
8989 EOF
8990 if { (eval echo configure:8991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8991 then
8992   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
8993 else
8994   echo "configure: failed program was:" >&5
8995   cat conftest.$ac_ext >&5
8996   rm -fr conftest*
8997   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
8998 fi
8999 rm -fr conftest*
9000 fi
9001
9002 fi
9003
9004 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9005 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9006     cat >> confdefs.h <<\EOF
9007 #define HAVE_GETTIMEOFDAY_TZ 1
9008 EOF
9009
9010 fi
9011
9012 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9013 echo "configure:9014: checking for C99 vsnprintf" >&5
9014 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9015   echo $ac_n "(cached) $ac_c" 1>&6
9016 else
9017   
9018 if test "$cross_compiling" = yes; then
9019   samba_cv_HAVE_C99_VSNPRINTF=cross
9020 else
9021   cat > conftest.$ac_ext <<EOF
9022 #line 9023 "configure"
9023 #include "confdefs.h"
9024
9025 #include <sys/types.h>
9026 #include <stdarg.h>
9027 void foo(const char *format, ...) { 
9028        va_list ap;
9029        int len;
9030        char buf[5];
9031
9032        va_start(ap, format);
9033        len = vsnprintf(0, 0, format, ap);
9034        va_end(ap);
9035        if (len != 5) exit(1);
9036
9037        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9038
9039        exit(0);
9040 }
9041 main() { foo("hello"); }
9042
9043 EOF
9044 if { (eval echo configure:9045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9045 then
9046   samba_cv_HAVE_C99_VSNPRINTF=yes
9047 else
9048   echo "configure: failed program was:" >&5
9049   cat conftest.$ac_ext >&5
9050   rm -fr conftest*
9051   samba_cv_HAVE_C99_VSNPRINTF=no
9052 fi
9053 rm -fr conftest*
9054 fi
9055
9056 fi
9057
9058 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9059 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9060     cat >> confdefs.h <<\EOF
9061 #define HAVE_C99_VSNPRINTF 1
9062 EOF
9063
9064 fi
9065
9066 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9067 echo "configure:9068: checking for broken readdir" >&5
9068 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9069   echo $ac_n "(cached) $ac_c" 1>&6
9070 else
9071   
9072 if test "$cross_compiling" = yes; then
9073   samba_cv_HAVE_BROKEN_READDIR=cross
9074 else
9075   cat > conftest.$ac_ext <<EOF
9076 #line 9077 "configure"
9077 #include "confdefs.h"
9078 #include <sys/types.h>
9079 #include <dirent.h>
9080 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9081 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9082 di->d_name[0] == 0) exit(0); exit(1);} 
9083 EOF
9084 if { (eval echo configure:9085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9085 then
9086   samba_cv_HAVE_BROKEN_READDIR=yes
9087 else
9088   echo "configure: failed program was:" >&5
9089   cat conftest.$ac_ext >&5
9090   rm -fr conftest*
9091   samba_cv_HAVE_BROKEN_READDIR=no
9092 fi
9093 rm -fr conftest*
9094 fi
9095
9096 fi
9097
9098 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9099 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9100     cat >> confdefs.h <<\EOF
9101 #define HAVE_BROKEN_READDIR 1
9102 EOF
9103
9104 fi
9105
9106 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9107 echo "configure:9108: checking for utimbuf" >&5
9108 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9109   echo $ac_n "(cached) $ac_c" 1>&6
9110 else
9111   
9112 cat > conftest.$ac_ext <<EOF
9113 #line 9114 "configure"
9114 #include "confdefs.h"
9115 #include <sys/types.h>
9116 #include <utime.h>
9117 int main() {
9118 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9119 ; return 0; }
9120 EOF
9121 if { (eval echo configure:9122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9122   rm -rf conftest*
9123   samba_cv_HAVE_UTIMBUF=yes
9124 else
9125   echo "configure: failed program was:" >&5
9126   cat conftest.$ac_ext >&5
9127   rm -rf conftest*
9128   samba_cv_HAVE_UTIMBUF=no
9129 fi
9130 rm -f conftest*
9131 fi
9132
9133 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9134 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9135     cat >> confdefs.h <<\EOF
9136 #define HAVE_UTIMBUF 1
9137 EOF
9138
9139 fi
9140
9141
9142 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9143 do
9144 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9145 echo "configure:9146: checking for $ac_func" >&5
9146 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9147   echo $ac_n "(cached) $ac_c" 1>&6
9148 else
9149   cat > conftest.$ac_ext <<EOF
9150 #line 9151 "configure"
9151 #include "confdefs.h"
9152 /* System header to define __stub macros and hopefully few prototypes,
9153     which can conflict with char $ac_func(); below.  */
9154 #include <assert.h>
9155 /* Override any gcc2 internal prototype to avoid an error.  */
9156 /* We use char because int might match the return type of a gcc2
9157     builtin and then its argument prototype would still apply.  */
9158 char $ac_func();
9159
9160 int main() {
9161
9162 /* The GNU C library defines this for functions which it implements
9163     to always fail with ENOSYS.  Some functions are actually named
9164     something starting with __ and the normal name is an alias.  */
9165 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9166 choke me
9167 #else
9168 $ac_func();
9169 #endif
9170
9171 ; return 0; }
9172 EOF
9173 if { (eval echo configure:9174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9174   rm -rf conftest*
9175   eval "ac_cv_func_$ac_func=yes"
9176 else
9177   echo "configure: failed program was:" >&5
9178   cat conftest.$ac_ext >&5
9179   rm -rf conftest*
9180   eval "ac_cv_func_$ac_func=no"
9181 fi
9182 rm -f conftest*
9183 fi
9184
9185 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9186   echo "$ac_t""yes" 1>&6
9187     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9188   cat >> confdefs.h <<EOF
9189 #define $ac_tr_func 1
9190 EOF
9191  
9192 else
9193   echo "$ac_t""no" 1>&6
9194 fi
9195 done
9196
9197
9198 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9199 echo "configure:9200: checking for ut_name in utmp" >&5
9200 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9201   echo $ac_n "(cached) $ac_c" 1>&6
9202 else
9203   
9204 cat > conftest.$ac_ext <<EOF
9205 #line 9206 "configure"
9206 #include "confdefs.h"
9207 #include <sys/types.h>
9208 #include <utmp.h>
9209 int main() {
9210 struct utmp ut;  ut.ut_name[0] = 'a';
9211 ; return 0; }
9212 EOF
9213 if { (eval echo configure:9214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9214   rm -rf conftest*
9215   samba_cv_HAVE_UT_UT_NAME=yes
9216 else
9217   echo "configure: failed program was:" >&5
9218   cat conftest.$ac_ext >&5
9219   rm -rf conftest*
9220   samba_cv_HAVE_UT_UT_NAME=no
9221 fi
9222 rm -f conftest*
9223 fi
9224
9225 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9226 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9227     cat >> confdefs.h <<\EOF
9228 #define HAVE_UT_UT_NAME 1
9229 EOF
9230
9231 fi 
9232
9233 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9234 echo "configure:9235: checking for ut_user in utmp" >&5
9235 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9236   echo $ac_n "(cached) $ac_c" 1>&6
9237 else
9238   
9239 cat > conftest.$ac_ext <<EOF
9240 #line 9241 "configure"
9241 #include "confdefs.h"
9242 #include <sys/types.h>
9243 #include <utmp.h>
9244 int main() {
9245 struct utmp ut;  ut.ut_user[0] = 'a';
9246 ; return 0; }
9247 EOF
9248 if { (eval echo configure:9249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9249   rm -rf conftest*
9250   samba_cv_HAVE_UT_UT_USER=yes
9251 else
9252   echo "configure: failed program was:" >&5
9253   cat conftest.$ac_ext >&5
9254   rm -rf conftest*
9255   samba_cv_HAVE_UT_UT_USER=no
9256 fi
9257 rm -f conftest*
9258 fi
9259
9260 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9261 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9262     cat >> confdefs.h <<\EOF
9263 #define HAVE_UT_UT_USER 1
9264 EOF
9265
9266 fi 
9267
9268 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9269 echo "configure:9270: checking for ut_id in utmp" >&5
9270 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9271   echo $ac_n "(cached) $ac_c" 1>&6
9272 else
9273   
9274 cat > conftest.$ac_ext <<EOF
9275 #line 9276 "configure"
9276 #include "confdefs.h"
9277 #include <sys/types.h>
9278 #include <utmp.h>
9279 int main() {
9280 struct utmp ut;  ut.ut_id[0] = 'a';
9281 ; return 0; }
9282 EOF
9283 if { (eval echo configure:9284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9284   rm -rf conftest*
9285   samba_cv_HAVE_UT_UT_ID=yes
9286 else
9287   echo "configure: failed program was:" >&5
9288   cat conftest.$ac_ext >&5
9289   rm -rf conftest*
9290   samba_cv_HAVE_UT_UT_ID=no
9291 fi
9292 rm -f conftest*
9293 fi
9294
9295 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9296 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9297     cat >> confdefs.h <<\EOF
9298 #define HAVE_UT_UT_ID 1
9299 EOF
9300
9301 fi 
9302
9303 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9304 echo "configure:9305: checking for ut_host in utmp" >&5
9305 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9306   echo $ac_n "(cached) $ac_c" 1>&6
9307 else
9308   
9309 cat > conftest.$ac_ext <<EOF
9310 #line 9311 "configure"
9311 #include "confdefs.h"
9312 #include <sys/types.h>
9313 #include <utmp.h>
9314 int main() {
9315 struct utmp ut;  ut.ut_host[0] = 'a';
9316 ; return 0; }
9317 EOF
9318 if { (eval echo configure:9319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9319   rm -rf conftest*
9320   samba_cv_HAVE_UT_UT_HOST=yes
9321 else
9322   echo "configure: failed program was:" >&5
9323   cat conftest.$ac_ext >&5
9324   rm -rf conftest*
9325   samba_cv_HAVE_UT_UT_HOST=no
9326 fi
9327 rm -f conftest*
9328 fi
9329
9330 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9331 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9332     cat >> confdefs.h <<\EOF
9333 #define HAVE_UT_UT_HOST 1
9334 EOF
9335
9336 fi 
9337
9338 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9339 echo "configure:9340: checking for ut_time in utmp" >&5
9340 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9341   echo $ac_n "(cached) $ac_c" 1>&6
9342 else
9343   
9344 cat > conftest.$ac_ext <<EOF
9345 #line 9346 "configure"
9346 #include "confdefs.h"
9347 #include <sys/types.h>
9348 #include <utmp.h>
9349 int main() {
9350 struct utmp ut;  time_t t; ut.ut_time = t;
9351 ; return 0; }
9352 EOF
9353 if { (eval echo configure:9354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9354   rm -rf conftest*
9355   samba_cv_HAVE_UT_UT_TIME=yes
9356 else
9357   echo "configure: failed program was:" >&5
9358   cat conftest.$ac_ext >&5
9359   rm -rf conftest*
9360   samba_cv_HAVE_UT_UT_TIME=no
9361 fi
9362 rm -f conftest*
9363 fi
9364
9365 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9366 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9367     cat >> confdefs.h <<\EOF
9368 #define HAVE_UT_UT_TIME 1
9369 EOF
9370
9371 fi 
9372
9373 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9374 echo "configure:9375: checking for ut_tv in utmp" >&5
9375 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9376   echo $ac_n "(cached) $ac_c" 1>&6
9377 else
9378   
9379 cat > conftest.$ac_ext <<EOF
9380 #line 9381 "configure"
9381 #include "confdefs.h"
9382 #include <sys/types.h>
9383 #include <utmp.h>
9384 int main() {
9385 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9386 ; return 0; }
9387 EOF
9388 if { (eval echo configure:9389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9389   rm -rf conftest*
9390   samba_cv_HAVE_UT_UT_TV=yes
9391 else
9392   echo "configure: failed program was:" >&5
9393   cat conftest.$ac_ext >&5
9394   rm -rf conftest*
9395   samba_cv_HAVE_UT_UT_TV=no
9396 fi
9397 rm -f conftest*
9398 fi
9399
9400 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9401 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9402     cat >> confdefs.h <<\EOF
9403 #define HAVE_UT_UT_TV 1
9404 EOF
9405
9406 fi 
9407
9408 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9409 echo "configure:9410: checking for ut_type in utmp" >&5
9410 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9411   echo $ac_n "(cached) $ac_c" 1>&6
9412 else
9413   
9414 cat > conftest.$ac_ext <<EOF
9415 #line 9416 "configure"
9416 #include "confdefs.h"
9417 #include <sys/types.h>
9418 #include <utmp.h>
9419 int main() {
9420 struct utmp ut;  ut.ut_type = 0;
9421 ; return 0; }
9422 EOF
9423 if { (eval echo configure:9424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9424   rm -rf conftest*
9425   samba_cv_HAVE_UT_UT_TYPE=yes
9426 else
9427   echo "configure: failed program was:" >&5
9428   cat conftest.$ac_ext >&5
9429   rm -rf conftest*
9430   samba_cv_HAVE_UT_UT_TYPE=no
9431 fi
9432 rm -f conftest*
9433 fi
9434
9435 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9436 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9437     cat >> confdefs.h <<\EOF
9438 #define HAVE_UT_UT_TYPE 1
9439 EOF
9440
9441 fi 
9442
9443 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9444 echo "configure:9445: checking for ut_pid in utmp" >&5
9445 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9446   echo $ac_n "(cached) $ac_c" 1>&6
9447 else
9448   
9449 cat > conftest.$ac_ext <<EOF
9450 #line 9451 "configure"
9451 #include "confdefs.h"
9452 #include <sys/types.h>
9453 #include <utmp.h>
9454 int main() {
9455 struct utmp ut;  ut.ut_pid = 0;
9456 ; return 0; }
9457 EOF
9458 if { (eval echo configure:9459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9459   rm -rf conftest*
9460   samba_cv_HAVE_UT_UT_PID=yes
9461 else
9462   echo "configure: failed program was:" >&5
9463   cat conftest.$ac_ext >&5
9464   rm -rf conftest*
9465   samba_cv_HAVE_UT_UT_PID=no
9466 fi
9467 rm -f conftest*
9468 fi
9469
9470 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9471 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9472     cat >> confdefs.h <<\EOF
9473 #define HAVE_UT_UT_PID 1
9474 EOF
9475
9476 fi 
9477
9478 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9479 echo "configure:9480: checking for ut_exit in utmp" >&5
9480 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9481   echo $ac_n "(cached) $ac_c" 1>&6
9482 else
9483   
9484 cat > conftest.$ac_ext <<EOF
9485 #line 9486 "configure"
9486 #include "confdefs.h"
9487 #include <sys/types.h>
9488 #include <utmp.h>
9489 int main() {
9490 struct utmp ut;  ut.ut_exit.e_exit = 0;
9491 ; return 0; }
9492 EOF
9493 if { (eval echo configure:9494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9494   rm -rf conftest*
9495   samba_cv_HAVE_UT_UT_EXIT=yes
9496 else
9497   echo "configure: failed program was:" >&5
9498   cat conftest.$ac_ext >&5
9499   rm -rf conftest*
9500   samba_cv_HAVE_UT_UT_EXIT=no
9501 fi
9502 rm -f conftest*
9503 fi
9504
9505 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9506 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9507     cat >> confdefs.h <<\EOF
9508 #define HAVE_UT_UT_EXIT 1
9509 EOF
9510
9511 fi 
9512
9513 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9514 echo "configure:9515: checking for ut_addr in utmp" >&5
9515 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9516   echo $ac_n "(cached) $ac_c" 1>&6
9517 else
9518   
9519 cat > conftest.$ac_ext <<EOF
9520 #line 9521 "configure"
9521 #include "confdefs.h"
9522 #include <sys/types.h>
9523 #include <utmp.h>
9524 int main() {
9525 struct utmp ut;  ut.ut_addr = 0;
9526 ; return 0; }
9527 EOF
9528 if { (eval echo configure:9529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9529   rm -rf conftest*
9530   samba_cv_HAVE_UT_UT_ADDR=yes
9531 else
9532   echo "configure: failed program was:" >&5
9533   cat conftest.$ac_ext >&5
9534   rm -rf conftest*
9535   samba_cv_HAVE_UT_UT_ADDR=no
9536 fi
9537 rm -f conftest*
9538 fi
9539
9540 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9541 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9542     cat >> confdefs.h <<\EOF
9543 #define HAVE_UT_UT_ADDR 1
9544 EOF
9545
9546 fi 
9547
9548 if test x$ac_cv_func_pututline = xyes ; then
9549   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9550 echo "configure:9551: checking whether pututline returns pointer" >&5
9551 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9552   echo $ac_n "(cached) $ac_c" 1>&6
9553 else
9554   
9555   cat > conftest.$ac_ext <<EOF
9556 #line 9557 "configure"
9557 #include "confdefs.h"
9558 #include <sys/types.h>
9559 #include <utmp.h>
9560 int main() {
9561 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9562 ; return 0; }
9563 EOF
9564 if { (eval echo configure:9565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9565   rm -rf conftest*
9566   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9567 else
9568   echo "configure: failed program was:" >&5
9569   cat conftest.$ac_ext >&5
9570   rm -rf conftest*
9571   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9572 fi
9573 rm -f conftest*
9574 fi
9575
9576 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9577   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9578       cat >> confdefs.h <<\EOF
9579 #define PUTUTLINE_RETURNS_UTMP 1
9580 EOF
9581
9582   fi
9583 fi
9584
9585 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9586 echo "configure:9587: checking for ut_syslen in utmpx" >&5
9587 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9588   echo $ac_n "(cached) $ac_c" 1>&6
9589 else
9590   
9591 cat > conftest.$ac_ext <<EOF
9592 #line 9593 "configure"
9593 #include "confdefs.h"
9594 #include <sys/types.h>
9595 #include <utmpx.h>
9596 int main() {
9597 struct utmpx ux;  ux.ut_syslen = 0;
9598 ; return 0; }
9599 EOF
9600 if { (eval echo configure:9601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9601   rm -rf conftest*
9602   samba_cv_HAVE_UX_UT_SYSLEN=yes
9603 else
9604   echo "configure: failed program was:" >&5
9605   cat conftest.$ac_ext >&5
9606   rm -rf conftest*
9607   samba_cv_HAVE_UX_UT_SYSLEN=no
9608 fi
9609 rm -f conftest*
9610 fi
9611
9612 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9613 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9614     cat >> confdefs.h <<\EOF
9615 #define HAVE_UX_UT_SYSLEN 1
9616 EOF
9617
9618 fi 
9619
9620
9621 #################################################
9622 # check for libiconv support
9623 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
9624 echo "configure:9625: checking whether to use libiconv" >&5
9625 # Check whether --with-libiconv or --without-libiconv was given.
9626 if test "${with_libiconv+set}" = set; then
9627   withval="$with_libiconv"
9628    case "$withval" in
9629   no)
9630     echo "$ac_t""no" 1>&6
9631     ;;
9632   *)
9633     echo "$ac_t""yes" 1>&6
9634     CFLAGS="$CFLAGS -I$withval/include"
9635     LDFLAGS="$LDFLAGS -L$withval/lib"
9636     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
9637 echo "configure:9638: checking for iconv_open in -liconv" >&5
9638 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
9639 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9640   echo $ac_n "(cached) $ac_c" 1>&6
9641 else
9642   ac_save_LIBS="$LIBS"
9643 LIBS="-liconv  $LIBS"
9644 cat > conftest.$ac_ext <<EOF
9645 #line 9646 "configure"
9646 #include "confdefs.h"
9647 /* Override any gcc2 internal prototype to avoid an error.  */
9648 /* We use char because int might match the return type of a gcc2
9649     builtin and then its argument prototype would still apply.  */
9650 char iconv_open();
9651
9652 int main() {
9653 iconv_open()
9654 ; return 0; }
9655 EOF
9656 if { (eval echo configure:9657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9657   rm -rf conftest*
9658   eval "ac_cv_lib_$ac_lib_var=yes"
9659 else
9660   echo "configure: failed program was:" >&5
9661   cat conftest.$ac_ext >&5
9662   rm -rf conftest*
9663   eval "ac_cv_lib_$ac_lib_var=no"
9664 fi
9665 rm -f conftest*
9666 LIBS="$ac_save_LIBS"
9667
9668 fi
9669 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9670   echo "$ac_t""yes" 1>&6
9671     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9672     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9673   cat >> confdefs.h <<EOF
9674 #define $ac_tr_lib 1
9675 EOF
9676
9677   LIBS="-liconv $LIBS"
9678
9679 else
9680   echo "$ac_t""no" 1>&6
9681 fi
9682
9683     cat >> confdefs.h <<EOF
9684 #define WITH_LIBICONV "${withval}"
9685 EOF
9686
9687     ;;
9688   esac 
9689 else
9690   echo "$ac_t""no" 1>&6
9691
9692 fi
9693
9694
9695
9696 ############
9697 # check for iconv in libc
9698 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9699 echo "configure:9700: checking for working iconv" >&5
9700 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9701   echo $ac_n "(cached) $ac_c" 1>&6
9702 else
9703   
9704 if test "$cross_compiling" = yes; then
9705   samba_cv_HAVE_NATIVE_ICONV=cross
9706 else
9707   cat > conftest.$ac_ext <<EOF
9708 #line 9709 "configure"
9709 #include "confdefs.h"
9710
9711 #include <iconv.h>
9712 main() {
9713        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
9714        if (cd == 0 || cd == (iconv_t)-1) return -1;
9715        return 0;
9716 }
9717
9718 EOF
9719 if { (eval echo configure:9720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9720 then
9721   samba_cv_HAVE_NATIVE_ICONV=yes
9722 else
9723   echo "configure: failed program was:" >&5
9724   cat conftest.$ac_ext >&5
9725   rm -fr conftest*
9726   samba_cv_HAVE_NATIVE_ICONV=no
9727 fi
9728 rm -fr conftest*
9729 fi
9730
9731 fi
9732
9733 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
9734 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
9735     cat >> confdefs.h <<\EOF
9736 #define HAVE_NATIVE_ICONV 1
9737 EOF
9738
9739 fi
9740
9741
9742 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9743 echo "configure:9744: checking for Linux kernel oplocks" >&5
9744 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9745   echo $ac_n "(cached) $ac_c" 1>&6
9746 else
9747   
9748 if test "$cross_compiling" = yes; then
9749   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9750 else
9751   cat > conftest.$ac_ext <<EOF
9752 #line 9753 "configure"
9753 #include "confdefs.h"
9754
9755 #include <sys/types.h>
9756 #include <fcntl.h>
9757 #ifndef F_GETLEASE
9758 #define F_GETLEASE      1025
9759 #endif
9760 main() {
9761        int fd = open("/dev/null", O_RDONLY);
9762        return fcntl(fd, F_GETLEASE, 0) == -1;
9763 }
9764
9765 EOF
9766 if { (eval echo configure:9767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9767 then
9768   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9769 else
9770   echo "configure: failed program was:" >&5
9771   cat conftest.$ac_ext >&5
9772   rm -fr conftest*
9773   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9774 fi
9775 rm -fr conftest*
9776 fi
9777
9778 fi
9779
9780 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9781 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9782     cat >> confdefs.h <<\EOF
9783 #define HAVE_KERNEL_OPLOCKS_LINUX 1
9784 EOF
9785
9786 fi
9787
9788 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
9789 echo "configure:9790: checking for kernel change notify support" >&5
9790 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
9791   echo $ac_n "(cached) $ac_c" 1>&6
9792 else
9793   
9794 if test "$cross_compiling" = yes; then
9795   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
9796 else
9797   cat > conftest.$ac_ext <<EOF
9798 #line 9799 "configure"
9799 #include "confdefs.h"
9800
9801 #include <sys/types.h>
9802 #include <fcntl.h>
9803 #include <signal.h>
9804 #ifndef F_NOTIFY
9805 #define F_NOTIFY 1026
9806 #endif
9807 main() {
9808         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
9809 }
9810
9811 EOF
9812 if { (eval echo configure:9813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9813 then
9814   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
9815 else
9816   echo "configure: failed program was:" >&5
9817   cat conftest.$ac_ext >&5
9818   rm -fr conftest*
9819   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
9820 fi
9821 rm -fr conftest*
9822 fi
9823
9824 fi
9825
9826 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
9827 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
9828     cat >> confdefs.h <<\EOF
9829 #define HAVE_KERNEL_CHANGE_NOTIFY 1
9830 EOF
9831
9832 fi
9833
9834 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
9835 echo "configure:9836: checking for kernel share modes" >&5
9836 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
9837   echo $ac_n "(cached) $ac_c" 1>&6
9838 else
9839   
9840 if test "$cross_compiling" = yes; then
9841   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
9842 else
9843   cat > conftest.$ac_ext <<EOF
9844 #line 9845 "configure"
9845 #include "confdefs.h"
9846
9847 #include <sys/types.h>
9848 #include <fcntl.h>
9849 #include <signal.h>
9850 #include <sys/file.h>
9851 #ifndef LOCK_MAND
9852 #define LOCK_MAND       32
9853 #define LOCK_READ       64
9854 #endif
9855 main() {
9856         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
9857 }
9858
9859 EOF
9860 if { (eval echo configure:9861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9861 then
9862   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
9863 else
9864   echo "configure: failed program was:" >&5
9865   cat conftest.$ac_ext >&5
9866   rm -fr conftest*
9867   samba_cv_HAVE_KERNEL_SHARE_MODES=no
9868 fi
9869 rm -fr conftest*
9870 fi
9871
9872 fi
9873
9874 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
9875 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
9876     cat >> confdefs.h <<\EOF
9877 #define HAVE_KERNEL_SHARE_MODES 1
9878 EOF
9879
9880 fi
9881
9882
9883
9884
9885 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
9886 echo "configure:9887: checking for IRIX kernel oplock type definitions" >&5
9887 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
9888   echo $ac_n "(cached) $ac_c" 1>&6
9889 else
9890   
9891 cat > conftest.$ac_ext <<EOF
9892 #line 9893 "configure"
9893 #include "confdefs.h"
9894 #include <sys/types.h>
9895 #include <fcntl.h>
9896 int main() {
9897 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
9898 ; return 0; }
9899 EOF
9900 if { (eval echo configure:9901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9901   rm -rf conftest*
9902   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
9903 else
9904   echo "configure: failed program was:" >&5
9905   cat conftest.$ac_ext >&5
9906   rm -rf conftest*
9907   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
9908 fi
9909 rm -f conftest*
9910 fi
9911
9912 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
9913 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
9914     cat >> confdefs.h <<\EOF
9915 #define HAVE_KERNEL_OPLOCKS_IRIX 1
9916 EOF
9917
9918 fi
9919
9920 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
9921 echo "configure:9922: checking for irix specific capabilities" >&5
9922 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
9923   echo $ac_n "(cached) $ac_c" 1>&6
9924 else
9925   
9926 if test "$cross_compiling" = yes; then
9927   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
9928 else
9929   cat > conftest.$ac_ext <<EOF
9930 #line 9931 "configure"
9931 #include "confdefs.h"
9932 #include <sys/types.h>
9933 #include <sys/capability.h>
9934 main() {
9935  cap_t cap;
9936  if ((cap = cap_get_proc()) == NULL)
9937    exit(1);
9938  cap->cap_effective |= CAP_NETWORK_MGT;
9939  cap->cap_inheritable |= CAP_NETWORK_MGT;
9940  cap_set_proc(cap);
9941  exit(0);
9942 }
9943
9944 EOF
9945 if { (eval echo configure:9946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9946 then
9947   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
9948 else
9949   echo "configure: failed program was:" >&5
9950   cat conftest.$ac_ext >&5
9951   rm -fr conftest*
9952   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
9953 fi
9954 rm -fr conftest*
9955 fi
9956
9957 fi
9958
9959 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
9960 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
9961     cat >> confdefs.h <<\EOF
9962 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
9963 EOF
9964
9965 fi
9966
9967 #
9968 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
9969 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
9970 #
9971
9972 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9973 echo "configure:9974: checking for int16 typedef included by rpc/rpc.h" >&5
9974 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
9975   echo $ac_n "(cached) $ac_c" 1>&6
9976 else
9977   
9978 cat > conftest.$ac_ext <<EOF
9979 #line 9980 "configure"
9980 #include "confdefs.h"
9981 #include <sys/types.h>
9982 #if defined(HAVE_RPC_RPC_H)
9983 #include <rpc/rpc.h>
9984 #endif
9985 int main() {
9986 int16 testvar;
9987 ; return 0; }
9988 EOF
9989 if { (eval echo configure:9990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9990   rm -rf conftest*
9991   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
9992 else
9993   echo "configure: failed program was:" >&5
9994   cat conftest.$ac_ext >&5
9995   rm -rf conftest*
9996   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
9997 fi
9998 rm -f conftest*
9999 fi
10000
10001 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10002 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10003     cat >> confdefs.h <<\EOF
10004 #define HAVE_INT16_FROM_RPC_RPC_H 1
10005 EOF
10006
10007 fi
10008
10009 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10010 echo "configure:10011: checking for uint16 typedef included by rpc/rpc.h" >&5
10011 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10012   echo $ac_n "(cached) $ac_c" 1>&6
10013 else
10014   
10015 cat > conftest.$ac_ext <<EOF
10016 #line 10017 "configure"
10017 #include "confdefs.h"
10018 #include <sys/types.h>
10019 #if defined(HAVE_RPC_RPC_H)
10020 #include <rpc/rpc.h>
10021 #endif
10022 int main() {
10023 uint16 testvar;
10024 ; return 0; }
10025 EOF
10026 if { (eval echo configure:10027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10027   rm -rf conftest*
10028   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10029 else
10030   echo "configure: failed program was:" >&5
10031   cat conftest.$ac_ext >&5
10032   rm -rf conftest*
10033   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10034 fi
10035 rm -f conftest*
10036 fi
10037
10038 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10039 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10040     cat >> confdefs.h <<\EOF
10041 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10042 EOF
10043
10044 fi
10045
10046 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10047 echo "configure:10048: checking for int32 typedef included by rpc/rpc.h" >&5
10048 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10049   echo $ac_n "(cached) $ac_c" 1>&6
10050 else
10051   
10052 cat > conftest.$ac_ext <<EOF
10053 #line 10054 "configure"
10054 #include "confdefs.h"
10055 #include <sys/types.h>
10056 #if defined(HAVE_RPC_RPC_H)
10057 #include <rpc/rpc.h>
10058 #endif
10059 int main() {
10060 int32 testvar;
10061 ; return 0; }
10062 EOF
10063 if { (eval echo configure:10064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10064   rm -rf conftest*
10065   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10066 else
10067   echo "configure: failed program was:" >&5
10068   cat conftest.$ac_ext >&5
10069   rm -rf conftest*
10070   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10071 fi
10072 rm -f conftest*
10073 fi
10074
10075 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10076 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10077     cat >> confdefs.h <<\EOF
10078 #define HAVE_INT32_FROM_RPC_RPC_H 1
10079 EOF
10080
10081 fi
10082
10083 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10084 echo "configure:10085: checking for uint32 typedef included by rpc/rpc.h" >&5
10085 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10086   echo $ac_n "(cached) $ac_c" 1>&6
10087 else
10088   
10089 cat > conftest.$ac_ext <<EOF
10090 #line 10091 "configure"
10091 #include "confdefs.h"
10092 #include <sys/types.h>
10093 #if defined(HAVE_RPC_RPC_H)
10094 #include <rpc/rpc.h>
10095 #endif
10096 int main() {
10097 uint32 testvar;
10098 ; return 0; }
10099 EOF
10100 if { (eval echo configure:10101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10101   rm -rf conftest*
10102   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10103 else
10104   echo "configure: failed program was:" >&5
10105   cat conftest.$ac_ext >&5
10106   rm -rf conftest*
10107   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10108 fi
10109 rm -f conftest*
10110 fi
10111
10112 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10113 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10114     cat >> confdefs.h <<\EOF
10115 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10116 EOF
10117
10118 fi
10119
10120
10121 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10122 echo "configure:10123: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10123 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10124   echo $ac_n "(cached) $ac_c" 1>&6
10125 else
10126   
10127 cat > conftest.$ac_ext <<EOF
10128 #line 10129 "configure"
10129 #include "confdefs.h"
10130 #include <sys/types.h>
10131 #ifdef HAVE_SYS_SECURITY_H
10132 #include <sys/security.h>
10133 #include <prot.h>
10134 #endif  /* HAVE_SYS_SECURITY_H */
10135 #if defined(HAVE_RPC_RPC_H)
10136 #include <rpc/rpc.h>
10137 #endif
10138 int main() {
10139 int testvar;
10140 ; return 0; }
10141 EOF
10142 if { (eval echo configure:10143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10143   rm -rf conftest*
10144   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10145 else
10146   echo "configure: failed program was:" >&5
10147   cat conftest.$ac_ext >&5
10148   rm -rf conftest*
10149   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10150 fi
10151 rm -f conftest*
10152 fi
10153
10154 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10155 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10156     cat >> confdefs.h <<\EOF
10157 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10158 EOF
10159
10160 fi
10161
10162 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10163 echo "configure:10164: checking for test routines" >&5
10164 if test "$cross_compiling" = yes; then
10165   echo "configure: warning: cannot run when cross-compiling" 1>&2
10166 else
10167   cat > conftest.$ac_ext <<EOF
10168 #line 10169 "configure"
10169 #include "confdefs.h"
10170 #include "${srcdir-.}/tests/trivial.c"
10171 EOF
10172 if { (eval echo configure:10173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10173 then
10174   echo "$ac_t""yes" 1>&6
10175 else
10176   echo "configure: failed program was:" >&5
10177   cat conftest.$ac_ext >&5
10178   rm -fr conftest*
10179   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10180 fi
10181 rm -fr conftest*
10182 fi
10183
10184
10185 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10186 echo "configure:10187: checking for ftruncate extend" >&5
10187 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10188   echo $ac_n "(cached) $ac_c" 1>&6
10189 else
10190   
10191 if test "$cross_compiling" = yes; then
10192   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10193 else
10194   cat > conftest.$ac_ext <<EOF
10195 #line 10196 "configure"
10196 #include "confdefs.h"
10197 #include "${srcdir-.}/tests/ftruncate.c"
10198 EOF
10199 if { (eval echo configure:10200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10200 then
10201   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10202 else
10203   echo "configure: failed program was:" >&5
10204   cat conftest.$ac_ext >&5
10205   rm -fr conftest*
10206   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10207 fi
10208 rm -fr conftest*
10209 fi
10210
10211 fi
10212
10213 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10214 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10215     cat >> confdefs.h <<\EOF
10216 #define HAVE_FTRUNCATE_EXTEND 1
10217 EOF
10218
10219 fi
10220
10221 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10222 echo "configure:10223: checking for AF_LOCAL socket support" >&5
10223 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10224   echo $ac_n "(cached) $ac_c" 1>&6
10225 else
10226   
10227 if test "$cross_compiling" = yes; then
10228   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10229 else
10230   cat > conftest.$ac_ext <<EOF
10231 #line 10232 "configure"
10232 #include "confdefs.h"
10233 #include "${srcdir-.}/tests/unixsock.c"
10234 EOF
10235 if { (eval echo configure:10236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10236 then
10237   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10238 else
10239   echo "configure: failed program was:" >&5
10240   cat conftest.$ac_ext >&5
10241   rm -fr conftest*
10242   samba_cv_HAVE_WORKING_AF_LOCAL=no
10243 fi
10244 rm -fr conftest*
10245 fi
10246
10247 fi
10248
10249 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10250 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10251 then
10252     cat >> confdefs.h <<\EOF
10253 #define HAVE_WORKING_AF_LOCAL 1
10254 EOF
10255
10256 fi
10257
10258 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10259 echo "configure:10260: checking for broken getgroups" >&5
10260 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10261   echo $ac_n "(cached) $ac_c" 1>&6
10262 else
10263   
10264 if test "$cross_compiling" = yes; then
10265   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10266 else
10267   cat > conftest.$ac_ext <<EOF
10268 #line 10269 "configure"
10269 #include "confdefs.h"
10270 #include "${srcdir-.}/tests/getgroups.c"
10271 EOF
10272 if { (eval echo configure:10273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10273 then
10274   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10275 else
10276   echo "configure: failed program was:" >&5
10277   cat conftest.$ac_ext >&5
10278   rm -fr conftest*
10279   samba_cv_HAVE_BROKEN_GETGROUPS=no
10280 fi
10281 rm -fr conftest*
10282 fi
10283
10284 fi
10285
10286 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10287 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10288     cat >> confdefs.h <<\EOF
10289 #define HAVE_BROKEN_GETGROUPS 1
10290 EOF
10291
10292 fi
10293
10294 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10295 echo "configure:10296: checking whether getpass should be replaced" >&5
10296 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10297   echo $ac_n "(cached) $ac_c" 1>&6
10298 else
10299   
10300 SAVE_CPPFLAGS="$CPPFLAGS"
10301 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10302 cat > conftest.$ac_ext <<EOF
10303 #line 10304 "configure"
10304 #include "confdefs.h"
10305
10306 #define REPLACE_GETPASS 1
10307 #define NO_CONFIG_H 1
10308 #define main dont_declare_main
10309 #include "${srcdir-.}/lib/getsmbpass.c"
10310 #undef main
10311
10312 int main() {
10313
10314 ; return 0; }
10315 EOF
10316 if { (eval echo configure:10317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10317   rm -rf conftest*
10318   samba_cv_REPLACE_GETPASS=yes
10319 else
10320   echo "configure: failed program was:" >&5
10321   cat conftest.$ac_ext >&5
10322   rm -rf conftest*
10323   samba_cv_REPLACE_GETPASS=no
10324 fi
10325 rm -f conftest*
10326 CPPFLAGS="$SAVE_CPPFLAGS"
10327
10328 fi
10329
10330 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10331 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10332         cat >> confdefs.h <<\EOF
10333 #define REPLACE_GETPASS 1
10334 EOF
10335
10336 fi
10337
10338 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10339 echo "configure:10340: checking for broken inet_ntoa" >&5
10340 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10341   echo $ac_n "(cached) $ac_c" 1>&6
10342 else
10343   
10344 if test "$cross_compiling" = yes; then
10345   samba_cv_REPLACE_INET_NTOA=cross
10346 else
10347   cat > conftest.$ac_ext <<EOF
10348 #line 10349 "configure"
10349 #include "confdefs.h"
10350
10351 #include <stdio.h>
10352 #include <sys/types.h>
10353 #include <netinet/in.h>
10354 #ifdef HAVE_ARPA_INET_H
10355 #include <arpa/inet.h>
10356 #endif
10357 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10358 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10359     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10360 exit(1);}
10361 EOF
10362 if { (eval echo configure:10363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10363 then
10364   samba_cv_REPLACE_INET_NTOA=yes
10365 else
10366   echo "configure: failed program was:" >&5
10367   cat conftest.$ac_ext >&5
10368   rm -fr conftest*
10369   samba_cv_REPLACE_INET_NTOA=no
10370 fi
10371 rm -fr conftest*
10372 fi
10373
10374 fi
10375
10376 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10377 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10378     cat >> confdefs.h <<\EOF
10379 #define REPLACE_INET_NTOA 1
10380 EOF
10381
10382 fi
10383
10384 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10385 echo "configure:10386: checking for secure mkstemp" >&5
10386 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10387   echo $ac_n "(cached) $ac_c" 1>&6
10388 else
10389   
10390 if test "$cross_compiling" = yes; then
10391   samba_cv_HAVE_SECURE_MKSTEMP=cross
10392 else
10393   cat > conftest.$ac_ext <<EOF
10394 #line 10395 "configure"
10395 #include "confdefs.h"
10396 #include <stdlib.h>
10397 #include <sys/types.h>
10398 #include <sys/stat.h>
10399 #include <unistd.h>
10400 main() { 
10401   struct stat st;
10402   char tpl[20]="/tmp/test.XXXXXX"; 
10403   int fd = mkstemp(tpl); 
10404   if (fd == -1) exit(1);
10405   unlink(tpl);
10406   if (fstat(fd, &st) != 0) exit(1);
10407   if ((st.st_mode & 0777) != 0600) exit(1);
10408   exit(0);
10409 }
10410 EOF
10411 if { (eval echo configure:10412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10412 then
10413   samba_cv_HAVE_SECURE_MKSTEMP=yes
10414 else
10415   echo "configure: failed program was:" >&5
10416   cat conftest.$ac_ext >&5
10417   rm -fr conftest*
10418   samba_cv_HAVE_SECURE_MKSTEMP=no
10419 fi
10420 rm -fr conftest*
10421 fi
10422
10423 fi
10424
10425 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10426 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10427     cat >> confdefs.h <<\EOF
10428 #define HAVE_SECURE_MKSTEMP 1
10429 EOF
10430
10431 fi
10432
10433 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10434 echo "configure:10435: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10435 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10436   echo $ac_n "(cached) $ac_c" 1>&6
10437 else
10438   
10439 if test "$cross_compiling" = yes; then
10440   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10441 else
10442   cat > conftest.$ac_ext <<EOF
10443 #line 10444 "configure"
10444 #include "confdefs.h"
10445 #include <unistd.h>
10446 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10447 EOF
10448 if { (eval echo configure:10449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10449 then
10450   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10451 else
10452   echo "configure: failed program was:" >&5
10453   cat conftest.$ac_ext >&5
10454   rm -fr conftest*
10455   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10456 fi
10457 rm -fr conftest*
10458 fi
10459
10460 fi
10461
10462 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10463 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10464     cat >> confdefs.h <<\EOF
10465 #define SYSCONF_SC_NGROUPS_MAX 1
10466 EOF
10467
10468 fi
10469
10470 echo $ac_n "checking for root""... $ac_c" 1>&6
10471 echo "configure:10472: checking for root" >&5
10472 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10473   echo $ac_n "(cached) $ac_c" 1>&6
10474 else
10475   
10476 if test "$cross_compiling" = yes; then
10477   samba_cv_HAVE_ROOT=cross
10478 else
10479   cat > conftest.$ac_ext <<EOF
10480 #line 10481 "configure"
10481 #include "confdefs.h"
10482 main() { exit(getuid() != 0); }
10483 EOF
10484 if { (eval echo configure:10485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10485 then
10486   samba_cv_HAVE_ROOT=yes
10487 else
10488   echo "configure: failed program was:" >&5
10489   cat conftest.$ac_ext >&5
10490   rm -fr conftest*
10491   samba_cv_HAVE_ROOT=no
10492 fi
10493 rm -fr conftest*
10494 fi
10495
10496 fi
10497
10498 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10499 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10500     cat >> confdefs.h <<\EOF
10501 #define HAVE_ROOT 1
10502 EOF
10503
10504 else
10505     echo "configure: warning: running as non-root will disable some tests" 1>&2
10506 fi
10507
10508 ##################
10509 # look for a method of finding the list of network interfaces
10510 iface=no;
10511 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10512 echo "configure:10513: checking for iface AIX" >&5
10513 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10514   echo $ac_n "(cached) $ac_c" 1>&6
10515 else
10516   
10517 if test "$cross_compiling" = yes; then
10518   samba_cv_HAVE_IFACE_AIX=cross
10519 else
10520   cat > conftest.$ac_ext <<EOF
10521 #line 10522 "configure"
10522 #include "confdefs.h"
10523
10524 #define HAVE_IFACE_AIX 1
10525 #define AUTOCONF_TEST 1
10526 #include "confdefs.h"
10527 #include "${srcdir-.}/lib/interfaces.c"
10528 EOF
10529 if { (eval echo configure:10530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10530 then
10531   samba_cv_HAVE_IFACE_AIX=yes
10532 else
10533   echo "configure: failed program was:" >&5
10534   cat conftest.$ac_ext >&5
10535   rm -fr conftest*
10536   samba_cv_HAVE_IFACE_AIX=no
10537 fi
10538 rm -fr conftest*
10539 fi
10540
10541 fi
10542
10543 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10544 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10545     iface=yes;cat >> confdefs.h <<\EOF
10546 #define HAVE_IFACE_AIX 1
10547 EOF
10548
10549 fi
10550
10551 if test $iface = no; then
10552 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10553 echo "configure:10554: checking for iface ifconf" >&5
10554 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10555   echo $ac_n "(cached) $ac_c" 1>&6
10556 else
10557   
10558 if test "$cross_compiling" = yes; then
10559   samba_cv_HAVE_IFACE_IFCONF=cross
10560 else
10561   cat > conftest.$ac_ext <<EOF
10562 #line 10563 "configure"
10563 #include "confdefs.h"
10564
10565 #define HAVE_IFACE_IFCONF 1
10566 #define AUTOCONF_TEST 1
10567 #include "confdefs.h"
10568 #include "${srcdir-.}/lib/interfaces.c"
10569 EOF
10570 if { (eval echo configure:10571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10571 then
10572   samba_cv_HAVE_IFACE_IFCONF=yes
10573 else
10574   echo "configure: failed program was:" >&5
10575   cat conftest.$ac_ext >&5
10576   rm -fr conftest*
10577   samba_cv_HAVE_IFACE_IFCONF=no
10578 fi
10579 rm -fr conftest*
10580 fi
10581
10582 fi
10583
10584 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10585 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10586     iface=yes;cat >> confdefs.h <<\EOF
10587 #define HAVE_IFACE_IFCONF 1
10588 EOF
10589
10590 fi
10591 fi
10592
10593 if test $iface = no; then
10594 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10595 echo "configure:10596: checking for iface ifreq" >&5
10596 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10597   echo $ac_n "(cached) $ac_c" 1>&6
10598 else
10599   
10600 if test "$cross_compiling" = yes; then
10601   samba_cv_HAVE_IFACE_IFREQ=cross
10602 else
10603   cat > conftest.$ac_ext <<EOF
10604 #line 10605 "configure"
10605 #include "confdefs.h"
10606
10607 #define HAVE_IFACE_IFREQ 1
10608 #define AUTOCONF_TEST 1
10609 #include "confdefs.h"
10610 #include "${srcdir-.}/lib/interfaces.c"
10611 EOF
10612 if { (eval echo configure:10613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10613 then
10614   samba_cv_HAVE_IFACE_IFREQ=yes
10615 else
10616   echo "configure: failed program was:" >&5
10617   cat conftest.$ac_ext >&5
10618   rm -fr conftest*
10619   samba_cv_HAVE_IFACE_IFREQ=no
10620 fi
10621 rm -fr conftest*
10622 fi
10623
10624 fi
10625
10626 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10627 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10628     iface=yes;cat >> confdefs.h <<\EOF
10629 #define HAVE_IFACE_IFREQ 1
10630 EOF
10631
10632 fi
10633 fi
10634
10635
10636 ################################################
10637 # look for a method of setting the effective uid
10638 seteuid=no;
10639 if test $seteuid = no; then
10640 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10641 echo "configure:10642: checking for setresuid" >&5
10642 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10643   echo $ac_n "(cached) $ac_c" 1>&6
10644 else
10645   
10646 if test "$cross_compiling" = yes; then
10647   samba_cv_USE_SETRESUID=cross
10648 else
10649   cat > conftest.$ac_ext <<EOF
10650 #line 10651 "configure"
10651 #include "confdefs.h"
10652
10653 #define AUTOCONF_TEST 1
10654 #define USE_SETRESUID 1
10655 #include "confdefs.h"
10656 #include "${srcdir-.}/lib/util_sec.c"
10657 EOF
10658 if { (eval echo configure:10659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10659 then
10660   samba_cv_USE_SETRESUID=yes
10661 else
10662   echo "configure: failed program was:" >&5
10663   cat conftest.$ac_ext >&5
10664   rm -fr conftest*
10665   samba_cv_USE_SETRESUID=no
10666 fi
10667 rm -fr conftest*
10668 fi
10669
10670 fi
10671
10672 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10673 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10674     seteuid=yes;cat >> confdefs.h <<\EOF
10675 #define USE_SETRESUID 1
10676 EOF
10677
10678 fi
10679 fi
10680
10681
10682 if test $seteuid = no; then
10683 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10684 echo "configure:10685: checking for setreuid" >&5
10685 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10686   echo $ac_n "(cached) $ac_c" 1>&6
10687 else
10688   
10689 if test "$cross_compiling" = yes; then
10690   samba_cv_USE_SETREUID=cross
10691 else
10692   cat > conftest.$ac_ext <<EOF
10693 #line 10694 "configure"
10694 #include "confdefs.h"
10695
10696 #define AUTOCONF_TEST 1
10697 #define USE_SETREUID 1
10698 #include "confdefs.h"
10699 #include "${srcdir-.}/lib/util_sec.c"
10700 EOF
10701 if { (eval echo configure:10702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10702 then
10703   samba_cv_USE_SETREUID=yes
10704 else
10705   echo "configure: failed program was:" >&5
10706   cat conftest.$ac_ext >&5
10707   rm -fr conftest*
10708   samba_cv_USE_SETREUID=no
10709 fi
10710 rm -fr conftest*
10711 fi
10712
10713 fi
10714
10715 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10716 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10717     seteuid=yes;cat >> confdefs.h <<\EOF
10718 #define USE_SETREUID 1
10719 EOF
10720
10721 fi
10722 fi
10723
10724 if test $seteuid = no; then
10725 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10726 echo "configure:10727: checking for seteuid" >&5
10727 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10728   echo $ac_n "(cached) $ac_c" 1>&6
10729 else
10730   
10731 if test "$cross_compiling" = yes; then
10732   samba_cv_USE_SETEUID=cross
10733 else
10734   cat > conftest.$ac_ext <<EOF
10735 #line 10736 "configure"
10736 #include "confdefs.h"
10737
10738 #define AUTOCONF_TEST 1
10739 #define USE_SETEUID 1
10740 #include "confdefs.h"
10741 #include "${srcdir-.}/lib/util_sec.c"
10742 EOF
10743 if { (eval echo configure:10744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10744 then
10745   samba_cv_USE_SETEUID=yes
10746 else
10747   echo "configure: failed program was:" >&5
10748   cat conftest.$ac_ext >&5
10749   rm -fr conftest*
10750   samba_cv_USE_SETEUID=no
10751 fi
10752 rm -fr conftest*
10753 fi
10754
10755 fi
10756
10757 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10758 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10759     seteuid=yes;cat >> confdefs.h <<\EOF
10760 #define USE_SETEUID 1
10761 EOF
10762
10763 fi
10764 fi
10765
10766 if test $seteuid = no; then
10767 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10768 echo "configure:10769: checking for setuidx" >&5
10769 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10770   echo $ac_n "(cached) $ac_c" 1>&6
10771 else
10772   
10773 if test "$cross_compiling" = yes; then
10774   samba_cv_USE_SETUIDX=cross
10775 else
10776   cat > conftest.$ac_ext <<EOF
10777 #line 10778 "configure"
10778 #include "confdefs.h"
10779
10780 #define AUTOCONF_TEST 1
10781 #define USE_SETUIDX 1
10782 #include "confdefs.h"
10783 #include "${srcdir-.}/lib/util_sec.c"
10784 EOF
10785 if { (eval echo configure:10786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10786 then
10787   samba_cv_USE_SETUIDX=yes
10788 else
10789   echo "configure: failed program was:" >&5
10790   cat conftest.$ac_ext >&5
10791   rm -fr conftest*
10792   samba_cv_USE_SETUIDX=no
10793 fi
10794 rm -fr conftest*
10795 fi
10796
10797 fi
10798
10799 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
10800 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
10801     seteuid=yes;cat >> confdefs.h <<\EOF
10802 #define USE_SETUIDX 1
10803 EOF
10804
10805 fi
10806 fi
10807
10808
10809 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10810 echo "configure:10811: checking for working mmap" >&5
10811 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
10812   echo $ac_n "(cached) $ac_c" 1>&6
10813 else
10814   
10815 if test "$cross_compiling" = yes; then
10816   samba_cv_HAVE_MMAP=cross
10817 else
10818   cat > conftest.$ac_ext <<EOF
10819 #line 10820 "configure"
10820 #include "confdefs.h"
10821 #include "${srcdir-.}/tests/shared_mmap.c"
10822 EOF
10823 if { (eval echo configure:10824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10824 then
10825   samba_cv_HAVE_MMAP=yes
10826 else
10827   echo "configure: failed program was:" >&5
10828   cat conftest.$ac_ext >&5
10829   rm -fr conftest*
10830   samba_cv_HAVE_MMAP=no
10831 fi
10832 rm -fr conftest*
10833 fi
10834
10835 fi
10836
10837 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
10838 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
10839     cat >> confdefs.h <<\EOF
10840 #define HAVE_MMAP 1
10841 EOF
10842
10843 fi
10844
10845 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
10846 echo "configure:10847: checking for ftruncate needs root" >&5
10847 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
10848   echo $ac_n "(cached) $ac_c" 1>&6
10849 else
10850   
10851 if test "$cross_compiling" = yes; then
10852   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
10853 else
10854   cat > conftest.$ac_ext <<EOF
10855 #line 10856 "configure"
10856 #include "confdefs.h"
10857 #include "${srcdir-.}/tests/ftruncroot.c"
10858 EOF
10859 if { (eval echo configure:10860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10860 then
10861   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
10862 else
10863   echo "configure: failed program was:" >&5
10864   cat conftest.$ac_ext >&5
10865   rm -fr conftest*
10866   samba_cv_FTRUNCATE_NEEDS_ROOT=no
10867 fi
10868 rm -fr conftest*
10869 fi
10870
10871 fi
10872
10873 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
10874 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
10875     cat >> confdefs.h <<\EOF
10876 #define FTRUNCATE_NEEDS_ROOT 1
10877 EOF
10878
10879 fi
10880
10881 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
10882 echo "configure:10883: checking for fcntl locking" >&5
10883 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
10884   echo $ac_n "(cached) $ac_c" 1>&6
10885 else
10886   
10887 if test "$cross_compiling" = yes; then
10888   samba_cv_HAVE_FCNTL_LOCK=cross
10889 else
10890   cat > conftest.$ac_ext <<EOF
10891 #line 10892 "configure"
10892 #include "confdefs.h"
10893 #include "${srcdir-.}/tests/fcntl_lock.c"
10894 EOF
10895 if { (eval echo configure:10896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10896 then
10897   samba_cv_HAVE_FCNTL_LOCK=yes
10898 else
10899   echo "configure: failed program was:" >&5
10900   cat conftest.$ac_ext >&5
10901   rm -fr conftest*
10902   samba_cv_HAVE_FCNTL_LOCK=no
10903 fi
10904 rm -fr conftest*
10905 fi
10906
10907 fi
10908
10909 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
10910 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
10911     cat >> confdefs.h <<\EOF
10912 #define HAVE_FCNTL_LOCK 1
10913 EOF
10914
10915 fi
10916
10917 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
10918 echo "configure:10919: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
10919 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
10920   echo $ac_n "(cached) $ac_c" 1>&6
10921 else
10922   
10923 if test "$cross_compiling" = yes; then
10924   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
10925 else
10926   cat > conftest.$ac_ext <<EOF
10927 #line 10928 "configure"
10928 #include "confdefs.h"
10929 #include "${srcdir-.}/tests/fcntl_lock64.c"
10930 EOF
10931 if { (eval echo configure:10932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10932 then
10933   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
10934 else
10935   echo "configure: failed program was:" >&5
10936   cat conftest.$ac_ext >&5
10937   rm -fr conftest*
10938   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
10939 fi
10940 rm -fr conftest*
10941 fi
10942
10943 fi
10944
10945 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
10946 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
10947     cat >> confdefs.h <<\EOF
10948 #define HAVE_BROKEN_FCNTL64_LOCKS 1
10949 EOF
10950
10951
10952 else
10953
10954
10955   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
10956 echo "configure:10957: checking for 64 bit fcntl locking" >&5
10957 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
10958   echo $ac_n "(cached) $ac_c" 1>&6
10959 else
10960   
10961   if test "$cross_compiling" = yes; then
10962   samba_cv_HAVE_STRUCT_FLOCK64=cross
10963 else
10964   cat > conftest.$ac_ext <<EOF
10965 #line 10966 "configure"
10966 #include "confdefs.h"
10967
10968 #if defined(HAVE_UNISTD_H)
10969 #include <unistd.h>
10970 #endif
10971 #include <stdio.h>
10972 #include <stdlib.h>
10973
10974 #ifdef HAVE_FCNTL_H
10975 #include <fcntl.h>
10976 #endif
10977
10978 #ifdef HAVE_SYS_FCNTL_H
10979 #include <sys/fcntl.h>
10980 #endif
10981 main() { struct flock64 fl64;
10982 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
10983 exit(0);
10984 #else
10985 exit(1);
10986 #endif
10987 }
10988 EOF
10989 if { (eval echo configure:10990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10990 then
10991   samba_cv_HAVE_STRUCT_FLOCK64=yes
10992 else
10993   echo "configure: failed program was:" >&5
10994   cat conftest.$ac_ext >&5
10995   rm -fr conftest*
10996   samba_cv_HAVE_STRUCT_FLOCK64=no
10997 fi
10998 rm -fr conftest*
10999 fi
11000
11001 fi
11002
11003 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11004
11005   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11006       cat >> confdefs.h <<\EOF
11007 #define HAVE_STRUCT_FLOCK64 1
11008 EOF
11009
11010   fi
11011 fi
11012
11013 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11014 echo "configure:11015: checking for broken nisplus include files" >&5
11015 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11016   echo $ac_n "(cached) $ac_c" 1>&6
11017 else
11018   
11019 cat > conftest.$ac_ext <<EOF
11020 #line 11021 "configure"
11021 #include "confdefs.h"
11022 #include <sys/acl.h>
11023 #if defined(HAVE_RPCSVC_NIS_H)
11024 #include <rpcsvc/nis.h>
11025 #endif
11026 int main() {
11027 return 0;
11028 ; return 0; }
11029 EOF
11030 if { (eval echo configure:11031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11031   rm -rf conftest*
11032   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11033 else
11034   echo "configure: failed program was:" >&5
11035   cat conftest.$ac_ext >&5
11036   rm -rf conftest*
11037   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11038 fi
11039 rm -f conftest*
11040 fi
11041
11042 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11043 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11044     cat >> confdefs.h <<\EOF
11045 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11046 EOF
11047
11048 fi
11049
11050
11051 #################################################
11052 # check for smbwrapper support
11053 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11054 echo "configure:11055: checking whether to use smbwrapper" >&5
11055 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11056 if test "${with_smbwrapper+set}" = set; then
11057   withval="$with_smbwrapper"
11058    case "$withval" in
11059   yes)
11060     echo "$ac_t""yes" 1>&6
11061     cat >> confdefs.h <<\EOF
11062 #define WITH_SMBWRAPPER 1
11063 EOF
11064
11065         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11066
11067         if test x$ATTEMPT_WRAP32_BUILD = x; then
11068                 WRAP32=""
11069         else
11070                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11071         fi
11072
11073 # Conditions under which smbwrapper should not be built.
11074
11075         if test x$PICFLAG = x; then
11076            echo No support for PIC code - disabling smbwrapper and smbsh
11077            WRAP=""
11078            WRAP32=""
11079         elif test x$ac_cv_func_syscall = xno; then
11080            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11081            WRAP=""
11082            WRAP32=""
11083         fi
11084     ;;
11085   *)
11086     echo "$ac_t""no" 1>&6
11087     ;;
11088   esac 
11089 else
11090   echo "$ac_t""no" 1>&6
11091
11092 fi
11093
11094
11095 #################################################
11096 # check for the AFS filesystem
11097 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
11098 echo "configure:11099: checking whether to use AFS" >&5
11099 # Check whether --with-afs or --without-afs was given.
11100 if test "${with_afs+set}" = set; then
11101   withval="$with_afs"
11102    case "$withval" in
11103   yes)
11104     echo "$ac_t""yes" 1>&6
11105     cat >> confdefs.h <<\EOF
11106 #define WITH_AFS 1
11107 EOF
11108
11109     ;;
11110   *)
11111     echo "$ac_t""no" 1>&6
11112     ;;
11113   esac 
11114 else
11115   echo "$ac_t""no" 1>&6
11116
11117 fi
11118
11119
11120
11121 #################################################
11122 # check for the DFS auth system
11123 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
11124 echo "configure:11125: checking whether to use DFS auth" >&5
11125 # Check whether --with-dfs or --without-dfs was given.
11126 if test "${with_dfs+set}" = set; then
11127   withval="$with_dfs"
11128    case "$withval" in
11129   yes)
11130     echo "$ac_t""yes" 1>&6
11131     cat >> confdefs.h <<\EOF
11132 #define WITH_DFS 1
11133 EOF
11134
11135     ;;
11136   *)
11137     echo "$ac_t""no" 1>&6
11138     ;;
11139   esac 
11140 else
11141   echo "$ac_t""no" 1>&6
11142
11143 fi
11144
11145
11146 #################################################
11147 # check for Kerberos IV auth system
11148 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
11149 echo "configure:11150: checking whether to use Kerberos IV" >&5
11150 # Check whether --with-krb4 or --without-krb4 was given.
11151 if test "${with_krb4+set}" = set; then
11152   withval="$with_krb4"
11153    case "$withval" in
11154   yes)
11155     echo "$ac_t""yes" 1>&6
11156     cat >> confdefs.h <<\EOF
11157 #define KRB4_AUTH 1
11158 EOF
11159
11160     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
11161 echo "configure:11162: checking for dn_expand in -lresolv" >&5
11162 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
11163 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11164   echo $ac_n "(cached) $ac_c" 1>&6
11165 else
11166   ac_save_LIBS="$LIBS"
11167 LIBS="-lresolv  $LIBS"
11168 cat > conftest.$ac_ext <<EOF
11169 #line 11170 "configure"
11170 #include "confdefs.h"
11171 /* Override any gcc2 internal prototype to avoid an error.  */
11172 /* We use char because int might match the return type of a gcc2
11173     builtin and then its argument prototype would still apply.  */
11174 char dn_expand();
11175
11176 int main() {
11177 dn_expand()
11178 ; return 0; }
11179 EOF
11180 if { (eval echo configure:11181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11181   rm -rf conftest*
11182   eval "ac_cv_lib_$ac_lib_var=yes"
11183 else
11184   echo "configure: failed program was:" >&5
11185   cat conftest.$ac_ext >&5
11186   rm -rf conftest*
11187   eval "ac_cv_lib_$ac_lib_var=no"
11188 fi
11189 rm -f conftest*
11190 LIBS="$ac_save_LIBS"
11191
11192 fi
11193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11194   echo "$ac_t""yes" 1>&6
11195     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11196     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11197   cat >> confdefs.h <<EOF
11198 #define $ac_tr_lib 1
11199 EOF
11200
11201   LIBS="-lresolv $LIBS"
11202
11203 else
11204   echo "$ac_t""no" 1>&6
11205 fi
11206
11207     LIBS="$LIBS -lkrb -ldes"
11208     CFLAGS="$CFLAGS -I$withval/include"
11209     LDFLAGS="$LDFLAGS -L$withval/lib"
11210     cat >> confdefs.h <<EOF
11211 #define KRB4_DIR ${withval}
11212 EOF
11213
11214     ;;
11215   *)
11216     echo "$ac_t""no" 1>&6
11217     ;;
11218   esac 
11219 else
11220   echo "$ac_t""no" 1>&6
11221
11222 fi
11223
11224
11225 #################################################
11226 # check for Kerberos 5 auth system
11227 echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
11228 echo "configure:11229: checking whether to use Kerberos 5" >&5
11229 # Check whether --with-krb5 or --without-krb5 was given.
11230 if test "${with_krb5+set}" = set; then
11231   withval="$with_krb5"
11232    case "$withval" in
11233   yes)
11234     echo "$ac_t""yes" 1>&6
11235     cat >> confdefs.h <<\EOF
11236 #define KRB5_AUTH 1
11237 EOF
11238
11239     LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err"
11240     CFLAGS="$CFLAGS -I$withval/include"
11241     LDFLAGS="$LDFLAGS -L$withval/lib"
11242     cat >> confdefs.h <<EOF
11243 #define KRB5_DIR ${withval}
11244 EOF
11245
11246     ;;
11247   *)
11248     echo "$ac_t""no" 1>&6
11249     ;;
11250   esac 
11251 else
11252   echo "$ac_t""no" 1>&6
11253
11254 fi
11255
11256
11257 #################################################
11258 # check for automount support
11259 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11260 echo "configure:11261: checking whether to use AUTOMOUNT" >&5
11261 # Check whether --with-automount or --without-automount was given.
11262 if test "${with_automount+set}" = set; then
11263   withval="$with_automount"
11264    case "$withval" in
11265   yes)
11266     echo "$ac_t""yes" 1>&6
11267     cat >> confdefs.h <<\EOF
11268 #define WITH_AUTOMOUNT 1
11269 EOF
11270
11271     ;;
11272   *)
11273     echo "$ac_t""no" 1>&6
11274     ;;
11275   esac 
11276 else
11277   echo "$ac_t""no" 1>&6
11278
11279 fi
11280
11281
11282 #################################################
11283 # check for smbmount support
11284 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11285 echo "configure:11286: checking whether to use SMBMOUNT" >&5
11286 # Check whether --with-smbmount or --without-smbmount was given.
11287 if test "${with_smbmount+set}" = set; then
11288   withval="$with_smbmount"
11289    case "$withval" in
11290   yes)
11291         case "$host_os" in
11292         *linux*)
11293                 echo "$ac_t""yes" 1>&6
11294                 cat >> confdefs.h <<\EOF
11295 #define WITH_SMBMOUNT 1
11296 EOF
11297
11298                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11299                 ;;
11300         *)
11301                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
11302                 ;;
11303         esac
11304     ;;
11305   *)
11306     echo "$ac_t""no" 1>&6
11307     MPROGS=
11308     ;;
11309   esac 
11310 else
11311   echo "$ac_t""no" 1>&6
11312   MPROGS=
11313
11314 fi
11315
11316
11317
11318 #################################################
11319 # check for a PAM password database
11320 with_pam_for_crypt=no
11321 echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
11322 echo "configure:11323: checking whether to use PAM password database" >&5
11323 # Check whether --with-pam or --without-pam was given.
11324 if test "${with_pam+set}" = set; then
11325   withval="$with_pam"
11326    case "$withval" in
11327   yes)
11328     echo "$ac_t""yes" 1>&6
11329     cat >> confdefs.h <<\EOF
11330 #define WITH_PAM 1
11331 EOF
11332
11333     LIBS="$LIBS -lpam"
11334     with_pam_for_crypt=yes
11335     ;;
11336   *)
11337     echo "$ac_t""no" 1>&6
11338     ;;
11339   esac 
11340 else
11341   echo "$ac_t""no" 1>&6
11342
11343 fi
11344
11345
11346 # we can't build a pam module if we don't have pam.
11347 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11348 echo "configure:11349: checking for pam_get_data in -lpam" >&5
11349 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11350 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11351   echo $ac_n "(cached) $ac_c" 1>&6
11352 else
11353   ac_save_LIBS="$LIBS"
11354 LIBS="-lpam  $LIBS"
11355 cat > conftest.$ac_ext <<EOF
11356 #line 11357 "configure"
11357 #include "confdefs.h"
11358 /* Override any gcc2 internal prototype to avoid an error.  */
11359 /* We use char because int might match the return type of a gcc2
11360     builtin and then its argument prototype would still apply.  */
11361 char pam_get_data();
11362
11363 int main() {
11364 pam_get_data()
11365 ; return 0; }
11366 EOF
11367 if { (eval echo configure:11368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11368   rm -rf conftest*
11369   eval "ac_cv_lib_$ac_lib_var=yes"
11370 else
11371   echo "configure: failed program was:" >&5
11372   cat conftest.$ac_ext >&5
11373   rm -rf conftest*
11374   eval "ac_cv_lib_$ac_lib_var=no"
11375 fi
11376 rm -f conftest*
11377 LIBS="$ac_save_LIBS"
11378
11379 fi
11380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11381   echo "$ac_t""yes" 1>&6
11382   cat >> confdefs.h <<\EOF
11383 #define HAVE_LIBPAM 1
11384 EOF
11385
11386 else
11387   echo "$ac_t""no" 1>&6
11388 fi
11389
11390
11391 #################################################
11392 # check for pam_smbpass support
11393 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11394 echo "configure:11395: checking whether to use pam_smbpass" >&5
11395 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11396 if test "${with_pam_smbpass+set}" = set; then
11397   withval="$with_pam_smbpass"
11398    case "$withval" in
11399   yes)
11400     echo "$ac_t""yes" 1>&6
11401
11402 # Conditions under which pam_smbpass should not be built.
11403
11404        if test x$PICFLAG = x; then
11405           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11406           PAM_MOD=""
11407        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11408           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11409           PAM_MOD=""
11410        else
11411           PAM_MOD="bin/pam_smbpass.so"
11412        fi
11413     ;;
11414   *)
11415     echo "$ac_t""no" 1>&6
11416     ;;
11417   esac 
11418 else
11419   echo "$ac_t""no" 1>&6
11420
11421 fi
11422
11423
11424
11425 ###############################################
11426 # test for where we get crypt() from, but only
11427 # if not using PAM
11428 if test $with_pam_for_crypt = no; then
11429 for ac_func in crypt
11430 do
11431 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11432 echo "configure:11433: checking for $ac_func" >&5
11433 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11434   echo $ac_n "(cached) $ac_c" 1>&6
11435 else
11436   cat > conftest.$ac_ext <<EOF
11437 #line 11438 "configure"
11438 #include "confdefs.h"
11439 /* System header to define __stub macros and hopefully few prototypes,
11440     which can conflict with char $ac_func(); below.  */
11441 #include <assert.h>
11442 /* Override any gcc2 internal prototype to avoid an error.  */
11443 /* We use char because int might match the return type of a gcc2
11444     builtin and then its argument prototype would still apply.  */
11445 char $ac_func();
11446
11447 int main() {
11448
11449 /* The GNU C library defines this for functions which it implements
11450     to always fail with ENOSYS.  Some functions are actually named
11451     something starting with __ and the normal name is an alias.  */
11452 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11453 choke me
11454 #else
11455 $ac_func();
11456 #endif
11457
11458 ; return 0; }
11459 EOF
11460 if { (eval echo configure:11461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11461   rm -rf conftest*
11462   eval "ac_cv_func_$ac_func=yes"
11463 else
11464   echo "configure: failed program was:" >&5
11465   cat conftest.$ac_ext >&5
11466   rm -rf conftest*
11467   eval "ac_cv_func_$ac_func=no"
11468 fi
11469 rm -f conftest*
11470 fi
11471
11472 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11473   echo "$ac_t""yes" 1>&6
11474     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11475   cat >> confdefs.h <<EOF
11476 #define $ac_tr_func 1
11477 EOF
11478  
11479 else
11480   echo "$ac_t""no" 1>&6
11481 fi
11482 done
11483
11484 if test x"$ac_cv_func_crypt" = x"no"; then
11485     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11486 echo "configure:11487: checking for crypt in -lcrypt" >&5
11487 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11488 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11489   echo $ac_n "(cached) $ac_c" 1>&6
11490 else
11491   ac_save_LIBS="$LIBS"
11492 LIBS="-lcrypt  $LIBS"
11493 cat > conftest.$ac_ext <<EOF
11494 #line 11495 "configure"
11495 #include "confdefs.h"
11496 /* Override any gcc2 internal prototype to avoid an error.  */
11497 /* We use char because int might match the return type of a gcc2
11498     builtin and then its argument prototype would still apply.  */
11499 char crypt();
11500
11501 int main() {
11502 crypt()
11503 ; return 0; }
11504 EOF
11505 if { (eval echo configure:11506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11506   rm -rf conftest*
11507   eval "ac_cv_lib_$ac_lib_var=yes"
11508 else
11509   echo "configure: failed program was:" >&5
11510   cat conftest.$ac_ext >&5
11511   rm -rf conftest*
11512   eval "ac_cv_lib_$ac_lib_var=no"
11513 fi
11514 rm -f conftest*
11515 LIBS="$ac_save_LIBS"
11516
11517 fi
11518 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11519   echo "$ac_t""yes" 1>&6
11520   LIBS="$LIBS -lcrypt";
11521         cat >> confdefs.h <<\EOF
11522 #define HAVE_CRYPT 1
11523 EOF
11524
11525 else
11526   echo "$ac_t""no" 1>&6
11527 fi
11528
11529 fi
11530 fi
11531
11532 ##
11533 ## moved after the check for -lcrypt in order to
11534 ## ensure that the necessary libraries are included
11535 ## check checking for truncated salt.  Wrapped by the
11536 ## $with_pam_for_crypt variable as above   --jerry
11537 ##
11538 if test $with_pam_for_crypt = no; then
11539 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
11540 echo "configure:11541: checking for a crypt that needs truncated salt" >&5
11541 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
11542   echo $ac_n "(cached) $ac_c" 1>&6
11543 else
11544   
11545 if test "$cross_compiling" = yes; then
11546   samba_cv_HAVE_TRUNCATED_SALT=cross
11547 else
11548   cat > conftest.$ac_ext <<EOF
11549 #line 11550 "configure"
11550 #include "confdefs.h"
11551 #include "${srcdir-.}/tests/crypttest.c"
11552 EOF
11553 if { (eval echo configure:11554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11554 then
11555   samba_cv_HAVE_TRUNCATED_SALT=no
11556 else
11557   echo "configure: failed program was:" >&5
11558   cat conftest.$ac_ext >&5
11559   rm -fr conftest*
11560   samba_cv_HAVE_TRUNCATED_SALT=yes
11561 fi
11562 rm -fr conftest*
11563 fi
11564
11565 fi
11566
11567 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
11568 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
11569         cat >> confdefs.h <<\EOF
11570 #define HAVE_TRUNCATED_SALT 1
11571 EOF
11572
11573 fi
11574 fi
11575
11576
11577
11578 ########################################################################################
11579 ##
11580 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
11581 ##
11582 ########################################################################################
11583
11584 ## set the with_smbpasswd_sam as the default
11585 with_smbpasswd_sam=yes
11586
11587
11588 #################################################
11589 # check for a TDB password database
11590 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
11591 echo "configure:11592: checking whether to use TDB SAM database" >&5
11592 # Check whether --with-tdbsam or --without-tdbsam was given.
11593 if test "${with_tdbsam+set}" = set; then
11594   withval="$with_tdbsam"
11595    case "$withval" in
11596   yes)
11597     echo "$ac_t""yes" 1>&6
11598     cat >> confdefs.h <<\EOF
11599 #define WITH_TDB_SAM 1
11600 EOF
11601
11602     with_smbpasswd_sam=no
11603     ;;
11604   *)
11605     echo "$ac_t""no" 1>&6
11606     ;;
11607   esac 
11608 else
11609   echo "$ac_t""no" 1>&6
11610
11611 fi
11612
11613
11614 #################################################
11615 # check for a LDAP password database
11616 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
11617 echo "configure:11618: checking whether to use LDAP SAM database" >&5
11618 # Check whether --with-ldapsam or --without-ldapsam was given.
11619 if test "${with_ldapsam+set}" = set; then
11620   withval="$with_ldapsam"
11621    case "$withval" in
11622   yes)
11623     echo "$ac_t""yes" 1>&6
11624     cat >> confdefs.h <<\EOF
11625 #define WITH_LDAP_SAM 1
11626 EOF
11627
11628     LIBS="-lldap -llber -lresolv $LIBS"
11629     with_smbpasswd_sam=no
11630     ;;
11631   *)
11632     echo "$ac_t""no" 1>&6
11633     ;;
11634   esac 
11635 else
11636   echo "$ac_t""no" 1>&6
11637
11638 fi
11639
11640
11641 #################################################
11642 # check for a NISPLUS password database
11643 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
11644 echo "configure:11645: checking whether to use NISPLUS SAM database" >&5
11645 # Check whether --with-nisplussam or --without-nisplussam was given.
11646 if test "${with_nisplussam+set}" = set; then
11647   withval="$with_nisplussam"
11648    case "$withval" in
11649   yes)
11650     echo "$ac_t""yes" 1>&6
11651     cat >> confdefs.h <<\EOF
11652 #define WITH_NISPLUS_SAM 1
11653 EOF
11654
11655     with_smbpasswd_sam=no
11656     ;;
11657   *)
11658     echo "$ac_t""no" 1>&6
11659     ;;
11660   esac 
11661 else
11662   echo "$ac_t""no" 1>&6
11663
11664 fi
11665
11666
11667 ################################################
11668 # This test should come last because the
11669 # smbpasswd SAM is only used if another format
11670 # has not been defined
11671 echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6
11672 echo "configure:11673: checking whether to use traditional smbpasswd file" >&5
11673 if test $with_smbpasswd_sam = yes; then
11674         echo "$ac_t""yes" 1>&6
11675         cat >> confdefs.h <<\EOF
11676 #define WITH_SMBPASSWD_SAM 1
11677 EOF
11678
11679 else
11680         echo "$ac_t""no" 1>&6
11681 fi
11682
11683 ########################################################################################
11684 ##
11685 ## END OF TESTS FOR SAM BACKENDS.  
11686 ##
11687 ########################################################################################
11688
11689 #################################################
11690 # check for a NISPLUS_HOME support 
11691 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
11692 echo "configure:11693: checking whether to use NISPLUS_HOME" >&5
11693 # Check whether --with-nisplus-home or --without-nisplus-home was given.
11694 if test "${with_nisplus_home+set}" = set; then
11695   withval="$with_nisplus_home"
11696    case "$withval" in
11697   yes)
11698     echo "$ac_t""yes" 1>&6
11699     cat >> confdefs.h <<\EOF
11700 #define WITH_NISPLUS_HOME 1
11701 EOF
11702
11703     ;;
11704   *)
11705     echo "$ac_t""no" 1>&6
11706     ;;
11707   esac 
11708 else
11709   echo "$ac_t""no" 1>&6
11710
11711 fi
11712
11713
11714 #################################################
11715 # check for the secure socket layer
11716 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
11717 echo "configure:11718: checking whether to use SSL" >&5
11718 # Check whether --with-ssl or --without-ssl was given.
11719 if test "${with_ssl+set}" = set; then
11720   withval="$with_ssl"
11721    case "$withval" in
11722   yes)
11723     echo "$ac_t""yes" 1>&6
11724     cat >> confdefs.h <<\EOF
11725 #define WITH_SSL 1
11726 EOF
11727
11728     withval="/usr/local/ssl"     # default
11729
11730     if test "${with_sslinc+set}" = set; then
11731
11732         withval="$with_sslinc"
11733         case "$withval" in
11734         yes|no)
11735           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
11736           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
11737         ;;
11738         * )
11739           CFLAGS="-I${withval} $CFLAGS"
11740         ;;
11741         esac
11742
11743     else
11744
11745         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
11746
11747     fi
11748
11749     if test "${with_ssllib+set}" = set; then
11750
11751         withval="$with_ssllib"
11752         case "$withval" in
11753         yes|no)
11754           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
11755           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
11756         ;;
11757         * )
11758           LDFLAGS="-L${withval}/lib $LDFLAGS"
11759         ;;
11760         esac
11761
11762     else
11763
11764         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
11765
11766     fi
11767
11768     LIBS="-lssl -lcrypto $LIBS"
11769
11770 #    if test ! -d ${withval}; then
11771 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
11772 #      exit 1
11773 #    fi 
11774
11775     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
11776
11777     ;;
11778   *)
11779     echo "$ac_t""no" 1>&6
11780     ;;
11781   esac 
11782 else
11783   echo "$ac_t""no" 1>&6
11784
11785 fi
11786
11787
11788 #################################################
11789 # check for syslog logging
11790 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
11791 echo "configure:11792: checking whether to use syslog logging" >&5
11792 # Check whether --with-syslog or --without-syslog was given.
11793 if test "${with_syslog+set}" = set; then
11794   withval="$with_syslog"
11795    case "$withval" in
11796   yes)
11797     echo "$ac_t""yes" 1>&6
11798     cat >> confdefs.h <<\EOF
11799 #define WITH_SYSLOG 1
11800 EOF
11801
11802     ;;
11803   *)
11804     echo "$ac_t""no" 1>&6
11805     ;;
11806   esac 
11807 else
11808   echo "$ac_t""no" 1>&6
11809
11810 fi
11811
11812
11813 #################################################
11814 # check for a shared memory profiling support
11815 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
11816 echo "configure:11817: checking whether to use profiling" >&5
11817 # Check whether --with-profiling-data or --without-profiling-data was given.
11818 if test "${with_profiling_data+set}" = set; then
11819   withval="$with_profiling_data"
11820    case "$withval" in
11821   yes)
11822     echo "$ac_t""yes" 1>&6
11823     cat >> confdefs.h <<\EOF
11824 #define WITH_PROFILE 1
11825 EOF
11826
11827     ;;
11828   *)
11829     echo "$ac_t""no" 1>&6
11830     ;;
11831   esac 
11832 else
11833   echo "$ac_t""no" 1>&6
11834
11835 fi
11836
11837
11838
11839 #################################################
11840 # check for experimental disk-quotas support
11841 QUOTAOBJS=smbd/noquotas.o
11842
11843 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
11844 echo "configure:11845: checking whether to support disk-quotas" >&5
11845 # Check whether --with-quotas or --without-quotas was given.
11846 if test "${with_quotas+set}" = set; then
11847   withval="$with_quotas"
11848    case "$withval" in
11849   yes)
11850     echo "$ac_t""yes" 1>&6
11851     case "$host_os" in
11852       *linux*)
11853         # Check for kernel 2.4.x quota braindamage...
11854         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
11855 echo "configure:11856: checking for linux 2.4.x quota braindamage.." >&5
11856 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
11857   echo $ac_n "(cached) $ac_c" 1>&6
11858 else
11859   
11860         cat > conftest.$ac_ext <<EOF
11861 #line 11862 "configure"
11862 #include "confdefs.h"
11863 #include <stdio.h>
11864 #include <sys/types.h>
11865 #include <asm/types.h>
11866 #include <linux/quota.h>
11867 #include <mntent.h>
11868 #include <linux/unistd.h>
11869 int main() {
11870 struct mem_dqblk D;
11871 ; return 0; }
11872 EOF
11873 if { (eval echo configure:11874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11874   rm -rf conftest*
11875   samba_cv_linux_2_4_quota_braindamage=yes
11876 else
11877   echo "configure: failed program was:" >&5
11878   cat conftest.$ac_ext >&5
11879   rm -rf conftest*
11880   samba_cv_linux_2_4_quota_braindamage=no
11881 fi
11882 rm -f conftest*
11883 fi
11884
11885 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
11886 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
11887         cat >> confdefs.h <<\EOF
11888 #define LINUX_QUOTAS_2 1
11889 EOF
11890
11891 else
11892         cat >> confdefs.h <<\EOF
11893 #define LINUX_QUOTAS_1 1
11894 EOF
11895
11896 fi
11897         ;;
11898       *)
11899         ;;
11900     esac
11901     QUOTAOBJS=smbd/quotas.o
11902     cat >> confdefs.h <<\EOF
11903 #define WITH_QUOTAS 1
11904 EOF
11905
11906     ;;
11907   *)
11908     echo "$ac_t""no" 1>&6
11909     ;;
11910   esac 
11911 else
11912   echo "$ac_t""no" 1>&6
11913
11914 fi
11915
11916
11917
11918 #################################################
11919 # check for experimental utmp accounting
11920
11921 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
11922 echo "configure:11923: checking whether to support utmp accounting" >&5
11923 # Check whether --with-utmp or --without-utmp was given.
11924 if test "${with_utmp+set}" = set; then
11925   withval="$with_utmp"
11926    case "$withval" in
11927   yes)
11928     echo "$ac_t""yes" 1>&6
11929     cat >> confdefs.h <<\EOF
11930 #define WITH_UTMP 1
11931 EOF
11932
11933     ;;
11934   *)
11935     echo "$ac_t""no" 1>&6
11936     ;;
11937   esac 
11938 else
11939   echo "$ac_t""no" 1>&6
11940
11941 fi
11942
11943
11944 #################################################
11945 # set private directory location
11946 # Check whether --with-privatedir or --without-privatedir was given.
11947 if test "${with_privatedir+set}" = set; then
11948   withval="$with_privatedir"
11949    case "$withval" in
11950   yes|no)
11951   #
11952   # Just in case anybody calls it without argument
11953   #
11954     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
11955     privatedir='${prefix}/private'
11956   ;;
11957   * )
11958     privatedir="$withval"
11959     ;;
11960   esac
11961   
11962 else
11963   privatedir='${prefix}/private'
11964    
11965
11966 fi
11967
11968
11969 #################################################
11970 # set lock directory location
11971 # Check whether --with-lockdir or --without-lockdir was given.
11972 if test "${with_lockdir+set}" = set; then
11973   withval="$with_lockdir"
11974    case "$withval" in
11975   yes|no)
11976   #
11977   # Just in case anybody calls it without argument
11978   #
11979     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
11980     lockdir='$(VARDIR)/locks'
11981   ;;
11982   * )
11983     lockdir="$withval"
11984     ;;
11985   esac
11986   
11987 else
11988   lockdir='$(VARDIR)/locks'
11989    
11990
11991 fi
11992
11993
11994 #################################################
11995 # set SWAT directory location
11996 # Check whether --with-swatdir or --without-swatdir was given.
11997 if test "${with_swatdir+set}" = set; then
11998   withval="$with_swatdir"
11999    case "$withval" in
12000   yes|no)
12001   #
12002   # Just in case anybody does it
12003   #
12004     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12005     swatdir='${prefix}/swat'
12006   ;;
12007   * )
12008     swatdir="$withval"
12009     ;;
12010   esac
12011   
12012 else
12013   swatdir='${prefix}/swat'
12014    
12015
12016 fi
12017
12018
12019 #################################################
12020 # check for i18n'ed SWAT compiling
12021 echo $ac_n "checking whether to use i18n'ed SWAT""... $ac_c" 1>&6
12022 echo "configure:12023: checking whether to use i18n'ed SWAT" >&5
12023 # Check whether --with-i18n-swat or --without-i18n-swat was given.
12024 if test "${with_i18n_swat+set}" = set; then
12025   withval="$with_i18n_swat"
12026    case "$withval" in
12027   yes)
12028     echo "$ac_t""yes" 1>&6
12029     cat >> confdefs.h <<\EOF
12030 #define I18N_SWAT 1
12031 EOF
12032
12033     i18n_swat="yes"
12034     ;;
12035   *)
12036     echo "$ac_t""no" 1>&6
12037     i18n_swat="no"
12038     ;;
12039   esac 
12040    
12041 else
12042    echo "$ac_t""no" 1>&6
12043   i18n_swat="no"
12044    
12045
12046 fi
12047
12048
12049 #################################################
12050 # set SWAT default language for old web browsers.
12051 echo $ac_n "checking whether to use default SWAT language""... $ac_c" 1>&6
12052 echo "configure:12053: checking whether to use default SWAT language" >&5
12053 # Check whether --with-swat-def-lang or --without-swat-def-lang was given.
12054 if test "${with_swat_def_lang+set}" = set; then
12055   withval="$with_swat_def_lang"
12056   
12057   default_pref_lang=""
12058   case "$withval" in
12059   yes)
12060     echo "configure: warning: --with-swat-def-lang called without argument - will use default" 1>&2
12061   ;;
12062   no)
12063     echo "$ac_t""no" 1>&6
12064   ;;
12065   *)
12066     default_pref_lang="$withval"
12067     echo "$ac_t""$withval" 1>&6
12068     ;;
12069   esac
12070   cat >> confdefs.h <<EOF
12071 #define I18N_DEFAULT_PREF_LANG "$default_pref_lang"
12072 EOF
12073
12074
12075 else
12076   
12077   default_pref_lang=""
12078   echo "$ac_t""no" 1>&6
12079   cat >> confdefs.h <<EOF
12080 #define I18N_DEFAULT_PREF_LANG "$default_pref_lang"
12081 EOF
12082
12083
12084
12085 fi
12086
12087
12088 #################################################
12089 # choose native language(s) of man pages
12090 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
12091 echo "configure:12092: checking chosen man pages' language(s)" >&5
12092 # Check whether --with-manpages-langs or --without-manpages-langs was given.
12093 if test "${with_manpages_langs+set}" = set; then
12094   withval="$with_manpages_langs"
12095    case "$withval" in
12096   yes|no)
12097     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
12098     manlangs="en"
12099   ;;
12100   *)
12101     manlangs="$withval"
12102   ;;
12103   esac
12104
12105   echo "$ac_t""$manlangs" 1>&6
12106   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
12107   
12108 else
12109   manlangs="en"
12110   echo "$ac_t""$manlangs" 1>&6
12111   
12112
12113 fi
12114
12115
12116 #################################################
12117 # these tests are taken from the GNU fileutils package
12118 echo "checking how to get filesystem space usage" 1>&6
12119 echo "configure:12120: checking how to get filesystem space usage" >&5
12120 space=no
12121
12122 # Test for statvfs64.
12123 if test $space = no; then
12124   # SVR4
12125   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12126 echo "configure:12127: checking statvfs64 function (SVR4)" >&5
12127 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12128   echo $ac_n "(cached) $ac_c" 1>&6
12129 else
12130   if test "$cross_compiling" = yes; then
12131   fu_cv_sys_stat_statvfs64=cross
12132 else
12133   cat > conftest.$ac_ext <<EOF
12134 #line 12135 "configure"
12135 #include "confdefs.h"
12136
12137 #if defined(HAVE_UNISTD_H)
12138 #include <unistd.h>
12139 #endif
12140 #include <sys/types.h>
12141 #include <sys/statvfs.h>
12142   main ()
12143   {
12144     struct statvfs64 fsd;
12145     exit (statvfs64 (".", &fsd));
12146   }
12147 EOF
12148 if { (eval echo configure:12149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12149 then
12150   fu_cv_sys_stat_statvfs64=yes
12151 else
12152   echo "configure: failed program was:" >&5
12153   cat conftest.$ac_ext >&5
12154   rm -fr conftest*
12155   fu_cv_sys_stat_statvfs64=no
12156 fi
12157 rm -fr conftest*
12158 fi
12159
12160 fi
12161
12162 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12163   if test $fu_cv_sys_stat_statvfs64 = yes; then
12164     space=yes
12165     cat >> confdefs.h <<\EOF
12166 #define STAT_STATVFS64 1
12167 EOF
12168
12169   fi
12170 fi
12171
12172 # Perform only the link test since it seems there are no variants of the
12173 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12174 # because that got a false positive on SCO OSR5.  Adding the declaration
12175 # of a `struct statvfs' causes this test to fail (as it should) on such
12176 # systems.  That system is reported to work fine with STAT_STATFS4 which
12177 # is what it gets when this test fails.
12178 if test $space = no; then
12179   # SVR4
12180   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12181 echo "configure:12182: checking statvfs function (SVR4)" >&5
12182 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12183   echo $ac_n "(cached) $ac_c" 1>&6
12184 else
12185   cat > conftest.$ac_ext <<EOF
12186 #line 12187 "configure"
12187 #include "confdefs.h"
12188 #include <sys/types.h>
12189 #include <sys/statvfs.h>
12190 int main() {
12191 struct statvfs fsd; statvfs (0, &fsd);
12192 ; return 0; }
12193 EOF
12194 if { (eval echo configure:12195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12195   rm -rf conftest*
12196   fu_cv_sys_stat_statvfs=yes
12197 else
12198   echo "configure: failed program was:" >&5
12199   cat conftest.$ac_ext >&5
12200   rm -rf conftest*
12201   fu_cv_sys_stat_statvfs=no
12202 fi
12203 rm -f conftest*
12204 fi
12205
12206 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12207   if test $fu_cv_sys_stat_statvfs = yes; then
12208     space=yes
12209     cat >> confdefs.h <<\EOF
12210 #define STAT_STATVFS 1
12211 EOF
12212
12213   fi
12214 fi
12215
12216 if test $space = no; then
12217   # DEC Alpha running OSF/1
12218   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12219 echo "configure:12220: checking for 3-argument statfs function (DEC OSF/1)" >&5
12220   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12221   echo $ac_n "(cached) $ac_c" 1>&6
12222 else
12223   if test "$cross_compiling" = yes; then
12224   fu_cv_sys_stat_statfs3_osf1=no
12225 else
12226   cat > conftest.$ac_ext <<EOF
12227 #line 12228 "configure"
12228 #include "confdefs.h"
12229
12230 #include <sys/param.h>
12231 #include <sys/types.h>
12232 #include <sys/mount.h>
12233   main ()
12234   {
12235     struct statfs fsd;
12236     fsd.f_fsize = 0;
12237     exit (statfs (".", &fsd, sizeof (struct statfs)));
12238   }
12239 EOF
12240 if { (eval echo configure:12241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12241 then
12242   fu_cv_sys_stat_statfs3_osf1=yes
12243 else
12244   echo "configure: failed program was:" >&5
12245   cat conftest.$ac_ext >&5
12246   rm -fr conftest*
12247   fu_cv_sys_stat_statfs3_osf1=no
12248 fi
12249 rm -fr conftest*
12250 fi
12251
12252 fi
12253
12254   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12255   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12256     space=yes
12257     cat >> confdefs.h <<\EOF
12258 #define STAT_STATFS3_OSF1 1
12259 EOF
12260
12261   fi
12262 fi
12263
12264 if test $space = no; then
12265 # AIX
12266   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12267 echo "configure:12268: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12268   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12269   echo $ac_n "(cached) $ac_c" 1>&6
12270 else
12271   if test "$cross_compiling" = yes; then
12272   fu_cv_sys_stat_statfs2_bsize=no
12273 else
12274   cat > conftest.$ac_ext <<EOF
12275 #line 12276 "configure"
12276 #include "confdefs.h"
12277
12278 #ifdef HAVE_SYS_PARAM_H
12279 #include <sys/param.h>
12280 #endif
12281 #ifdef HAVE_SYS_MOUNT_H
12282 #include <sys/mount.h>
12283 #endif
12284 #ifdef HAVE_SYS_VFS_H
12285 #include <sys/vfs.h>
12286 #endif
12287   main ()
12288   {
12289   struct statfs fsd;
12290   fsd.f_bsize = 0;
12291   exit (statfs (".", &fsd));
12292   }
12293 EOF
12294 if { (eval echo configure:12295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12295 then
12296   fu_cv_sys_stat_statfs2_bsize=yes
12297 else
12298   echo "configure: failed program was:" >&5
12299   cat conftest.$ac_ext >&5
12300   rm -fr conftest*
12301   fu_cv_sys_stat_statfs2_bsize=no
12302 fi
12303 rm -fr conftest*
12304 fi
12305
12306 fi
12307
12308   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12309   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12310     space=yes
12311     cat >> confdefs.h <<\EOF
12312 #define STAT_STATFS2_BSIZE 1
12313 EOF
12314
12315   fi
12316 fi
12317
12318 if test $space = no; then
12319 # SVR3
12320   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12321 echo "configure:12322: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12322   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12323   echo $ac_n "(cached) $ac_c" 1>&6
12324 else
12325   if test "$cross_compiling" = yes; then
12326   fu_cv_sys_stat_statfs4=no
12327 else
12328   cat > conftest.$ac_ext <<EOF
12329 #line 12330 "configure"
12330 #include "confdefs.h"
12331 #include <sys/types.h>
12332 #include <sys/statfs.h>
12333   main ()
12334   {
12335   struct statfs fsd;
12336   exit (statfs (".", &fsd, sizeof fsd, 0));
12337   }
12338 EOF
12339 if { (eval echo configure:12340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12340 then
12341   fu_cv_sys_stat_statfs4=yes
12342 else
12343   echo "configure: failed program was:" >&5
12344   cat conftest.$ac_ext >&5
12345   rm -fr conftest*
12346   fu_cv_sys_stat_statfs4=no
12347 fi
12348 rm -fr conftest*
12349 fi
12350
12351 fi
12352
12353   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12354   if test $fu_cv_sys_stat_statfs4 = yes; then
12355     space=yes
12356     cat >> confdefs.h <<\EOF
12357 #define STAT_STATFS4 1
12358 EOF
12359
12360   fi
12361 fi
12362
12363 if test $space = no; then
12364 # 4.4BSD and NetBSD
12365   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12366 echo "configure:12367: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12367   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12368   echo $ac_n "(cached) $ac_c" 1>&6
12369 else
12370   if test "$cross_compiling" = yes; then
12371   fu_cv_sys_stat_statfs2_fsize=no
12372 else
12373   cat > conftest.$ac_ext <<EOF
12374 #line 12375 "configure"
12375 #include "confdefs.h"
12376 #include <sys/types.h>
12377 #ifdef HAVE_SYS_PARAM_H
12378 #include <sys/param.h>
12379 #endif
12380 #ifdef HAVE_SYS_MOUNT_H
12381 #include <sys/mount.h>
12382 #endif
12383   main ()
12384   {
12385   struct statfs fsd;
12386   fsd.f_fsize = 0;
12387   exit (statfs (".", &fsd));
12388   }
12389 EOF
12390 if { (eval echo configure:12391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12391 then
12392   fu_cv_sys_stat_statfs2_fsize=yes
12393 else
12394   echo "configure: failed program was:" >&5
12395   cat conftest.$ac_ext >&5
12396   rm -fr conftest*
12397   fu_cv_sys_stat_statfs2_fsize=no
12398 fi
12399 rm -fr conftest*
12400 fi
12401
12402 fi
12403
12404   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12405   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12406     space=yes
12407     cat >> confdefs.h <<\EOF
12408 #define STAT_STATFS2_FSIZE 1
12409 EOF
12410
12411   fi
12412 fi
12413
12414 if test $space = no; then
12415   # Ultrix
12416   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12417 echo "configure:12418: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12418   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12419   echo $ac_n "(cached) $ac_c" 1>&6
12420 else
12421   if test "$cross_compiling" = yes; then
12422   fu_cv_sys_stat_fs_data=no
12423 else
12424   cat > conftest.$ac_ext <<EOF
12425 #line 12426 "configure"
12426 #include "confdefs.h"
12427 #include <sys/types.h>
12428 #ifdef HAVE_SYS_PARAM_H
12429 #include <sys/param.h>
12430 #endif
12431 #ifdef HAVE_SYS_MOUNT_H
12432 #include <sys/mount.h>
12433 #endif
12434 #ifdef HAVE_SYS_FS_TYPES_H
12435 #include <sys/fs_types.h>
12436 #endif
12437   main ()
12438   {
12439   struct fs_data fsd;
12440   /* Ultrix's statfs returns 1 for success,
12441      0 for not mounted, -1 for failure.  */
12442   exit (statfs (".", &fsd) != 1);
12443   }
12444 EOF
12445 if { (eval echo configure:12446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12446 then
12447   fu_cv_sys_stat_fs_data=yes
12448 else
12449   echo "configure: failed program was:" >&5
12450   cat conftest.$ac_ext >&5
12451   rm -fr conftest*
12452   fu_cv_sys_stat_fs_data=no
12453 fi
12454 rm -fr conftest*
12455 fi
12456
12457 fi
12458
12459   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12460   if test $fu_cv_sys_stat_fs_data = yes; then
12461     space=yes
12462     cat >> confdefs.h <<\EOF
12463 #define STAT_STATFS2_FS_DATA 1
12464 EOF
12465
12466   fi
12467 fi
12468
12469 #
12470 # As a gating factor for large file support, in order to
12471 # use <4GB files we must have the following minimal support
12472 # available.
12473 # long long, and a 64 bit off_t or off64_t.
12474 # If we don't have all of these then disable large
12475 # file support.
12476 #
12477 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12478 echo "configure:12479: checking if large file support can be enabled" >&5
12479 cat > conftest.$ac_ext <<EOF
12480 #line 12481 "configure"
12481 #include "confdefs.h"
12482
12483 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12484 #include <sys/types.h>
12485 #else
12486 __COMPILE_ERROR_
12487 #endif
12488
12489 int main() {
12490 int i
12491 ; return 0; }
12492 EOF
12493 if { (eval echo configure:12494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12494   rm -rf conftest*
12495   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12496 else
12497   echo "configure: failed program was:" >&5
12498   cat conftest.$ac_ext >&5
12499   rm -rf conftest*
12500   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12501 fi
12502 rm -f conftest*
12503 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12504     cat >> confdefs.h <<\EOF
12505 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12506 EOF
12507
12508 fi
12509 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12510
12511 # Check whether --with-spinlocks or --without-spinlocks was given.
12512 if test "${with_spinlocks+set}" = set; then
12513   withval="$with_spinlocks"
12514   :
12515 fi
12516
12517 if test "x$with_spinlocks" = "xyes"; then
12518     cat >> confdefs.h <<\EOF
12519 #define USE_SPINLOCKS 1
12520 EOF
12521
12522
12523     case "$host_cpu" in
12524         sparc)
12525             cat >> confdefs.h <<\EOF
12526 #define SPARC_SPINLOCKS 1
12527 EOF
12528
12529             ;;
12530
12531         i386|i486|i586|i686)
12532             cat >> confdefs.h <<\EOF
12533 #define INTEL_SPINLOCKS 1
12534 EOF
12535
12536             ;;
12537
12538         mips)
12539             cat >> confdefs.h <<\EOF
12540 #define MIPS_SPINLOCKS 1
12541 EOF
12542
12543             ;;
12544
12545         powerpc)
12546             cat >> confdefs.h <<\EOF
12547 #define POWERPC_SPINLOCKS 1
12548 EOF
12549
12550             ;;
12551     esac
12552 fi
12553
12554 #################################################
12555 # check for ACL support
12556
12557 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12558 echo "configure:12559: checking whether to support ACLs" >&5
12559 # Check whether --with-acl-support or --without-acl-support was given.
12560 if test "${with_acl_support+set}" = set; then
12561   withval="$with_acl_support"
12562    case "$withval" in
12563   yes)
12564
12565         case "$host_os" in
12566         *sysv5*)
12567             echo "$ac_t""Using UnixWare ACLs" 1>&6
12568             cat >> confdefs.h <<\EOF
12569 #define HAVE_UNIXWARE_ACLS 1
12570 EOF
12571
12572             ;;
12573         *solaris*)
12574             echo "$ac_t""Using solaris ACLs" 1>&6
12575             cat >> confdefs.h <<\EOF
12576 #define HAVE_SOLARIS_ACLS 1
12577 EOF
12578
12579             ;;
12580                 *irix*)
12581                         echo "$ac_t""Using IRIX ACLs" 1>&6
12582                         cat >> confdefs.h <<\EOF
12583 #define HAVE_IRIX_ACLS 1
12584 EOF
12585
12586                         ;;
12587                 *aix*)
12588                         echo "$ac_t""Using AIX ACLs" 1>&6
12589                         cat >> confdefs.h <<\EOF
12590 #define HAVE_AIX_ACLS 1
12591 EOF
12592
12593                         ;;
12594                 *osf*)
12595                         echo "$ac_t""Using Tru64 ACLs" 1>&6
12596                         cat >> confdefs.h <<\EOF
12597 #define HAVE_TRU64_ACLS 1
12598 EOF
12599
12600                         LIBS="$LIBS -lpacl"
12601                         ;;
12602         *)
12603                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12604 echo "configure:12605: checking for acl_get_file in -lacl" >&5
12605 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12606 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12607   echo $ac_n "(cached) $ac_c" 1>&6
12608 else
12609   ac_save_LIBS="$LIBS"
12610 LIBS="-lacl  $LIBS"
12611 cat > conftest.$ac_ext <<EOF
12612 #line 12613 "configure"
12613 #include "confdefs.h"
12614 /* Override any gcc2 internal prototype to avoid an error.  */
12615 /* We use char because int might match the return type of a gcc2
12616     builtin and then its argument prototype would still apply.  */
12617 char acl_get_file();
12618
12619 int main() {
12620 acl_get_file()
12621 ; return 0; }
12622 EOF
12623 if { (eval echo configure:12624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12624   rm -rf conftest*
12625   eval "ac_cv_lib_$ac_lib_var=yes"
12626 else
12627   echo "configure: failed program was:" >&5
12628   cat conftest.$ac_ext >&5
12629   rm -rf conftest*
12630   eval "ac_cv_lib_$ac_lib_var=no"
12631 fi
12632 rm -f conftest*
12633 LIBS="$ac_save_LIBS"
12634
12635 fi
12636 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12637   echo "$ac_t""yes" 1>&6
12638     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12639     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12640   cat >> confdefs.h <<EOF
12641 #define $ac_tr_lib 1
12642 EOF
12643
12644   LIBS="-lacl $LIBS"
12645
12646 else
12647   echo "$ac_t""no" 1>&6
12648 fi
12649
12650                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
12651 echo "configure:12652: checking for ACL support" >&5
12652 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
12653   echo $ac_n "(cached) $ac_c" 1>&6
12654 else
12655   
12656                         cat > conftest.$ac_ext <<EOF
12657 #line 12658 "configure"
12658 #include "confdefs.h"
12659 #include <sys/types.h>
12660 #include <sys/acl.h>
12661 int main() {
12662  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
12663 ; return 0; }
12664 EOF
12665 if { (eval echo configure:12666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12666   rm -rf conftest*
12667   samba_cv_HAVE_POSIX_ACLS=yes
12668 else
12669   echo "configure: failed program was:" >&5
12670   cat conftest.$ac_ext >&5
12671   rm -rf conftest*
12672   samba_cv_HAVE_POSIX_ACLS=no
12673 fi
12674 rm -f conftest*
12675 fi
12676
12677 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
12678                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
12679                                 echo "$ac_t""Using posix ACLs" 1>&6
12680                                 cat >> confdefs.h <<\EOF
12681 #define HAVE_POSIX_ACLS 1
12682 EOF
12683
12684                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
12685 echo "configure:12686: checking for acl_get_perm_np" >&5
12686 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
12687   echo $ac_n "(cached) $ac_c" 1>&6
12688 else
12689   
12690                                 cat > conftest.$ac_ext <<EOF
12691 #line 12692 "configure"
12692 #include "confdefs.h"
12693 #include <sys/types.h>
12694 #include <sys/acl.h>
12695 int main() {
12696  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
12697 ; return 0; }
12698 EOF
12699 if { (eval echo configure:12700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12700   rm -rf conftest*
12701   samba_cv_HAVE_ACL_GET_PERM_NP=yes
12702 else
12703   echo "configure: failed program was:" >&5
12704   cat conftest.$ac_ext >&5
12705   rm -rf conftest*
12706   samba_cv_HAVE_ACL_GET_PERM_NP=no
12707 fi
12708 rm -f conftest*
12709 fi
12710
12711 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
12712                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
12713                                         cat >> confdefs.h <<\EOF
12714 #define HAVE_ACL_GET_PERM_NP 1
12715 EOF
12716
12717                                 fi
12718                         fi
12719             ;;
12720         esac
12721         ;;
12722   *)
12723     echo "$ac_t""no" 1>&6
12724     cat >> confdefs.h <<\EOF
12725 #define HAVE_NO_ACLS 1
12726 EOF
12727
12728     ;;
12729   esac 
12730 else
12731   cat >> confdefs.h <<\EOF
12732 #define HAVE_NO_ACLS 1
12733 EOF
12734
12735   echo "$ac_t""no" 1>&6
12736
12737 fi
12738
12739
12740 #################################################
12741 # Check whether winbind is supported on this platform.  If so we need to
12742 # build and install client programs (WINBIND_TARGETS), sbin programs
12743 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
12744
12745 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
12746 echo "configure:12747: checking whether to build winbind" >&5
12747
12748 # Initially, the value of $host_os decides whether winbind is supported
12749
12750 case "$host_os" in 
12751         *linux*|*solaris*)
12752                 HAVE_WINBIND=yes
12753                 ;;
12754         *)
12755                 HAVE_WINBIND=no
12756                 winbind_no_reason=", unsupported on $host_os"
12757                 ;;
12758 esac
12759
12760 # Check the setting of --with-winbindd
12761
12762 # Check whether --with-winbind or --without-winbind was given.
12763 if test "${with_winbind+set}" = set; then
12764   withval="$with_winbind"
12765    
12766   case "$withval" in
12767         yes)
12768                 HAVE_WINBIND=yes
12769                 ;;
12770         no)
12771                 HAVE_WINBIND=no
12772                 winbind_reason=""
12773                 ;;
12774   esac 
12775 fi
12776
12777
12778 # We need unix domain sockets for winbind
12779
12780 if test x"$HAVE_WINBIND" = x"yes"; then
12781         if test x"$samba_cv_unixsocket" = x"no"; then
12782                 winbind_no_reason=", no unix domain socket support on $host_os"
12783                 HAVE_WINBIND=no
12784         fi
12785 fi
12786
12787 # Display test results
12788
12789 if test x"$HAVE_WINBIND" = x"yes"; then
12790
12791         echo "$ac_t""yes" 1>&6
12792
12793         WINBIND_TARGETS="\$(WINBIND_PROGS)"
12794         WINBIND_STARGETS="\$(WINBIND_SPROGS)"
12795         WINBIND_LTARGETS="\$(WINBIND_LPROGS)"
12796         case "$with_pam" in
12797                 yes)
12798                         WINBIND_PAM_PROGS="\$(WINBIND_PAM_PROGS)"
12799                 ;;
12800         esac
12801 else
12802         echo "$ac_t""no$winbind_no_reason" 1>&6
12803
12804         WINBIND_TARGETS=""
12805         WINBIND_STARGETS=""
12806         WINBIND_LTARGETS=""
12807         WINBIND_PAM_PROGS=""
12808 fi
12809
12810 # Substitution time!
12811
12812
12813
12814
12815
12816
12817 #################################################
12818 # Check for SWAT i18n support
12819
12820 PACKAGE=i18n_swat
12821 cat >> confdefs.h <<EOF
12822 #define PACKAGE "$PACKAGE"
12823 EOF
12824
12825
12826 ALL_LINGUAS="en ja pl tr"
12827 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
12828 echo "configure:12829: checking whether ${MAKE-make} sets \${MAKE}" >&5
12829 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
12830 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
12831   echo $ac_n "(cached) $ac_c" 1>&6
12832 else
12833   cat > conftestmake <<\EOF
12834 all:
12835         @echo 'ac_maketemp="${MAKE}"'
12836 EOF
12837 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
12838 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
12839 if test -n "$ac_maketemp"; then
12840   eval ac_cv_prog_make_${ac_make}_set=yes
12841 else
12842   eval ac_cv_prog_make_${ac_make}_set=no
12843 fi
12844 rm -f conftestmake
12845 fi
12846 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
12847   echo "$ac_t""yes" 1>&6
12848   SET_MAKE=
12849 else
12850   echo "$ac_t""no" 1>&6
12851   SET_MAKE="MAKE=${MAKE-make}"
12852 fi
12853
12854 # Extract the first word of "ranlib", so it can be a program name with args.
12855 set dummy ranlib; ac_word=$2
12856 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
12857 echo "configure:12858: checking for $ac_word" >&5
12858 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
12859   echo $ac_n "(cached) $ac_c" 1>&6
12860 else
12861   if test -n "$RANLIB"; then
12862   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
12863 else
12864   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
12865   ac_dummy="$PATH"
12866   for ac_dir in $ac_dummy; do
12867     test -z "$ac_dir" && ac_dir=.
12868     if test -f $ac_dir/$ac_word; then
12869       ac_cv_prog_RANLIB="ranlib"
12870       break
12871     fi
12872   done
12873   IFS="$ac_save_ifs"
12874   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
12875 fi
12876 fi
12877 RANLIB="$ac_cv_prog_RANLIB"
12878 if test -n "$RANLIB"; then
12879   echo "$ac_t""$RANLIB" 1>&6
12880 else
12881   echo "$ac_t""no" 1>&6
12882 fi
12883
12884 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
12885 echo "configure:12886: checking for POSIXized ISC" >&5
12886 if test -d /etc/conf/kconfig.d &&
12887   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
12888 then
12889   echo "$ac_t""yes" 1>&6
12890   ISC=yes # If later tests want to check for ISC.
12891   cat >> confdefs.h <<\EOF
12892 #define _POSIX_SOURCE 1
12893 EOF
12894
12895   if test "$GCC" = yes; then
12896     CC="$CC -posix"
12897   else
12898     CC="$CC -Xp"
12899   fi
12900 else
12901   echo "$ac_t""no" 1>&6
12902   ISC=
12903 fi
12904
12905 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12906 # for constant arguments.  Useless!
12907 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
12908 echo "configure:12909: checking for working alloca.h" >&5
12909 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
12910   echo $ac_n "(cached) $ac_c" 1>&6
12911 else
12912   cat > conftest.$ac_ext <<EOF
12913 #line 12914 "configure"
12914 #include "confdefs.h"
12915 #include <alloca.h>
12916 int main() {
12917 char *p = alloca(2 * sizeof(int));
12918 ; return 0; }
12919 EOF
12920 if { (eval echo configure:12921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12921   rm -rf conftest*
12922   ac_cv_header_alloca_h=yes
12923 else
12924   echo "configure: failed program was:" >&5
12925   cat conftest.$ac_ext >&5
12926   rm -rf conftest*
12927   ac_cv_header_alloca_h=no
12928 fi
12929 rm -f conftest*
12930 fi
12931
12932 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
12933 if test $ac_cv_header_alloca_h = yes; then
12934   cat >> confdefs.h <<\EOF
12935 #define HAVE_ALLOCA_H 1
12936 EOF
12937
12938 fi
12939
12940 echo $ac_n "checking for alloca""... $ac_c" 1>&6
12941 echo "configure:12942: checking for alloca" >&5
12942 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
12943   echo $ac_n "(cached) $ac_c" 1>&6
12944 else
12945   cat > conftest.$ac_ext <<EOF
12946 #line 12947 "configure"
12947 #include "confdefs.h"
12948
12949 #ifdef __GNUC__
12950 # define alloca __builtin_alloca
12951 #else
12952 # ifdef _MSC_VER
12953 #  include <malloc.h>
12954 #  define alloca _alloca
12955 # else
12956 #  if HAVE_ALLOCA_H
12957 #   include <alloca.h>
12958 #  else
12959 #   ifdef _AIX
12960  #pragma alloca
12961 #   else
12962 #    ifndef alloca /* predefined by HP cc +Olibcalls */
12963 char *alloca ();
12964 #    endif
12965 #   endif
12966 #  endif
12967 # endif
12968 #endif
12969
12970 int main() {
12971 char *p = (char *) alloca(1);
12972 ; return 0; }
12973 EOF
12974 if { (eval echo configure:12975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12975   rm -rf conftest*
12976   ac_cv_func_alloca_works=yes
12977 else
12978   echo "configure: failed program was:" >&5
12979   cat conftest.$ac_ext >&5
12980   rm -rf conftest*
12981   ac_cv_func_alloca_works=no
12982 fi
12983 rm -f conftest*
12984 fi
12985
12986 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
12987 if test $ac_cv_func_alloca_works = yes; then
12988   cat >> confdefs.h <<\EOF
12989 #define HAVE_ALLOCA 1
12990 EOF
12991
12992 fi
12993
12994 if test $ac_cv_func_alloca_works = no; then
12995   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12996   # that cause trouble.  Some versions do not even contain alloca or
12997   # contain a buggy version.  If you still want to use their alloca,
12998   # use ar to extract alloca.o from them instead of compiling alloca.c.
12999   ALLOCA=alloca.${ac_objext}
13000   cat >> confdefs.h <<\EOF
13001 #define C_ALLOCA 1
13002 EOF
13003
13004
13005 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
13006 echo "configure:13007: checking whether alloca needs Cray hooks" >&5
13007 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
13008   echo $ac_n "(cached) $ac_c" 1>&6
13009 else
13010   cat > conftest.$ac_ext <<EOF
13011 #line 13012 "configure"
13012 #include "confdefs.h"
13013 #if defined(CRAY) && ! defined(CRAY2)
13014 webecray
13015 #else
13016 wenotbecray
13017 #endif
13018
13019 EOF
13020 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13021   egrep "webecray" >/dev/null 2>&1; then
13022   rm -rf conftest*
13023   ac_cv_os_cray=yes
13024 else
13025   rm -rf conftest*
13026   ac_cv_os_cray=no
13027 fi
13028 rm -f conftest*
13029
13030 fi
13031
13032 echo "$ac_t""$ac_cv_os_cray" 1>&6
13033 if test $ac_cv_os_cray = yes; then
13034 for ac_func in _getb67 GETB67 getb67; do
13035   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13036 echo "configure:13037: checking for $ac_func" >&5
13037 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
13038   echo $ac_n "(cached) $ac_c" 1>&6
13039 else
13040   cat > conftest.$ac_ext <<EOF
13041 #line 13042 "configure"
13042 #include "confdefs.h"
13043 /* System header to define __stub macros and hopefully few prototypes,
13044     which can conflict with char $ac_func(); below.  */
13045 #include <assert.h>
13046 /* Override any gcc2 internal prototype to avoid an error.  */
13047 /* We use char because int might match the return type of a gcc2
13048     builtin and then its argument prototype would still apply.  */
13049 char $ac_func();
13050
13051 int main() {
13052
13053 /* The GNU C library defines this for functions which it implements
13054     to always fail with ENOSYS.  Some functions are actually named
13055     something starting with __ and the normal name is an alias.  */
13056 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13057 choke me
13058 #else
13059 $ac_func();
13060 #endif
13061
13062 ; return 0; }
13063 EOF
13064 if { (eval echo configure:13065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13065   rm -rf conftest*
13066   eval "ac_cv_func_$ac_func=yes"
13067 else
13068   echo "configure: failed program was:" >&5
13069   cat conftest.$ac_ext >&5
13070   rm -rf conftest*
13071   eval "ac_cv_func_$ac_func=no"
13072 fi
13073 rm -f conftest*
13074 fi
13075
13076 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13077   echo "$ac_t""yes" 1>&6
13078   cat >> confdefs.h <<EOF
13079 #define CRAY_STACKSEG_END $ac_func
13080 EOF
13081
13082   break
13083 else
13084   echo "$ac_t""no" 1>&6
13085 fi
13086
13087 done
13088 fi
13089
13090 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
13091 echo "configure:13092: checking stack direction for C alloca" >&5
13092 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
13093   echo $ac_n "(cached) $ac_c" 1>&6
13094 else
13095   if test "$cross_compiling" = yes; then
13096   ac_cv_c_stack_direction=0
13097 else
13098   cat > conftest.$ac_ext <<EOF
13099 #line 13100 "configure"
13100 #include "confdefs.h"
13101 find_stack_direction ()
13102 {
13103   static char *addr = 0;
13104   auto char dummy;
13105   if (addr == 0)
13106     {
13107       addr = &dummy;
13108       return find_stack_direction ();
13109     }
13110   else
13111     return (&dummy > addr) ? 1 : -1;
13112 }
13113 main ()
13114 {
13115   exit (find_stack_direction() < 0);
13116 }
13117 EOF
13118 if { (eval echo configure:13119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13119 then
13120   ac_cv_c_stack_direction=1
13121 else
13122   echo "configure: failed program was:" >&5
13123   cat conftest.$ac_ext >&5
13124   rm -fr conftest*
13125   ac_cv_c_stack_direction=-1
13126 fi
13127 rm -fr conftest*
13128 fi
13129
13130 fi
13131
13132 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
13133 cat >> confdefs.h <<EOF
13134 #define STACK_DIRECTION $ac_cv_c_stack_direction
13135 EOF
13136
13137 fi
13138
13139 for ac_hdr in unistd.h
13140 do
13141 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13142 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13143 echo "configure:13144: checking for $ac_hdr" >&5
13144 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
13145   echo $ac_n "(cached) $ac_c" 1>&6
13146 else
13147   cat > conftest.$ac_ext <<EOF
13148 #line 13149 "configure"
13149 #include "confdefs.h"
13150 #include <$ac_hdr>
13151 EOF
13152 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13153 { (eval echo configure:13154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13154 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13155 if test -z "$ac_err"; then
13156   rm -rf conftest*
13157   eval "ac_cv_header_$ac_safe=yes"
13158 else
13159   echo "$ac_err" >&5
13160   echo "configure: failed program was:" >&5
13161   cat conftest.$ac_ext >&5
13162   rm -rf conftest*
13163   eval "ac_cv_header_$ac_safe=no"
13164 fi
13165 rm -f conftest*
13166 fi
13167 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13168   echo "$ac_t""yes" 1>&6
13169     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13170   cat >> confdefs.h <<EOF
13171 #define $ac_tr_hdr 1
13172 EOF
13173  
13174 else
13175   echo "$ac_t""no" 1>&6
13176 fi
13177 done
13178
13179 for ac_func in getpagesize
13180 do
13181 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13182 echo "configure:13183: checking for $ac_func" >&5
13183 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
13184   echo $ac_n "(cached) $ac_c" 1>&6
13185 else
13186   cat > conftest.$ac_ext <<EOF
13187 #line 13188 "configure"
13188 #include "confdefs.h"
13189 /* System header to define __stub macros and hopefully few prototypes,
13190     which can conflict with char $ac_func(); below.  */
13191 #include <assert.h>
13192 /* Override any gcc2 internal prototype to avoid an error.  */
13193 /* We use char because int might match the return type of a gcc2
13194     builtin and then its argument prototype would still apply.  */
13195 char $ac_func();
13196
13197 int main() {
13198
13199 /* The GNU C library defines this for functions which it implements
13200     to always fail with ENOSYS.  Some functions are actually named
13201     something starting with __ and the normal name is an alias.  */
13202 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13203 choke me
13204 #else
13205 $ac_func();
13206 #endif
13207
13208 ; return 0; }
13209 EOF
13210 if { (eval echo configure:13211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13211   rm -rf conftest*
13212   eval "ac_cv_func_$ac_func=yes"
13213 else
13214   echo "configure: failed program was:" >&5
13215   cat conftest.$ac_ext >&5
13216   rm -rf conftest*
13217   eval "ac_cv_func_$ac_func=no"
13218 fi
13219 rm -f conftest*
13220 fi
13221
13222 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13223   echo "$ac_t""yes" 1>&6
13224     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13225   cat >> confdefs.h <<EOF
13226 #define $ac_tr_func 1
13227 EOF
13228  
13229 else
13230   echo "$ac_t""no" 1>&6
13231 fi
13232 done
13233
13234 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
13235 echo "configure:13236: checking for working mmap" >&5
13236 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
13237   echo $ac_n "(cached) $ac_c" 1>&6
13238 else
13239   if test "$cross_compiling" = yes; then
13240   ac_cv_func_mmap_fixed_mapped=no
13241 else
13242   cat > conftest.$ac_ext <<EOF
13243 #line 13244 "configure"
13244 #include "confdefs.h"
13245
13246 /* Thanks to Mike Haertel and Jim Avera for this test.
13247    Here is a matrix of mmap possibilities:
13248         mmap private not fixed
13249         mmap private fixed at somewhere currently unmapped
13250         mmap private fixed at somewhere already mapped
13251         mmap shared not fixed
13252         mmap shared fixed at somewhere currently unmapped
13253         mmap shared fixed at somewhere already mapped
13254    For private mappings, we should verify that changes cannot be read()
13255    back from the file, nor mmap's back from the file at a different
13256    address.  (There have been systems where private was not correctly
13257    implemented like the infamous i386 svr4.0, and systems where the
13258    VM page cache was not coherent with the filesystem buffer cache
13259    like early versions of FreeBSD and possibly contemporary NetBSD.)
13260    For shared mappings, we should conversely verify that changes get
13261    propogated back to all the places they're supposed to be.
13262
13263    Grep wants private fixed already mapped.
13264    The main things grep needs to know about mmap are:
13265    * does it exist and is it safe to write into the mmap'd area
13266    * how to use it (BSD variants)  */
13267 #include <sys/types.h>
13268 #include <fcntl.h>
13269 #include <sys/mman.h>
13270
13271 /* This mess was copied from the GNU getpagesize.h.  */
13272 #ifndef HAVE_GETPAGESIZE
13273 # ifdef HAVE_UNISTD_H
13274 #  include <unistd.h>
13275 # endif
13276
13277 /* Assume that all systems that can run configure have sys/param.h.  */
13278 # ifndef HAVE_SYS_PARAM_H
13279 #  define HAVE_SYS_PARAM_H 1
13280 # endif
13281
13282 # ifdef _SC_PAGESIZE
13283 #  define getpagesize() sysconf(_SC_PAGESIZE)
13284 # else /* no _SC_PAGESIZE */
13285 #  ifdef HAVE_SYS_PARAM_H
13286 #   include <sys/param.h>
13287 #   ifdef EXEC_PAGESIZE
13288 #    define getpagesize() EXEC_PAGESIZE
13289 #   else /* no EXEC_PAGESIZE */
13290 #    ifdef NBPG
13291 #     define getpagesize() NBPG * CLSIZE
13292 #     ifndef CLSIZE
13293 #      define CLSIZE 1
13294 #     endif /* no CLSIZE */
13295 #    else /* no NBPG */
13296 #     ifdef NBPC
13297 #      define getpagesize() NBPC
13298 #     else /* no NBPC */
13299 #      ifdef PAGESIZE
13300 #       define getpagesize() PAGESIZE
13301 #      endif /* PAGESIZE */
13302 #     endif /* no NBPC */
13303 #    endif /* no NBPG */
13304 #   endif /* no EXEC_PAGESIZE */
13305 #  else /* no HAVE_SYS_PARAM_H */
13306 #   define getpagesize() 8192   /* punt totally */
13307 #  endif /* no HAVE_SYS_PARAM_H */
13308 # endif /* no _SC_PAGESIZE */
13309
13310 #endif /* no HAVE_GETPAGESIZE */
13311
13312 #ifdef __cplusplus
13313 extern "C" { void *malloc(unsigned); }
13314 #else
13315 char *malloc();
13316 #endif
13317
13318 int
13319 main()
13320 {
13321         char *data, *data2, *data3;
13322         int i, pagesize;
13323         int fd;
13324
13325         pagesize = getpagesize();
13326
13327         /*
13328          * First, make a file with some known garbage in it.
13329          */
13330         data = malloc(pagesize);
13331         if (!data)
13332                 exit(1);
13333         for (i = 0; i < pagesize; ++i)
13334                 *(data + i) = rand();
13335         umask(0);
13336         fd = creat("conftestmmap", 0600);
13337         if (fd < 0)
13338                 exit(1);
13339         if (write(fd, data, pagesize) != pagesize)
13340                 exit(1);
13341         close(fd);
13342
13343         /*
13344          * Next, try to mmap the file at a fixed address which
13345          * already has something else allocated at it.  If we can,
13346          * also make sure that we see the same garbage.
13347          */
13348         fd = open("conftestmmap", O_RDWR);
13349         if (fd < 0)
13350                 exit(1);
13351         data2 = malloc(2 * pagesize);
13352         if (!data2)
13353                 exit(1);
13354         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
13355         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
13356             MAP_PRIVATE | MAP_FIXED, fd, 0L))
13357                 exit(1);
13358         for (i = 0; i < pagesize; ++i)
13359                 if (*(data + i) != *(data2 + i))
13360                         exit(1);
13361
13362         /*
13363          * Finally, make sure that changes to the mapped area
13364          * do not percolate back to the file as seen by read().
13365          * (This is a bug on some variants of i386 svr4.0.)
13366          */
13367         for (i = 0; i < pagesize; ++i)
13368                 *(data2 + i) = *(data2 + i) + 1;
13369         data3 = malloc(pagesize);
13370         if (!data3)
13371                 exit(1);
13372         if (read(fd, data3, pagesize) != pagesize)
13373                 exit(1);
13374         for (i = 0; i < pagesize; ++i)
13375                 if (*(data + i) != *(data3 + i))
13376                         exit(1);
13377         close(fd);
13378         unlink("conftestmmap");
13379         exit(0);
13380 }
13381
13382 EOF
13383 if { (eval echo configure:13384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13384 then
13385   ac_cv_func_mmap_fixed_mapped=yes
13386 else
13387   echo "configure: failed program was:" >&5
13388   cat conftest.$ac_ext >&5
13389   rm -fr conftest*
13390   ac_cv_func_mmap_fixed_mapped=no
13391 fi
13392 rm -fr conftest*
13393 fi
13394
13395 fi
13396
13397 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
13398 if test $ac_cv_func_mmap_fixed_mapped = yes; then
13399   cat >> confdefs.h <<\EOF
13400 #define HAVE_MMAP 1
13401 EOF
13402
13403 fi
13404
13405                               
13406    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
13407 unistd.h sys/param.h
13408 do
13409 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
13410 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
13411 echo "configure:13412: checking for $ac_hdr" >&5
13412 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
13413   echo $ac_n "(cached) $ac_c" 1>&6
13414 else
13415   cat > conftest.$ac_ext <<EOF
13416 #line 13417 "configure"
13417 #include "confdefs.h"
13418 #include <$ac_hdr>
13419 EOF
13420 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13421 { (eval echo configure:13422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13422 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13423 if test -z "$ac_err"; then
13424   rm -rf conftest*
13425   eval "ac_cv_header_$ac_safe=yes"
13426 else
13427   echo "$ac_err" >&5
13428   echo "configure: failed program was:" >&5
13429   cat conftest.$ac_ext >&5
13430   rm -rf conftest*
13431   eval "ac_cv_header_$ac_safe=no"
13432 fi
13433 rm -f conftest*
13434 fi
13435 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13436   echo "$ac_t""yes" 1>&6
13437     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
13438   cat >> confdefs.h <<EOF
13439 #define $ac_tr_hdr 1
13440 EOF
13441  
13442 else
13443   echo "$ac_t""no" 1>&6
13444 fi
13445 done
13446
13447    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
13448 strdup __argz_count __argz_stringify __argz_next
13449 do
13450 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13451 echo "configure:13452: checking for $ac_func" >&5
13452 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
13453   echo $ac_n "(cached) $ac_c" 1>&6
13454 else
13455   cat > conftest.$ac_ext <<EOF
13456 #line 13457 "configure"
13457 #include "confdefs.h"
13458 /* System header to define __stub macros and hopefully few prototypes,
13459     which can conflict with char $ac_func(); below.  */
13460 #include <assert.h>
13461 /* Override any gcc2 internal prototype to avoid an error.  */
13462 /* We use char because int might match the return type of a gcc2
13463     builtin and then its argument prototype would still apply.  */
13464 char $ac_func();
13465
13466 int main() {
13467
13468 /* The GNU C library defines this for functions which it implements
13469     to always fail with ENOSYS.  Some functions are actually named
13470     something starting with __ and the normal name is an alias.  */
13471 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13472 choke me
13473 #else
13474 $ac_func();
13475 #endif
13476
13477 ; return 0; }
13478 EOF
13479 if { (eval echo configure:13480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13480   rm -rf conftest*
13481   eval "ac_cv_func_$ac_func=yes"
13482 else
13483   echo "configure: failed program was:" >&5
13484   cat conftest.$ac_ext >&5
13485   rm -rf conftest*
13486   eval "ac_cv_func_$ac_func=no"
13487 fi
13488 rm -f conftest*
13489 fi
13490
13491 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13492   echo "$ac_t""yes" 1>&6
13493     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13494   cat >> confdefs.h <<EOF
13495 #define $ac_tr_func 1
13496 EOF
13497  
13498 else
13499   echo "$ac_t""no" 1>&6
13500 fi
13501 done
13502
13503
13504    if test "${ac_cv_func_stpcpy+set}" != "set"; then
13505      for ac_func in stpcpy
13506 do
13507 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13508 echo "configure:13509: checking for $ac_func" >&5
13509 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
13510   echo $ac_n "(cached) $ac_c" 1>&6
13511 else
13512   cat > conftest.$ac_ext <<EOF
13513 #line 13514 "configure"
13514 #include "confdefs.h"
13515 /* System header to define __stub macros and hopefully few prototypes,
13516     which can conflict with char $ac_func(); below.  */
13517 #include <assert.h>
13518 /* Override any gcc2 internal prototype to avoid an error.  */
13519 /* We use char because int might match the return type of a gcc2
13520     builtin and then its argument prototype would still apply.  */
13521 char $ac_func();
13522
13523 int main() {
13524
13525 /* The GNU C library defines this for functions which it implements
13526     to always fail with ENOSYS.  Some functions are actually named
13527     something starting with __ and the normal name is an alias.  */
13528 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13529 choke me
13530 #else
13531 $ac_func();
13532 #endif
13533
13534 ; return 0; }
13535 EOF
13536 if { (eval echo configure:13537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13537   rm -rf conftest*
13538   eval "ac_cv_func_$ac_func=yes"
13539 else
13540   echo "configure: failed program was:" >&5
13541   cat conftest.$ac_ext >&5
13542   rm -rf conftest*
13543   eval "ac_cv_func_$ac_func=no"
13544 fi
13545 rm -f conftest*
13546 fi
13547
13548 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13549   echo "$ac_t""yes" 1>&6
13550     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13551   cat >> confdefs.h <<EOF
13552 #define $ac_tr_func 1
13553 EOF
13554  
13555 else
13556   echo "$ac_t""no" 1>&6
13557 fi
13558 done
13559
13560    fi
13561    if test "${ac_cv_func_stpcpy}" = "yes"; then
13562      cat >> confdefs.h <<\EOF
13563 #define HAVE_STPCPY 1
13564 EOF
13565
13566    fi
13567
13568    if test $ac_cv_header_locale_h = yes; then
13569     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
13570 echo "configure:13571: checking for LC_MESSAGES" >&5
13571 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
13572   echo $ac_n "(cached) $ac_c" 1>&6
13573 else
13574   cat > conftest.$ac_ext <<EOF
13575 #line 13576 "configure"
13576 #include "confdefs.h"
13577 #include <locale.h>
13578 int main() {
13579 return LC_MESSAGES
13580 ; return 0; }
13581 EOF
13582 if { (eval echo configure:13583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13583   rm -rf conftest*
13584   am_cv_val_LC_MESSAGES=yes
13585 else
13586   echo "configure: failed program was:" >&5
13587   cat conftest.$ac_ext >&5
13588   rm -rf conftest*
13589   am_cv_val_LC_MESSAGES=no
13590 fi
13591 rm -f conftest*
13592 fi
13593
13594 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
13595     if test $am_cv_val_LC_MESSAGES = yes; then
13596       cat >> confdefs.h <<\EOF
13597 #define HAVE_LC_MESSAGES 1
13598 EOF
13599
13600     fi
13601   fi
13602    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
13603 echo "configure:13604: checking whether NLS is requested" >&5
13604         # Check whether --enable-nls or --disable-nls was given.
13605 if test "${enable_nls+set}" = set; then
13606   enableval="$enable_nls"
13607   USE_NLS=$enableval
13608 else
13609   USE_NLS=yes
13610 fi
13611
13612     echo "$ac_t""$USE_NLS" 1>&6
13613     
13614
13615     USE_INCLUDED_LIBINTL=no
13616
13617         if test "$USE_NLS" = "yes"; then
13618       cat >> confdefs.h <<\EOF
13619 #define ENABLE_NLS 1
13620 EOF
13621
13622 #      AC_MSG_CHECKING([whether included gettext is requested])
13623 #      AC_ARG_WITH(included-gettext,
13624 #        [  --with-included-gettext use the GNU gettext library included here],
13625 #        nls_cv_force_use_gnu_gettext=$withval,
13626 #        nls_cv_force_use_gnu_gettext=no)
13627 #      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
13628
13629                         nls_cv_force_use_gnu_gettext="yes"
13630
13631       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
13632       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
13633                                         nls_cv_header_intl=
13634         nls_cv_header_libgt=
13635         CATOBJEXT=NONE
13636
13637         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
13638 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
13639 echo "configure:13640: checking for libintl.h" >&5
13640 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
13641   echo $ac_n "(cached) $ac_c" 1>&6
13642 else
13643   cat > conftest.$ac_ext <<EOF
13644 #line 13645 "configure"
13645 #include "confdefs.h"
13646 #include <libintl.h>
13647 EOF
13648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13649 { (eval echo configure:13650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13650 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13651 if test -z "$ac_err"; then
13652   rm -rf conftest*
13653   eval "ac_cv_header_$ac_safe=yes"
13654 else
13655   echo "$ac_err" >&5
13656   echo "configure: failed program was:" >&5
13657   cat conftest.$ac_ext >&5
13658   rm -rf conftest*
13659   eval "ac_cv_header_$ac_safe=no"
13660 fi
13661 rm -f conftest*
13662 fi
13663 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13664   echo "$ac_t""yes" 1>&6
13665   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
13666 echo "configure:13667: checking for gettext in libc" >&5
13667 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
13668   echo $ac_n "(cached) $ac_c" 1>&6
13669 else
13670   cat > conftest.$ac_ext <<EOF
13671 #line 13672 "configure"
13672 #include "confdefs.h"
13673 #include <libintl.h>
13674 int main() {
13675 return (int) gettext ("")
13676 ; return 0; }
13677 EOF
13678 if { (eval echo configure:13679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13679   rm -rf conftest*
13680   gt_cv_func_gettext_libc=yes
13681 else
13682   echo "configure: failed program was:" >&5
13683   cat conftest.$ac_ext >&5
13684   rm -rf conftest*
13685   gt_cv_func_gettext_libc=no
13686 fi
13687 rm -f conftest*
13688 fi
13689
13690 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
13691
13692            if test "$gt_cv_func_gettext_libc" != "yes"; then
13693              echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
13694 echo "configure:13695: checking for bindtextdomain in -lintl" >&5
13695 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
13696 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13697   echo $ac_n "(cached) $ac_c" 1>&6
13698 else
13699   ac_save_LIBS="$LIBS"
13700 LIBS="-lintl  $LIBS"
13701 cat > conftest.$ac_ext <<EOF
13702 #line 13703 "configure"
13703 #include "confdefs.h"
13704 /* Override any gcc2 internal prototype to avoid an error.  */
13705 /* We use char because int might match the return type of a gcc2
13706     builtin and then its argument prototype would still apply.  */
13707 char bindtextdomain();
13708
13709 int main() {
13710 bindtextdomain()
13711 ; return 0; }
13712 EOF
13713 if { (eval echo configure:13714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13714   rm -rf conftest*
13715   eval "ac_cv_lib_$ac_lib_var=yes"
13716 else
13717   echo "configure: failed program was:" >&5
13718   cat conftest.$ac_ext >&5
13719   rm -rf conftest*
13720   eval "ac_cv_lib_$ac_lib_var=no"
13721 fi
13722 rm -f conftest*
13723 LIBS="$ac_save_LIBS"
13724
13725 fi
13726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13727   echo "$ac_t""yes" 1>&6
13728   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
13729 echo "configure:13730: checking for gettext in libintl" >&5
13730 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
13731   echo $ac_n "(cached) $ac_c" 1>&6
13732 else
13733   echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
13734 echo "configure:13735: checking for gettext in -lintl" >&5
13735 ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
13736 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13737   echo $ac_n "(cached) $ac_c" 1>&6
13738 else
13739   ac_save_LIBS="$LIBS"
13740 LIBS="-lintl  $LIBS"
13741 cat > conftest.$ac_ext <<EOF
13742 #line 13743 "configure"
13743 #include "confdefs.h"
13744 /* Override any gcc2 internal prototype to avoid an error.  */
13745 /* We use char because int might match the return type of a gcc2
13746     builtin and then its argument prototype would still apply.  */
13747 char gettext();
13748
13749 int main() {
13750 gettext()
13751 ; return 0; }
13752 EOF
13753 if { (eval echo configure:13754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13754   rm -rf conftest*
13755   eval "ac_cv_lib_$ac_lib_var=yes"
13756 else
13757   echo "configure: failed program was:" >&5
13758   cat conftest.$ac_ext >&5
13759   rm -rf conftest*
13760   eval "ac_cv_lib_$ac_lib_var=no"
13761 fi
13762 rm -f conftest*
13763 LIBS="$ac_save_LIBS"
13764
13765 fi
13766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13767   echo "$ac_t""yes" 1>&6
13768   gt_cv_func_gettext_libintl=yes
13769 else
13770   echo "$ac_t""no" 1>&6
13771 gt_cv_func_gettext_libintl=no
13772 fi
13773
13774 fi
13775
13776 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
13777 else
13778   echo "$ac_t""no" 1>&6
13779 fi
13780
13781            fi
13782
13783            if test "$gt_cv_func_gettext_libc" = "yes" \
13784               || test "$gt_cv_func_gettext_libintl" = "yes"; then
13785               cat >> confdefs.h <<\EOF
13786 #define HAVE_GETTEXT 1
13787 EOF
13788
13789               # Extract the first word of "msgfmt", so it can be a program name with args.
13790 set dummy msgfmt; ac_word=$2
13791 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13792 echo "configure:13793: checking for $ac_word" >&5
13793 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
13794   echo $ac_n "(cached) $ac_c" 1>&6
13795 else
13796   case "$MSGFMT" in
13797   /*)
13798   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
13799   ;;
13800   *)
13801   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
13802   for ac_dir in $PATH; do
13803     test -z "$ac_dir" && ac_dir=.
13804     if test -f $ac_dir/$ac_word; then
13805       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
13806         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
13807         break
13808       fi
13809     fi
13810   done
13811   IFS="$ac_save_ifs"
13812   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
13813   ;;
13814 esac
13815 fi
13816 MSGFMT="$ac_cv_path_MSGFMT"
13817 if test -n "$MSGFMT"; then
13818   echo "$ac_t""$MSGFMT" 1>&6
13819 else
13820   echo "$ac_t""no" 1>&6
13821 fi
13822               if test "$MSGFMT" != "no"; then
13823                 for ac_func in dcgettext
13824 do
13825 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13826 echo "configure:13827: checking for $ac_func" >&5
13827 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
13828   echo $ac_n "(cached) $ac_c" 1>&6
13829 else
13830   cat > conftest.$ac_ext <<EOF
13831 #line 13832 "configure"
13832 #include "confdefs.h"
13833 /* System header to define __stub macros and hopefully few prototypes,
13834     which can conflict with char $ac_func(); below.  */
13835 #include <assert.h>
13836 /* Override any gcc2 internal prototype to avoid an error.  */
13837 /* We use char because int might match the return type of a gcc2
13838     builtin and then its argument prototype would still apply.  */
13839 char $ac_func();
13840
13841 int main() {
13842
13843 /* The GNU C library defines this for functions which it implements
13844     to always fail with ENOSYS.  Some functions are actually named
13845     something starting with __ and the normal name is an alias.  */
13846 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13847 choke me
13848 #else
13849 $ac_func();
13850 #endif
13851
13852 ; return 0; }
13853 EOF
13854 if { (eval echo configure:13855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13855   rm -rf conftest*
13856   eval "ac_cv_func_$ac_func=yes"
13857 else
13858   echo "configure: failed program was:" >&5
13859   cat conftest.$ac_ext >&5
13860   rm -rf conftest*
13861   eval "ac_cv_func_$ac_func=no"
13862 fi
13863 rm -f conftest*
13864 fi
13865
13866 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13867   echo "$ac_t""yes" 1>&6
13868     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13869   cat >> confdefs.h <<EOF
13870 #define $ac_tr_func 1
13871 EOF
13872  
13873 else
13874   echo "$ac_t""no" 1>&6
13875 fi
13876 done
13877
13878                 # Extract the first word of "gmsgfmt", so it can be a program name with args.
13879 set dummy gmsgfmt; ac_word=$2
13880 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13881 echo "configure:13882: checking for $ac_word" >&5
13882 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
13883   echo $ac_n "(cached) $ac_c" 1>&6
13884 else
13885   case "$GMSGFMT" in
13886   /*)
13887   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
13888   ;;
13889   ?:/*)                  
13890   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
13891   ;;
13892   *)
13893   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13894   ac_dummy="$PATH"
13895   for ac_dir in $ac_dummy; do 
13896     test -z "$ac_dir" && ac_dir=.
13897     if test -f $ac_dir/$ac_word; then
13898       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
13899       break
13900     fi
13901   done
13902   IFS="$ac_save_ifs"
13903   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
13904   ;;
13905 esac
13906 fi
13907 GMSGFMT="$ac_cv_path_GMSGFMT"
13908 if test -n "$GMSGFMT"; then
13909   echo "$ac_t""$GMSGFMT" 1>&6
13910 else
13911   echo "$ac_t""no" 1>&6
13912 fi
13913
13914                 # Extract the first word of "xgettext", so it can be a program name with args.
13915 set dummy xgettext; ac_word=$2
13916 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13917 echo "configure:13918: checking for $ac_word" >&5
13918 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
13919   echo $ac_n "(cached) $ac_c" 1>&6
13920 else
13921   case "$XGETTEXT" in
13922   /*)
13923   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
13924   ;;
13925   *)
13926   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
13927   for ac_dir in $PATH; do
13928     test -z "$ac_dir" && ac_dir=.
13929     if test -f $ac_dir/$ac_word; then
13930       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
13931         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
13932         break
13933       fi
13934     fi
13935   done
13936   IFS="$ac_save_ifs"
13937   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
13938   ;;
13939 esac
13940 fi
13941 XGETTEXT="$ac_cv_path_XGETTEXT"
13942 if test -n "$XGETTEXT"; then
13943   echo "$ac_t""$XGETTEXT" 1>&6
13944 else
13945   echo "$ac_t""no" 1>&6
13946 fi
13947
13948                 cat > conftest.$ac_ext <<EOF
13949 #line 13950 "configure"
13950 #include "confdefs.h"
13951
13952 int main() {
13953 extern int _nl_msg_cat_cntr;
13954                                return _nl_msg_cat_cntr
13955 ; return 0; }
13956 EOF
13957 if { (eval echo configure:13958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13958   rm -rf conftest*
13959   CATOBJEXT=.gmo
13960                    DATADIRNAME=share
13961 else
13962   echo "configure: failed program was:" >&5
13963   cat conftest.$ac_ext >&5
13964   rm -rf conftest*
13965   CATOBJEXT=.mo
13966                    DATADIRNAME=lib
13967 fi
13968 rm -f conftest*
13969                 INSTOBJEXT=.mo
13970               fi
13971             fi
13972         
13973 else
13974   echo "$ac_t""no" 1>&6
13975 fi
13976
13977
13978         if test "$CATOBJEXT" = "NONE"; then
13979 #         AC_MSG_CHECKING([whether catgets can be used])
13980 #         AC_ARG_WITH(catgets,
13981 #           [  --with-catgets          use catgets functions if available],
13982 #           nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
13983 #         AC_MSG_RESULT($nls_cv_use_catgets)
13984
13985                         nls_cv_use_catgets="no"
13986
13987           if test "$nls_cv_use_catgets" = "yes"; then
13988                         echo $ac_n "checking for main in -li""... $ac_c" 1>&6
13989 echo "configure:13990: checking for main in -li" >&5
13990 ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
13991 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13992   echo $ac_n "(cached) $ac_c" 1>&6
13993 else
13994   ac_save_LIBS="$LIBS"
13995 LIBS="-li  $LIBS"
13996 cat > conftest.$ac_ext <<EOF
13997 #line 13998 "configure"
13998 #include "confdefs.h"
13999
14000 int main() {
14001 main()
14002 ; return 0; }
14003 EOF
14004 if { (eval echo configure:14005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14005   rm -rf conftest*
14006   eval "ac_cv_lib_$ac_lib_var=yes"
14007 else
14008   echo "configure: failed program was:" >&5
14009   cat conftest.$ac_ext >&5
14010   rm -rf conftest*
14011   eval "ac_cv_lib_$ac_lib_var=no"
14012 fi
14013 rm -f conftest*
14014 LIBS="$ac_save_LIBS"
14015
14016 fi
14017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14018   echo "$ac_t""yes" 1>&6
14019     ac_tr_lib=HAVE_LIB`echo i | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14020     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14021   cat >> confdefs.h <<EOF
14022 #define $ac_tr_lib 1
14023 EOF
14024
14025   LIBS="-li $LIBS"
14026
14027 else
14028   echo "$ac_t""no" 1>&6
14029 fi
14030
14031             echo $ac_n "checking for catgets""... $ac_c" 1>&6
14032 echo "configure:14033: checking for catgets" >&5
14033 if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
14034   echo $ac_n "(cached) $ac_c" 1>&6
14035 else
14036   cat > conftest.$ac_ext <<EOF
14037 #line 14038 "configure"
14038 #include "confdefs.h"
14039 /* System header to define __stub macros and hopefully few prototypes,
14040     which can conflict with char catgets(); below.  */
14041 #include <assert.h>
14042 /* Override any gcc2 internal prototype to avoid an error.  */
14043 /* We use char because int might match the return type of a gcc2
14044     builtin and then its argument prototype would still apply.  */
14045 char catgets();
14046
14047 int main() {
14048
14049 /* The GNU C library defines this for functions which it implements
14050     to always fail with ENOSYS.  Some functions are actually named
14051     something starting with __ and the normal name is an alias.  */
14052 #if defined (__stub_catgets) || defined (__stub___catgets)
14053 choke me
14054 #else
14055 catgets();
14056 #endif
14057
14058 ; return 0; }
14059 EOF
14060 if { (eval echo configure:14061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14061   rm -rf conftest*
14062   eval "ac_cv_func_catgets=yes"
14063 else
14064   echo "configure: failed program was:" >&5
14065   cat conftest.$ac_ext >&5
14066   rm -rf conftest*
14067   eval "ac_cv_func_catgets=no"
14068 fi
14069 rm -f conftest*
14070 fi
14071
14072 if eval "test \"`echo '$ac_cv_func_'catgets`\" = yes"; then
14073   echo "$ac_t""yes" 1>&6
14074   cat >> confdefs.h <<\EOF
14075 #define HAVE_CATGETS 1
14076 EOF
14077
14078                INTLOBJS="\$(CATOBJS)"
14079                # Extract the first word of "gencat", so it can be a program name with args.
14080 set dummy gencat; ac_word=$2
14081 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14082 echo "configure:14083: checking for $ac_word" >&5
14083 if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
14084   echo $ac_n "(cached) $ac_c" 1>&6
14085 else
14086   case "$GENCAT" in
14087   /*)
14088   ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
14089   ;;
14090   ?:/*)                  
14091   ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a dos path.
14092   ;;
14093   *)
14094   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
14095   ac_dummy="$PATH"
14096   for ac_dir in $ac_dummy; do 
14097     test -z "$ac_dir" && ac_dir=.
14098     if test -f $ac_dir/$ac_word; then
14099       ac_cv_path_GENCAT="$ac_dir/$ac_word"
14100       break
14101     fi
14102   done
14103   IFS="$ac_save_ifs"
14104   test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT="no"
14105   ;;
14106 esac
14107 fi
14108 GENCAT="$ac_cv_path_GENCAT"
14109 if test -n "$GENCAT"; then
14110   echo "$ac_t""$GENCAT" 1>&6
14111 else
14112   echo "$ac_t""no" 1>&6
14113 fi
14114                if test "$GENCAT" != "no"; then
14115                  # Extract the first word of "gmsgfmt", so it can be a program name with args.
14116 set dummy gmsgfmt; ac_word=$2
14117 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14118 echo "configure:14119: checking for $ac_word" >&5
14119 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
14120   echo $ac_n "(cached) $ac_c" 1>&6
14121 else
14122   case "$GMSGFMT" in
14123   /*)
14124   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
14125   ;;
14126   ?:/*)                  
14127   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
14128   ;;
14129   *)
14130   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
14131   ac_dummy="$PATH"
14132   for ac_dir in $ac_dummy; do 
14133     test -z "$ac_dir" && ac_dir=.
14134     if test -f $ac_dir/$ac_word; then
14135       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
14136       break
14137     fi
14138   done
14139   IFS="$ac_save_ifs"
14140   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
14141   ;;
14142 esac
14143 fi
14144 GMSGFMT="$ac_cv_path_GMSGFMT"
14145 if test -n "$GMSGFMT"; then
14146   echo "$ac_t""$GMSGFMT" 1>&6
14147 else
14148   echo "$ac_t""no" 1>&6
14149 fi
14150
14151                  if test "$GMSGFMT" = "no"; then
14152                    # Extract the first word of "msgfmt", so it can be a program name with args.
14153 set dummy msgfmt; ac_word=$2
14154 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14155 echo "configure:14156: checking for $ac_word" >&5
14156 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
14157   echo $ac_n "(cached) $ac_c" 1>&6
14158 else
14159   case "$GMSGFMT" in
14160   /*)
14161   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
14162   ;;
14163   *)
14164   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14165   for ac_dir in $PATH; do
14166     test -z "$ac_dir" && ac_dir=.
14167     if test -f $ac_dir/$ac_word; then
14168       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
14169         ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
14170         break
14171       fi
14172     fi
14173   done
14174   IFS="$ac_save_ifs"
14175   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="no"
14176   ;;
14177 esac
14178 fi
14179 GMSGFMT="$ac_cv_path_GMSGFMT"
14180 if test -n "$GMSGFMT"; then
14181   echo "$ac_t""$GMSGFMT" 1>&6
14182 else
14183   echo "$ac_t""no" 1>&6
14184 fi
14185
14186                  fi
14187                  # Extract the first word of "xgettext", so it can be a program name with args.
14188 set dummy xgettext; ac_word=$2
14189 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14190 echo "configure:14191: checking for $ac_word" >&5
14191 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
14192   echo $ac_n "(cached) $ac_c" 1>&6
14193 else
14194   case "$XGETTEXT" in
14195   /*)
14196   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
14197   ;;
14198   *)
14199   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14200   for ac_dir in $PATH; do
14201     test -z "$ac_dir" && ac_dir=.
14202     if test -f $ac_dir/$ac_word; then
14203       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
14204         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
14205         break
14206       fi
14207     fi
14208   done
14209   IFS="$ac_save_ifs"
14210   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
14211   ;;
14212 esac
14213 fi
14214 XGETTEXT="$ac_cv_path_XGETTEXT"
14215 if test -n "$XGETTEXT"; then
14216   echo "$ac_t""$XGETTEXT" 1>&6
14217 else
14218   echo "$ac_t""no" 1>&6
14219 fi
14220
14221                  USE_INCLUDED_LIBINTL=yes
14222                  CATOBJEXT=.cat
14223                  INSTOBJEXT=.cat
14224                  DATADIRNAME=lib
14225                  INTLDEPS='$(top_builddir)/intl/libintl.a'
14226                  INTLLIBS=$INTLDEPS
14227                  LIBS=`echo $LIBS | sed -e 's/-lintl//'`
14228                  nls_cv_header_intl=intl/libintl.h
14229                  nls_cv_header_libgt=intl/libgettext.h
14230                fi
14231 else
14232   echo "$ac_t""no" 1>&6
14233 fi
14234
14235           fi
14236         fi
14237
14238         if test "$CATOBJEXT" = "NONE"; then
14239                               nls_cv_use_gnu_gettext=yes
14240         fi
14241       fi
14242
14243       if test "$nls_cv_use_gnu_gettext" = "yes"; then
14244                 INTLOBJS="\$(GETTOBJS)"
14245         # Extract the first word of "msgfmt", so it can be a program name with args.
14246 set dummy msgfmt; ac_word=$2
14247 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14248 echo "configure:14249: checking for $ac_word" >&5
14249 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
14250   echo $ac_n "(cached) $ac_c" 1>&6
14251 else
14252   case "$MSGFMT" in
14253   /*)
14254   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
14255   ;;
14256   *)
14257   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14258   for ac_dir in $PATH; do
14259     test -z "$ac_dir" && ac_dir=.
14260     if test -f $ac_dir/$ac_word; then
14261       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
14262         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
14263         break
14264       fi
14265     fi
14266   done
14267   IFS="$ac_save_ifs"
14268   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
14269   ;;
14270 esac
14271 fi
14272 MSGFMT="$ac_cv_path_MSGFMT"
14273 if test -n "$MSGFMT"; then
14274   echo "$ac_t""$MSGFMT" 1>&6
14275 else
14276   echo "$ac_t""no" 1>&6
14277 fi
14278
14279         # Extract the first word of "gmsgfmt", so it can be a program name with args.
14280 set dummy gmsgfmt; ac_word=$2
14281 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14282 echo "configure:14283: checking for $ac_word" >&5
14283 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
14284   echo $ac_n "(cached) $ac_c" 1>&6
14285 else
14286   case "$GMSGFMT" in
14287   /*)
14288   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
14289   ;;
14290   ?:/*)                  
14291   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
14292   ;;
14293   *)
14294   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
14295   ac_dummy="$PATH"
14296   for ac_dir in $ac_dummy; do 
14297     test -z "$ac_dir" && ac_dir=.
14298     if test -f $ac_dir/$ac_word; then
14299       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
14300       break
14301     fi
14302   done
14303   IFS="$ac_save_ifs"
14304   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
14305   ;;
14306 esac
14307 fi
14308 GMSGFMT="$ac_cv_path_GMSGFMT"
14309 if test -n "$GMSGFMT"; then
14310   echo "$ac_t""$GMSGFMT" 1>&6
14311 else
14312   echo "$ac_t""no" 1>&6
14313 fi
14314
14315         # Extract the first word of "xgettext", so it can be a program name with args.
14316 set dummy xgettext; ac_word=$2
14317 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
14318 echo "configure:14319: checking for $ac_word" >&5
14319 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
14320   echo $ac_n "(cached) $ac_c" 1>&6
14321 else
14322   case "$XGETTEXT" in
14323   /*)
14324   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
14325   ;;
14326   *)
14327   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14328   for ac_dir in $PATH; do
14329     test -z "$ac_dir" && ac_dir=.
14330     if test -f $ac_dir/$ac_word; then
14331       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
14332         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
14333         break
14334       fi
14335     fi
14336   done
14337   IFS="$ac_save_ifs"
14338   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
14339   ;;
14340 esac
14341 fi
14342 XGETTEXT="$ac_cv_path_XGETTEXT"
14343 if test -n "$XGETTEXT"; then
14344   echo "$ac_t""$XGETTEXT" 1>&6
14345 else
14346   echo "$ac_t""no" 1>&6
14347 fi
14348
14349         
14350         USE_INCLUDED_LIBINTL=yes
14351         CATOBJEXT=.gmo
14352         INSTOBJEXT=.mo
14353         DATADIRNAME=share
14354         INTLDEPS='$(top_builddir)/intl/libintl.a'
14355         INTLLIBS=$INTLDEPS
14356         LIBS=`echo $LIBS | sed -e 's/-lintl//'`
14357         nls_cv_header_intl=intl/libintl.h
14358         nls_cv_header_libgt=intl/libgettext.h
14359       fi
14360
14361             if test "$XGETTEXT" != ":"; then
14362                         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
14363           : ;
14364         else
14365           echo "$ac_t""found xgettext program is not GNU xgettext; ignore it" 1>&6
14366           XGETTEXT=":"
14367         fi
14368       fi
14369
14370       # We need to process the po/ directory.
14371       POSUB=po
14372     else
14373       DATADIRNAME=share
14374       nls_cv_header_intl=intl/libintl.h
14375       nls_cv_header_libgt=intl/libgettext.h
14376     fi
14377
14378             rm -f intl/libintl.h
14379
14380     
14381     
14382
14383
14384     # If this is used in GNU gettext we have to set USE_NLS to `yes'
14385     # because some of the sources are only built for this goal.
14386     if test "$PACKAGE" = gettext; then
14387       USE_NLS=yes
14388       USE_INCLUDED_LIBINTL=yes
14389     fi
14390
14391                 for lang in $ALL_LINGUAS; do
14392       GMOFILES="$GMOFILES $lang.gmo"
14393       POFILES="$POFILES $lang.po"
14394     done
14395
14396         
14397     
14398     
14399     
14400     
14401     
14402     
14403     
14404     
14405     
14406     
14407   
14408
14409
14410    if test "x$CATOBJEXT" != "x"; then
14411      if test "x$ALL_LINGUAS" = "x"; then
14412        LINGUAS=
14413      else
14414        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
14415 echo "configure:14416: checking for catalogs to be installed" >&5
14416        NEW_LINGUAS=
14417        for lang in ${LINGUAS=$ALL_LINGUAS}; do
14418          case "$ALL_LINGUAS" in
14419           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
14420          esac
14421        done
14422        LINGUAS=$NEW_LINGUAS
14423        echo "$ac_t""$LINGUAS" 1>&6
14424      fi
14425
14426           if test -n "$LINGUAS"; then
14427        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
14428      fi
14429    fi
14430
14431             if test $ac_cv_header_locale_h = yes; then
14432      INCLUDE_LOCALE_H="#include <locale.h>"
14433    else
14434      INCLUDE_LOCALE_H="\
14435 /* The system does not provide the header <locale.h>.  Take care yourself.  */"
14436    fi
14437    
14438             test -d intl || mkdir intl
14439    if test "$CATOBJEXT" = ".cat"; then
14440      ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
14441 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
14442 echo "configure:14443: checking for linux/version.h" >&5
14443 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
14444   echo $ac_n "(cached) $ac_c" 1>&6
14445 else
14446   cat > conftest.$ac_ext <<EOF
14447 #line 14448 "configure"
14448 #include "confdefs.h"
14449 #include <linux/version.h>
14450 EOF
14451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14452 { (eval echo configure:14453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14454 if test -z "$ac_err"; then
14455   rm -rf conftest*
14456   eval "ac_cv_header_$ac_safe=yes"
14457 else
14458   echo "$ac_err" >&5
14459   echo "configure: failed program was:" >&5
14460   cat conftest.$ac_ext >&5
14461   rm -rf conftest*
14462   eval "ac_cv_header_$ac_safe=no"
14463 fi
14464 rm -f conftest*
14465 fi
14466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14467   echo "$ac_t""yes" 1>&6
14468   msgformat=linux
14469 else
14470   echo "$ac_t""no" 1>&6
14471 msgformat=xopen
14472 fi
14473
14474
14475                sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
14476
14477                               if test "$msgformat" = "linux"; then
14478        rm -f $srcdir/po/*.msg
14479      fi
14480    fi
14481       sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
14482      $srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
14483
14484             if test "$PACKAGE" = "gettext"; then
14485      GT_NO="#NO#"
14486      GT_YES=
14487    else
14488      GT_NO=
14489      GT_YES="#YES#"
14490    fi
14491    
14492    
14493
14494             MKINSTALLDIRS=
14495    if test -n "$ac_aux_dir"; then
14496      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
14497    fi
14498    if test -z "$MKINSTALLDIRS"; then
14499      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
14500    fi
14501    
14502
14503       l=
14504    
14505
14506          test -d po || mkdir po
14507    if test "x$srcdir" != "x."; then
14508      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
14509        posrcprefix="$srcdir/"
14510      else
14511        posrcprefix="../$srcdir/"
14512      fi
14513    else
14514      posrcprefix="../"
14515    fi
14516    rm -f po/POTFILES
14517    sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
14518         < $srcdir/po/POTFILES.in > po/POTFILES
14519   
14520
14521 #################################################
14522 # final configure stuff
14523
14524 echo "checking configure summary"
14525 if test "$cross_compiling" = yes; then
14526   :
14527 else
14528   cat > conftest.$ac_ext <<EOF
14529 #line 14530 "configure"
14530 #include "confdefs.h"
14531 #include "${srcdir-.}/tests/summary.c"
14532 EOF
14533 if { (eval echo configure:14534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14534 then
14535   echo "configure OK";
14536 else
14537   echo "configure: failed program was:" >&5
14538   cat conftest.$ac_ext >&5
14539   rm -fr conftest*
14540   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
14541 fi
14542 rm -fr conftest*
14543 fi
14544
14545
14546 builddir=`pwd`
14547
14548
14549 trap '' 1 2 15
14550 cat > confcache <<\EOF
14551 # This file is a shell script that caches the results of configure
14552 # tests run on this system so they can be shared between configure
14553 # scripts and configure runs.  It is not useful on other systems.
14554 # If it contains results you don't want to keep, you may remove or edit it.
14555 #
14556 # By default, configure uses ./config.cache as the cache file,
14557 # creating it if it does not exist already.  You can give configure
14558 # the --cache-file=FILE option to use a different cache file; that is
14559 # what configure does when it calls configure scripts in
14560 # subdirectories, so they share the cache.
14561 # Giving --cache-file=/dev/null disables caching, for debugging configure.
14562 # config.status only pays attention to the cache file if you give it the
14563 # --recheck option to rerun configure.
14564 #
14565 EOF
14566 # The following way of writing the cache mishandles newlines in values,
14567 # but we know of no workaround that is simple, portable, and efficient.
14568 # So, don't put newlines in cache variables' values.
14569 # Ultrix sh set writes to stderr and can't be redirected directly,
14570 # and sets the high bit in the cache file unless we assign to the vars.
14571 (set) 2>&1 |
14572   case `(ac_space=' '; set | grep ac_space) 2>&1` in
14573   *ac_space=\ *)
14574     # `set' does not quote correctly, so add quotes (double-quote substitution
14575     # turns \\\\ into \\, and sed turns \\ into \).
14576     sed -n \
14577       -e "s/'/'\\\\''/g" \
14578       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
14579     ;;
14580   *)
14581     # `set' quotes correctly as required by POSIX, so do not add quotes.
14582     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
14583     ;;
14584   esac >> confcache
14585 if cmp -s $cache_file confcache; then
14586   :
14587 else
14588   if test -w $cache_file; then
14589     echo "updating cache $cache_file"
14590     cat confcache > $cache_file
14591   else
14592     echo "not updating unwritable cache $cache_file"
14593   fi
14594 fi
14595 rm -f confcache
14596
14597 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14598
14599 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14600 # Let make expand exec_prefix.
14601 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14602
14603 # Any assignment to VPATH causes Sun make to only execute
14604 # the first set of double-colon rules, so remove it if not needed.
14605 # If there is a colon in the path, we need to keep it.
14606 if test "x$srcdir" = x.; then
14607   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14608 fi
14609
14610 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14611
14612 DEFS=-DHAVE_CONFIG_H
14613
14614 # Without the "./", some shells look in PATH for config.status.
14615 : ${CONFIG_STATUS=./config.status}
14616
14617 echo creating $CONFIG_STATUS
14618 rm -f $CONFIG_STATUS
14619 cat > $CONFIG_STATUS <<EOF
14620 #! /bin/sh
14621 # Generated automatically by configure.
14622 # Run this file to recreate the current configuration.
14623 # This directory was configured as follows,
14624 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14625 #
14626 # $0 $ac_configure_args
14627 #
14628 # Compiler output produced by configure, useful for debugging
14629 # configure, is in ./config.log if it exists.
14630
14631 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14632 for ac_option
14633 do
14634   case "\$ac_option" in
14635   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14636     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14637     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14638   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14639     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14640     exit 0 ;;
14641   -help | --help | --hel | --he | --h)
14642     echo "\$ac_cs_usage"; exit 0 ;;
14643   *) echo "\$ac_cs_usage"; exit 1 ;;
14644   esac
14645 done
14646
14647 ac_given_srcdir=$srcdir
14648 ac_given_INSTALL="$INSTALL"
14649
14650 trap 'rm -fr `echo "include/stamp-h Makefile intl/Makefile po/Makefile.in include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14651 EOF
14652 cat >> $CONFIG_STATUS <<EOF
14653
14654 # Protect against being on the right side of a sed subst in config.status.
14655 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14656  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14657 $ac_vpsub
14658 $extrasub
14659 s%@SHELL@%$SHELL%g
14660 s%@CFLAGS@%$CFLAGS%g
14661 s%@CPPFLAGS@%$CPPFLAGS%g
14662 s%@CXXFLAGS@%$CXXFLAGS%g
14663 s%@FFLAGS@%$FFLAGS%g
14664 s%@DEFS@%$DEFS%g
14665 s%@LDFLAGS@%$LDFLAGS%g
14666 s%@LIBS@%$LIBS%g
14667 s%@exec_prefix@%$exec_prefix%g
14668 s%@prefix@%$prefix%g
14669 s%@program_transform_name@%$program_transform_name%g
14670 s%@bindir@%$bindir%g
14671 s%@sbindir@%$sbindir%g
14672 s%@libexecdir@%$libexecdir%g
14673 s%@datadir@%$datadir%g
14674 s%@sysconfdir@%$sysconfdir%g
14675 s%@sharedstatedir@%$sharedstatedir%g
14676 s%@localstatedir@%$localstatedir%g
14677 s%@libdir@%$libdir%g
14678 s%@includedir@%$includedir%g
14679 s%@oldincludedir@%$oldincludedir%g
14680 s%@infodir@%$infodir%g
14681 s%@mandir@%$mandir%g
14682 s%@RUNPROG@%$RUNPROG%g
14683 s%@MPROGS@%$MPROGS%g
14684 s%@LDSHFLAGS@%$LDSHFLAGS%g
14685 s%@SHLD@%$SHLD%g
14686 s%@HOST_OS@%$HOST_OS%g
14687 s%@PAM_MOD@%$PAM_MOD%g
14688 s%@WRAP@%$WRAP%g
14689 s%@WRAP32@%$WRAP32%g
14690 s%@PICFLAG@%$PICFLAG%g
14691 s%@PICSUFFIX@%$PICSUFFIX%g
14692 s%@POBAD_CC@%$POBAD_CC%g
14693 s%@SHLIBEXT@%$SHLIBEXT%g
14694 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
14695 s%@CC@%$CC%g
14696 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14697 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14698 s%@INSTALL_DATA@%$INSTALL_DATA%g
14699 s%@AWK@%$AWK%g
14700 s%@BROKEN_CC@%$BROKEN_CC%g
14701 s%@host@%$host%g
14702 s%@host_alias@%$host_alias%g
14703 s%@host_cpu@%$host_cpu%g
14704 s%@host_vendor@%$host_vendor%g
14705 s%@host_os@%$host_os%g
14706 s%@target@%$target%g
14707 s%@target_alias@%$target_alias%g
14708 s%@target_cpu@%$target_cpu%g
14709 s%@target_vendor@%$target_vendor%g
14710 s%@target_os@%$target_os%g
14711 s%@build@%$build%g
14712 s%@build_alias@%$build_alias%g
14713 s%@build_cpu@%$build_cpu%g
14714 s%@build_vendor@%$build_vendor%g
14715 s%@build_os@%$build_os%g
14716 s%@CPP@%$CPP%g
14717 s%@LIBOBJS@%$LIBOBJS%g
14718 s%@TERMLIBS@%$TERMLIBS%g
14719 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
14720 s%@ROFF@%$ROFF%g
14721 s%@QUOTAOBJS@%$QUOTAOBJS%g
14722 s%@privatedir@%$privatedir%g
14723 s%@lockdir@%$lockdir%g
14724 s%@swatdir@%$swatdir%g
14725 s%@i18n_swat@%$i18n_swat%g
14726 s%@manlangs@%$manlangs%g
14727 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
14728 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
14729 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
14730 s%@WINBIND_PAM_PROGS@%$WINBIND_PAM_PROGS%g
14731 s%@PACKAGE@%$PACKAGE%g
14732 s%@SET_MAKE@%$SET_MAKE%g
14733 s%@RANLIB@%$RANLIB%g
14734 s%@ALLOCA@%$ALLOCA%g
14735 s%@USE_NLS@%$USE_NLS%g
14736 s%@MSGFMT@%$MSGFMT%g
14737 s%@GMSGFMT@%$GMSGFMT%g
14738 s%@XGETTEXT@%$XGETTEXT%g
14739 s%@GENCAT@%$GENCAT%g
14740 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
14741 s%@CATALOGS@%$CATALOGS%g
14742 s%@CATOBJEXT@%$CATOBJEXT%g
14743 s%@DATADIRNAME@%$DATADIRNAME%g
14744 s%@GMOFILES@%$GMOFILES%g
14745 s%@INSTOBJEXT@%$INSTOBJEXT%g
14746 s%@INTLDEPS@%$INTLDEPS%g
14747 s%@INTLLIBS@%$INTLLIBS%g
14748 s%@INTLOBJS@%$INTLOBJS%g
14749 s%@POFILES@%$POFILES%g
14750 s%@POSUB@%$POSUB%g
14751 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
14752 s%@GT_NO@%$GT_NO%g
14753 s%@GT_YES@%$GT_YES%g
14754 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
14755 s%@l@%$l%g
14756 s%@builddir@%$builddir%g
14757
14758 CEOF
14759 EOF
14760
14761 cat >> $CONFIG_STATUS <<\EOF
14762
14763 # Split the substitutions into bite-sized pieces for seds with
14764 # small command number limits, like on Digital OSF/1 and HP-UX.
14765 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14766 ac_file=1 # Number of current file.
14767 ac_beg=1 # First line for current file.
14768 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14769 ac_more_lines=:
14770 ac_sed_cmds=""
14771 while $ac_more_lines; do
14772   if test $ac_beg -gt 1; then
14773     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14774   else
14775     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14776   fi
14777   if test ! -s conftest.s$ac_file; then
14778     ac_more_lines=false
14779     rm -f conftest.s$ac_file
14780   else
14781     if test -z "$ac_sed_cmds"; then
14782       ac_sed_cmds="sed -f conftest.s$ac_file"
14783     else
14784       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14785     fi
14786     ac_file=`expr $ac_file + 1`
14787     ac_beg=$ac_end
14788     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14789   fi
14790 done
14791 if test -z "$ac_sed_cmds"; then
14792   ac_sed_cmds=cat
14793 fi
14794 EOF
14795
14796 cat >> $CONFIG_STATUS <<EOF
14797
14798 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile intl/Makefile po/Makefile.in"}
14799 EOF
14800 cat >> $CONFIG_STATUS <<\EOF
14801 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14802   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14803   case "$ac_file" in
14804   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14805        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14806   *) ac_file_in="${ac_file}.in" ;;
14807   esac
14808
14809   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14810
14811   # Remove last slash and all that follows it.  Not all systems have dirname.
14812   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14813   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14814     # The file is in a subdirectory.
14815     test ! -d "$ac_dir" && mkdir "$ac_dir"
14816     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14817     # A "../" for each directory in $ac_dir_suffix.
14818     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14819   else
14820     ac_dir_suffix= ac_dots=
14821   fi
14822
14823   case "$ac_given_srcdir" in
14824   .)  srcdir=.
14825       if test -z "$ac_dots"; then top_srcdir=.
14826       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14827   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14828   *) # Relative path.
14829     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14830     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14831   esac
14832
14833   case "$ac_given_INSTALL" in
14834   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14835   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14836   esac
14837
14838   echo creating "$ac_file"
14839   rm -f "$ac_file"
14840   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14841   case "$ac_file" in
14842   *Makefile*) ac_comsub="1i\\
14843 # $configure_input" ;;
14844   *) ac_comsub= ;;
14845   esac
14846
14847   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14848   sed -e "$ac_comsub
14849 s%@configure_input@%$configure_input%g
14850 s%@srcdir@%$srcdir%g
14851 s%@top_srcdir@%$top_srcdir%g
14852 s%@INSTALL@%$INSTALL%g
14853 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14854 fi; done
14855 rm -f conftest.s*
14856
14857 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14858 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14859 #
14860 # ac_d sets the value in "#define NAME VALUE" lines.
14861 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14862 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14863 ac_dC='\3'
14864 ac_dD='%g'
14865 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14866 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14867 ac_uB='\([      ]\)%\1#\2define\3'
14868 ac_uC=' '
14869 ac_uD='\4%g'
14870 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14871 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14872 ac_eB='$%\1#\2define\3'
14873 ac_eC=' '
14874 ac_eD='%g'
14875
14876 if test "${CONFIG_HEADERS+set}" != set; then
14877 EOF
14878 cat >> $CONFIG_STATUS <<EOF
14879   CONFIG_HEADERS="include/config.h"
14880 EOF
14881 cat >> $CONFIG_STATUS <<\EOF
14882 fi
14883 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14884   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14885   case "$ac_file" in
14886   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14887        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14888   *) ac_file_in="${ac_file}.in" ;;
14889   esac
14890
14891   echo creating $ac_file
14892
14893   rm -f conftest.frag conftest.in conftest.out
14894   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14895   cat $ac_file_inputs > conftest.in
14896
14897 EOF
14898
14899 # Transform confdefs.h into a sed script conftest.vals that substitutes
14900 # the proper values into config.h.in to produce config.h.  And first:
14901 # Protect against being on the right side of a sed subst in config.status.
14902 # Protect against being in an unquoted here document in config.status.
14903 rm -f conftest.vals
14904 cat > conftest.hdr <<\EOF
14905 s/[\\&%]/\\&/g
14906 s%[\\$`]%\\&%g
14907 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14908 s%ac_d%ac_u%gp
14909 s%ac_u%ac_e%gp
14910 EOF
14911 sed -n -f conftest.hdr confdefs.h > conftest.vals
14912 rm -f conftest.hdr
14913
14914 # This sed command replaces #undef with comments.  This is necessary, for
14915 # example, in the case of _POSIX_SOURCE, which is predefined and required
14916 # on some systems where configure will not decide to define it.
14917 cat >> conftest.vals <<\EOF
14918 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14919 EOF
14920
14921 # Break up conftest.vals because some shells have a limit on
14922 # the size of here documents, and old seds have small limits too.
14923
14924 rm -f conftest.tail
14925 while :
14926 do
14927   ac_lines=`grep -c . conftest.vals`
14928   # grep -c gives empty output for an empty file on some AIX systems.
14929   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14930   # Write a limited-size here document to conftest.frag.
14931   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14932   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14933   echo 'CEOF
14934   sed -f conftest.frag conftest.in > conftest.out
14935   rm -f conftest.in
14936   mv conftest.out conftest.in
14937 ' >> $CONFIG_STATUS
14938   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14939   rm -f conftest.vals
14940   mv conftest.tail conftest.vals
14941 done
14942 rm -f conftest.vals
14943
14944 cat >> $CONFIG_STATUS <<\EOF
14945   rm -f conftest.frag conftest.h
14946   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14947   cat conftest.in >> conftest.h
14948   rm -f conftest.in
14949   if cmp -s $ac_file conftest.h 2>/dev/null; then
14950     echo "$ac_file is unchanged"
14951     rm -f conftest.h
14952   else
14953     # Remove last slash and all that follows it.  Not all systems have dirname.
14954       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14955       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14956       # The file is in a subdirectory.
14957       test ! -d "$ac_dir" && mkdir "$ac_dir"
14958     fi
14959     rm -f $ac_file
14960     mv conftest.h $ac_file
14961   fi
14962 fi; done
14963
14964 EOF
14965
14966 cat >> $CONFIG_STATUS <<EOF
14967 ac_sources="$nls_cv_header_libgt"
14968 ac_dests="$nls_cv_header_intl"
14969 EOF
14970
14971 cat >> $CONFIG_STATUS <<\EOF
14972 srcdir=$ac_given_srcdir
14973 while test -n "$ac_sources"; do
14974   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
14975   set $ac_sources; ac_source=$1; shift; ac_sources=$*
14976
14977   echo "linking $srcdir/$ac_source to $ac_dest"
14978
14979   if test ! -r $srcdir/$ac_source; then
14980     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
14981   fi
14982   rm -f $ac_dest
14983
14984   # Make relative symlinks.
14985   # Remove last slash and all that follows it.  Not all systems have dirname.
14986   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
14987   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
14988     # The dest file is in a subdirectory.
14989     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
14990     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
14991     # A "../" for each directory in $ac_dest_dir_suffix.
14992     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
14993   else
14994     ac_dest_dir_suffix= ac_dots=
14995   fi
14996
14997   case "$srcdir" in
14998   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
14999   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
15000   esac
15001
15002   # Make a symlink if possible; otherwise try a hard link.
15003   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
15004     ln $srcdir/$ac_source $ac_dest; then :
15005   else
15006     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
15007   fi
15008 done
15009 EOF
15010 cat >> $CONFIG_STATUS <<EOF
15011
15012
15013 EOF
15014 cat >> $CONFIG_STATUS <<\EOF
15015 case "$CONFIG_FILES" in *po/Makefile.in*)
15016         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
15017       esac
15018
15019 exit 0
15020 EOF
15021 chmod +x $CONFIG_STATUS
15022 rm -fr confdefs* $ac_clean_files
15023 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
15024