Fixed REPLACE_GETPASS test.
[vlendec/samba-autobuild/.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-shared[=PKGS]  build shared libraries [default=yes]"
19 ac_help="$ac_help
20   --enable-static[=PKGS]  build static libraries [default=yes]"
21 ac_help="$ac_help
22   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
23 ac_help="$ac_help
24   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
25 ac_help="$ac_help
26   --disable-libtool-lock  avoid locking (might break parallel builds)"
27 ac_help="$ac_help
28   --with-codepagedir=DIR     Where to put codepage files (\$libdir/codepages)"
29 ac_help="$ac_help
30   --with-readline[=DIR]   Look for readline include/libs in DIR
31   --without-readline      Don't include readline support"
32 ac_help="$ac_help
33   --with-smbwrapper     Include SMB wrapper support
34   --without-smbwrapper  Don't include SMB wrapper support (default)"
35 ac_help="$ac_help
36   --with-afs     Include AFS support
37   --without-afs  Don't include AFS support (default)"
38 ac_help="$ac_help
39   --with-dfs     Include DFS support
40   --without-dfs  Don't include DFS support (default)"
41 ac_help="$ac_help
42   --with-krb4=base-dir     Include Kerberos IV support
43   --without-krb4          Don't include Kerberos IV support (default)"
44 ac_help="$ac_help
45   --with-krb5=base-dir     Include Kerberos 5 support
46   --without-krb5          Don't include Kerberos 5 support (default)"
47 ac_help="$ac_help
48   --with-automount     Include AUTOMOUNT support
49   --without-automount  Don't include AUTOMOUNT support (default)"
50 ac_help="$ac_help
51   --with-smbmount     Include SMBMOUNT (Linux only) support
52   --without-smbmount  Don't include SMBMOUNT support (default)"
53 ac_help="$ac_help
54   --with-pam     Include PAM password database support
55   --without-pam  Don't include PAM password database support (default)"
56 ac_help="$ac_help
57   --with-pam_smbpass     Include the smbpass PAM module
58   --without-pam_smbpass  Don't include the smbpass PAM module (default)"
59 ac_help="$ac_help
60   --with-tdbsam   Include experimental TDB password database
61   --without-tdbsam  Don't include experimental TDB password database (default)"
62 ac_help="$ac_help
63   --with-ldap     Include LDAP support
64   --without-ldap  Don't include LDAP support (default)"
65 ac_help="$ac_help
66   --with-nisplus     Include NISPLUS password database support
67   --without-nisplus  Don't include NISPLUS password database support (default)"
68 ac_help="$ac_help
69   --with-nisplus-home     Include NISPLUS_HOME support
70   --without-nisplus-home  Don't include NISPLUS_HOME support (default)"
71 ac_help="$ac_help
72   --with-ssl     Include SSL support
73   --without-ssl  Don't include SSL support (default)
74   --with-sslinc=DIR Where the SSL includes are (defaults to /usr/local/ssl)"
75 ac_help="$ac_help
76   --with-syslog     Include experimental SYSLOG support
77   --without-syslog  Don't include SYSLOG support (default)"
78 ac_help="$ac_help
79   --with-profile     Include profile support
80   --without-profile  Don't include profile support (default)"
81 ac_help="$ac_help
82   --with-netatalk     Include experimental Netatalk support
83   --without-netatalk  Don't include experimental Netatalk support (default)"
84 ac_help="$ac_help
85   --with-quotas     Include experimental disk-quota support
86   --without-quotas  Don't include experimental disk-quota support (default)"
87 ac_help="$ac_help
88   --with-utmp     Include experimental utmp accounting
89   --without-utmp  Don't include experimental utmp accounting (default)"
90 ac_help="$ac_help
91   --with-msdfs          Include MS Dfs support
92   --without-msdfs       Don't include MS Dfs support (default)"
93 ac_help="$ac_help
94   --with-privatedir=DIR     Where to put smbpasswd ($ac_default_prefix/private)"
95 ac_help="$ac_help
96   --with-lockdir=DIR     Where to put lock files ($ac_default_prefix/var/locks)"
97 ac_help="$ac_help
98   --with-swatdir=DIR     Where to put SWAT files ($ac_default_prefix/swat)"
99 ac_help="$ac_help
100   --with-spinlocks        use spin locks instead of fcntl locks "
101 ac_help="$ac_help
102   --with-acl-support        Include ACL support
103   --without-acl-support  Don't include ACL support (default)"
104
105 # Initialize some variables set by options.
106 # The variables have the same names as the options, with
107 # dashes changed to underlines.
108 build=NONE
109 cache_file=./config.cache
110 exec_prefix=NONE
111 host=NONE
112 no_create=
113 nonopt=NONE
114 no_recursion=
115 prefix=NONE
116 program_prefix=NONE
117 program_suffix=NONE
118 program_transform_name=s,x,x,
119 silent=
120 site=
121 srcdir=
122 target=NONE
123 verbose=
124 x_includes=NONE
125 x_libraries=NONE
126 bindir='${exec_prefix}/bin'
127 sbindir='${exec_prefix}/sbin'
128 libexecdir='${exec_prefix}/libexec'
129 datadir='${prefix}/share'
130 sysconfdir='${prefix}/etc'
131 sharedstatedir='${prefix}/com'
132 localstatedir='${prefix}/var'
133 libdir='${exec_prefix}/lib'
134 includedir='${prefix}/include'
135 oldincludedir='/usr/include'
136 infodir='${prefix}/info'
137 mandir='${prefix}/man'
138
139 # Initialize some other variables.
140 subdirs=
141 MFLAGS= MAKEFLAGS=
142 SHELL=${CONFIG_SHELL-/bin/sh}
143 # Maximum number of lines to put in a shell here document.
144 ac_max_here_lines=12
145
146 ac_prev=
147 for ac_option
148 do
149
150   # If the previous option needs an argument, assign it.
151   if test -n "$ac_prev"; then
152     eval "$ac_prev=\$ac_option"
153     ac_prev=
154     continue
155   fi
156
157   case "$ac_option" in
158   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
159   *) ac_optarg= ;;
160   esac
161
162   # Accept the important Cygnus configure options, so we can diagnose typos.
163
164   case "$ac_option" in
165
166   -bindir | --bindir | --bindi | --bind | --bin | --bi)
167     ac_prev=bindir ;;
168   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
169     bindir="$ac_optarg" ;;
170
171   -build | --build | --buil | --bui | --bu)
172     ac_prev=build ;;
173   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
174     build="$ac_optarg" ;;
175
176   -cache-file | --cache-file | --cache-fil | --cache-fi \
177   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
178     ac_prev=cache_file ;;
179   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
180   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
181     cache_file="$ac_optarg" ;;
182
183   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
184     ac_prev=datadir ;;
185   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
186   | --da=*)
187     datadir="$ac_optarg" ;;
188
189   -disable-* | --disable-*)
190     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
191     # Reject names that are not valid shell variable names.
192     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
193       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
194     fi
195     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
196     eval "enable_${ac_feature}=no" ;;
197
198   -enable-* | --enable-*)
199     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
200     # Reject names that are not valid shell variable names.
201     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
202       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
203     fi
204     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
205     case "$ac_option" in
206       *=*) ;;
207       *) ac_optarg=yes ;;
208     esac
209     eval "enable_${ac_feature}='$ac_optarg'" ;;
210
211   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
212   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
213   | --exec | --exe | --ex)
214     ac_prev=exec_prefix ;;
215   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
216   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
217   | --exec=* | --exe=* | --ex=*)
218     exec_prefix="$ac_optarg" ;;
219
220   -gas | --gas | --ga | --g)
221     # Obsolete; use --with-gas.
222     with_gas=yes ;;
223
224   -help | --help | --hel | --he)
225     # Omit some internal or obsolete options to make the list less imposing.
226     # This message is too long to be a string in the A/UX 3.1 sh.
227     cat << EOF
228 Usage: configure [options] [host]
229 Options: [defaults in brackets after descriptions]
230 Configuration:
231   --cache-file=FILE       cache test results in FILE
232   --help                  print this message
233   --no-create             do not create output files
234   --quiet, --silent       do not print \`checking...' messages
235   --version               print the version of autoconf that created configure
236 Directory and file names:
237   --prefix=PREFIX         install architecture-independent files in PREFIX
238                           [$ac_default_prefix]
239   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
240                           [same as prefix]
241   --bindir=DIR            user executables in DIR [EPREFIX/bin]
242   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
243   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
244   --datadir=DIR           read-only architecture-independent data in DIR
245                           [PREFIX/share]
246   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
247   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
248                           [PREFIX/com]
249   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
250   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
251   --includedir=DIR        C header files in DIR [PREFIX/include]
252   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
253   --infodir=DIR           info documentation in DIR [PREFIX/info]
254   --mandir=DIR            man documentation in DIR [PREFIX/man]
255   --srcdir=DIR            find the sources in DIR [configure dir or ..]
256   --program-prefix=PREFIX prepend PREFIX to installed program names
257   --program-suffix=SUFFIX append SUFFIX to installed program names
258   --program-transform-name=PROGRAM
259                           run sed PROGRAM on installed program names
260 EOF
261     cat << EOF
262 Host type:
263   --build=BUILD           configure for building on BUILD [BUILD=HOST]
264   --host=HOST             configure for HOST [guessed]
265   --target=TARGET         configure for TARGET [TARGET=HOST]
266 Features and packages:
267   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
268   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
269   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
270   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
271   --x-includes=DIR        X include files are in DIR
272   --x-libraries=DIR       X library files are in DIR
273 EOF
274     if test -n "$ac_help"; then
275       echo "--enable and --with options recognized:$ac_help"
276     fi
277     exit 0 ;;
278
279   -host | --host | --hos | --ho)
280     ac_prev=host ;;
281   -host=* | --host=* | --hos=* | --ho=*)
282     host="$ac_optarg" ;;
283
284   -includedir | --includedir | --includedi | --included | --include \
285   | --includ | --inclu | --incl | --inc)
286     ac_prev=includedir ;;
287   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
288   | --includ=* | --inclu=* | --incl=* | --inc=*)
289     includedir="$ac_optarg" ;;
290
291   -infodir | --infodir | --infodi | --infod | --info | --inf)
292     ac_prev=infodir ;;
293   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
294     infodir="$ac_optarg" ;;
295
296   -libdir | --libdir | --libdi | --libd)
297     ac_prev=libdir ;;
298   -libdir=* | --libdir=* | --libdi=* | --libd=*)
299     libdir="$ac_optarg" ;;
300
301   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
302   | --libexe | --libex | --libe)
303     ac_prev=libexecdir ;;
304   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
305   | --libexe=* | --libex=* | --libe=*)
306     libexecdir="$ac_optarg" ;;
307
308   -localstatedir | --localstatedir | --localstatedi | --localstated \
309   | --localstate | --localstat | --localsta | --localst \
310   | --locals | --local | --loca | --loc | --lo)
311     ac_prev=localstatedir ;;
312   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
313   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
314   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
315     localstatedir="$ac_optarg" ;;
316
317   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
318     ac_prev=mandir ;;
319   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
320     mandir="$ac_optarg" ;;
321
322   -nfp | --nfp | --nf)
323     # Obsolete; use --without-fp.
324     with_fp=no ;;
325
326   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
327   | --no-cr | --no-c)
328     no_create=yes ;;
329
330   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
331   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
332     no_recursion=yes ;;
333
334   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
335   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
336   | --oldin | --oldi | --old | --ol | --o)
337     ac_prev=oldincludedir ;;
338   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
339   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
340   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
341     oldincludedir="$ac_optarg" ;;
342
343   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
344     ac_prev=prefix ;;
345   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
346     prefix="$ac_optarg" ;;
347
348   -program-prefix | --program-prefix | --program-prefi | --program-pref \
349   | --program-pre | --program-pr | --program-p)
350     ac_prev=program_prefix ;;
351   -program-prefix=* | --program-prefix=* | --program-prefi=* \
352   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
353     program_prefix="$ac_optarg" ;;
354
355   -program-suffix | --program-suffix | --program-suffi | --program-suff \
356   | --program-suf | --program-su | --program-s)
357     ac_prev=program_suffix ;;
358   -program-suffix=* | --program-suffix=* | --program-suffi=* \
359   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
360     program_suffix="$ac_optarg" ;;
361
362   -program-transform-name | --program-transform-name \
363   | --program-transform-nam | --program-transform-na \
364   | --program-transform-n | --program-transform- \
365   | --program-transform | --program-transfor \
366   | --program-transfo | --program-transf \
367   | --program-trans | --program-tran \
368   | --progr-tra | --program-tr | --program-t)
369     ac_prev=program_transform_name ;;
370   -program-transform-name=* | --program-transform-name=* \
371   | --program-transform-nam=* | --program-transform-na=* \
372   | --program-transform-n=* | --program-transform-=* \
373   | --program-transform=* | --program-transfor=* \
374   | --program-transfo=* | --program-transf=* \
375   | --program-trans=* | --program-tran=* \
376   | --progr-tra=* | --program-tr=* | --program-t=*)
377     program_transform_name="$ac_optarg" ;;
378
379   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
380   | -silent | --silent | --silen | --sile | --sil)
381     silent=yes ;;
382
383   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
384     ac_prev=sbindir ;;
385   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
386   | --sbi=* | --sb=*)
387     sbindir="$ac_optarg" ;;
388
389   -sharedstatedir | --sharedstatedir | --sharedstatedi \
390   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
391   | --sharedst | --shareds | --shared | --share | --shar \
392   | --sha | --sh)
393     ac_prev=sharedstatedir ;;
394   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
395   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
396   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
397   | --sha=* | --sh=*)
398     sharedstatedir="$ac_optarg" ;;
399
400   -site | --site | --sit)
401     ac_prev=site ;;
402   -site=* | --site=* | --sit=*)
403     site="$ac_optarg" ;;
404
405   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
406     ac_prev=srcdir ;;
407   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
408     srcdir="$ac_optarg" ;;
409
410   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
411   | --syscon | --sysco | --sysc | --sys | --sy)
412     ac_prev=sysconfdir ;;
413   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
414   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
415     sysconfdir="$ac_optarg" ;;
416
417   -target | --target | --targe | --targ | --tar | --ta | --t)
418     ac_prev=target ;;
419   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
420     target="$ac_optarg" ;;
421
422   -v | -verbose | --verbose | --verbos | --verbo | --verb)
423     verbose=yes ;;
424
425   -version | --version | --versio | --versi | --vers)
426     echo "configure generated by autoconf version 2.13"
427     exit 0 ;;
428
429   -with-* | --with-*)
430     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
431     # Reject names that are not valid shell variable names.
432     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
433       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
434     fi
435     ac_package=`echo $ac_package| sed 's/-/_/g'`
436     case "$ac_option" in
437       *=*) ;;
438       *) ac_optarg=yes ;;
439     esac
440     eval "with_${ac_package}='$ac_optarg'" ;;
441
442   -without-* | --without-*)
443     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
444     # Reject names that are not valid shell variable names.
445     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
446       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
447     fi
448     ac_package=`echo $ac_package| sed 's/-/_/g'`
449     eval "with_${ac_package}=no" ;;
450
451   --x)
452     # Obsolete; use --with-x.
453     with_x=yes ;;
454
455   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
456   | --x-incl | --x-inc | --x-in | --x-i)
457     ac_prev=x_includes ;;
458   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
459   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
460     x_includes="$ac_optarg" ;;
461
462   -x-libraries | --x-libraries | --x-librarie | --x-librari \
463   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
464     ac_prev=x_libraries ;;
465   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
466   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
467     x_libraries="$ac_optarg" ;;
468
469   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
470     ;;
471
472   *)
473     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
474       echo "configure: warning: $ac_option: invalid host type" 1>&2
475     fi
476     if test "x$nonopt" != xNONE; then
477       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
478     fi
479     nonopt="$ac_option"
480     ;;
481
482   esac
483 done
484
485 if test -n "$ac_prev"; then
486   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
487 fi
488
489 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
490
491 # File descriptor usage:
492 # 0 standard input
493 # 1 file creation
494 # 2 errors and warnings
495 # 3 some systems may open it to /dev/tty
496 # 4 used on the Kubota Titan
497 # 6 checking for... messages and results
498 # 5 compiler messages saved in config.log
499 if test "$silent" = yes; then
500   exec 6>/dev/null
501 else
502   exec 6>&1
503 fi
504 exec 5>./config.log
505
506 echo "\
507 This file contains any messages produced by compilers while
508 running configure, to aid debugging if configure makes a mistake.
509 " 1>&5
510
511 # Strip out --no-create and --no-recursion so they do not pile up.
512 # Also quote any args containing shell metacharacters.
513 ac_configure_args=
514 for ac_arg
515 do
516   case "$ac_arg" in
517   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
518   | --no-cr | --no-c) ;;
519   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
520   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
521   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
522   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
523   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
524   esac
525 done
526
527 # NLS nuisances.
528 # Only set these to C if already set.  These must not be set unconditionally
529 # because not all systems understand e.g. LANG=C (notably SCO).
530 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
531 # Non-C LC_CTYPE values break the ctype check.
532 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
533 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
534 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
535 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
536
537 # confdefs.h avoids OS command line length limits that DEFS can exceed.
538 rm -rf conftest* confdefs.h
539 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
540 echo > confdefs.h
541
542 # A filename unique to this package, relative to the directory that
543 # configure is in, which we can look for to find out if srcdir is correct.
544 ac_unique_file=include/includes.h
545
546 # Find the source files, if location was not specified.
547 if test -z "$srcdir"; then
548   ac_srcdir_defaulted=yes
549   # Try the directory containing this script, then its parent.
550   ac_prog=$0
551   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
552   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
553   srcdir=$ac_confdir
554   if test ! -r $srcdir/$ac_unique_file; then
555     srcdir=..
556   fi
557 else
558   ac_srcdir_defaulted=no
559 fi
560 if test ! -r $srcdir/$ac_unique_file; then
561   if test "$ac_srcdir_defaulted" = yes; then
562     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
563   else
564     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
565   fi
566 fi
567 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
568
569 # Prefer explicitly selected file to automatically selected ones.
570 if test -z "$CONFIG_SITE"; then
571   if test "x$prefix" != xNONE; then
572     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
573   else
574     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
575   fi
576 fi
577 for ac_site_file in $CONFIG_SITE; do
578   if test -r "$ac_site_file"; then
579     echo "loading site script $ac_site_file"
580     . "$ac_site_file"
581   fi
582 done
583
584 if test -r "$cache_file"; then
585   echo "loading cache $cache_file"
586   . $cache_file
587 else
588   echo "creating cache $cache_file"
589   > $cache_file
590 fi
591
592 ac_ext=c
593 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
594 ac_cpp='$CPP $CPPFLAGS'
595 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
596 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
597 cross_compiling=$ac_cv_prog_cc_cross
598
599 ac_exeext=
600 ac_objext=o
601 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
602   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
603   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
604     ac_n= ac_c='
605 ' ac_t='        '
606   else
607     ac_n=-n ac_c= ac_t=
608   fi
609 else
610   ac_n= ac_c='\c' ac_t=
611 fi
612
613
614
615 # we want to be compatibe with older versions of Samba
616
617
618
619
620
621
622
623
624
625
626
627
628
629 # compile with optimisation and without debugging by default
630 CFLAGS="-O ${CFLAGS}"
631
632 # Check whether --enable-debug or --disable-debug was given.
633 if test "${enable_debug+set}" = set; then
634   enableval="$enable_debug"
635   if eval "test x$enable_debug = xyes"; then
636         CFLAGS="${CFLAGS} -g"
637     fi
638 fi
639
640
641
642 # Extract the first word of "gcc", so it can be a program name with args.
643 set dummy gcc; ac_word=$2
644 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
645 echo "configure:646: checking for $ac_word" >&5
646 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
647   echo $ac_n "(cached) $ac_c" 1>&6
648 else
649   if test -n "$CC"; then
650   ac_cv_prog_CC="$CC" # Let the user override the test.
651 else
652   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
653   ac_dummy="$PATH"
654   for ac_dir in $ac_dummy; do
655     test -z "$ac_dir" && ac_dir=.
656     if test -f $ac_dir/$ac_word; then
657       ac_cv_prog_CC="gcc"
658       break
659     fi
660   done
661   IFS="$ac_save_ifs"
662 fi
663 fi
664 CC="$ac_cv_prog_CC"
665 if test -n "$CC"; then
666   echo "$ac_t""$CC" 1>&6
667 else
668   echo "$ac_t""no" 1>&6
669 fi
670
671 if test -z "$CC"; then
672   # Extract the first word of "cc", so it can be a program name with args.
673 set dummy cc; ac_word=$2
674 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
675 echo "configure:676: checking for $ac_word" >&5
676 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
677   echo $ac_n "(cached) $ac_c" 1>&6
678 else
679   if test -n "$CC"; then
680   ac_cv_prog_CC="$CC" # Let the user override the test.
681 else
682   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
683   ac_prog_rejected=no
684   ac_dummy="$PATH"
685   for ac_dir in $ac_dummy; do
686     test -z "$ac_dir" && ac_dir=.
687     if test -f $ac_dir/$ac_word; then
688       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
689         ac_prog_rejected=yes
690         continue
691       fi
692       ac_cv_prog_CC="cc"
693       break
694     fi
695   done
696   IFS="$ac_save_ifs"
697 if test $ac_prog_rejected = yes; then
698   # We found a bogon in the path, so make sure we never use it.
699   set dummy $ac_cv_prog_CC
700   shift
701   if test $# -gt 0; then
702     # We chose a different compiler from the bogus one.
703     # However, it has the same basename, so the bogon will be chosen
704     # first if we set CC to just the basename; use the full file name.
705     shift
706     set dummy "$ac_dir/$ac_word" "$@"
707     shift
708     ac_cv_prog_CC="$@"
709   fi
710 fi
711 fi
712 fi
713 CC="$ac_cv_prog_CC"
714 if test -n "$CC"; then
715   echo "$ac_t""$CC" 1>&6
716 else
717   echo "$ac_t""no" 1>&6
718 fi
719
720   if test -z "$CC"; then
721     case "`uname -s`" in
722     *win32* | *WIN32*)
723       # Extract the first word of "cl", so it can be a program name with args.
724 set dummy cl; ac_word=$2
725 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
726 echo "configure:727: checking for $ac_word" >&5
727 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
728   echo $ac_n "(cached) $ac_c" 1>&6
729 else
730   if test -n "$CC"; then
731   ac_cv_prog_CC="$CC" # Let the user override the test.
732 else
733   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
734   ac_dummy="$PATH"
735   for ac_dir in $ac_dummy; do
736     test -z "$ac_dir" && ac_dir=.
737     if test -f $ac_dir/$ac_word; then
738       ac_cv_prog_CC="cl"
739       break
740     fi
741   done
742   IFS="$ac_save_ifs"
743 fi
744 fi
745 CC="$ac_cv_prog_CC"
746 if test -n "$CC"; then
747   echo "$ac_t""$CC" 1>&6
748 else
749   echo "$ac_t""no" 1>&6
750 fi
751  ;;
752     esac
753   fi
754   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
755 fi
756
757 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
758 echo "configure:759: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
759
760 ac_ext=c
761 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
762 ac_cpp='$CPP $CPPFLAGS'
763 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
764 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
765 cross_compiling=$ac_cv_prog_cc_cross
766
767 cat > conftest.$ac_ext << EOF
768
769 #line 770 "configure"
770 #include "confdefs.h"
771
772 main(){return(0);}
773 EOF
774 if { (eval echo configure:775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
775   ac_cv_prog_cc_works=yes
776   # If we can't run a trivial program, we are probably using a cross compiler.
777   if (./conftest; exit) 2>/dev/null; then
778     ac_cv_prog_cc_cross=no
779   else
780     ac_cv_prog_cc_cross=yes
781   fi
782 else
783   echo "configure: failed program was:" >&5
784   cat conftest.$ac_ext >&5
785   ac_cv_prog_cc_works=no
786 fi
787 rm -fr conftest*
788 ac_ext=c
789 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
790 ac_cpp='$CPP $CPPFLAGS'
791 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
792 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
793 cross_compiling=$ac_cv_prog_cc_cross
794
795 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
796 if test $ac_cv_prog_cc_works = no; then
797   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
798 fi
799 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
800 echo "configure:801: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
801 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
802 cross_compiling=$ac_cv_prog_cc_cross
803
804 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
805 echo "configure:806: checking whether we are using GNU C" >&5
806 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
807   echo $ac_n "(cached) $ac_c" 1>&6
808 else
809   cat > conftest.c <<EOF
810 #ifdef __GNUC__
811   yes;
812 #endif
813 EOF
814 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
815   ac_cv_prog_gcc=yes
816 else
817   ac_cv_prog_gcc=no
818 fi
819 fi
820
821 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
822
823 if test $ac_cv_prog_gcc = yes; then
824   GCC=yes
825 else
826   GCC=
827 fi
828
829 ac_test_CFLAGS="${CFLAGS+set}"
830 ac_save_CFLAGS="$CFLAGS"
831 CFLAGS=
832 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
833 echo "configure:834: checking whether ${CC-cc} accepts -g" >&5
834 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
835   echo $ac_n "(cached) $ac_c" 1>&6
836 else
837   echo 'void f(){}' > conftest.c
838 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
839   ac_cv_prog_cc_g=yes
840 else
841   ac_cv_prog_cc_g=no
842 fi
843 rm -f conftest*
844
845 fi
846
847 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
848 if test "$ac_test_CFLAGS" = set; then
849   CFLAGS="$ac_save_CFLAGS"
850 elif test $ac_cv_prog_cc_g = yes; then
851   if test "$GCC" = yes; then
852     CFLAGS="-g -O2"
853   else
854     CFLAGS="-g"
855   fi
856 else
857   if test "$GCC" = yes; then
858     CFLAGS="-O2"
859   else
860     CFLAGS=
861   fi
862 fi
863
864 ac_aux_dir=
865 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
866   if test -f $ac_dir/install-sh; then
867     ac_aux_dir=$ac_dir
868     ac_install_sh="$ac_aux_dir/install-sh -c"
869     break
870   elif test -f $ac_dir/install.sh; then
871     ac_aux_dir=$ac_dir
872     ac_install_sh="$ac_aux_dir/install.sh -c"
873     break
874   fi
875 done
876 if test -z "$ac_aux_dir"; then
877   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
878 fi
879 ac_config_guess=$ac_aux_dir/config.guess
880 ac_config_sub=$ac_aux_dir/config.sub
881 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
882
883 # Find a good install program.  We prefer a C program (faster),
884 # so one script is as good as another.  But avoid the broken or
885 # incompatible versions:
886 # SysV /etc/install, /usr/sbin/install
887 # SunOS /usr/etc/install
888 # IRIX /sbin/install
889 # AIX /bin/install
890 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
891 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
892 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
893 # ./install, which can be erroneously created by make from ./install.sh.
894 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
895 echo "configure:896: checking for a BSD compatible install" >&5
896 if test -z "$INSTALL"; then
897 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
898   echo $ac_n "(cached) $ac_c" 1>&6
899 else
900     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
901   for ac_dir in $PATH; do
902     # Account for people who put trailing slashes in PATH elements.
903     case "$ac_dir/" in
904     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
905     *)
906       # OSF1 and SCO ODT 3.0 have their own names for install.
907       # Don't use installbsd from OSF since it installs stuff as root
908       # by default.
909       for ac_prog in ginstall scoinst install; do
910         if test -f $ac_dir/$ac_prog; then
911           if test $ac_prog = install &&
912             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
913             # AIX install.  It has an incompatible calling convention.
914             :
915           else
916             ac_cv_path_install="$ac_dir/$ac_prog -c"
917             break 2
918           fi
919         fi
920       done
921       ;;
922     esac
923   done
924   IFS="$ac_save_IFS"
925
926 fi
927   if test "${ac_cv_path_install+set}" = set; then
928     INSTALL="$ac_cv_path_install"
929   else
930     # As a last resort, use the slow shell script.  We don't cache a
931     # path for INSTALL within a source directory, because that will
932     # break other packages using the cache if that directory is
933     # removed, or if the path is relative.
934     INSTALL="$ac_install_sh"
935   fi
936 fi
937 echo "$ac_t""$INSTALL" 1>&6
938
939 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
940 # It thinks the first close brace ends the variable substitution.
941 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
942
943 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
944
945 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
946
947 for ac_prog in gawk mawk nawk awk
948 do
949 # Extract the first word of "$ac_prog", so it can be a program name with args.
950 set dummy $ac_prog; ac_word=$2
951 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
952 echo "configure:953: checking for $ac_word" >&5
953 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
954   echo $ac_n "(cached) $ac_c" 1>&6
955 else
956   if test -n "$AWK"; then
957   ac_cv_prog_AWK="$AWK" # Let the user override the test.
958 else
959   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
960   ac_dummy="$PATH"
961   for ac_dir in $ac_dummy; do
962     test -z "$ac_dir" && ac_dir=.
963     if test -f $ac_dir/$ac_word; then
964       ac_cv_prog_AWK="$ac_prog"
965       break
966     fi
967   done
968   IFS="$ac_save_ifs"
969 fi
970 fi
971 AWK="$ac_cv_prog_AWK"
972 if test -n "$AWK"; then
973   echo "$ac_t""$AWK" 1>&6
974 else
975   echo "$ac_t""no" 1>&6
976 fi
977
978 test -n "$AWK" && break
979 done
980
981 # Check whether --enable-shared or --disable-shared was given.
982 if test "${enable_shared+set}" = set; then
983   enableval="$enable_shared"
984   p=${PACKAGE-default}
985 case "$enableval" in
986 yes) enable_shared=yes ;;
987 no) enable_shared=no ;;
988 *)
989   enable_shared=no
990   # Look at the argument we got.  We use all the common list separators.
991   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
992   for pkg in $enableval; do
993     if test "X$pkg" = "X$p"; then
994       enable_shared=yes
995     fi
996   done
997   IFS="$ac_save_ifs"
998   ;;
999 esac
1000 else
1001   enable_shared=yes
1002 fi
1003
1004 # Check whether --enable-static or --disable-static was given.
1005 if test "${enable_static+set}" = set; then
1006   enableval="$enable_static"
1007   p=${PACKAGE-default}
1008 case "$enableval" in
1009 yes) enable_static=yes ;;
1010 no) enable_static=no ;;
1011 *)
1012   enable_static=no
1013   # Look at the argument we got.  We use all the common list separators.
1014   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1015   for pkg in $enableval; do
1016     if test "X$pkg" = "X$p"; then
1017       enable_static=yes
1018     fi
1019   done
1020   IFS="$ac_save_ifs"
1021   ;;
1022 esac
1023 else
1024   enable_static=yes
1025 fi
1026
1027 # Check whether --enable-fast-install or --disable-fast-install was given.
1028 if test "${enable_fast_install+set}" = set; then
1029   enableval="$enable_fast_install"
1030   p=${PACKAGE-default}
1031 case "$enableval" in
1032 yes) enable_fast_install=yes ;;
1033 no) enable_fast_install=no ;;
1034 *)
1035   enable_fast_install=no
1036   # Look at the argument we got.  We use all the common list separators.
1037   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1038   for pkg in $enableval; do
1039     if test "X$pkg" = "X$p"; then
1040       enable_fast_install=yes
1041     fi
1042   done
1043   IFS="$ac_save_ifs"
1044   ;;
1045 esac
1046 else
1047   enable_fast_install=yes
1048 fi
1049
1050
1051 # Make sure we can run config.sub.
1052 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1053 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1054 fi
1055
1056 echo $ac_n "checking host system type""... $ac_c" 1>&6
1057 echo "configure:1058: checking host system type" >&5
1058
1059 host_alias=$host
1060 case "$host_alias" in
1061 NONE)
1062   case $nonopt in
1063   NONE)
1064     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1065     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1066     fi ;;
1067   *) host_alias=$nonopt ;;
1068   esac ;;
1069 esac
1070
1071 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1072 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1073 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1074 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1075 echo "$ac_t""$host" 1>&6
1076
1077 echo $ac_n "checking build system type""... $ac_c" 1>&6
1078 echo "configure:1079: checking build system type" >&5
1079
1080 build_alias=$build
1081 case "$build_alias" in
1082 NONE)
1083   case $nonopt in
1084   NONE) build_alias=$host_alias ;;
1085   *) build_alias=$nonopt ;;
1086   esac ;;
1087 esac
1088
1089 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1090 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1091 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1092 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1093 echo "$ac_t""$build" 1>&6
1094
1095 # Extract the first word of "ranlib", so it can be a program name with args.
1096 set dummy ranlib; ac_word=$2
1097 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1098 echo "configure:1099: checking for $ac_word" >&5
1099 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1100   echo $ac_n "(cached) $ac_c" 1>&6
1101 else
1102   if test -n "$RANLIB"; then
1103   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1104 else
1105   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1106   ac_dummy="$PATH"
1107   for ac_dir in $ac_dummy; do
1108     test -z "$ac_dir" && ac_dir=.
1109     if test -f $ac_dir/$ac_word; then
1110       ac_cv_prog_RANLIB="ranlib"
1111       break
1112     fi
1113   done
1114   IFS="$ac_save_ifs"
1115   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1116 fi
1117 fi
1118 RANLIB="$ac_cv_prog_RANLIB"
1119 if test -n "$RANLIB"; then
1120   echo "$ac_t""$RANLIB" 1>&6
1121 else
1122   echo "$ac_t""no" 1>&6
1123 fi
1124
1125 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1126 if test "${with_gnu_ld+set}" = set; then
1127   withval="$with_gnu_ld"
1128   test "$withval" = no || with_gnu_ld=yes
1129 else
1130   with_gnu_ld=no
1131 fi
1132
1133 ac_prog=ld
1134 if test "$ac_cv_prog_gcc" = yes; then
1135   # Check if gcc -print-prog-name=ld gives a path.
1136   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1137 echo "configure:1138: checking for ld used by GCC" >&5
1138   ac_prog=`($CC -print-prog-name=ld) 2>&5`
1139   case "$ac_prog" in
1140     # Accept absolute paths.
1141     [\\/]* | [A-Za-z]:[\\/]*)
1142       re_direlt='/[^/][^/]*/\.\./'
1143       # Canonicalize the path of ld
1144       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1145       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1146         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1147       done
1148       test -z "$LD" && LD="$ac_prog"
1149       ;;
1150   "")
1151     # If it fails, then pretend we aren't using GCC.
1152     ac_prog=ld
1153     ;;
1154   *)
1155     # If it is relative, then search for the first ld in PATH.
1156     with_gnu_ld=unknown
1157     ;;
1158   esac
1159 elif test "$with_gnu_ld" = yes; then
1160   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1161 echo "configure:1162: checking for GNU ld" >&5
1162 else
1163   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1164 echo "configure:1165: checking for non-GNU ld" >&5
1165 fi
1166 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1167   echo $ac_n "(cached) $ac_c" 1>&6
1168 else
1169   if test -z "$LD"; then
1170   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1171   for ac_dir in $PATH; do
1172     test -z "$ac_dir" && ac_dir=.
1173     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1174       ac_cv_path_LD="$ac_dir/$ac_prog"
1175       # Check to see if the program is GNU ld.  I'd rather use --version,
1176       # but apparently some GNU ld's only accept -v.
1177       # Break only if it was the GNU/non-GNU ld that we prefer.
1178       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1179         test "$with_gnu_ld" != no && break
1180       else
1181         test "$with_gnu_ld" != yes && break
1182       fi
1183     fi
1184   done
1185   IFS="$ac_save_ifs"
1186 else
1187   ac_cv_path_LD="$LD" # Let the user override the test with a path.
1188 fi
1189 fi
1190
1191 LD="$ac_cv_path_LD"
1192 if test -n "$LD"; then
1193   echo "$ac_t""$LD" 1>&6
1194 else
1195   echo "$ac_t""no" 1>&6
1196 fi
1197 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1198 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1199 echo "configure:1200: checking if the linker ($LD) is GNU ld" >&5
1200 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1201   echo $ac_n "(cached) $ac_c" 1>&6
1202 else
1203   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1204 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1205   ac_cv_prog_gnu_ld=yes
1206 else
1207   ac_cv_prog_gnu_ld=no
1208 fi
1209 fi
1210
1211 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1212
1213
1214 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1215 echo "configure:1216: checking for BSD-compatible nm" >&5
1216 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1217   echo $ac_n "(cached) $ac_c" 1>&6
1218 else
1219   if test -n "$NM"; then
1220   # Let the user override the test.
1221   ac_cv_path_NM="$NM"
1222 else
1223   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1224   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1225     test -z "$ac_dir" && ac_dir=.
1226     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
1227       # Check to see if the nm accepts a BSD-compat flag.
1228       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1229       #   nm: unknown option "B" ignored
1230       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1231         ac_cv_path_NM="$ac_dir/nm -B"
1232         break
1233       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1234         ac_cv_path_NM="$ac_dir/nm -p"
1235         break
1236       else
1237         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1238         continue # so that we can try to find one that supports BSD flags
1239       fi
1240     fi
1241   done
1242   IFS="$ac_save_ifs"
1243   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1244 fi
1245 fi
1246
1247 NM="$ac_cv_path_NM"
1248 echo "$ac_t""$NM" 1>&6
1249
1250 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1251 echo "configure:1252: checking whether ln -s works" >&5
1252 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1253   echo $ac_n "(cached) $ac_c" 1>&6
1254 else
1255   rm -f conftestdata
1256 if ln -s X conftestdata 2>/dev/null
1257 then
1258   rm -f conftestdata
1259   ac_cv_prog_LN_S="ln -s"
1260 else
1261   ac_cv_prog_LN_S=ln
1262 fi
1263 fi
1264 LN_S="$ac_cv_prog_LN_S"
1265 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1266   echo "$ac_t""yes" 1>&6
1267 else
1268   echo "$ac_t""no" 1>&6
1269 fi
1270
1271
1272 case "$target" in
1273 NONE) lt_target="$host" ;;
1274 *) lt_target="$target" ;;
1275 esac
1276
1277 # Check for any special flags to pass to ltconfig.
1278 libtool_flags="--cache-file=$cache_file"
1279 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1280 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1281 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1282 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1283 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1284
1285
1286 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1287 if test "${enable_libtool_lock+set}" = set; then
1288   enableval="$enable_libtool_lock"
1289   :
1290 fi
1291
1292 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1293 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1294
1295 # Some flags need to be propagated to the compiler or linker for good
1296 # libtool support.
1297 case "$lt_target" in
1298 *-*-irix6*)
1299   # Find out which ABI we are using.
1300   echo '#line 1301 "configure"' > conftest.$ac_ext
1301   if { (eval echo configure:1302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1302     case "`/usr/bin/file conftest.o`" in
1303     *32-bit*)
1304       LD="${LD-ld} -32"
1305       ;;
1306     *N32*)
1307       LD="${LD-ld} -n32"
1308       ;;
1309     *64-bit*)
1310       LD="${LD-ld} -64"
1311       ;;
1312     esac
1313   fi
1314   rm -rf conftest*
1315   ;;
1316
1317 *-*-sco3.2v5*)
1318   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1319   SAVE_CFLAGS="$CFLAGS"
1320   CFLAGS="$CFLAGS -belf"
1321   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1322 echo "configure:1323: checking whether the C compiler needs -belf" >&5
1323 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1324   echo $ac_n "(cached) $ac_c" 1>&6
1325 else
1326   cat > conftest.$ac_ext <<EOF
1327 #line 1328 "configure"
1328 #include "confdefs.h"
1329
1330 int main() {
1331
1332 ; return 0; }
1333 EOF
1334 if { (eval echo configure:1335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1335   rm -rf conftest*
1336   lt_cv_cc_needs_belf=yes
1337 else
1338   echo "configure: failed program was:" >&5
1339   cat conftest.$ac_ext >&5
1340   rm -rf conftest*
1341   lt_cv_cc_needs_belf=no
1342 fi
1343 rm -f conftest*
1344 fi
1345
1346 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1347   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1348     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1349     CFLAGS="$SAVE_CFLAGS"
1350   fi
1351   ;;
1352
1353
1354 esac
1355
1356
1357 # Save cache, so that ltconfig can load it
1358 cat > confcache <<\EOF
1359 # This file is a shell script that caches the results of configure
1360 # tests run on this system so they can be shared between configure
1361 # scripts and configure runs.  It is not useful on other systems.
1362 # If it contains results you don't want to keep, you may remove or edit it.
1363 #
1364 # By default, configure uses ./config.cache as the cache file,
1365 # creating it if it does not exist already.  You can give configure
1366 # the --cache-file=FILE option to use a different cache file; that is
1367 # what configure does when it calls configure scripts in
1368 # subdirectories, so they share the cache.
1369 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1370 # config.status only pays attention to the cache file if you give it the
1371 # --recheck option to rerun configure.
1372 #
1373 EOF
1374 # The following way of writing the cache mishandles newlines in values,
1375 # but we know of no workaround that is simple, portable, and efficient.
1376 # So, don't put newlines in cache variables' values.
1377 # Ultrix sh set writes to stderr and can't be redirected directly,
1378 # and sets the high bit in the cache file unless we assign to the vars.
1379 (set) 2>&1 |
1380   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1381   *ac_space=\ *)
1382     # `set' does not quote correctly, so add quotes (double-quote substitution
1383     # turns \\\\ into \\, and sed turns \\ into \).
1384     sed -n \
1385       -e "s/'/'\\\\''/g" \
1386       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1387     ;;
1388   *)
1389     # `set' quotes correctly as required by POSIX, so do not add quotes.
1390     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1391     ;;
1392   esac >> confcache
1393 if cmp -s $cache_file confcache; then
1394   :
1395 else
1396   if test -w $cache_file; then
1397     echo "updating cache $cache_file"
1398     cat confcache > $cache_file
1399   else
1400     echo "not updating unwritable cache $cache_file"
1401   fi
1402 fi
1403 rm -f confcache
1404
1405
1406 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
1407 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1408 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1409 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
1410 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
1411 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1412 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
1413 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1414
1415 # Reload cache, that may have been modified by ltconfig
1416 if test -r "$cache_file"; then
1417   echo "loading cache $cache_file"
1418   . $cache_file
1419 else
1420   echo "creating cache $cache_file"
1421   > $cache_file
1422 fi
1423
1424
1425 # This can be used to rebuild libtool when needed
1426 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1427
1428 # Always use our own libtool.
1429 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1430
1431 # Redirect the config.log output again, so that the ltconfig log is not
1432 # clobbered by the next message.
1433 exec 5>>./config.log
1434
1435
1436
1437 if test "x$CC" != xcc; then
1438   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1439 echo "configure:1440: checking whether $CC and cc understand -c and -o together" >&5
1440 else
1441   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1442 echo "configure:1443: checking whether cc understands -c and -o together" >&5
1443 fi
1444 set dummy $CC; ac_cc="`echo $2 |
1445                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1446 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1447   echo $ac_n "(cached) $ac_c" 1>&6
1448 else
1449   echo 'foo(){}' > conftest.c
1450 # Make sure it works both with $CC and with simple cc.
1451 # We do the test twice because some compilers refuse to overwrite an
1452 # existing .o file with -o, though they will create one.
1453 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1454 if { (eval echo configure:1455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1455    test -f conftest.o && { (eval echo configure:1456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1456 then
1457   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1458   if test "x$CC" != xcc; then
1459     # Test first that cc exists at all.
1460     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1461       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1462       if { (eval echo configure:1463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1463          test -f conftest.o && { (eval echo configure:1464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1464       then
1465         # cc works too.
1466         :
1467       else
1468         # cc exists but doesn't like -o.
1469         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1470       fi
1471     fi
1472   fi
1473 else
1474   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1475 fi
1476 rm -f conftest*
1477
1478 fi
1479 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1480   echo "$ac_t""yes" 1>&6
1481 else
1482   echo "$ac_t""no" 1>&6
1483   cat >> confdefs.h <<\EOF
1484 #define NO_MINUS_C_MINUS_O 1
1485 EOF
1486
1487 fi
1488
1489 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1490       BROKEN_CC=
1491 else
1492       BROKEN_CC=#
1493 fi
1494
1495
1496 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1497 echo "configure:1498: checking that the C compiler understands volatile" >&5
1498 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1499   echo $ac_n "(cached) $ac_c" 1>&6
1500 else
1501   
1502     cat > conftest.$ac_ext <<EOF
1503 #line 1504 "configure"
1504 #include "confdefs.h"
1505 #include <sys/types.h>
1506 int main() {
1507 volatile int i = 0
1508 ; return 0; }
1509 EOF
1510 if { (eval echo configure:1511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1511   rm -rf conftest*
1512   samba_cv_volatile=yes
1513 else
1514   echo "configure: failed program was:" >&5
1515   cat conftest.$ac_ext >&5
1516   rm -rf conftest*
1517   samba_cv_volatile=no
1518 fi
1519 rm -f conftest*
1520 fi
1521
1522 echo "$ac_t""$samba_cv_volatile" 1>&6
1523 if test x"$samba_cv_volatile" = x"yes"; then
1524    cat >> confdefs.h <<\EOF
1525 #define HAVE_VOLATILE 1
1526 EOF
1527
1528 fi
1529
1530
1531 #################################################
1532 # set codepage directory location
1533 # Check whether --with-codepagedir or --without-codepagedir was given.
1534 if test "${with_codepagedir+set}" = set; then
1535   withval="$with_codepagedir"
1536    case "$withval" in
1537   yes|no)
1538   #
1539   # Just in case anybody does it
1540   #
1541     echo "configure: warning: --with-codepagedir called without argument - will use default" 1>&2
1542   ;;
1543   * )
1544     codepagedir="$withval"
1545     ;;
1546   esac
1547 fi
1548
1549
1550
1551
1552 # Do some error checking and defaulting for the host and target type.
1553 # The inputs are:
1554 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1555 #
1556 # The rules are:
1557 # 1. You are not allowed to specify --host, --target, and nonopt at the
1558 #    same time.
1559 # 2. Host defaults to nonopt.
1560 # 3. If nonopt is not specified, then host defaults to the current host,
1561 #    as determined by config.guess.
1562 # 4. Target and build default to nonopt.
1563 # 5. If nonopt is not specified, then target and build default to host.
1564
1565 # The aliases save the names the user supplied, while $host etc.
1566 # will get canonicalized.
1567 case $host---$target---$nonopt in
1568 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1569 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1570 esac
1571
1572
1573 # Make sure we can run config.sub.
1574 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1575 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1576 fi
1577
1578 echo $ac_n "checking host system type""... $ac_c" 1>&6
1579 echo "configure:1580: checking host system type" >&5
1580
1581 host_alias=$host
1582 case "$host_alias" in
1583 NONE)
1584   case $nonopt in
1585   NONE)
1586     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1587     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1588     fi ;;
1589   *) host_alias=$nonopt ;;
1590   esac ;;
1591 esac
1592
1593 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1594 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1595 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1596 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1597 echo "$ac_t""$host" 1>&6
1598
1599 echo $ac_n "checking target system type""... $ac_c" 1>&6
1600 echo "configure:1601: checking target system type" >&5
1601
1602 target_alias=$target
1603 case "$target_alias" in
1604 NONE)
1605   case $nonopt in
1606   NONE) target_alias=$host_alias ;;
1607   *) target_alias=$nonopt ;;
1608   esac ;;
1609 esac
1610
1611 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1612 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1613 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1614 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1615 echo "$ac_t""$target" 1>&6
1616
1617 echo $ac_n "checking build system type""... $ac_c" 1>&6
1618 echo "configure:1619: checking build system type" >&5
1619
1620 build_alias=$build
1621 case "$build_alias" in
1622 NONE)
1623   case $nonopt in
1624   NONE) build_alias=$host_alias ;;
1625   *) build_alias=$nonopt ;;
1626   esac ;;
1627 esac
1628
1629 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1630 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1631 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1632 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1633 echo "$ac_t""$build" 1>&6
1634
1635 test "$host_alias" != "$target_alias" &&
1636   test "$program_prefix$program_suffix$program_transform_name" = \
1637     NONENONEs,x,x, &&
1638   program_prefix=${target_alias}-
1639
1640
1641   case "$host_os" in
1642         *irix6*) cat >> confdefs.h <<\EOF
1643 #include <standards.h>
1644 EOF
1645
1646         ;;
1647 esac
1648
1649
1650     
1651     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1652 echo "configure:1653: checking config.cache system type" >&5
1653     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1654          test x"$ac_cv_host_system_type" != x"$host"; } ||
1655        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1656          test x"$ac_cv_build_system_type" != x"$build"; } ||
1657        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1658          test x"$ac_cv_target_system_type" != x"$target"; }; then
1659         echo "$ac_t""different" 1>&6
1660         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1661     else
1662         echo "$ac_t""same" 1>&6
1663     fi
1664     ac_cv_host_system_type="$host"
1665     ac_cv_build_system_type="$build"
1666     ac_cv_target_system_type="$target"
1667
1668
1669 #
1670 # Config CPPFLAG settings for strange OS's that must be set
1671 # before other tests.
1672 #
1673 case "$host_os" in
1674 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1675     *hpux*)
1676       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1677 echo "configure:1678: checking whether ${CC-cc} accepts -Ae" >&5
1678 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1679   echo $ac_n "(cached) $ac_c" 1>&6
1680 else
1681   echo 'void f(){}' > conftest.c
1682 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1683   ac_cv_prog_cc_Ae=yes
1684 else
1685   ac_cv_prog_cc_Ae=no
1686 fi
1687 rm -f conftest*
1688
1689 fi
1690
1691 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1692       if test $ac_cv_prog_cc_Ae = yes; then
1693         CPPFLAGS="$CPPFLAGS -Ae"
1694       fi
1695 #
1696 # Defines needed for HPUX support.
1697 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1698 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1699 #
1700       case `uname -r` in
1701                         *9*|*10*)
1702                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1703                                 cat >> confdefs.h <<\EOF
1704 #define USE_BOTH_CRYPT_CALLS 1
1705 EOF
1706
1707                                 ;;
1708                         *11*)
1709                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1710                                 cat >> confdefs.h <<\EOF
1711 #define USE_BOTH_CRYPT_CALLS 1
1712 EOF
1713
1714                                 ;;
1715       esac
1716       ;;
1717 #
1718 # AIX4.x doesn't even admit to having large
1719 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1720 #
1721     *aix4*)
1722           echo "$ac_t""enabling large file support" 1>&6
1723       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1724       ;;    
1725 #
1726 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1727 # to the existance of large files..
1728 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1729 # recommendations on large file support, however it makes the
1730 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1731 # recommendation makes the compile fail on gcc2.7. JRA.
1732 #
1733         *solaris*)
1734                 case `uname -r` in
1735                         5.6*|5.7*)
1736                         echo "$ac_t""enabling large file support" 1>&6
1737                         if test "$ac_cv_prog_gcc" = yes; then
1738                                 ${CC-cc} -v >conftest.c 2>&1
1739                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1740                                 rm -fr conftest.c
1741                                 case "$ac_cv_gcc_compiler_version_number" in
1742                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1743                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1744                                                 ;;
1745                                         *)
1746                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1747                                                 ;;
1748                                 esac
1749                         else
1750                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1751                         fi
1752                         ;;
1753                 esac
1754                 ;;
1755 #
1756 # Tests needed for SINIX large file support.
1757 #
1758     *sysv4*)
1759       if test $host = mips-sni-sysv4 ; then
1760         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1761 echo "configure:1762: checking for LFS support" >&5
1762         old_CPPFLAGS="$CPPFLAGS"
1763         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1764         if test "$cross_compiling" = yes; then
1765   SINIX_LFS_SUPPORT=cross
1766 else
1767   cat > conftest.$ac_ext <<EOF
1768 #line 1769 "configure"
1769 #include "confdefs.h"
1770
1771 #include <unistd.h>
1772 main () {
1773 #if _LFS64_LARGEFILE == 1
1774 exit(0);
1775 #else
1776 exit(1);
1777 #endif
1778 }
1779 EOF
1780 if { (eval echo configure:1781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1781 then
1782   SINIX_LFS_SUPPORT=yes
1783 else
1784   echo "configure: failed program was:" >&5
1785   cat conftest.$ac_ext >&5
1786   rm -fr conftest*
1787   SINIX_LFS_SUPPORT=no
1788 fi
1789 rm -fr conftest*
1790 fi
1791
1792         CPPFLAGS="$old_CPPFLAGS"
1793         if test x$SINIX_LFS_SUPPORT = xyes ; then
1794           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1795           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1796           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1797           LIBS="`getconf LFS64_LIBS` $LIBS"
1798         fi
1799       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1800       fi
1801     ;;
1802
1803 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1804 #
1805     *linux*)
1806         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1807 echo "configure:1808: checking for LFS support" >&5
1808         old_CPPFLAGS="$CPPFLAGS"
1809         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1810        if test "$cross_compiling" = yes; then
1811   LINUX_LFS_SUPPORT=cross
1812 else
1813   cat > conftest.$ac_ext <<EOF
1814 #line 1815 "configure"
1815 #include "confdefs.h"
1816
1817 #include <unistd.h>
1818 #include <sys/utsname.h>
1819 main() {
1820 #if _LFS64_LARGEFILE == 1
1821        struct utsname uts;
1822        char *release;
1823        int major, minor;
1824
1825        /* Ensure this is glibc 2.2 or higher */
1826 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1827        int libc_major = __GLIBC__;
1828        int libc_minor = __GLIBC_MINOR__;
1829
1830        if (libc_major < 2)
1831               exit(1);
1832        if (libc_minor < 2)
1833               exit(1);
1834 #endif
1835
1836        /* Ensure this is kernel 2.4 or higher */
1837
1838        uname(&uts);
1839        release = uts.release;
1840        major = atoi(strsep(&release, "."));
1841        minor = atoi(strsep(&release, "."));
1842
1843        if (major > 2 || (major == 2 && minor > 3))
1844                exit(0);
1845        exit(1);
1846 #else
1847        exit(1);
1848 #endif
1849 }
1850
1851 EOF
1852 if { (eval echo configure:1853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1853 then
1854   LINUX_LFS_SUPPORT=yes
1855 else
1856   echo "configure: failed program was:" >&5
1857   cat conftest.$ac_ext >&5
1858   rm -fr conftest*
1859   LINUX_LFS_SUPPORT=no
1860 fi
1861 rm -fr conftest*
1862 fi
1863
1864         CPPFLAGS="$old_CPPFLAGS"
1865         if test x$LINUX_LFS_SUPPORT = xyes ; then
1866           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1867         fi
1868        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1869                 ;;
1870
1871     *hurd*)
1872         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1873 echo "configure:1874: checking for LFS support" >&5
1874         old_CPPFLAGS="$CPPFLAGS"
1875         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1876         if test "$cross_compiling" = yes; then
1877   GLIBC_LFS_SUPPORT=cross
1878 else
1879   cat > conftest.$ac_ext <<EOF
1880 #line 1881 "configure"
1881 #include "confdefs.h"
1882
1883 #include <unistd.h>
1884 main () {
1885 #if _LFS64_LARGEFILE == 1
1886 exit(0);
1887 #else
1888 exit(1);
1889 #endif
1890 }
1891 EOF
1892 if { (eval echo configure:1893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1893 then
1894   GLIBC_LFS_SUPPORT=yes
1895 else
1896   echo "configure: failed program was:" >&5
1897   cat conftest.$ac_ext >&5
1898   rm -fr conftest*
1899   GLIBC_LFS_SUPPORT=no
1900 fi
1901 rm -fr conftest*
1902 fi
1903
1904         CPPFLAGS="$old_CPPFLAGS"
1905         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1906           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1907         fi
1908       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1909     ;;
1910
1911 esac
1912
1913 echo $ac_n "checking for inline""... $ac_c" 1>&6
1914 echo "configure:1915: checking for inline" >&5
1915 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1916   echo $ac_n "(cached) $ac_c" 1>&6
1917 else
1918   ac_cv_c_inline=no
1919 for ac_kw in inline __inline__ __inline; do
1920   cat > conftest.$ac_ext <<EOF
1921 #line 1922 "configure"
1922 #include "confdefs.h"
1923
1924 int main() {
1925 } $ac_kw foo() {
1926 ; return 0; }
1927 EOF
1928 if { (eval echo configure:1929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1929   rm -rf conftest*
1930   ac_cv_c_inline=$ac_kw; break
1931 else
1932   echo "configure: failed program was:" >&5
1933   cat conftest.$ac_ext >&5
1934 fi
1935 rm -f conftest*
1936 done
1937
1938 fi
1939
1940 echo "$ac_t""$ac_cv_c_inline" 1>&6
1941 case "$ac_cv_c_inline" in
1942   inline | yes) ;;
1943   no) cat >> confdefs.h <<\EOF
1944 #define inline 
1945 EOF
1946  ;;
1947   *)  cat >> confdefs.h <<EOF
1948 #define inline $ac_cv_c_inline
1949 EOF
1950  ;;
1951 esac
1952
1953 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1954 echo "configure:1955: checking how to run the C preprocessor" >&5
1955 # On Suns, sometimes $CPP names a directory.
1956 if test -n "$CPP" && test -d "$CPP"; then
1957   CPP=
1958 fi
1959 if test -z "$CPP"; then
1960 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1961   echo $ac_n "(cached) $ac_c" 1>&6
1962 else
1963     # This must be in double quotes, not single quotes, because CPP may get
1964   # substituted into the Makefile and "${CC-cc}" will confuse make.
1965   CPP="${CC-cc} -E"
1966   # On the NeXT, cc -E runs the code through the compiler's parser,
1967   # not just through cpp.
1968   cat > conftest.$ac_ext <<EOF
1969 #line 1970 "configure"
1970 #include "confdefs.h"
1971 #include <assert.h>
1972 Syntax Error
1973 EOF
1974 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1975 { (eval echo configure:1976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1976 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1977 if test -z "$ac_err"; then
1978   :
1979 else
1980   echo "$ac_err" >&5
1981   echo "configure: failed program was:" >&5
1982   cat conftest.$ac_ext >&5
1983   rm -rf conftest*
1984   CPP="${CC-cc} -E -traditional-cpp"
1985   cat > conftest.$ac_ext <<EOF
1986 #line 1987 "configure"
1987 #include "confdefs.h"
1988 #include <assert.h>
1989 Syntax Error
1990 EOF
1991 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1992 { (eval echo configure:1993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1993 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1994 if test -z "$ac_err"; then
1995   :
1996 else
1997   echo "$ac_err" >&5
1998   echo "configure: failed program was:" >&5
1999   cat conftest.$ac_ext >&5
2000   rm -rf conftest*
2001   CPP="${CC-cc} -nologo -E"
2002   cat > conftest.$ac_ext <<EOF
2003 #line 2004 "configure"
2004 #include "confdefs.h"
2005 #include <assert.h>
2006 Syntax Error
2007 EOF
2008 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2009 { (eval echo configure:2010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2010 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2011 if test -z "$ac_err"; then
2012   :
2013 else
2014   echo "$ac_err" >&5
2015   echo "configure: failed program was:" >&5
2016   cat conftest.$ac_ext >&5
2017   rm -rf conftest*
2018   CPP=/lib/cpp
2019 fi
2020 rm -f conftest*
2021 fi
2022 rm -f conftest*
2023 fi
2024 rm -f conftest*
2025   ac_cv_prog_CPP="$CPP"
2026 fi
2027   CPP="$ac_cv_prog_CPP"
2028 else
2029   ac_cv_prog_CPP="$CPP"
2030 fi
2031 echo "$ac_t""$CPP" 1>&6
2032
2033 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2034 echo "configure:2035: checking for ANSI C header files" >&5
2035 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2036   echo $ac_n "(cached) $ac_c" 1>&6
2037 else
2038   cat > conftest.$ac_ext <<EOF
2039 #line 2040 "configure"
2040 #include "confdefs.h"
2041 #include <stdlib.h>
2042 #include <stdarg.h>
2043 #include <string.h>
2044 #include <float.h>
2045 EOF
2046 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2047 { (eval echo configure:2048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2048 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2049 if test -z "$ac_err"; then
2050   rm -rf conftest*
2051   ac_cv_header_stdc=yes
2052 else
2053   echo "$ac_err" >&5
2054   echo "configure: failed program was:" >&5
2055   cat conftest.$ac_ext >&5
2056   rm -rf conftest*
2057   ac_cv_header_stdc=no
2058 fi
2059 rm -f conftest*
2060
2061 if test $ac_cv_header_stdc = yes; then
2062   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2063 cat > conftest.$ac_ext <<EOF
2064 #line 2065 "configure"
2065 #include "confdefs.h"
2066 #include <string.h>
2067 EOF
2068 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2069   egrep "memchr" >/dev/null 2>&1; then
2070   :
2071 else
2072   rm -rf conftest*
2073   ac_cv_header_stdc=no
2074 fi
2075 rm -f conftest*
2076
2077 fi
2078
2079 if test $ac_cv_header_stdc = yes; then
2080   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2081 cat > conftest.$ac_ext <<EOF
2082 #line 2083 "configure"
2083 #include "confdefs.h"
2084 #include <stdlib.h>
2085 EOF
2086 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2087   egrep "free" >/dev/null 2>&1; then
2088   :
2089 else
2090   rm -rf conftest*
2091   ac_cv_header_stdc=no
2092 fi
2093 rm -f conftest*
2094
2095 fi
2096
2097 if test $ac_cv_header_stdc = yes; then
2098   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2099 if test "$cross_compiling" = yes; then
2100   :
2101 else
2102   cat > conftest.$ac_ext <<EOF
2103 #line 2104 "configure"
2104 #include "confdefs.h"
2105 #include <ctype.h>
2106 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2107 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2108 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2109 int main () { int i; for (i = 0; i < 256; i++)
2110 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2111 exit (0); }
2112
2113 EOF
2114 if { (eval echo configure:2115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2115 then
2116   :
2117 else
2118   echo "configure: failed program was:" >&5
2119   cat conftest.$ac_ext >&5
2120   rm -fr conftest*
2121   ac_cv_header_stdc=no
2122 fi
2123 rm -fr conftest*
2124 fi
2125
2126 fi
2127 fi
2128
2129 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2130 if test $ac_cv_header_stdc = yes; then
2131   cat >> confdefs.h <<\EOF
2132 #define STDC_HEADERS 1
2133 EOF
2134
2135 fi
2136
2137 ac_header_dirent=no
2138 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2139 do
2140 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2141 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2142 echo "configure:2143: checking for $ac_hdr that defines DIR" >&5
2143 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2144   echo $ac_n "(cached) $ac_c" 1>&6
2145 else
2146   cat > conftest.$ac_ext <<EOF
2147 #line 2148 "configure"
2148 #include "confdefs.h"
2149 #include <sys/types.h>
2150 #include <$ac_hdr>
2151 int main() {
2152 DIR *dirp = 0;
2153 ; return 0; }
2154 EOF
2155 if { (eval echo configure:2156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2156   rm -rf conftest*
2157   eval "ac_cv_header_dirent_$ac_safe=yes"
2158 else
2159   echo "configure: failed program was:" >&5
2160   cat conftest.$ac_ext >&5
2161   rm -rf conftest*
2162   eval "ac_cv_header_dirent_$ac_safe=no"
2163 fi
2164 rm -f conftest*
2165 fi
2166 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2167   echo "$ac_t""yes" 1>&6
2168     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2169   cat >> confdefs.h <<EOF
2170 #define $ac_tr_hdr 1
2171 EOF
2172  ac_header_dirent=$ac_hdr; break
2173 else
2174   echo "$ac_t""no" 1>&6
2175 fi
2176 done
2177 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2178 if test $ac_header_dirent = dirent.h; then
2179 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2180 echo "configure:2181: checking for opendir in -ldir" >&5
2181 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2182 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2183   echo $ac_n "(cached) $ac_c" 1>&6
2184 else
2185   ac_save_LIBS="$LIBS"
2186 LIBS="-ldir  $LIBS"
2187 cat > conftest.$ac_ext <<EOF
2188 #line 2189 "configure"
2189 #include "confdefs.h"
2190 /* Override any gcc2 internal prototype to avoid an error.  */
2191 /* We use char because int might match the return type of a gcc2
2192     builtin and then its argument prototype would still apply.  */
2193 char opendir();
2194
2195 int main() {
2196 opendir()
2197 ; return 0; }
2198 EOF
2199 if { (eval echo configure:2200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2200   rm -rf conftest*
2201   eval "ac_cv_lib_$ac_lib_var=yes"
2202 else
2203   echo "configure: failed program was:" >&5
2204   cat conftest.$ac_ext >&5
2205   rm -rf conftest*
2206   eval "ac_cv_lib_$ac_lib_var=no"
2207 fi
2208 rm -f conftest*
2209 LIBS="$ac_save_LIBS"
2210
2211 fi
2212 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2213   echo "$ac_t""yes" 1>&6
2214   LIBS="$LIBS -ldir"
2215 else
2216   echo "$ac_t""no" 1>&6
2217 fi
2218
2219 else
2220 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2221 echo "configure:2222: checking for opendir in -lx" >&5
2222 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2223 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2224   echo $ac_n "(cached) $ac_c" 1>&6
2225 else
2226   ac_save_LIBS="$LIBS"
2227 LIBS="-lx  $LIBS"
2228 cat > conftest.$ac_ext <<EOF
2229 #line 2230 "configure"
2230 #include "confdefs.h"
2231 /* Override any gcc2 internal prototype to avoid an error.  */
2232 /* We use char because int might match the return type of a gcc2
2233     builtin and then its argument prototype would still apply.  */
2234 char opendir();
2235
2236 int main() {
2237 opendir()
2238 ; return 0; }
2239 EOF
2240 if { (eval echo configure:2241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2241   rm -rf conftest*
2242   eval "ac_cv_lib_$ac_lib_var=yes"
2243 else
2244   echo "configure: failed program was:" >&5
2245   cat conftest.$ac_ext >&5
2246   rm -rf conftest*
2247   eval "ac_cv_lib_$ac_lib_var=no"
2248 fi
2249 rm -f conftest*
2250 LIBS="$ac_save_LIBS"
2251
2252 fi
2253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2254   echo "$ac_t""yes" 1>&6
2255   LIBS="$LIBS -lx"
2256 else
2257   echo "$ac_t""no" 1>&6
2258 fi
2259
2260 fi
2261
2262 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2263 echo "configure:2264: checking whether time.h and sys/time.h may both be included" >&5
2264 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2265   echo $ac_n "(cached) $ac_c" 1>&6
2266 else
2267   cat > conftest.$ac_ext <<EOF
2268 #line 2269 "configure"
2269 #include "confdefs.h"
2270 #include <sys/types.h>
2271 #include <sys/time.h>
2272 #include <time.h>
2273 int main() {
2274 struct tm *tp;
2275 ; return 0; }
2276 EOF
2277 if { (eval echo configure:2278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2278   rm -rf conftest*
2279   ac_cv_header_time=yes
2280 else
2281   echo "configure: failed program was:" >&5
2282   cat conftest.$ac_ext >&5
2283   rm -rf conftest*
2284   ac_cv_header_time=no
2285 fi
2286 rm -f conftest*
2287 fi
2288
2289 echo "$ac_t""$ac_cv_header_time" 1>&6
2290 if test $ac_cv_header_time = yes; then
2291   cat >> confdefs.h <<\EOF
2292 #define TIME_WITH_SYS_TIME 1
2293 EOF
2294
2295 fi
2296
2297 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2298 echo "configure:2299: checking for sys/wait.h that is POSIX.1 compatible" >&5
2299 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2300   echo $ac_n "(cached) $ac_c" 1>&6
2301 else
2302   cat > conftest.$ac_ext <<EOF
2303 #line 2304 "configure"
2304 #include "confdefs.h"
2305 #include <sys/types.h>
2306 #include <sys/wait.h>
2307 #ifndef WEXITSTATUS
2308 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2309 #endif
2310 #ifndef WIFEXITED
2311 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2312 #endif
2313 int main() {
2314 int s;
2315 wait (&s);
2316 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2317 ; return 0; }
2318 EOF
2319 if { (eval echo configure:2320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2320   rm -rf conftest*
2321   ac_cv_header_sys_wait_h=yes
2322 else
2323   echo "configure: failed program was:" >&5
2324   cat conftest.$ac_ext >&5
2325   rm -rf conftest*
2326   ac_cv_header_sys_wait_h=no
2327 fi
2328 rm -f conftest*
2329 fi
2330
2331 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2332 if test $ac_cv_header_sys_wait_h = yes; then
2333   cat >> confdefs.h <<\EOF
2334 #define HAVE_SYS_WAIT_H 1
2335 EOF
2336
2337 fi
2338
2339 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
2340 do
2341 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2342 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2343 echo "configure:2344: checking for $ac_hdr" >&5
2344 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2345   echo $ac_n "(cached) $ac_c" 1>&6
2346 else
2347   cat > conftest.$ac_ext <<EOF
2348 #line 2349 "configure"
2349 #include "confdefs.h"
2350 #include <$ac_hdr>
2351 EOF
2352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2353 { (eval echo configure:2354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2355 if test -z "$ac_err"; then
2356   rm -rf conftest*
2357   eval "ac_cv_header_$ac_safe=yes"
2358 else
2359   echo "$ac_err" >&5
2360   echo "configure: failed program was:" >&5
2361   cat conftest.$ac_ext >&5
2362   rm -rf conftest*
2363   eval "ac_cv_header_$ac_safe=no"
2364 fi
2365 rm -f conftest*
2366 fi
2367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2368   echo "$ac_t""yes" 1>&6
2369     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2370   cat >> confdefs.h <<EOF
2371 #define $ac_tr_hdr 1
2372 EOF
2373  
2374 else
2375   echo "$ac_t""no" 1>&6
2376 fi
2377 done
2378
2379 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
2380 do
2381 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2382 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2383 echo "configure:2384: checking for $ac_hdr" >&5
2384 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2385   echo $ac_n "(cached) $ac_c" 1>&6
2386 else
2387   cat > conftest.$ac_ext <<EOF
2388 #line 2389 "configure"
2389 #include "confdefs.h"
2390 #include <$ac_hdr>
2391 EOF
2392 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2393 { (eval echo configure:2394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2394 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2395 if test -z "$ac_err"; then
2396   rm -rf conftest*
2397   eval "ac_cv_header_$ac_safe=yes"
2398 else
2399   echo "$ac_err" >&5
2400   echo "configure: failed program was:" >&5
2401   cat conftest.$ac_ext >&5
2402   rm -rf conftest*
2403   eval "ac_cv_header_$ac_safe=no"
2404 fi
2405 rm -f conftest*
2406 fi
2407 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2408   echo "$ac_t""yes" 1>&6
2409     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2410   cat >> confdefs.h <<EOF
2411 #define $ac_tr_hdr 1
2412 EOF
2413  
2414 else
2415   echo "$ac_t""no" 1>&6
2416 fi
2417 done
2418
2419 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
2420 do
2421 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2422 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2423 echo "configure:2424: checking for $ac_hdr" >&5
2424 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2425   echo $ac_n "(cached) $ac_c" 1>&6
2426 else
2427   cat > conftest.$ac_ext <<EOF
2428 #line 2429 "configure"
2429 #include "confdefs.h"
2430 #include <$ac_hdr>
2431 EOF
2432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2433 { (eval echo configure:2434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2435 if test -z "$ac_err"; then
2436   rm -rf conftest*
2437   eval "ac_cv_header_$ac_safe=yes"
2438 else
2439   echo "$ac_err" >&5
2440   echo "configure: failed program was:" >&5
2441   cat conftest.$ac_ext >&5
2442   rm -rf conftest*
2443   eval "ac_cv_header_$ac_safe=no"
2444 fi
2445 rm -f conftest*
2446 fi
2447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2448   echo "$ac_t""yes" 1>&6
2449     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2450   cat >> confdefs.h <<EOF
2451 #define $ac_tr_hdr 1
2452 EOF
2453  
2454 else
2455   echo "$ac_t""no" 1>&6
2456 fi
2457 done
2458
2459 for ac_hdr in sys/param.h ctype.h sys/un.h sys/wait.h sys/resource.h sys/ioctl.h sys/mode.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 for ac_hdr in sys/mman.h sys/filio.h sys/priv.h string.h strings.h stdlib.h sys/socket.h
2500 do
2501 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2502 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2503 echo "configure:2504: checking for $ac_hdr" >&5
2504 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2505   echo $ac_n "(cached) $ac_c" 1>&6
2506 else
2507   cat > conftest.$ac_ext <<EOF
2508 #line 2509 "configure"
2509 #include "confdefs.h"
2510 #include <$ac_hdr>
2511 EOF
2512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2513 { (eval echo configure:2514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2515 if test -z "$ac_err"; then
2516   rm -rf conftest*
2517   eval "ac_cv_header_$ac_safe=yes"
2518 else
2519   echo "$ac_err" >&5
2520   echo "configure: failed program was:" >&5
2521   cat conftest.$ac_ext >&5
2522   rm -rf conftest*
2523   eval "ac_cv_header_$ac_safe=no"
2524 fi
2525 rm -f conftest*
2526 fi
2527 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2528   echo "$ac_t""yes" 1>&6
2529     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2530   cat >> confdefs.h <<EOF
2531 #define $ac_tr_hdr 1
2532 EOF
2533  
2534 else
2535   echo "$ac_t""no" 1>&6
2536 fi
2537 done
2538
2539 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2540 do
2541 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2542 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2543 echo "configure:2544: checking for $ac_hdr" >&5
2544 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2545   echo $ac_n "(cached) $ac_c" 1>&6
2546 else
2547   cat > conftest.$ac_ext <<EOF
2548 #line 2549 "configure"
2549 #include "confdefs.h"
2550 #include <$ac_hdr>
2551 EOF
2552 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2553 { (eval echo configure:2554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2554 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2555 if test -z "$ac_err"; then
2556   rm -rf conftest*
2557   eval "ac_cv_header_$ac_safe=yes"
2558 else
2559   echo "$ac_err" >&5
2560   echo "configure: failed program was:" >&5
2561   cat conftest.$ac_ext >&5
2562   rm -rf conftest*
2563   eval "ac_cv_header_$ac_safe=no"
2564 fi
2565 rm -f conftest*
2566 fi
2567 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2568   echo "$ac_t""yes" 1>&6
2569     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2570   cat >> confdefs.h <<EOF
2571 #define $ac_tr_hdr 1
2572 EOF
2573  
2574 else
2575   echo "$ac_t""no" 1>&6
2576 fi
2577 done
2578
2579 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2580 do
2581 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2582 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2583 echo "configure:2584: checking for $ac_hdr" >&5
2584 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2585   echo $ac_n "(cached) $ac_c" 1>&6
2586 else
2587   cat > conftest.$ac_ext <<EOF
2588 #line 2589 "configure"
2589 #include "confdefs.h"
2590 #include <$ac_hdr>
2591 EOF
2592 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2593 { (eval echo configure:2594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2594 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2595 if test -z "$ac_err"; then
2596   rm -rf conftest*
2597   eval "ac_cv_header_$ac_safe=yes"
2598 else
2599   echo "$ac_err" >&5
2600   echo "configure: failed program was:" >&5
2601   cat conftest.$ac_ext >&5
2602   rm -rf conftest*
2603   eval "ac_cv_header_$ac_safe=no"
2604 fi
2605 rm -f conftest*
2606 fi
2607 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2608   echo "$ac_t""yes" 1>&6
2609     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2610   cat >> confdefs.h <<EOF
2611 #define $ac_tr_hdr 1
2612 EOF
2613  
2614 else
2615   echo "$ac_t""no" 1>&6
2616 fi
2617 done
2618
2619 #
2620 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2621 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2622 #
2623 case "$host_os" in
2624     *hpux*)
2625                 cat > conftest.$ac_ext <<EOF
2626 #line 2627 "configure"
2627 #include "confdefs.h"
2628 #include <shadow.h>
2629 int main() {
2630 struct spwd testme
2631 ; return 0; }
2632 EOF
2633 if { (eval echo configure:2634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2634   rm -rf conftest*
2635   ac_cv_header_shadow_h=yes
2636 else
2637   echo "configure: failed program was:" >&5
2638   cat conftest.$ac_ext >&5
2639   rm -rf conftest*
2640   ac_cv_header_shadow_h=no
2641 fi
2642 rm -f conftest*
2643                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2644                    cat >> confdefs.h <<\EOF
2645 #define HAVE_SHADOW_H 1
2646 EOF
2647
2648                 fi
2649         ;;
2650 esac
2651 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2652 do
2653 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2654 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2655 echo "configure:2656: checking for $ac_hdr" >&5
2656 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2657   echo $ac_n "(cached) $ac_c" 1>&6
2658 else
2659   cat > conftest.$ac_ext <<EOF
2660 #line 2661 "configure"
2661 #include "confdefs.h"
2662 #include <$ac_hdr>
2663 EOF
2664 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2665 { (eval echo configure:2666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2666 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2667 if test -z "$ac_err"; then
2668   rm -rf conftest*
2669   eval "ac_cv_header_$ac_safe=yes"
2670 else
2671   echo "$ac_err" >&5
2672   echo "configure: failed program was:" >&5
2673   cat conftest.$ac_ext >&5
2674   rm -rf conftest*
2675   eval "ac_cv_header_$ac_safe=no"
2676 fi
2677 rm -f conftest*
2678 fi
2679 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2680   echo "$ac_t""yes" 1>&6
2681     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2682   cat >> confdefs.h <<EOF
2683 #define $ac_tr_hdr 1
2684 EOF
2685  
2686 else
2687   echo "$ac_t""no" 1>&6
2688 fi
2689 done
2690
2691 for ac_hdr in nss.h sys/security.h security/pam_appl.h security/pam_modules.h
2692 do
2693 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2694 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2695 echo "configure:2696: checking for $ac_hdr" >&5
2696 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2697   echo $ac_n "(cached) $ac_c" 1>&6
2698 else
2699   cat > conftest.$ac_ext <<EOF
2700 #line 2701 "configure"
2701 #include "confdefs.h"
2702 #include <$ac_hdr>
2703 EOF
2704 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2705 { (eval echo configure:2706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2706 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2707 if test -z "$ac_err"; then
2708   rm -rf conftest*
2709   eval "ac_cv_header_$ac_safe=yes"
2710 else
2711   echo "$ac_err" >&5
2712   echo "configure: failed program was:" >&5
2713   cat conftest.$ac_ext >&5
2714   rm -rf conftest*
2715   eval "ac_cv_header_$ac_safe=no"
2716 fi
2717 rm -f conftest*
2718 fi
2719 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2720   echo "$ac_t""yes" 1>&6
2721     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2722   cat >> confdefs.h <<EOF
2723 #define $ac_tr_hdr 1
2724 EOF
2725  
2726 else
2727   echo "$ac_t""no" 1>&6
2728 fi
2729 done
2730
2731 for ac_hdr in stropts.h poll.h
2732 do
2733 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2734 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2735 echo "configure:2736: checking for $ac_hdr" >&5
2736 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2737   echo $ac_n "(cached) $ac_c" 1>&6
2738 else
2739   cat > conftest.$ac_ext <<EOF
2740 #line 2741 "configure"
2741 #include "confdefs.h"
2742 #include <$ac_hdr>
2743 EOF
2744 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2745 { (eval echo configure:2746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2746 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2747 if test -z "$ac_err"; then
2748   rm -rf conftest*
2749   eval "ac_cv_header_$ac_safe=yes"
2750 else
2751   echo "$ac_err" >&5
2752   echo "configure: failed program was:" >&5
2753   cat conftest.$ac_ext >&5
2754   rm -rf conftest*
2755   eval "ac_cv_header_$ac_safe=no"
2756 fi
2757 rm -f conftest*
2758 fi
2759 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2760   echo "$ac_t""yes" 1>&6
2761     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2762   cat >> confdefs.h <<EOF
2763 #define $ac_tr_hdr 1
2764 EOF
2765  
2766 else
2767   echo "$ac_t""no" 1>&6
2768 fi
2769 done
2770
2771 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2772 do
2773 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2774 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2775 echo "configure:2776: checking for $ac_hdr" >&5
2776 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2777   echo $ac_n "(cached) $ac_c" 1>&6
2778 else
2779   cat > conftest.$ac_ext <<EOF
2780 #line 2781 "configure"
2781 #include "confdefs.h"
2782 #include <$ac_hdr>
2783 EOF
2784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2785 { (eval echo configure:2786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2787 if test -z "$ac_err"; then
2788   rm -rf conftest*
2789   eval "ac_cv_header_$ac_safe=yes"
2790 else
2791   echo "$ac_err" >&5
2792   echo "configure: failed program was:" >&5
2793   cat conftest.$ac_ext >&5
2794   rm -rf conftest*
2795   eval "ac_cv_header_$ac_safe=no"
2796 fi
2797 rm -f conftest*
2798 fi
2799 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2800   echo "$ac_t""yes" 1>&6
2801     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2802   cat >> confdefs.h <<EOF
2803 #define $ac_tr_hdr 1
2804 EOF
2805  
2806 else
2807   echo "$ac_t""no" 1>&6
2808 fi
2809 done
2810
2811 for ac_hdr in sys/acl.h sys/cdefs.h glob.h acl/acl.h
2812 do
2813 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2814 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2815 echo "configure:2816: checking for $ac_hdr" >&5
2816 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2817   echo $ac_n "(cached) $ac_c" 1>&6
2818 else
2819   cat > conftest.$ac_ext <<EOF
2820 #line 2821 "configure"
2821 #include "confdefs.h"
2822 #include <$ac_hdr>
2823 EOF
2824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2825 { (eval echo configure:2826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2827 if test -z "$ac_err"; then
2828   rm -rf conftest*
2829   eval "ac_cv_header_$ac_safe=yes"
2830 else
2831   echo "$ac_err" >&5
2832   echo "configure: failed program was:" >&5
2833   cat conftest.$ac_ext >&5
2834   rm -rf conftest*
2835   eval "ac_cv_header_$ac_safe=no"
2836 fi
2837 rm -f conftest*
2838 fi
2839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2840   echo "$ac_t""yes" 1>&6
2841     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2842   cat >> confdefs.h <<EOF
2843 #define $ac_tr_hdr 1
2844 EOF
2845  
2846 else
2847   echo "$ac_t""no" 1>&6
2848 fi
2849 done
2850
2851
2852 # For experimental utmp support (lastlog on some BSD-like systems)
2853 for ac_hdr in utmp.h utmpx.h lastlog.h
2854 do
2855 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2856 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2857 echo "configure:2858: checking for $ac_hdr" >&5
2858 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2859   echo $ac_n "(cached) $ac_c" 1>&6
2860 else
2861   cat > conftest.$ac_ext <<EOF
2862 #line 2863 "configure"
2863 #include "confdefs.h"
2864 #include <$ac_hdr>
2865 EOF
2866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2867 { (eval echo configure:2868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2869 if test -z "$ac_err"; then
2870   rm -rf conftest*
2871   eval "ac_cv_header_$ac_safe=yes"
2872 else
2873   echo "$ac_err" >&5
2874   echo "configure: failed program was:" >&5
2875   cat conftest.$ac_ext >&5
2876   rm -rf conftest*
2877   eval "ac_cv_header_$ac_safe=no"
2878 fi
2879 rm -f conftest*
2880 fi
2881 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2882   echo "$ac_t""yes" 1>&6
2883     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2884   cat >> confdefs.h <<EOF
2885 #define $ac_tr_hdr 1
2886 EOF
2887  
2888 else
2889   echo "$ac_t""no" 1>&6
2890 fi
2891 done
2892
2893  
2894 # For quotas on Veritas VxFS filesystems
2895 for ac_hdr in sys/fs/vx_quota.h
2896 do
2897 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2898 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2899 echo "configure:2900: checking for $ac_hdr" >&5
2900 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2901   echo $ac_n "(cached) $ac_c" 1>&6
2902 else
2903   cat > conftest.$ac_ext <<EOF
2904 #line 2905 "configure"
2905 #include "confdefs.h"
2906 #include <$ac_hdr>
2907 EOF
2908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2909 { (eval echo configure:2910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2911 if test -z "$ac_err"; then
2912   rm -rf conftest*
2913   eval "ac_cv_header_$ac_safe=yes"
2914 else
2915   echo "$ac_err" >&5
2916   echo "configure: failed program was:" >&5
2917   cat conftest.$ac_ext >&5
2918   rm -rf conftest*
2919   eval "ac_cv_header_$ac_safe=no"
2920 fi
2921 rm -f conftest*
2922 fi
2923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2924   echo "$ac_t""yes" 1>&6
2925     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2926   cat >> confdefs.h <<EOF
2927 #define $ac_tr_hdr 1
2928 EOF
2929  
2930 else
2931   echo "$ac_t""no" 1>&6
2932 fi
2933 done
2934
2935
2936 echo $ac_n "checking size of int""... $ac_c" 1>&6
2937 echo "configure:2938: checking size of int" >&5
2938 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2939   echo $ac_n "(cached) $ac_c" 1>&6
2940 else
2941   if test "$cross_compiling" = yes; then
2942   ac_cv_sizeof_int=cross
2943 else
2944   cat > conftest.$ac_ext <<EOF
2945 #line 2946 "configure"
2946 #include "confdefs.h"
2947 #include <stdio.h>
2948 main()
2949 {
2950   FILE *f=fopen("conftestval", "w");
2951   if (!f) exit(1);
2952   fprintf(f, "%d\n", sizeof(int));
2953   exit(0);
2954 }
2955 EOF
2956 if { (eval echo configure:2957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2957 then
2958   ac_cv_sizeof_int=`cat conftestval`
2959 else
2960   echo "configure: failed program was:" >&5
2961   cat conftest.$ac_ext >&5
2962   rm -fr conftest*
2963   ac_cv_sizeof_int=0
2964 fi
2965 rm -fr conftest*
2966 fi
2967
2968 fi
2969 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2970 cat >> confdefs.h <<EOF
2971 #define SIZEOF_INT $ac_cv_sizeof_int
2972 EOF
2973
2974
2975 echo $ac_n "checking size of long""... $ac_c" 1>&6
2976 echo "configure:2977: checking size of long" >&5
2977 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2978   echo $ac_n "(cached) $ac_c" 1>&6
2979 else
2980   if test "$cross_compiling" = yes; then
2981   ac_cv_sizeof_long=cross
2982 else
2983   cat > conftest.$ac_ext <<EOF
2984 #line 2985 "configure"
2985 #include "confdefs.h"
2986 #include <stdio.h>
2987 main()
2988 {
2989   FILE *f=fopen("conftestval", "w");
2990   if (!f) exit(1);
2991   fprintf(f, "%d\n", sizeof(long));
2992   exit(0);
2993 }
2994 EOF
2995 if { (eval echo configure:2996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2996 then
2997   ac_cv_sizeof_long=`cat conftestval`
2998 else
2999   echo "configure: failed program was:" >&5
3000   cat conftest.$ac_ext >&5
3001   rm -fr conftest*
3002   ac_cv_sizeof_long=0
3003 fi
3004 rm -fr conftest*
3005 fi
3006
3007 fi
3008 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3009 cat >> confdefs.h <<EOF
3010 #define SIZEOF_LONG $ac_cv_sizeof_long
3011 EOF
3012
3013
3014 echo $ac_n "checking size of short""... $ac_c" 1>&6
3015 echo "configure:3016: checking size of short" >&5
3016 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
3017   echo $ac_n "(cached) $ac_c" 1>&6
3018 else
3019   if test "$cross_compiling" = yes; then
3020   ac_cv_sizeof_short=cross
3021 else
3022   cat > conftest.$ac_ext <<EOF
3023 #line 3024 "configure"
3024 #include "confdefs.h"
3025 #include <stdio.h>
3026 main()
3027 {
3028   FILE *f=fopen("conftestval", "w");
3029   if (!f) exit(1);
3030   fprintf(f, "%d\n", sizeof(short));
3031   exit(0);
3032 }
3033 EOF
3034 if { (eval echo configure:3035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3035 then
3036   ac_cv_sizeof_short=`cat conftestval`
3037 else
3038   echo "configure: failed program was:" >&5
3039   cat conftest.$ac_ext >&5
3040   rm -fr conftest*
3041   ac_cv_sizeof_short=0
3042 fi
3043 rm -fr conftest*
3044 fi
3045
3046 fi
3047 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3048 cat >> confdefs.h <<EOF
3049 #define SIZEOF_SHORT $ac_cv_sizeof_short
3050 EOF
3051
3052
3053
3054 echo $ac_n "checking for working const""... $ac_c" 1>&6
3055 echo "configure:3056: checking for working const" >&5
3056 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3057   echo $ac_n "(cached) $ac_c" 1>&6
3058 else
3059   cat > conftest.$ac_ext <<EOF
3060 #line 3061 "configure"
3061 #include "confdefs.h"
3062
3063 int main() {
3064
3065 /* Ultrix mips cc rejects this.  */
3066 typedef int charset[2]; const charset x;
3067 /* SunOS 4.1.1 cc rejects this.  */
3068 char const *const *ccp;
3069 char **p;
3070 /* NEC SVR4.0.2 mips cc rejects this.  */
3071 struct point {int x, y;};
3072 static struct point const zero = {0,0};
3073 /* AIX XL C 1.02.0.0 rejects this.
3074    It does not let you subtract one const X* pointer from another in an arm
3075    of an if-expression whose if-part is not a constant expression */
3076 const char *g = "string";
3077 ccp = &g + (g ? g-g : 0);
3078 /* HPUX 7.0 cc rejects these. */
3079 ++ccp;
3080 p = (char**) ccp;
3081 ccp = (char const *const *) p;
3082 { /* SCO 3.2v4 cc rejects this.  */
3083   char *t;
3084   char const *s = 0 ? (char *) 0 : (char const *) 0;
3085
3086   *t++ = 0;
3087 }
3088 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3089   int x[] = {25, 17};
3090   const int *foo = &x[0];
3091   ++foo;
3092 }
3093 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3094   typedef const int *iptr;
3095   iptr p = 0;
3096   ++p;
3097 }
3098 { /* AIX XL C 1.02.0.0 rejects this saying
3099      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3100   struct s { int j; const int *ap[3]; };
3101   struct s *b; b->j = 5;
3102 }
3103 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3104   const int foo = 10;
3105 }
3106
3107 ; return 0; }
3108 EOF
3109 if { (eval echo configure:3110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3110   rm -rf conftest*
3111   ac_cv_c_const=yes
3112 else
3113   echo "configure: failed program was:" >&5
3114   cat conftest.$ac_ext >&5
3115   rm -rf conftest*
3116   ac_cv_c_const=no
3117 fi
3118 rm -f conftest*
3119 fi
3120
3121 echo "$ac_t""$ac_cv_c_const" 1>&6
3122 if test $ac_cv_c_const = no; then
3123   cat >> confdefs.h <<\EOF
3124 #define const 
3125 EOF
3126
3127 fi
3128
3129 echo $ac_n "checking for inline""... $ac_c" 1>&6
3130 echo "configure:3131: checking for inline" >&5
3131 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3132   echo $ac_n "(cached) $ac_c" 1>&6
3133 else
3134   ac_cv_c_inline=no
3135 for ac_kw in inline __inline__ __inline; do
3136   cat > conftest.$ac_ext <<EOF
3137 #line 3138 "configure"
3138 #include "confdefs.h"
3139
3140 int main() {
3141 } $ac_kw foo() {
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_c_inline=$ac_kw; break
3147 else
3148   echo "configure: failed program was:" >&5
3149   cat conftest.$ac_ext >&5
3150 fi
3151 rm -f conftest*
3152 done
3153
3154 fi
3155
3156 echo "$ac_t""$ac_cv_c_inline" 1>&6
3157 case "$ac_cv_c_inline" in
3158   inline | yes) ;;
3159   no) cat >> confdefs.h <<\EOF
3160 #define inline 
3161 EOF
3162  ;;
3163   *)  cat >> confdefs.h <<EOF
3164 #define inline $ac_cv_c_inline
3165 EOF
3166  ;;
3167 esac
3168
3169 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3170 echo "configure:3171: checking whether byte ordering is bigendian" >&5
3171 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
3172   echo $ac_n "(cached) $ac_c" 1>&6
3173 else
3174   ac_cv_c_bigendian=unknown
3175 # See if sys/param.h defines the BYTE_ORDER macro.
3176 cat > conftest.$ac_ext <<EOF
3177 #line 3178 "configure"
3178 #include "confdefs.h"
3179 #include <sys/types.h>
3180 #include <sys/param.h>
3181 int main() {
3182
3183 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3184  bogus endian macros
3185 #endif
3186 ; return 0; }
3187 EOF
3188 if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3189   rm -rf conftest*
3190   # It does; now see whether it defined to BIG_ENDIAN or not.
3191 cat > conftest.$ac_ext <<EOF
3192 #line 3193 "configure"
3193 #include "confdefs.h"
3194 #include <sys/types.h>
3195 #include <sys/param.h>
3196 int main() {
3197
3198 #if BYTE_ORDER != BIG_ENDIAN
3199  not big endian
3200 #endif
3201 ; return 0; }
3202 EOF
3203 if { (eval echo configure:3204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3204   rm -rf conftest*
3205   ac_cv_c_bigendian=yes
3206 else
3207   echo "configure: failed program was:" >&5
3208   cat conftest.$ac_ext >&5
3209   rm -rf conftest*
3210   ac_cv_c_bigendian=no
3211 fi
3212 rm -f conftest*
3213 else
3214   echo "configure: failed program was:" >&5
3215   cat conftest.$ac_ext >&5
3216 fi
3217 rm -f conftest*
3218 if test $ac_cv_c_bigendian = unknown; then
3219 if test "$cross_compiling" = yes; then
3220     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3221 else
3222   cat > conftest.$ac_ext <<EOF
3223 #line 3224 "configure"
3224 #include "confdefs.h"
3225 main () {
3226   /* Are we little or big endian?  From Harbison&Steele.  */
3227   union
3228   {
3229     long l;
3230     char c[sizeof (long)];
3231   } u;
3232   u.l = 1;
3233   exit (u.c[sizeof (long) - 1] == 1);
3234 }
3235 EOF
3236 if { (eval echo configure:3237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3237 then
3238   ac_cv_c_bigendian=no
3239 else
3240   echo "configure: failed program was:" >&5
3241   cat conftest.$ac_ext >&5
3242   rm -fr conftest*
3243   ac_cv_c_bigendian=yes
3244 fi
3245 rm -fr conftest*
3246 fi
3247
3248 fi
3249 fi
3250
3251 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3252 if test $ac_cv_c_bigendian = yes; then
3253   cat >> confdefs.h <<\EOF
3254 #define WORDS_BIGENDIAN 1
3255 EOF
3256
3257 fi
3258
3259 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
3260 echo "configure:3261: checking whether char is unsigned" >&5
3261 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
3262   echo $ac_n "(cached) $ac_c" 1>&6
3263 else
3264   if test "$GCC" = yes; then
3265   # GCC predefines this symbol on systems where it applies.
3266 cat > conftest.$ac_ext <<EOF
3267 #line 3268 "configure"
3268 #include "confdefs.h"
3269 #ifdef __CHAR_UNSIGNED__
3270   yes
3271 #endif
3272
3273 EOF
3274 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3275   egrep "yes" >/dev/null 2>&1; then
3276   rm -rf conftest*
3277   ac_cv_c_char_unsigned=yes
3278 else
3279   rm -rf conftest*
3280   ac_cv_c_char_unsigned=no
3281 fi
3282 rm -f conftest*
3283
3284 else
3285 if test "$cross_compiling" = yes; then
3286     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
3287 else
3288   cat > conftest.$ac_ext <<EOF
3289 #line 3290 "configure"
3290 #include "confdefs.h"
3291 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
3292 #if !defined(__STDC__) || __STDC__ != 1
3293 #define volatile
3294 #endif
3295 main() {
3296   volatile char c = 255; exit(c < 0);
3297 }
3298 EOF
3299 if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3300 then
3301   ac_cv_c_char_unsigned=yes
3302 else
3303   echo "configure: failed program was:" >&5
3304   cat conftest.$ac_ext >&5
3305   rm -fr conftest*
3306   ac_cv_c_char_unsigned=no
3307 fi
3308 rm -fr conftest*
3309 fi
3310
3311 fi
3312 fi
3313
3314 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
3315 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
3316   cat >> confdefs.h <<\EOF
3317 #define __CHAR_UNSIGNED__ 1
3318 EOF
3319
3320 fi
3321
3322
3323 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3324 echo "configure:3325: checking return type of signal handlers" >&5
3325 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3326   echo $ac_n "(cached) $ac_c" 1>&6
3327 else
3328   cat > conftest.$ac_ext <<EOF
3329 #line 3330 "configure"
3330 #include "confdefs.h"
3331 #include <sys/types.h>
3332 #include <signal.h>
3333 #ifdef signal
3334 #undef signal
3335 #endif
3336 #ifdef __cplusplus
3337 extern "C" void (*signal (int, void (*)(int)))(int);
3338 #else
3339 void (*signal ()) ();
3340 #endif
3341
3342 int main() {
3343 int i;
3344 ; return 0; }
3345 EOF
3346 if { (eval echo configure:3347: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3347   rm -rf conftest*
3348   ac_cv_type_signal=void
3349 else
3350   echo "configure: failed program was:" >&5
3351   cat conftest.$ac_ext >&5
3352   rm -rf conftest*
3353   ac_cv_type_signal=int
3354 fi
3355 rm -f conftest*
3356 fi
3357
3358 echo "$ac_t""$ac_cv_type_signal" 1>&6
3359 cat >> confdefs.h <<EOF
3360 #define RETSIGTYPE $ac_cv_type_signal
3361 EOF
3362
3363
3364 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3365 echo "configure:3366: checking for uid_t in sys/types.h" >&5
3366 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3367   echo $ac_n "(cached) $ac_c" 1>&6
3368 else
3369   cat > conftest.$ac_ext <<EOF
3370 #line 3371 "configure"
3371 #include "confdefs.h"
3372 #include <sys/types.h>
3373 EOF
3374 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3375   egrep "uid_t" >/dev/null 2>&1; then
3376   rm -rf conftest*
3377   ac_cv_type_uid_t=yes
3378 else
3379   rm -rf conftest*
3380   ac_cv_type_uid_t=no
3381 fi
3382 rm -f conftest*
3383
3384 fi
3385
3386 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3387 if test $ac_cv_type_uid_t = no; then
3388   cat >> confdefs.h <<\EOF
3389 #define uid_t int
3390 EOF
3391
3392   cat >> confdefs.h <<\EOF
3393 #define gid_t int
3394 EOF
3395
3396 fi
3397
3398 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3399 echo "configure:3400: checking for mode_t" >&5
3400 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3401   echo $ac_n "(cached) $ac_c" 1>&6
3402 else
3403   cat > conftest.$ac_ext <<EOF
3404 #line 3405 "configure"
3405 #include "confdefs.h"
3406 #include <sys/types.h>
3407 #if STDC_HEADERS
3408 #include <stdlib.h>
3409 #include <stddef.h>
3410 #endif
3411 EOF
3412 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3413   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3414   rm -rf conftest*
3415   ac_cv_type_mode_t=yes
3416 else
3417   rm -rf conftest*
3418   ac_cv_type_mode_t=no
3419 fi
3420 rm -f conftest*
3421
3422 fi
3423 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3424 if test $ac_cv_type_mode_t = no; then
3425   cat >> confdefs.h <<\EOF
3426 #define mode_t int
3427 EOF
3428
3429 fi
3430
3431 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3432 echo "configure:3433: checking for off_t" >&5
3433 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3434   echo $ac_n "(cached) $ac_c" 1>&6
3435 else
3436   cat > conftest.$ac_ext <<EOF
3437 #line 3438 "configure"
3438 #include "confdefs.h"
3439 #include <sys/types.h>
3440 #if STDC_HEADERS
3441 #include <stdlib.h>
3442 #include <stddef.h>
3443 #endif
3444 EOF
3445 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3446   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3447   rm -rf conftest*
3448   ac_cv_type_off_t=yes
3449 else
3450   rm -rf conftest*
3451   ac_cv_type_off_t=no
3452 fi
3453 rm -f conftest*
3454
3455 fi
3456 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3457 if test $ac_cv_type_off_t = no; then
3458   cat >> confdefs.h <<\EOF
3459 #define off_t long
3460 EOF
3461
3462 fi
3463
3464 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3465 echo "configure:3466: checking for size_t" >&5
3466 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3467   echo $ac_n "(cached) $ac_c" 1>&6
3468 else
3469   cat > conftest.$ac_ext <<EOF
3470 #line 3471 "configure"
3471 #include "confdefs.h"
3472 #include <sys/types.h>
3473 #if STDC_HEADERS
3474 #include <stdlib.h>
3475 #include <stddef.h>
3476 #endif
3477 EOF
3478 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3479   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3480   rm -rf conftest*
3481   ac_cv_type_size_t=yes
3482 else
3483   rm -rf conftest*
3484   ac_cv_type_size_t=no
3485 fi
3486 rm -f conftest*
3487
3488 fi
3489 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3490 if test $ac_cv_type_size_t = no; then
3491   cat >> confdefs.h <<\EOF
3492 #define size_t unsigned
3493 EOF
3494
3495 fi
3496
3497 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3498 echo "configure:3499: checking for pid_t" >&5
3499 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3500   echo $ac_n "(cached) $ac_c" 1>&6
3501 else
3502   cat > conftest.$ac_ext <<EOF
3503 #line 3504 "configure"
3504 #include "confdefs.h"
3505 #include <sys/types.h>
3506 #if STDC_HEADERS
3507 #include <stdlib.h>
3508 #include <stddef.h>
3509 #endif
3510 EOF
3511 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3512   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3513   rm -rf conftest*
3514   ac_cv_type_pid_t=yes
3515 else
3516   rm -rf conftest*
3517   ac_cv_type_pid_t=no
3518 fi
3519 rm -f conftest*
3520
3521 fi
3522 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3523 if test $ac_cv_type_pid_t = no; then
3524   cat >> confdefs.h <<\EOF
3525 #define pid_t int
3526 EOF
3527
3528 fi
3529
3530 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3531 echo "configure:3532: checking for st_rdev in struct stat" >&5
3532 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3533   echo $ac_n "(cached) $ac_c" 1>&6
3534 else
3535   cat > conftest.$ac_ext <<EOF
3536 #line 3537 "configure"
3537 #include "confdefs.h"
3538 #include <sys/types.h>
3539 #include <sys/stat.h>
3540 int main() {
3541 struct stat s; s.st_rdev;
3542 ; return 0; }
3543 EOF
3544 if { (eval echo configure:3545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3545   rm -rf conftest*
3546   ac_cv_struct_st_rdev=yes
3547 else
3548   echo "configure: failed program was:" >&5
3549   cat conftest.$ac_ext >&5
3550   rm -rf conftest*
3551   ac_cv_struct_st_rdev=no
3552 fi
3553 rm -f conftest*
3554 fi
3555
3556 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3557 if test $ac_cv_struct_st_rdev = yes; then
3558   cat >> confdefs.h <<\EOF
3559 #define HAVE_ST_RDEV 1
3560 EOF
3561
3562 fi
3563
3564 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3565 echo "configure:3566: checking for d_off in dirent" >&5
3566 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3567   echo $ac_n "(cached) $ac_c" 1>&6
3568 else
3569   cat > conftest.$ac_ext <<EOF
3570 #line 3571 "configure"
3571 #include "confdefs.h"
3572
3573 #include <unistd.h>
3574 #include <sys/types.h>
3575 #include <dirent.h>
3576 int main() {
3577 struct dirent d; d.d_off;
3578 ; return 0; }
3579 EOF
3580 if { (eval echo configure:3581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3581   rm -rf conftest*
3582   ac_cv_dirent_d_off=yes
3583 else
3584   echo "configure: failed program was:" >&5
3585   cat conftest.$ac_ext >&5
3586   rm -rf conftest*
3587   ac_cv_dirent_d_off=no
3588 fi
3589 rm -f conftest*
3590 fi
3591
3592 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3593 if test $ac_cv_dirent_d_off = yes; then
3594   cat >> confdefs.h <<\EOF
3595 #define HAVE_DIRENT_D_OFF 1
3596 EOF
3597
3598 fi
3599
3600 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3601 echo "configure:3602: checking for ino_t" >&5
3602 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3603   echo $ac_n "(cached) $ac_c" 1>&6
3604 else
3605   cat > conftest.$ac_ext <<EOF
3606 #line 3607 "configure"
3607 #include "confdefs.h"
3608 #include <sys/types.h>
3609 #if STDC_HEADERS
3610 #include <stdlib.h>
3611 #include <stddef.h>
3612 #endif
3613 EOF
3614 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3615   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3616   rm -rf conftest*
3617   ac_cv_type_ino_t=yes
3618 else
3619   rm -rf conftest*
3620   ac_cv_type_ino_t=no
3621 fi
3622 rm -f conftest*
3623
3624 fi
3625 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3626 if test $ac_cv_type_ino_t = no; then
3627   cat >> confdefs.h <<\EOF
3628 #define ino_t unsigned
3629 EOF
3630
3631 fi
3632
3633 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3634 echo "configure:3635: checking for loff_t" >&5
3635 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3636   echo $ac_n "(cached) $ac_c" 1>&6
3637 else
3638   cat > conftest.$ac_ext <<EOF
3639 #line 3640 "configure"
3640 #include "confdefs.h"
3641 #include <sys/types.h>
3642 #if STDC_HEADERS
3643 #include <stdlib.h>
3644 #include <stddef.h>
3645 #endif
3646 EOF
3647 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3648   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3649   rm -rf conftest*
3650   ac_cv_type_loff_t=yes
3651 else
3652   rm -rf conftest*
3653   ac_cv_type_loff_t=no
3654 fi
3655 rm -f conftest*
3656
3657 fi
3658 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3659 if test $ac_cv_type_loff_t = no; then
3660   cat >> confdefs.h <<\EOF
3661 #define loff_t off_t
3662 EOF
3663
3664 fi
3665
3666 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3667 echo "configure:3668: checking for offset_t" >&5
3668 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3669   echo $ac_n "(cached) $ac_c" 1>&6
3670 else
3671   cat > conftest.$ac_ext <<EOF
3672 #line 3673 "configure"
3673 #include "confdefs.h"
3674 #include <sys/types.h>
3675 #if STDC_HEADERS
3676 #include <stdlib.h>
3677 #include <stddef.h>
3678 #endif
3679 EOF
3680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3681   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3682   rm -rf conftest*
3683   ac_cv_type_offset_t=yes
3684 else
3685   rm -rf conftest*
3686   ac_cv_type_offset_t=no
3687 fi
3688 rm -f conftest*
3689
3690 fi
3691 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3692 if test $ac_cv_type_offset_t = no; then
3693   cat >> confdefs.h <<\EOF
3694 #define offset_t loff_t
3695 EOF
3696
3697 fi
3698
3699 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3700 echo "configure:3701: checking for ssize_t" >&5
3701 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3702   echo $ac_n "(cached) $ac_c" 1>&6
3703 else
3704   cat > conftest.$ac_ext <<EOF
3705 #line 3706 "configure"
3706 #include "confdefs.h"
3707 #include <sys/types.h>
3708 #if STDC_HEADERS
3709 #include <stdlib.h>
3710 #include <stddef.h>
3711 #endif
3712 EOF
3713 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3714   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3715   rm -rf conftest*
3716   ac_cv_type_ssize_t=yes
3717 else
3718   rm -rf conftest*
3719   ac_cv_type_ssize_t=no
3720 fi
3721 rm -f conftest*
3722
3723 fi
3724 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3725 if test $ac_cv_type_ssize_t = no; then
3726   cat >> confdefs.h <<\EOF
3727 #define ssize_t int
3728 EOF
3729
3730 fi
3731
3732 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3733 echo "configure:3734: checking for wchar_t" >&5
3734 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3735   echo $ac_n "(cached) $ac_c" 1>&6
3736 else
3737   cat > conftest.$ac_ext <<EOF
3738 #line 3739 "configure"
3739 #include "confdefs.h"
3740 #include <sys/types.h>
3741 #if STDC_HEADERS
3742 #include <stdlib.h>
3743 #include <stddef.h>
3744 #endif
3745 EOF
3746 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3747   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3748   rm -rf conftest*
3749   ac_cv_type_wchar_t=yes
3750 else
3751   rm -rf conftest*
3752   ac_cv_type_wchar_t=no
3753 fi
3754 rm -f conftest*
3755
3756 fi
3757 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3758 if test $ac_cv_type_wchar_t = no; then
3759   cat >> confdefs.h <<\EOF
3760 #define wchar_t unsigned short
3761 EOF
3762
3763 fi
3764
3765
3766 # we need libcups for CUPS support...
3767 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3768 echo "configure:3769: checking for httpConnect in -lcups" >&5
3769 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3770 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3771   echo $ac_n "(cached) $ac_c" 1>&6
3772 else
3773   ac_save_LIBS="$LIBS"
3774 LIBS="-lcups  $LIBS"
3775 cat > conftest.$ac_ext <<EOF
3776 #line 3777 "configure"
3777 #include "confdefs.h"
3778 /* Override any gcc2 internal prototype to avoid an error.  */
3779 /* We use char because int might match the return type of a gcc2
3780     builtin and then its argument prototype would still apply.  */
3781 char httpConnect();
3782
3783 int main() {
3784 httpConnect()
3785 ; return 0; }
3786 EOF
3787 if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3788   rm -rf conftest*
3789   eval "ac_cv_lib_$ac_lib_var=yes"
3790 else
3791   echo "configure: failed program was:" >&5
3792   cat conftest.$ac_ext >&5
3793   rm -rf conftest*
3794   eval "ac_cv_lib_$ac_lib_var=no"
3795 fi
3796 rm -f conftest*
3797 LIBS="$ac_save_LIBS"
3798
3799 fi
3800 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3801   echo "$ac_t""yes" 1>&6
3802     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3803     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3804   cat >> confdefs.h <<EOF
3805 #define $ac_tr_lib 1
3806 EOF
3807
3808   LIBS="-lcups $LIBS"
3809
3810 else
3811   echo "$ac_t""no" 1>&6
3812 fi
3813
3814
3815 # we need libdl for PAM and the new VFS code
3816 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3817 echo "configure:3818: checking for dlopen in -ldl" >&5
3818 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3819 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3820   echo $ac_n "(cached) $ac_c" 1>&6
3821 else
3822   ac_save_LIBS="$LIBS"
3823 LIBS="-ldl  $LIBS"
3824 cat > conftest.$ac_ext <<EOF
3825 #line 3826 "configure"
3826 #include "confdefs.h"
3827 /* Override any gcc2 internal prototype to avoid an error.  */
3828 /* We use char because int might match the return type of a gcc2
3829     builtin and then its argument prototype would still apply.  */
3830 char dlopen();
3831
3832 int main() {
3833 dlopen()
3834 ; return 0; }
3835 EOF
3836 if { (eval echo configure:3837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3837   rm -rf conftest*
3838   eval "ac_cv_lib_$ac_lib_var=yes"
3839 else
3840   echo "configure: failed program was:" >&5
3841   cat conftest.$ac_ext >&5
3842   rm -rf conftest*
3843   eval "ac_cv_lib_$ac_lib_var=no"
3844 fi
3845 rm -f conftest*
3846 LIBS="$ac_save_LIBS"
3847
3848 fi
3849 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3850   echo "$ac_t""yes" 1>&6
3851   LIBS="$LIBS -ldl";
3852         cat >> confdefs.h <<\EOF
3853 #define HAVE_LIBDL 1
3854 EOF
3855
3856 else
3857   echo "$ac_t""no" 1>&6
3858 fi
3859
3860
3861 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3862 echo "configure:3863: checking for sig_atomic_t type" >&5
3863 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3864   echo $ac_n "(cached) $ac_c" 1>&6
3865 else
3866   
3867     cat > conftest.$ac_ext <<EOF
3868 #line 3869 "configure"
3869 #include "confdefs.h"
3870
3871 #include <sys/types.h>
3872 #if STDC_HEADERS
3873 #include <stdlib.h>
3874 #include <stddef.h>
3875 #endif
3876 #include <signal.h>
3877 int main() {
3878 sig_atomic_t i = 0
3879 ; return 0; }
3880 EOF
3881 if { (eval echo configure:3882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3882   rm -rf conftest*
3883   samba_cv_sig_atomic_t=yes
3884 else
3885   echo "configure: failed program was:" >&5
3886   cat conftest.$ac_ext >&5
3887   rm -rf conftest*
3888   samba_cv_sig_atomic_t=no
3889 fi
3890 rm -f conftest*
3891 fi
3892
3893 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3894 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3895    cat >> confdefs.h <<\EOF
3896 #define HAVE_SIG_ATOMIC_T_TYPE 1
3897 EOF
3898
3899 fi
3900
3901 echo $ac_n "checking for errno in errno.h""... $ac_c" 1>&6
3902 echo "configure:3903: checking for errno in errno.h" >&5
3903 if eval "test \"`echo '$''{'samba_cv_errno'+set}'`\" = set"; then
3904   echo $ac_n "(cached) $ac_c" 1>&6
3905 else
3906   
3907     cat > conftest.$ac_ext <<EOF
3908 #line 3909 "configure"
3909 #include "confdefs.h"
3910 #include <errno.h>
3911 int main() {
3912 int i = errno
3913 ; return 0; }
3914 EOF
3915 if { (eval echo configure:3916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3916   rm -rf conftest*
3917   samba_cv_errno=yes
3918 else
3919   echo "configure: failed program was:" >&5
3920   cat conftest.$ac_ext >&5
3921   rm -rf conftest*
3922   samba_cv_have_errno=no
3923 fi
3924 rm -f conftest*
3925 fi
3926
3927 echo "$ac_t""$samba_cv_errno" 1>&6
3928 if test x"$samba_cv_errno" = x"yes"; then
3929    cat >> confdefs.h <<\EOF
3930 #define HAVE_ERRNO_DECL 1
3931 EOF
3932
3933 fi
3934
3935 # stupid glibc has the functions but no declaration. grrrr.
3936 echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3937 echo "configure:3938: checking for setresuid declaration" >&5
3938 if eval "test \"`echo '$''{'samba_cv_have_setresuid_decl'+set}'`\" = set"; then
3939   echo $ac_n "(cached) $ac_c" 1>&6
3940 else
3941   
3942     cat > conftest.$ac_ext <<EOF
3943 #line 3944 "configure"
3944 #include "confdefs.h"
3945 #include <unistd.h>
3946 int main() {
3947 int i = (int)setresuid
3948 ; return 0; }
3949 EOF
3950 if { (eval echo configure:3951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3951   rm -rf conftest*
3952   samba_cv_have_setresuid_decl=yes
3953 else
3954   echo "configure: failed program was:" >&5
3955   cat conftest.$ac_ext >&5
3956   rm -rf conftest*
3957   samba_cv_have_setresuid_decl=no
3958 fi
3959 rm -f conftest*
3960 fi
3961
3962 echo "$ac_t""$samba_cv_have_setresuid_decl" 1>&6
3963 if test x"$samba_cv_have_setresuid_decl" = x"yes"; then
3964     cat >> confdefs.h <<\EOF
3965 #define HAVE_SETRESUID_DECL 1
3966 EOF
3967
3968 fi
3969
3970 # stupid glibc has the functions but no declaration. grrrr.
3971 echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3972 echo "configure:3973: checking for setresgid declaration" >&5
3973 if eval "test \"`echo '$''{'samba_cv_have_setresgid_decl'+set}'`\" = set"; then
3974   echo $ac_n "(cached) $ac_c" 1>&6
3975 else
3976   
3977     cat > conftest.$ac_ext <<EOF
3978 #line 3979 "configure"
3979 #include "confdefs.h"
3980 #include <unistd.h>
3981 int main() {
3982 int i = (int)setresgid
3983 ; return 0; }
3984 EOF
3985 if { (eval echo configure:3986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3986   rm -rf conftest*
3987   samba_cv_have_setresgid_decl=yes
3988 else
3989   echo "configure: failed program was:" >&5
3990   cat conftest.$ac_ext >&5
3991   rm -rf conftest*
3992   samba_cv_have_setresgid_decl=no
3993 fi
3994 rm -f conftest*
3995 fi
3996
3997 echo "$ac_t""$samba_cv_have_setresgid_decl" 1>&6
3998 if test x"$samba_cv_have_setresgid_decl" = x"yes"; then
3999     cat >> confdefs.h <<\EOF
4000 #define HAVE_SETRESGID_DECL 1
4001 EOF
4002
4003 fi
4004
4005 # and glibc has setresuid under linux but the function does
4006 # nothing until kernel 2.1.44! very dumb.
4007 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
4008 echo "configure:4009: checking for real setresuid" >&5
4009 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
4010   echo $ac_n "(cached) $ac_c" 1>&6
4011 else
4012   
4013     if test "$cross_compiling" = yes; then
4014   samba_cv_have_setresuid=cross
4015 else
4016   cat > conftest.$ac_ext <<EOF
4017 #line 4018 "configure"
4018 #include "confdefs.h"
4019 #include <errno.h>
4020 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
4021 EOF
4022 if { (eval echo configure:4023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4023 then
4024   samba_cv_have_setresuid=yes
4025 else
4026   echo "configure: failed program was:" >&5
4027   cat conftest.$ac_ext >&5
4028   rm -fr conftest*
4029   samba_cv_have_setresuid=no
4030 fi
4031 rm -fr conftest*
4032 fi
4033
4034 fi
4035
4036 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4037 if test x"$samba_cv_have_setresuid" = x"yes"; then
4038     cat >> confdefs.h <<\EOF
4039 #define HAVE_SETRESUID 1
4040 EOF
4041
4042 fi
4043
4044 # Do the same check for setresguid...
4045 #
4046 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4047 echo "configure:4048: checking for real setresgid" >&5
4048 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4049   echo $ac_n "(cached) $ac_c" 1>&6
4050 else
4051   
4052     if test "$cross_compiling" = yes; then
4053   samba_cv_have_setresgid=cross
4054 else
4055   cat > conftest.$ac_ext <<EOF
4056 #line 4057 "configure"
4057 #include "confdefs.h"
4058 #include <unistd.h>
4059 #include <errno.h>
4060 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4061 EOF
4062 if { (eval echo configure:4063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4063 then
4064   samba_cv_have_setresgid=yes
4065 else
4066   echo "configure: failed program was:" >&5
4067   cat conftest.$ac_ext >&5
4068   rm -fr conftest*
4069   samba_cv_have_setresgid=no
4070 fi
4071 rm -fr conftest*
4072 fi
4073
4074 fi
4075
4076 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4077 if test x"$samba_cv_have_setresgid" = x"yes"; then
4078     cat >> confdefs.h <<\EOF
4079 #define HAVE_SETRESGID 1
4080 EOF
4081
4082 fi
4083
4084 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4085 echo "configure:4086: checking for 8-bit clean memcmp" >&5
4086 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4087   echo $ac_n "(cached) $ac_c" 1>&6
4088 else
4089   if test "$cross_compiling" = yes; then
4090   ac_cv_func_memcmp_clean=no
4091 else
4092   cat > conftest.$ac_ext <<EOF
4093 #line 4094 "configure"
4094 #include "confdefs.h"
4095
4096 main()
4097 {
4098   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4099   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4100 }
4101
4102 EOF
4103 if { (eval echo configure:4104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4104 then
4105   ac_cv_func_memcmp_clean=yes
4106 else
4107   echo "configure: failed program was:" >&5
4108   cat conftest.$ac_ext >&5
4109   rm -fr conftest*
4110   ac_cv_func_memcmp_clean=no
4111 fi
4112 rm -fr conftest*
4113 fi
4114
4115 fi
4116
4117 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4118 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4119
4120
4121 ###############################################
4122 # test for where we get crypt() from
4123 for ac_func in crypt
4124 do
4125 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4126 echo "configure:4127: checking for $ac_func" >&5
4127 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4128   echo $ac_n "(cached) $ac_c" 1>&6
4129 else
4130   cat > conftest.$ac_ext <<EOF
4131 #line 4132 "configure"
4132 #include "confdefs.h"
4133 /* System header to define __stub macros and hopefully few prototypes,
4134     which can conflict with char $ac_func(); below.  */
4135 #include <assert.h>
4136 /* Override any gcc2 internal prototype to avoid an error.  */
4137 /* We use char because int might match the return type of a gcc2
4138     builtin and then its argument prototype would still apply.  */
4139 char $ac_func();
4140
4141 int main() {
4142
4143 /* The GNU C library defines this for functions which it implements
4144     to always fail with ENOSYS.  Some functions are actually named
4145     something starting with __ and the normal name is an alias.  */
4146 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4147 choke me
4148 #else
4149 $ac_func();
4150 #endif
4151
4152 ; return 0; }
4153 EOF
4154 if { (eval echo configure:4155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4155   rm -rf conftest*
4156   eval "ac_cv_func_$ac_func=yes"
4157 else
4158   echo "configure: failed program was:" >&5
4159   cat conftest.$ac_ext >&5
4160   rm -rf conftest*
4161   eval "ac_cv_func_$ac_func=no"
4162 fi
4163 rm -f conftest*
4164 fi
4165
4166 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4167   echo "$ac_t""yes" 1>&6
4168     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4169   cat >> confdefs.h <<EOF
4170 #define $ac_tr_func 1
4171 EOF
4172  
4173 else
4174   echo "$ac_t""no" 1>&6
4175 fi
4176 done
4177
4178 if test x"$ac_cv_func_crypt" = x"no"; then
4179     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4180 echo "configure:4181: checking for crypt in -lcrypt" >&5
4181 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4182 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4183   echo $ac_n "(cached) $ac_c" 1>&6
4184 else
4185   ac_save_LIBS="$LIBS"
4186 LIBS="-lcrypt  $LIBS"
4187 cat > conftest.$ac_ext <<EOF
4188 #line 4189 "configure"
4189 #include "confdefs.h"
4190 /* Override any gcc2 internal prototype to avoid an error.  */
4191 /* We use char because int might match the return type of a gcc2
4192     builtin and then its argument prototype would still apply.  */
4193 char crypt();
4194
4195 int main() {
4196 crypt()
4197 ; return 0; }
4198 EOF
4199 if { (eval echo configure:4200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4200   rm -rf conftest*
4201   eval "ac_cv_lib_$ac_lib_var=yes"
4202 else
4203   echo "configure: failed program was:" >&5
4204   cat conftest.$ac_ext >&5
4205   rm -rf conftest*
4206   eval "ac_cv_lib_$ac_lib_var=no"
4207 fi
4208 rm -f conftest*
4209 LIBS="$ac_save_LIBS"
4210
4211 fi
4212 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4213   echo "$ac_t""yes" 1>&6
4214   LIBS="$LIBS -lcrypt";
4215         cat >> confdefs.h <<\EOF
4216 #define HAVE_CRYPT 1
4217 EOF
4218
4219 else
4220   echo "$ac_t""no" 1>&6
4221 fi
4222
4223 fi
4224
4225
4226 ###############################################
4227 # Readline included by default unless explicitly asked not to
4228 test "${with_readline+set}" != "set" && with_readline=yes
4229
4230 # test for where we get readline() from
4231 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4232 echo "configure:4233: checking whether to use readline" >&5
4233 # Check whether --with-readline or --without-readline was given.
4234 if test "${with_readline+set}" = set; then
4235   withval="$with_readline"
4236     case "$with_readline" in
4237   yes)
4238     echo "$ac_t""yes" 1>&6
4239
4240     for ac_hdr in readline.h history.h readline/readline.h
4241 do
4242 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4243 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4244 echo "configure:4245: checking for $ac_hdr" >&5
4245 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4246   echo $ac_n "(cached) $ac_c" 1>&6
4247 else
4248   cat > conftest.$ac_ext <<EOF
4249 #line 4250 "configure"
4250 #include "confdefs.h"
4251 #include <$ac_hdr>
4252 EOF
4253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4254 { (eval echo configure:4255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4256 if test -z "$ac_err"; then
4257   rm -rf conftest*
4258   eval "ac_cv_header_$ac_safe=yes"
4259 else
4260   echo "$ac_err" >&5
4261   echo "configure: failed program was:" >&5
4262   cat conftest.$ac_ext >&5
4263   rm -rf conftest*
4264   eval "ac_cv_header_$ac_safe=no"
4265 fi
4266 rm -f conftest*
4267 fi
4268 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4269   echo "$ac_t""yes" 1>&6
4270     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4271   cat >> confdefs.h <<EOF
4272 #define $ac_tr_hdr 1
4273 EOF
4274  
4275 else
4276   echo "$ac_t""no" 1>&6
4277 fi
4278 done
4279
4280     for ac_hdr in readline/history.h
4281 do
4282 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4283 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4284 echo "configure:4285: checking for $ac_hdr" >&5
4285 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4286   echo $ac_n "(cached) $ac_c" 1>&6
4287 else
4288   cat > conftest.$ac_ext <<EOF
4289 #line 4290 "configure"
4290 #include "confdefs.h"
4291 #include <$ac_hdr>
4292 EOF
4293 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4294 { (eval echo configure:4295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4295 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4296 if test -z "$ac_err"; then
4297   rm -rf conftest*
4298   eval "ac_cv_header_$ac_safe=yes"
4299 else
4300   echo "$ac_err" >&5
4301   echo "configure: failed program was:" >&5
4302   cat conftest.$ac_ext >&5
4303   rm -rf conftest*
4304   eval "ac_cv_header_$ac_safe=no"
4305 fi
4306 rm -f conftest*
4307 fi
4308 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4309   echo "$ac_t""yes" 1>&6
4310     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4311   cat >> confdefs.h <<EOF
4312 #define $ac_tr_hdr 1
4313 EOF
4314  
4315 else
4316   echo "$ac_t""no" 1>&6
4317 fi
4318 done
4319
4320
4321     for ac_hdr in readline.h readline/readline.h
4322 do
4323 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4324 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4325 echo "configure:4326: checking for $ac_hdr" >&5
4326 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4327   echo $ac_n "(cached) $ac_c" 1>&6
4328 else
4329   cat > conftest.$ac_ext <<EOF
4330 #line 4331 "configure"
4331 #include "confdefs.h"
4332 #include <$ac_hdr>
4333 EOF
4334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4335 { (eval echo configure:4336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4337 if test -z "$ac_err"; then
4338   rm -rf conftest*
4339   eval "ac_cv_header_$ac_safe=yes"
4340 else
4341   echo "$ac_err" >&5
4342   echo "configure: failed program was:" >&5
4343   cat conftest.$ac_ext >&5
4344   rm -rf conftest*
4345   eval "ac_cv_header_$ac_safe=no"
4346 fi
4347 rm -f conftest*
4348 fi
4349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4350   echo "$ac_t""yes" 1>&6
4351     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4352   cat >> confdefs.h <<EOF
4353 #define $ac_tr_hdr 1
4354 EOF
4355  
4356       for termlib in ncurses curses termcap terminfo termlib; do
4357        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4358 echo "configure:4359: checking for tgetent in -l${termlib}" >&5
4359 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4360 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4361   echo $ac_n "(cached) $ac_c" 1>&6
4362 else
4363   ac_save_LIBS="$LIBS"
4364 LIBS="-l${termlib}  $LIBS"
4365 cat > conftest.$ac_ext <<EOF
4366 #line 4367 "configure"
4367 #include "confdefs.h"
4368 /* Override any gcc2 internal prototype to avoid an error.  */
4369 /* We use char because int might match the return type of a gcc2
4370     builtin and then its argument prototype would still apply.  */
4371 char tgetent();
4372
4373 int main() {
4374 tgetent()
4375 ; return 0; }
4376 EOF
4377 if { (eval echo configure:4378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4378   rm -rf conftest*
4379   eval "ac_cv_lib_$ac_lib_var=yes"
4380 else
4381   echo "configure: failed program was:" >&5
4382   cat conftest.$ac_ext >&5
4383   rm -rf conftest*
4384   eval "ac_cv_lib_$ac_lib_var=no"
4385 fi
4386 rm -f conftest*
4387 LIBS="$ac_save_LIBS"
4388
4389 fi
4390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4391   echo "$ac_t""yes" 1>&6
4392   TERMLIBS="-l${termlib}"; break
4393 else
4394   echo "$ac_t""no" 1>&6
4395 fi
4396
4397       done
4398       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4399 echo "configure:4400: checking for rl_callback_handler_install in -lreadline" >&5
4400 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4401 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4402   echo $ac_n "(cached) $ac_c" 1>&6
4403 else
4404   ac_save_LIBS="$LIBS"
4405 LIBS="-lreadline $TERMLIBS $LIBS"
4406 cat > conftest.$ac_ext <<EOF
4407 #line 4408 "configure"
4408 #include "confdefs.h"
4409 /* Override any gcc2 internal prototype to avoid an error.  */
4410 /* We use char because int might match the return type of a gcc2
4411     builtin and then its argument prototype would still apply.  */
4412 char rl_callback_handler_install();
4413
4414 int main() {
4415 rl_callback_handler_install()
4416 ; return 0; }
4417 EOF
4418 if { (eval echo configure:4419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4419   rm -rf conftest*
4420   eval "ac_cv_lib_$ac_lib_var=yes"
4421 else
4422   echo "configure: failed program was:" >&5
4423   cat conftest.$ac_ext >&5
4424   rm -rf conftest*
4425   eval "ac_cv_lib_$ac_lib_var=no"
4426 fi
4427 rm -f conftest*
4428 LIBS="$ac_save_LIBS"
4429
4430 fi
4431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4432   echo "$ac_t""yes" 1>&6
4433   TERMLIBS="-lreadline $TERMLIBS"
4434        cat >> confdefs.h <<\EOF
4435 #define HAVE_LIBREADLINE 1
4436 EOF
4437
4438        break
4439 else
4440   echo "$ac_t""no" 1>&6
4441 TERMLIBS=
4442 fi
4443
4444 else
4445   echo "$ac_t""no" 1>&6
4446 fi
4447 done
4448
4449     ;;
4450   no)
4451     echo "$ac_t""no" 1>&6
4452     ;;
4453   *)
4454     echo "$ac_t""yes" 1>&6
4455
4456     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4457     # alternate readline path
4458     _ldflags=${LDFLAGS}
4459     _cppflags=${CPPFLAGS}
4460
4461     # Add additional search path
4462     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4463     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4464
4465     for ac_hdr in readline.h history.h readline/readline.h
4466 do
4467 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4468 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4469 echo "configure:4470: checking for $ac_hdr" >&5
4470 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4471   echo $ac_n "(cached) $ac_c" 1>&6
4472 else
4473   cat > conftest.$ac_ext <<EOF
4474 #line 4475 "configure"
4475 #include "confdefs.h"
4476 #include <$ac_hdr>
4477 EOF
4478 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4479 { (eval echo configure:4480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4480 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4481 if test -z "$ac_err"; then
4482   rm -rf conftest*
4483   eval "ac_cv_header_$ac_safe=yes"
4484 else
4485   echo "$ac_err" >&5
4486   echo "configure: failed program was:" >&5
4487   cat conftest.$ac_ext >&5
4488   rm -rf conftest*
4489   eval "ac_cv_header_$ac_safe=no"
4490 fi
4491 rm -f conftest*
4492 fi
4493 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4494   echo "$ac_t""yes" 1>&6
4495     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4496   cat >> confdefs.h <<EOF
4497 #define $ac_tr_hdr 1
4498 EOF
4499  
4500 else
4501   echo "$ac_t""no" 1>&6
4502 fi
4503 done
4504
4505     for ac_hdr in readline/history.h
4506 do
4507 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4508 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4509 echo "configure:4510: checking for $ac_hdr" >&5
4510 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4511   echo $ac_n "(cached) $ac_c" 1>&6
4512 else
4513   cat > conftest.$ac_ext <<EOF
4514 #line 4515 "configure"
4515 #include "confdefs.h"
4516 #include <$ac_hdr>
4517 EOF
4518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4519 { (eval echo configure:4520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4521 if test -z "$ac_err"; then
4522   rm -rf conftest*
4523   eval "ac_cv_header_$ac_safe=yes"
4524 else
4525   echo "$ac_err" >&5
4526   echo "configure: failed program was:" >&5
4527   cat conftest.$ac_ext >&5
4528   rm -rf conftest*
4529   eval "ac_cv_header_$ac_safe=no"
4530 fi
4531 rm -f conftest*
4532 fi
4533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4534   echo "$ac_t""yes" 1>&6
4535     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4536   cat >> confdefs.h <<EOF
4537 #define $ac_tr_hdr 1
4538 EOF
4539  
4540 else
4541   echo "$ac_t""no" 1>&6
4542 fi
4543 done
4544
4545
4546     for ac_hdr in readline.h readline/readline.h
4547 do
4548 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4549 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4550 echo "configure:4551: checking for $ac_hdr" >&5
4551 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4552   echo $ac_n "(cached) $ac_c" 1>&6
4553 else
4554   cat > conftest.$ac_ext <<EOF
4555 #line 4556 "configure"
4556 #include "confdefs.h"
4557 #include <$ac_hdr>
4558 EOF
4559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4560 { (eval echo configure:4561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4562 if test -z "$ac_err"; then
4563   rm -rf conftest*
4564   eval "ac_cv_header_$ac_safe=yes"
4565 else
4566   echo "$ac_err" >&5
4567   echo "configure: failed program was:" >&5
4568   cat conftest.$ac_ext >&5
4569   rm -rf conftest*
4570   eval "ac_cv_header_$ac_safe=no"
4571 fi
4572 rm -f conftest*
4573 fi
4574 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4575   echo "$ac_t""yes" 1>&6
4576     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4577   cat >> confdefs.h <<EOF
4578 #define $ac_tr_hdr 1
4579 EOF
4580  
4581       for termlib in ncurses curses termcap terminfo termlib; do
4582        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4583 echo "configure:4584: checking for tgetent in -l${termlib}" >&5
4584 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4585 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4586   echo $ac_n "(cached) $ac_c" 1>&6
4587 else
4588   ac_save_LIBS="$LIBS"
4589 LIBS="-l${termlib}  $LIBS"
4590 cat > conftest.$ac_ext <<EOF
4591 #line 4592 "configure"
4592 #include "confdefs.h"
4593 /* Override any gcc2 internal prototype to avoid an error.  */
4594 /* We use char because int might match the return type of a gcc2
4595     builtin and then its argument prototype would still apply.  */
4596 char tgetent();
4597
4598 int main() {
4599 tgetent()
4600 ; return 0; }
4601 EOF
4602 if { (eval echo configure:4603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4603   rm -rf conftest*
4604   eval "ac_cv_lib_$ac_lib_var=yes"
4605 else
4606   echo "configure: failed program was:" >&5
4607   cat conftest.$ac_ext >&5
4608   rm -rf conftest*
4609   eval "ac_cv_lib_$ac_lib_var=no"
4610 fi
4611 rm -f conftest*
4612 LIBS="$ac_save_LIBS"
4613
4614 fi
4615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4616   echo "$ac_t""yes" 1>&6
4617   TERMLIBS="-l${termlib}"; break
4618 else
4619   echo "$ac_t""no" 1>&6
4620 fi
4621
4622       done
4623       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4624 echo "configure:4625: checking for rl_callback_handler_install in -lreadline" >&5
4625 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4626 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4627   echo $ac_n "(cached) $ac_c" 1>&6
4628 else
4629   ac_save_LIBS="$LIBS"
4630 LIBS="-lreadline $TERMLIBS $LIBS"
4631 cat > conftest.$ac_ext <<EOF
4632 #line 4633 "configure"
4633 #include "confdefs.h"
4634 /* Override any gcc2 internal prototype to avoid an error.  */
4635 /* We use char because int might match the return type of a gcc2
4636     builtin and then its argument prototype would still apply.  */
4637 char rl_callback_handler_install();
4638
4639 int main() {
4640 rl_callback_handler_install()
4641 ; return 0; }
4642 EOF
4643 if { (eval echo configure:4644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4644   rm -rf conftest*
4645   eval "ac_cv_lib_$ac_lib_var=yes"
4646 else
4647   echo "configure: failed program was:" >&5
4648   cat conftest.$ac_ext >&5
4649   rm -rf conftest*
4650   eval "ac_cv_lib_$ac_lib_var=no"
4651 fi
4652 rm -f conftest*
4653 LIBS="$ac_save_LIBS"
4654
4655 fi
4656 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4657   echo "$ac_t""yes" 1>&6
4658   TERMLDFLAGS="-L$with_readline/lib"
4659        TERMCPPFLAGS="-I$with_readline/include"
4660        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4661        TERMLIBS="-lreadline $TERMLIBS"
4662        cat >> confdefs.h <<\EOF
4663 #define HAVE_LIBREADLINE 1
4664 EOF
4665
4666        break
4667 else
4668   echo "$ac_t""no" 1>&6
4669 TERMLIBS= CPPFLAGS=$_cppflags
4670 fi
4671
4672 else
4673   echo "$ac_t""no" 1>&6
4674 fi
4675 done
4676
4677
4678     LDFLAGS=$_ldflags
4679     ;;
4680   esac
4681 else
4682   echo "$ac_t""no" 1>&6
4683
4684 fi
4685
4686
4687
4688
4689 # The following test taken from the cvs sources
4690 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4691 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4692 # libsocket.so which has a bad implementation of gethostbyname (it
4693 # only looks in /etc/hosts), so we only look for -lsocket if we need
4694 # it.
4695 for ac_func in connect
4696 do
4697 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4698 echo "configure:4699: checking for $ac_func" >&5
4699 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4700   echo $ac_n "(cached) $ac_c" 1>&6
4701 else
4702   cat > conftest.$ac_ext <<EOF
4703 #line 4704 "configure"
4704 #include "confdefs.h"
4705 /* System header to define __stub macros and hopefully few prototypes,
4706     which can conflict with char $ac_func(); below.  */
4707 #include <assert.h>
4708 /* Override any gcc2 internal prototype to avoid an error.  */
4709 /* We use char because int might match the return type of a gcc2
4710     builtin and then its argument prototype would still apply.  */
4711 char $ac_func();
4712
4713 int main() {
4714
4715 /* The GNU C library defines this for functions which it implements
4716     to always fail with ENOSYS.  Some functions are actually named
4717     something starting with __ and the normal name is an alias.  */
4718 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4719 choke me
4720 #else
4721 $ac_func();
4722 #endif
4723
4724 ; return 0; }
4725 EOF
4726 if { (eval echo configure:4727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4727   rm -rf conftest*
4728   eval "ac_cv_func_$ac_func=yes"
4729 else
4730   echo "configure: failed program was:" >&5
4731   cat conftest.$ac_ext >&5
4732   rm -rf conftest*
4733   eval "ac_cv_func_$ac_func=no"
4734 fi
4735 rm -f conftest*
4736 fi
4737
4738 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4739   echo "$ac_t""yes" 1>&6
4740     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4741   cat >> confdefs.h <<EOF
4742 #define $ac_tr_func 1
4743 EOF
4744  
4745 else
4746   echo "$ac_t""no" 1>&6
4747 fi
4748 done
4749
4750 if test x"$ac_cv_func_connect" = x"no"; then
4751     case "$LIBS" in
4752     *-lnsl*) ;;
4753     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4754 echo "configure:4755: checking for printf in -lnsl_s" >&5
4755 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4756 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4757   echo $ac_n "(cached) $ac_c" 1>&6
4758 else
4759   ac_save_LIBS="$LIBS"
4760 LIBS="-lnsl_s  $LIBS"
4761 cat > conftest.$ac_ext <<EOF
4762 #line 4763 "configure"
4763 #include "confdefs.h"
4764 /* Override any gcc2 internal prototype to avoid an error.  */
4765 /* We use char because int might match the return type of a gcc2
4766     builtin and then its argument prototype would still apply.  */
4767 char printf();
4768
4769 int main() {
4770 printf()
4771 ; return 0; }
4772 EOF
4773 if { (eval echo configure:4774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4774   rm -rf conftest*
4775   eval "ac_cv_lib_$ac_lib_var=yes"
4776 else
4777   echo "configure: failed program was:" >&5
4778   cat conftest.$ac_ext >&5
4779   rm -rf conftest*
4780   eval "ac_cv_lib_$ac_lib_var=no"
4781 fi
4782 rm -f conftest*
4783 LIBS="$ac_save_LIBS"
4784
4785 fi
4786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4787   echo "$ac_t""yes" 1>&6
4788     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4789     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4790   cat >> confdefs.h <<EOF
4791 #define $ac_tr_lib 1
4792 EOF
4793
4794   LIBS="-lnsl_s $LIBS"
4795
4796 else
4797   echo "$ac_t""no" 1>&6
4798 fi
4799  ;;
4800     esac
4801     case "$LIBS" in
4802     *-lnsl*) ;;
4803     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4804 echo "configure:4805: checking for printf in -lnsl" >&5
4805 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4806 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4807   echo $ac_n "(cached) $ac_c" 1>&6
4808 else
4809   ac_save_LIBS="$LIBS"
4810 LIBS="-lnsl  $LIBS"
4811 cat > conftest.$ac_ext <<EOF
4812 #line 4813 "configure"
4813 #include "confdefs.h"
4814 /* Override any gcc2 internal prototype to avoid an error.  */
4815 /* We use char because int might match the return type of a gcc2
4816     builtin and then its argument prototype would still apply.  */
4817 char printf();
4818
4819 int main() {
4820 printf()
4821 ; return 0; }
4822 EOF
4823 if { (eval echo configure:4824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4824   rm -rf conftest*
4825   eval "ac_cv_lib_$ac_lib_var=yes"
4826 else
4827   echo "configure: failed program was:" >&5
4828   cat conftest.$ac_ext >&5
4829   rm -rf conftest*
4830   eval "ac_cv_lib_$ac_lib_var=no"
4831 fi
4832 rm -f conftest*
4833 LIBS="$ac_save_LIBS"
4834
4835 fi
4836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4837   echo "$ac_t""yes" 1>&6
4838     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4839     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4840   cat >> confdefs.h <<EOF
4841 #define $ac_tr_lib 1
4842 EOF
4843
4844   LIBS="-lnsl $LIBS"
4845
4846 else
4847   echo "$ac_t""no" 1>&6
4848 fi
4849  ;;
4850     esac
4851     case "$LIBS" in
4852     *-lsocket*) ;;
4853     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4854 echo "configure:4855: checking for connect in -lsocket" >&5
4855 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4856 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4857   echo $ac_n "(cached) $ac_c" 1>&6
4858 else
4859   ac_save_LIBS="$LIBS"
4860 LIBS="-lsocket  $LIBS"
4861 cat > conftest.$ac_ext <<EOF
4862 #line 4863 "configure"
4863 #include "confdefs.h"
4864 /* Override any gcc2 internal prototype to avoid an error.  */
4865 /* We use char because int might match the return type of a gcc2
4866     builtin and then its argument prototype would still apply.  */
4867 char connect();
4868
4869 int main() {
4870 connect()
4871 ; return 0; }
4872 EOF
4873 if { (eval echo configure:4874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4874   rm -rf conftest*
4875   eval "ac_cv_lib_$ac_lib_var=yes"
4876 else
4877   echo "configure: failed program was:" >&5
4878   cat conftest.$ac_ext >&5
4879   rm -rf conftest*
4880   eval "ac_cv_lib_$ac_lib_var=no"
4881 fi
4882 rm -f conftest*
4883 LIBS="$ac_save_LIBS"
4884
4885 fi
4886 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4887   echo "$ac_t""yes" 1>&6
4888     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4889     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4890   cat >> confdefs.h <<EOF
4891 #define $ac_tr_lib 1
4892 EOF
4893
4894   LIBS="-lsocket $LIBS"
4895
4896 else
4897   echo "$ac_t""no" 1>&6
4898 fi
4899  ;;
4900     esac
4901     case "$LIBS" in
4902     *-linet*) ;;
4903     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4904 echo "configure:4905: checking for connect in -linet" >&5
4905 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4906 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4907   echo $ac_n "(cached) $ac_c" 1>&6
4908 else
4909   ac_save_LIBS="$LIBS"
4910 LIBS="-linet  $LIBS"
4911 cat > conftest.$ac_ext <<EOF
4912 #line 4913 "configure"
4913 #include "confdefs.h"
4914 /* Override any gcc2 internal prototype to avoid an error.  */
4915 /* We use char because int might match the return type of a gcc2
4916     builtin and then its argument prototype would still apply.  */
4917 char connect();
4918
4919 int main() {
4920 connect()
4921 ; return 0; }
4922 EOF
4923 if { (eval echo configure:4924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4924   rm -rf conftest*
4925   eval "ac_cv_lib_$ac_lib_var=yes"
4926 else
4927   echo "configure: failed program was:" >&5
4928   cat conftest.$ac_ext >&5
4929   rm -rf conftest*
4930   eval "ac_cv_lib_$ac_lib_var=no"
4931 fi
4932 rm -f conftest*
4933 LIBS="$ac_save_LIBS"
4934
4935 fi
4936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4937   echo "$ac_t""yes" 1>&6
4938     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4939     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4940   cat >> confdefs.h <<EOF
4941 #define $ac_tr_lib 1
4942 EOF
4943
4944   LIBS="-linet $LIBS"
4945
4946 else
4947   echo "$ac_t""no" 1>&6
4948 fi
4949  ;;
4950     esac
4951             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4952        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4953         # ac_cv_func_connect=yes
4954         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4955         cat >> confdefs.h <<\EOF
4956 #define HAVE_CONNECT 1
4957 EOF
4958
4959     fi
4960 fi
4961
4962 ###############################################
4963 # test for where we get get_yp_default_domain() from
4964 for ac_func in yp_get_default_domain
4965 do
4966 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4967 echo "configure:4968: checking for $ac_func" >&5
4968 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4969   echo $ac_n "(cached) $ac_c" 1>&6
4970 else
4971   cat > conftest.$ac_ext <<EOF
4972 #line 4973 "configure"
4973 #include "confdefs.h"
4974 /* System header to define __stub macros and hopefully few prototypes,
4975     which can conflict with char $ac_func(); below.  */
4976 #include <assert.h>
4977 /* Override any gcc2 internal prototype to avoid an error.  */
4978 /* We use char because int might match the return type of a gcc2
4979     builtin and then its argument prototype would still apply.  */
4980 char $ac_func();
4981
4982 int main() {
4983
4984 /* The GNU C library defines this for functions which it implements
4985     to always fail with ENOSYS.  Some functions are actually named
4986     something starting with __ and the normal name is an alias.  */
4987 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4988 choke me
4989 #else
4990 $ac_func();
4991 #endif
4992
4993 ; return 0; }
4994 EOF
4995 if { (eval echo configure:4996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4996   rm -rf conftest*
4997   eval "ac_cv_func_$ac_func=yes"
4998 else
4999   echo "configure: failed program was:" >&5
5000   cat conftest.$ac_ext >&5
5001   rm -rf conftest*
5002   eval "ac_cv_func_$ac_func=no"
5003 fi
5004 rm -f conftest*
5005 fi
5006
5007 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5008   echo "$ac_t""yes" 1>&6
5009     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5010   cat >> confdefs.h <<EOF
5011 #define $ac_tr_func 1
5012 EOF
5013  
5014 else
5015   echo "$ac_t""no" 1>&6
5016 fi
5017 done
5018
5019 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5020         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5021 echo "configure:5022: checking for yp_get_default_domain in -lnsl" >&5
5022 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5023 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5024   echo $ac_n "(cached) $ac_c" 1>&6
5025 else
5026   ac_save_LIBS="$LIBS"
5027 LIBS="-lnsl  $LIBS"
5028 cat > conftest.$ac_ext <<EOF
5029 #line 5030 "configure"
5030 #include "confdefs.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 yp_get_default_domain();
5035
5036 int main() {
5037 yp_get_default_domain()
5038 ; return 0; }
5039 EOF
5040 if { (eval echo configure:5041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5041   rm -rf conftest*
5042   eval "ac_cv_lib_$ac_lib_var=yes"
5043 else
5044   echo "configure: failed program was:" >&5
5045   cat conftest.$ac_ext >&5
5046   rm -rf conftest*
5047   eval "ac_cv_lib_$ac_lib_var=no"
5048 fi
5049 rm -f conftest*
5050 LIBS="$ac_save_LIBS"
5051
5052 fi
5053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5054   echo "$ac_t""yes" 1>&6
5055   LIBS="$LIBS -lnsl";
5056         cat >> confdefs.h <<\EOF
5057 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5058 EOF
5059
5060 else
5061   echo "$ac_t""no" 1>&6
5062 fi
5063  
5064 fi
5065
5066 # Check if we have execl, if not we need to compile smbrun.
5067 for ac_func in execl
5068 do
5069 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5070 echo "configure:5071: checking for $ac_func" >&5
5071 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5072   echo $ac_n "(cached) $ac_c" 1>&6
5073 else
5074   cat > conftest.$ac_ext <<EOF
5075 #line 5076 "configure"
5076 #include "confdefs.h"
5077 /* System header to define __stub macros and hopefully few prototypes,
5078     which can conflict with char $ac_func(); below.  */
5079 #include <assert.h>
5080 /* Override any gcc2 internal prototype to avoid an error.  */
5081 /* We use char because int might match the return type of a gcc2
5082     builtin and then its argument prototype would still apply.  */
5083 char $ac_func();
5084
5085 int main() {
5086
5087 /* The GNU C library defines this for functions which it implements
5088     to always fail with ENOSYS.  Some functions are actually named
5089     something starting with __ and the normal name is an alias.  */
5090 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5091 choke me
5092 #else
5093 $ac_func();
5094 #endif
5095
5096 ; return 0; }
5097 EOF
5098 if { (eval echo configure:5099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5099   rm -rf conftest*
5100   eval "ac_cv_func_$ac_func=yes"
5101 else
5102   echo "configure: failed program was:" >&5
5103   cat conftest.$ac_ext >&5
5104   rm -rf conftest*
5105   eval "ac_cv_func_$ac_func=no"
5106 fi
5107 rm -f conftest*
5108 fi
5109
5110 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5111   echo "$ac_t""yes" 1>&6
5112     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5113   cat >> confdefs.h <<EOF
5114 #define $ac_tr_func 1
5115 EOF
5116  
5117 else
5118   echo "$ac_t""no" 1>&6
5119 fi
5120 done
5121
5122 if test x"$ac_cv_func_execl" = x"no"; then
5123     RUNPROG="bin/smbrun"
5124 else
5125     RUNPROG=""
5126 fi
5127
5128 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
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 fstat strchr utime utimes getrlimit fsync bzero memset
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 memmove vsnprintf snprintf setsid glob strpbrk pipe crypt16 getauthuid
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 strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent
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 initgroups select poll rdchk getgrnam getgrent pathconf
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 setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
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 lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
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 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5514 do
5515 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5516 echo "configure:5517: checking for $ac_func" >&5
5517 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5518   echo $ac_n "(cached) $ac_c" 1>&6
5519 else
5520   cat > conftest.$ac_ext <<EOF
5521 #line 5522 "configure"
5522 #include "confdefs.h"
5523 /* System header to define __stub macros and hopefully few prototypes,
5524     which can conflict with char $ac_func(); below.  */
5525 #include <assert.h>
5526 /* Override any gcc2 internal prototype to avoid an error.  */
5527 /* We use char because int might match the return type of a gcc2
5528     builtin and then its argument prototype would still apply.  */
5529 char $ac_func();
5530
5531 int main() {
5532
5533 /* The GNU C library defines this for functions which it implements
5534     to always fail with ENOSYS.  Some functions are actually named
5535     something starting with __ and the normal name is an alias.  */
5536 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5537 choke me
5538 #else
5539 $ac_func();
5540 #endif
5541
5542 ; return 0; }
5543 EOF
5544 if { (eval echo configure:5545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5545   rm -rf conftest*
5546   eval "ac_cv_func_$ac_func=yes"
5547 else
5548   echo "configure: failed program was:" >&5
5549   cat conftest.$ac_ext >&5
5550   rm -rf conftest*
5551   eval "ac_cv_func_$ac_func=no"
5552 fi
5553 rm -f conftest*
5554 fi
5555
5556 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5557   echo "$ac_t""yes" 1>&6
5558     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5559   cat >> confdefs.h <<EOF
5560 #define $ac_tr_func 1
5561 EOF
5562  
5563 else
5564   echo "$ac_t""no" 1>&6
5565 fi
5566 done
5567
5568 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl
5569 do
5570 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5571 echo "configure:5572: checking for $ac_func" >&5
5572 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5573   echo $ac_n "(cached) $ac_c" 1>&6
5574 else
5575   cat > conftest.$ac_ext <<EOF
5576 #line 5577 "configure"
5577 #include "confdefs.h"
5578 /* System header to define __stub macros and hopefully few prototypes,
5579     which can conflict with char $ac_func(); below.  */
5580 #include <assert.h>
5581 /* Override any gcc2 internal prototype to avoid an error.  */
5582 /* We use char because int might match the return type of a gcc2
5583     builtin and then its argument prototype would still apply.  */
5584 char $ac_func();
5585
5586 int main() {
5587
5588 /* The GNU C library defines this for functions which it implements
5589     to always fail with ENOSYS.  Some functions are actually named
5590     something starting with __ and the normal name is an alias.  */
5591 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5592 choke me
5593 #else
5594 $ac_func();
5595 #endif
5596
5597 ; return 0; }
5598 EOF
5599 if { (eval echo configure:5600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5600   rm -rf conftest*
5601   eval "ac_cv_func_$ac_func=yes"
5602 else
5603   echo "configure: failed program was:" >&5
5604   cat conftest.$ac_ext >&5
5605   rm -rf conftest*
5606   eval "ac_cv_func_$ac_func=no"
5607 fi
5608 rm -f conftest*
5609 fi
5610
5611 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5612   echo "$ac_t""yes" 1>&6
5613     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5614   cat >> confdefs.h <<EOF
5615 #define $ac_tr_func 1
5616 EOF
5617  
5618 else
5619   echo "$ac_t""no" 1>&6
5620 fi
5621 done
5622
5623
5624 # syscall() is needed for smbwrapper.
5625 for ac_func in syscall
5626 do
5627 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5628 echo "configure:5629: checking for $ac_func" >&5
5629 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5630   echo $ac_n "(cached) $ac_c" 1>&6
5631 else
5632   cat > conftest.$ac_ext <<EOF
5633 #line 5634 "configure"
5634 #include "confdefs.h"
5635 /* System header to define __stub macros and hopefully few prototypes,
5636     which can conflict with char $ac_func(); below.  */
5637 #include <assert.h>
5638 /* Override any gcc2 internal prototype to avoid an error.  */
5639 /* We use char because int might match the return type of a gcc2
5640     builtin and then its argument prototype would still apply.  */
5641 char $ac_func();
5642
5643 int main() {
5644
5645 /* The GNU C library defines this for functions which it implements
5646     to always fail with ENOSYS.  Some functions are actually named
5647     something starting with __ and the normal name is an alias.  */
5648 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5649 choke me
5650 #else
5651 $ac_func();
5652 #endif
5653
5654 ; return 0; }
5655 EOF
5656 if { (eval echo configure:5657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5657   rm -rf conftest*
5658   eval "ac_cv_func_$ac_func=yes"
5659 else
5660   echo "configure: failed program was:" >&5
5661   cat conftest.$ac_ext >&5
5662   rm -rf conftest*
5663   eval "ac_cv_func_$ac_func=no"
5664 fi
5665 rm -f conftest*
5666 fi
5667
5668 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5669   echo "$ac_t""yes" 1>&6
5670     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5671   cat >> confdefs.h <<EOF
5672 #define $ac_tr_func 1
5673 EOF
5674  
5675 else
5676   echo "$ac_t""no" 1>&6
5677 fi
5678 done
5679
5680
5681 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5682 do
5683 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5684 echo "configure:5685: checking for $ac_func" >&5
5685 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5686   echo $ac_n "(cached) $ac_c" 1>&6
5687 else
5688   cat > conftest.$ac_ext <<EOF
5689 #line 5690 "configure"
5690 #include "confdefs.h"
5691 /* System header to define __stub macros and hopefully few prototypes,
5692     which can conflict with char $ac_func(); below.  */
5693 #include <assert.h>
5694 /* Override any gcc2 internal prototype to avoid an error.  */
5695 /* We use char because int might match the return type of a gcc2
5696     builtin and then its argument prototype would still apply.  */
5697 char $ac_func();
5698
5699 int main() {
5700
5701 /* The GNU C library defines this for functions which it implements
5702     to always fail with ENOSYS.  Some functions are actually named
5703     something starting with __ and the normal name is an alias.  */
5704 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5705 choke me
5706 #else
5707 $ac_func();
5708 #endif
5709
5710 ; return 0; }
5711 EOF
5712 if { (eval echo configure:5713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5713   rm -rf conftest*
5714   eval "ac_cv_func_$ac_func=yes"
5715 else
5716   echo "configure: failed program was:" >&5
5717   cat conftest.$ac_ext >&5
5718   rm -rf conftest*
5719   eval "ac_cv_func_$ac_func=no"
5720 fi
5721 rm -f conftest*
5722 fi
5723
5724 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5725   echo "$ac_t""yes" 1>&6
5726     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5727   cat >> confdefs.h <<EOF
5728 #define $ac_tr_func 1
5729 EOF
5730  
5731 else
5732   echo "$ac_t""no" 1>&6
5733 fi
5734 done
5735
5736 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5737 do
5738 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5739 echo "configure:5740: checking for $ac_func" >&5
5740 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5741   echo $ac_n "(cached) $ac_c" 1>&6
5742 else
5743   cat > conftest.$ac_ext <<EOF
5744 #line 5745 "configure"
5745 #include "confdefs.h"
5746 /* System header to define __stub macros and hopefully few prototypes,
5747     which can conflict with char $ac_func(); below.  */
5748 #include <assert.h>
5749 /* Override any gcc2 internal prototype to avoid an error.  */
5750 /* We use char because int might match the return type of a gcc2
5751     builtin and then its argument prototype would still apply.  */
5752 char $ac_func();
5753
5754 int main() {
5755
5756 /* The GNU C library defines this for functions which it implements
5757     to always fail with ENOSYS.  Some functions are actually named
5758     something starting with __ and the normal name is an alias.  */
5759 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5760 choke me
5761 #else
5762 $ac_func();
5763 #endif
5764
5765 ; return 0; }
5766 EOF
5767 if { (eval echo configure:5768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5768   rm -rf conftest*
5769   eval "ac_cv_func_$ac_func=yes"
5770 else
5771   echo "configure: failed program was:" >&5
5772   cat conftest.$ac_ext >&5
5773   rm -rf conftest*
5774   eval "ac_cv_func_$ac_func=no"
5775 fi
5776 rm -f conftest*
5777 fi
5778
5779 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5780   echo "$ac_t""yes" 1>&6
5781     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5782   cat >> confdefs.h <<EOF
5783 #define $ac_tr_func 1
5784 EOF
5785  
5786 else
5787   echo "$ac_t""no" 1>&6
5788 fi
5789 done
5790
5791 for ac_func in __getcwd _getcwd
5792 do
5793 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5794 echo "configure:5795: checking for $ac_func" >&5
5795 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5796   echo $ac_n "(cached) $ac_c" 1>&6
5797 else
5798   cat > conftest.$ac_ext <<EOF
5799 #line 5800 "configure"
5800 #include "confdefs.h"
5801 /* System header to define __stub macros and hopefully few prototypes,
5802     which can conflict with char $ac_func(); below.  */
5803 #include <assert.h>
5804 /* Override any gcc2 internal prototype to avoid an error.  */
5805 /* We use char because int might match the return type of a gcc2
5806     builtin and then its argument prototype would still apply.  */
5807 char $ac_func();
5808
5809 int main() {
5810
5811 /* The GNU C library defines this for functions which it implements
5812     to always fail with ENOSYS.  Some functions are actually named
5813     something starting with __ and the normal name is an alias.  */
5814 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5815 choke me
5816 #else
5817 $ac_func();
5818 #endif
5819
5820 ; return 0; }
5821 EOF
5822 if { (eval echo configure:5823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5823   rm -rf conftest*
5824   eval "ac_cv_func_$ac_func=yes"
5825 else
5826   echo "configure: failed program was:" >&5
5827   cat conftest.$ac_ext >&5
5828   rm -rf conftest*
5829   eval "ac_cv_func_$ac_func=no"
5830 fi
5831 rm -f conftest*
5832 fi
5833
5834 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5835   echo "$ac_t""yes" 1>&6
5836     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5837   cat >> confdefs.h <<EOF
5838 #define $ac_tr_func 1
5839 EOF
5840  
5841 else
5842   echo "$ac_t""no" 1>&6
5843 fi
5844 done
5845
5846 for ac_func in __xstat __fxstat __lxstat
5847 do
5848 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5849 echo "configure:5850: checking for $ac_func" >&5
5850 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5851   echo $ac_n "(cached) $ac_c" 1>&6
5852 else
5853   cat > conftest.$ac_ext <<EOF
5854 #line 5855 "configure"
5855 #include "confdefs.h"
5856 /* System header to define __stub macros and hopefully few prototypes,
5857     which can conflict with char $ac_func(); below.  */
5858 #include <assert.h>
5859 /* Override any gcc2 internal prototype to avoid an error.  */
5860 /* We use char because int might match the return type of a gcc2
5861     builtin and then its argument prototype would still apply.  */
5862 char $ac_func();
5863
5864 int main() {
5865
5866 /* The GNU C library defines this for functions which it implements
5867     to always fail with ENOSYS.  Some functions are actually named
5868     something starting with __ and the normal name is an alias.  */
5869 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5870 choke me
5871 #else
5872 $ac_func();
5873 #endif
5874
5875 ; return 0; }
5876 EOF
5877 if { (eval echo configure:5878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5878   rm -rf conftest*
5879   eval "ac_cv_func_$ac_func=yes"
5880 else
5881   echo "configure: failed program was:" >&5
5882   cat conftest.$ac_ext >&5
5883   rm -rf conftest*
5884   eval "ac_cv_func_$ac_func=no"
5885 fi
5886 rm -f conftest*
5887 fi
5888
5889 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5890   echo "$ac_t""yes" 1>&6
5891     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5892   cat >> confdefs.h <<EOF
5893 #define $ac_tr_func 1
5894 EOF
5895  
5896 else
5897   echo "$ac_t""no" 1>&6
5898 fi
5899 done
5900
5901 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
5902 do
5903 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5904 echo "configure:5905: checking for $ac_func" >&5
5905 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5906   echo $ac_n "(cached) $ac_c" 1>&6
5907 else
5908   cat > conftest.$ac_ext <<EOF
5909 #line 5910 "configure"
5910 #include "confdefs.h"
5911 /* System header to define __stub macros and hopefully few prototypes,
5912     which can conflict with char $ac_func(); below.  */
5913 #include <assert.h>
5914 /* Override any gcc2 internal prototype to avoid an error.  */
5915 /* We use char because int might match the return type of a gcc2
5916     builtin and then its argument prototype would still apply.  */
5917 char $ac_func();
5918
5919 int main() {
5920
5921 /* The GNU C library defines this for functions which it implements
5922     to always fail with ENOSYS.  Some functions are actually named
5923     something starting with __ and the normal name is an alias.  */
5924 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5925 choke me
5926 #else
5927 $ac_func();
5928 #endif
5929
5930 ; return 0; }
5931 EOF
5932 if { (eval echo configure:5933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5933   rm -rf conftest*
5934   eval "ac_cv_func_$ac_func=yes"
5935 else
5936   echo "configure: failed program was:" >&5
5937   cat conftest.$ac_ext >&5
5938   rm -rf conftest*
5939   eval "ac_cv_func_$ac_func=no"
5940 fi
5941 rm -f conftest*
5942 fi
5943
5944 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5945   echo "$ac_t""yes" 1>&6
5946     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5947   cat >> confdefs.h <<EOF
5948 #define $ac_tr_func 1
5949 EOF
5950  
5951 else
5952   echo "$ac_t""no" 1>&6
5953 fi
5954 done
5955
5956 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
5957 do
5958 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5959 echo "configure:5960: checking for $ac_func" >&5
5960 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5961   echo $ac_n "(cached) $ac_c" 1>&6
5962 else
5963   cat > conftest.$ac_ext <<EOF
5964 #line 5965 "configure"
5965 #include "confdefs.h"
5966 /* System header to define __stub macros and hopefully few prototypes,
5967     which can conflict with char $ac_func(); below.  */
5968 #include <assert.h>
5969 /* Override any gcc2 internal prototype to avoid an error.  */
5970 /* We use char because int might match the return type of a gcc2
5971     builtin and then its argument prototype would still apply.  */
5972 char $ac_func();
5973
5974 int main() {
5975
5976 /* The GNU C library defines this for functions which it implements
5977     to always fail with ENOSYS.  Some functions are actually named
5978     something starting with __ and the normal name is an alias.  */
5979 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5980 choke me
5981 #else
5982 $ac_func();
5983 #endif
5984
5985 ; return 0; }
5986 EOF
5987 if { (eval echo configure:5988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5988   rm -rf conftest*
5989   eval "ac_cv_func_$ac_func=yes"
5990 else
5991   echo "configure: failed program was:" >&5
5992   cat conftest.$ac_ext >&5
5993   rm -rf conftest*
5994   eval "ac_cv_func_$ac_func=no"
5995 fi
5996 rm -f conftest*
5997 fi
5998
5999 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6000   echo "$ac_t""yes" 1>&6
6001     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6002   cat >> confdefs.h <<EOF
6003 #define $ac_tr_func 1
6004 EOF
6005  
6006 else
6007   echo "$ac_t""no" 1>&6
6008 fi
6009 done
6010
6011 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6012 do
6013 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6014 echo "configure:6015: checking for $ac_func" >&5
6015 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6016   echo $ac_n "(cached) $ac_c" 1>&6
6017 else
6018   cat > conftest.$ac_ext <<EOF
6019 #line 6020 "configure"
6020 #include "confdefs.h"
6021 /* System header to define __stub macros and hopefully few prototypes,
6022     which can conflict with char $ac_func(); below.  */
6023 #include <assert.h>
6024 /* Override any gcc2 internal prototype to avoid an error.  */
6025 /* We use char because int might match the return type of a gcc2
6026     builtin and then its argument prototype would still apply.  */
6027 char $ac_func();
6028
6029 int main() {
6030
6031 /* The GNU C library defines this for functions which it implements
6032     to always fail with ENOSYS.  Some functions are actually named
6033     something starting with __ and the normal name is an alias.  */
6034 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6035 choke me
6036 #else
6037 $ac_func();
6038 #endif
6039
6040 ; return 0; }
6041 EOF
6042 if { (eval echo configure:6043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6043   rm -rf conftest*
6044   eval "ac_cv_func_$ac_func=yes"
6045 else
6046   echo "configure: failed program was:" >&5
6047   cat conftest.$ac_ext >&5
6048   rm -rf conftest*
6049   eval "ac_cv_func_$ac_func=no"
6050 fi
6051 rm -f conftest*
6052 fi
6053
6054 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6055   echo "$ac_t""yes" 1>&6
6056     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6057   cat >> confdefs.h <<EOF
6058 #define $ac_tr_func 1
6059 EOF
6060  
6061 else
6062   echo "$ac_t""no" 1>&6
6063 fi
6064 done
6065
6066 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6067 do
6068 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6069 echo "configure:6070: checking for $ac_func" >&5
6070 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6071   echo $ac_n "(cached) $ac_c" 1>&6
6072 else
6073   cat > conftest.$ac_ext <<EOF
6074 #line 6075 "configure"
6075 #include "confdefs.h"
6076 /* System header to define __stub macros and hopefully few prototypes,
6077     which can conflict with char $ac_func(); below.  */
6078 #include <assert.h>
6079 /* Override any gcc2 internal prototype to avoid an error.  */
6080 /* We use char because int might match the return type of a gcc2
6081     builtin and then its argument prototype would still apply.  */
6082 char $ac_func();
6083
6084 int main() {
6085
6086 /* The GNU C library defines this for functions which it implements
6087     to always fail with ENOSYS.  Some functions are actually named
6088     something starting with __ and the normal name is an alias.  */
6089 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6090 choke me
6091 #else
6092 $ac_func();
6093 #endif
6094
6095 ; return 0; }
6096 EOF
6097 if { (eval echo configure:6098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6098   rm -rf conftest*
6099   eval "ac_cv_func_$ac_func=yes"
6100 else
6101   echo "configure: failed program was:" >&5
6102   cat conftest.$ac_ext >&5
6103   rm -rf conftest*
6104   eval "ac_cv_func_$ac_func=no"
6105 fi
6106 rm -f conftest*
6107 fi
6108
6109 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6110   echo "$ac_t""yes" 1>&6
6111     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6112   cat >> confdefs.h <<EOF
6113 #define $ac_tr_func 1
6114 EOF
6115  
6116 else
6117   echo "$ac_t""no" 1>&6
6118 fi
6119 done
6120
6121 for ac_func in _write __write _fork __fork
6122 do
6123 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6124 echo "configure:6125: checking for $ac_func" >&5
6125 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6126   echo $ac_n "(cached) $ac_c" 1>&6
6127 else
6128   cat > conftest.$ac_ext <<EOF
6129 #line 6130 "configure"
6130 #include "confdefs.h"
6131 /* System header to define __stub macros and hopefully few prototypes,
6132     which can conflict with char $ac_func(); below.  */
6133 #include <assert.h>
6134 /* Override any gcc2 internal prototype to avoid an error.  */
6135 /* We use char because int might match the return type of a gcc2
6136     builtin and then its argument prototype would still apply.  */
6137 char $ac_func();
6138
6139 int main() {
6140
6141 /* The GNU C library defines this for functions which it implements
6142     to always fail with ENOSYS.  Some functions are actually named
6143     something starting with __ and the normal name is an alias.  */
6144 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6145 choke me
6146 #else
6147 $ac_func();
6148 #endif
6149
6150 ; return 0; }
6151 EOF
6152 if { (eval echo configure:6153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6153   rm -rf conftest*
6154   eval "ac_cv_func_$ac_func=yes"
6155 else
6156   echo "configure: failed program was:" >&5
6157   cat conftest.$ac_ext >&5
6158   rm -rf conftest*
6159   eval "ac_cv_func_$ac_func=no"
6160 fi
6161 rm -f conftest*
6162 fi
6163
6164 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6165   echo "$ac_t""yes" 1>&6
6166     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6167   cat >> confdefs.h <<EOF
6168 #define $ac_tr_func 1
6169 EOF
6170  
6171 else
6172   echo "$ac_t""no" 1>&6
6173 fi
6174 done
6175
6176 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6177 do
6178 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6179 echo "configure:6180: checking for $ac_func" >&5
6180 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6181   echo $ac_n "(cached) $ac_c" 1>&6
6182 else
6183   cat > conftest.$ac_ext <<EOF
6184 #line 6185 "configure"
6185 #include "confdefs.h"
6186 /* System header to define __stub macros and hopefully few prototypes,
6187     which can conflict with char $ac_func(); below.  */
6188 #include <assert.h>
6189 /* Override any gcc2 internal prototype to avoid an error.  */
6190 /* We use char because int might match the return type of a gcc2
6191     builtin and then its argument prototype would still apply.  */
6192 char $ac_func();
6193
6194 int main() {
6195
6196 /* The GNU C library defines this for functions which it implements
6197     to always fail with ENOSYS.  Some functions are actually named
6198     something starting with __ and the normal name is an alias.  */
6199 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6200 choke me
6201 #else
6202 $ac_func();
6203 #endif
6204
6205 ; return 0; }
6206 EOF
6207 if { (eval echo configure:6208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6208   rm -rf conftest*
6209   eval "ac_cv_func_$ac_func=yes"
6210 else
6211   echo "configure: failed program was:" >&5
6212   cat conftest.$ac_ext >&5
6213   rm -rf conftest*
6214   eval "ac_cv_func_$ac_func=no"
6215 fi
6216 rm -f conftest*
6217 fi
6218
6219 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6220   echo "$ac_t""yes" 1>&6
6221     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6222   cat >> confdefs.h <<EOF
6223 #define $ac_tr_func 1
6224 EOF
6225  
6226 else
6227   echo "$ac_t""no" 1>&6
6228 fi
6229 done
6230
6231 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6232 do
6233 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6234 echo "configure:6235: checking for $ac_func" >&5
6235 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6236   echo $ac_n "(cached) $ac_c" 1>&6
6237 else
6238   cat > conftest.$ac_ext <<EOF
6239 #line 6240 "configure"
6240 #include "confdefs.h"
6241 /* System header to define __stub macros and hopefully few prototypes,
6242     which can conflict with char $ac_func(); below.  */
6243 #include <assert.h>
6244 /* Override any gcc2 internal prototype to avoid an error.  */
6245 /* We use char because int might match the return type of a gcc2
6246     builtin and then its argument prototype would still apply.  */
6247 char $ac_func();
6248
6249 int main() {
6250
6251 /* The GNU C library defines this for functions which it implements
6252     to always fail with ENOSYS.  Some functions are actually named
6253     something starting with __ and the normal name is an alias.  */
6254 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6255 choke me
6256 #else
6257 $ac_func();
6258 #endif
6259
6260 ; return 0; }
6261 EOF
6262 if { (eval echo configure:6263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6263   rm -rf conftest*
6264   eval "ac_cv_func_$ac_func=yes"
6265 else
6266   echo "configure: failed program was:" >&5
6267   cat conftest.$ac_ext >&5
6268   rm -rf conftest*
6269   eval "ac_cv_func_$ac_func=no"
6270 fi
6271 rm -f conftest*
6272 fi
6273
6274 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6275   echo "$ac_t""yes" 1>&6
6276     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6277   cat >> confdefs.h <<EOF
6278 #define $ac_tr_func 1
6279 EOF
6280  
6281 else
6282   echo "$ac_t""no" 1>&6
6283 fi
6284 done
6285
6286 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6287 do
6288 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6289 echo "configure:6290: checking for $ac_func" >&5
6290 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6291   echo $ac_n "(cached) $ac_c" 1>&6
6292 else
6293   cat > conftest.$ac_ext <<EOF
6294 #line 6295 "configure"
6295 #include "confdefs.h"
6296 /* System header to define __stub macros and hopefully few prototypes,
6297     which can conflict with char $ac_func(); below.  */
6298 #include <assert.h>
6299 /* Override any gcc2 internal prototype to avoid an error.  */
6300 /* We use char because int might match the return type of a gcc2
6301     builtin and then its argument prototype would still apply.  */
6302 char $ac_func();
6303
6304 int main() {
6305
6306 /* The GNU C library defines this for functions which it implements
6307     to always fail with ENOSYS.  Some functions are actually named
6308     something starting with __ and the normal name is an alias.  */
6309 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6310 choke me
6311 #else
6312 $ac_func();
6313 #endif
6314
6315 ; return 0; }
6316 EOF
6317 if { (eval echo configure:6318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6318   rm -rf conftest*
6319   eval "ac_cv_func_$ac_func=yes"
6320 else
6321   echo "configure: failed program was:" >&5
6322   cat conftest.$ac_ext >&5
6323   rm -rf conftest*
6324   eval "ac_cv_func_$ac_func=no"
6325 fi
6326 rm -f conftest*
6327 fi
6328
6329 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6330   echo "$ac_t""yes" 1>&6
6331     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6332   cat >> confdefs.h <<EOF
6333 #define $ac_tr_func 1
6334 EOF
6335  
6336 else
6337   echo "$ac_t""no" 1>&6
6338 fi
6339 done
6340
6341 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6342 do
6343 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6344 echo "configure:6345: checking for $ac_func" >&5
6345 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6346   echo $ac_n "(cached) $ac_c" 1>&6
6347 else
6348   cat > conftest.$ac_ext <<EOF
6349 #line 6350 "configure"
6350 #include "confdefs.h"
6351 /* System header to define __stub macros and hopefully few prototypes,
6352     which can conflict with char $ac_func(); below.  */
6353 #include <assert.h>
6354 /* Override any gcc2 internal prototype to avoid an error.  */
6355 /* We use char because int might match the return type of a gcc2
6356     builtin and then its argument prototype would still apply.  */
6357 char $ac_func();
6358
6359 int main() {
6360
6361 /* The GNU C library defines this for functions which it implements
6362     to always fail with ENOSYS.  Some functions are actually named
6363     something starting with __ and the normal name is an alias.  */
6364 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6365 choke me
6366 #else
6367 $ac_func();
6368 #endif
6369
6370 ; return 0; }
6371 EOF
6372 if { (eval echo configure:6373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6373   rm -rf conftest*
6374   eval "ac_cv_func_$ac_func=yes"
6375 else
6376   echo "configure: failed program was:" >&5
6377   cat conftest.$ac_ext >&5
6378   rm -rf conftest*
6379   eval "ac_cv_func_$ac_func=no"
6380 fi
6381 rm -f conftest*
6382 fi
6383
6384 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6385   echo "$ac_t""yes" 1>&6
6386     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6387   cat >> confdefs.h <<EOF
6388 #define $ac_tr_func 1
6389 EOF
6390  
6391 else
6392   echo "$ac_t""no" 1>&6
6393 fi
6394 done
6395
6396 for ac_func in open64 _open64 __open64 creat64
6397 do
6398 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6399 echo "configure:6400: checking for $ac_func" >&5
6400 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6401   echo $ac_n "(cached) $ac_c" 1>&6
6402 else
6403   cat > conftest.$ac_ext <<EOF
6404 #line 6405 "configure"
6405 #include "confdefs.h"
6406 /* System header to define __stub macros and hopefully few prototypes,
6407     which can conflict with char $ac_func(); below.  */
6408 #include <assert.h>
6409 /* Override any gcc2 internal prototype to avoid an error.  */
6410 /* We use char because int might match the return type of a gcc2
6411     builtin and then its argument prototype would still apply.  */
6412 char $ac_func();
6413
6414 int main() {
6415
6416 /* The GNU C library defines this for functions which it implements
6417     to always fail with ENOSYS.  Some functions are actually named
6418     something starting with __ and the normal name is an alias.  */
6419 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6420 choke me
6421 #else
6422 $ac_func();
6423 #endif
6424
6425 ; return 0; }
6426 EOF
6427 if { (eval echo configure:6428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6428   rm -rf conftest*
6429   eval "ac_cv_func_$ac_func=yes"
6430 else
6431   echo "configure: failed program was:" >&5
6432   cat conftest.$ac_ext >&5
6433   rm -rf conftest*
6434   eval "ac_cv_func_$ac_func=no"
6435 fi
6436 rm -f conftest*
6437 fi
6438
6439 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6440   echo "$ac_t""yes" 1>&6
6441     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6442   cat >> confdefs.h <<EOF
6443 #define $ac_tr_func 1
6444 EOF
6445  
6446 else
6447   echo "$ac_t""no" 1>&6
6448 fi
6449 done
6450
6451
6452 #
6453 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6454 #
6455
6456 if test x$ac_cv_func_stat64 = xno ; then
6457   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6458 echo "configure:6459: checking for stat64 in <sys/stat.h>" >&5
6459   cat > conftest.$ac_ext <<EOF
6460 #line 6461 "configure"
6461 #include "confdefs.h"
6462
6463 #if defined(HAVE_UNISTD_H)
6464 #include <unistd.h>
6465 #endif
6466 #include <sys/stat.h>
6467
6468 int main() {
6469 struct stat64 st64; exit(stat64(".",&st64));
6470 ; return 0; }
6471 EOF
6472 if { (eval echo configure:6473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6473   rm -rf conftest*
6474   ac_cv_func_stat64=yes
6475 else
6476   echo "configure: failed program was:" >&5
6477   cat conftest.$ac_ext >&5
6478 fi
6479 rm -f conftest*
6480   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6481   if test x$ac_cv_func_stat64 = xyes ; then
6482     cat >> confdefs.h <<\EOF
6483 #define HAVE_STAT64 1
6484 EOF
6485
6486   fi
6487 fi
6488
6489 if test x$ac_cv_func_lstat64 = xno ; then
6490   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6491 echo "configure:6492: checking for lstat64 in <sys/stat.h>" >&5
6492   cat > conftest.$ac_ext <<EOF
6493 #line 6494 "configure"
6494 #include "confdefs.h"
6495
6496 #if defined(HAVE_UNISTD_H)
6497 #include <unistd.h>
6498 #endif
6499 #include <sys/stat.h>
6500
6501 int main() {
6502 struct stat64 st64; exit(lstat64(".",&st64));
6503 ; return 0; }
6504 EOF
6505 if { (eval echo configure:6506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6506   rm -rf conftest*
6507   ac_cv_func_lstat64=yes
6508 else
6509   echo "configure: failed program was:" >&5
6510   cat conftest.$ac_ext >&5
6511 fi
6512 rm -f conftest*
6513   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6514   if test x$ac_cv_func_lstat64 = xyes ; then
6515     cat >> confdefs.h <<\EOF
6516 #define HAVE_LSTAT64 1
6517 EOF
6518
6519   fi
6520 fi
6521
6522 if test x$ac_cv_func_fstat64 = xno ; then
6523   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6524 echo "configure:6525: checking for fstat64 in <sys/stat.h>" >&5
6525   cat > conftest.$ac_ext <<EOF
6526 #line 6527 "configure"
6527 #include "confdefs.h"
6528
6529 #if defined(HAVE_UNISTD_H)
6530 #include <unistd.h>
6531 #endif
6532 #include <sys/stat.h>
6533
6534 int main() {
6535 struct stat64 st64; exit(fstat64(0,&st64));
6536 ; return 0; }
6537 EOF
6538 if { (eval echo configure:6539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6539   rm -rf conftest*
6540   ac_cv_func_fstat64=yes
6541 else
6542   echo "configure: failed program was:" >&5
6543   cat conftest.$ac_ext >&5
6544 fi
6545 rm -f conftest*
6546   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6547   if test x$ac_cv_func_fstat64 = xyes ; then
6548     cat >> confdefs.h <<\EOF
6549 #define HAVE_FSTAT64 1
6550 EOF
6551
6552   fi
6553 fi
6554
6555 #
6556 # If no strcasecmp, check for it in some known places
6557 # It is in -lresolv on ReliantUNIX and UnixWare
6558 #   -lresolve *must* follow -lnsl for name resolution to work properly
6559 #
6560
6561 if test x$ac_cv_func_strcasecmp = xno ; then
6562         echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6
6563 echo "configure:6564: checking for strcasecmp in -lresolv" >&5
6564 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'`
6565 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6566   echo $ac_n "(cached) $ac_c" 1>&6
6567 else
6568   ac_save_LIBS="$LIBS"
6569 LIBS="-lresolv  $LIBS"
6570 cat > conftest.$ac_ext <<EOF
6571 #line 6572 "configure"
6572 #include "confdefs.h"
6573 /* Override any gcc2 internal prototype to avoid an error.  */
6574 /* We use char because int might match the return type of a gcc2
6575     builtin and then its argument prototype would still apply.  */
6576 char strcasecmp();
6577
6578 int main() {
6579 strcasecmp()
6580 ; return 0; }
6581 EOF
6582 if { (eval echo configure:6583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6583   rm -rf conftest*
6584   eval "ac_cv_lib_$ac_lib_var=yes"
6585 else
6586   echo "configure: failed program was:" >&5
6587   cat conftest.$ac_ext >&5
6588   rm -rf conftest*
6589   eval "ac_cv_lib_$ac_lib_var=no"
6590 fi
6591 rm -f conftest*
6592 LIBS="$ac_save_LIBS"
6593
6594 fi
6595 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6596   echo "$ac_t""yes" 1>&6
6597   LIBS="$LIBS -lresolv"
6598                 cat >> confdefs.h <<\EOF
6599 #define HAVE_STRCASECMP 1
6600 EOF
6601
6602 else
6603   echo "$ac_t""no" 1>&6
6604 fi
6605
6606 fi
6607
6608 #
6609 # Check for the functions putprpwnam, set_auth_parameters,
6610 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6611 # Needed for OSF1 and HPUX.
6612 #
6613
6614 case "$LIBS" in
6615   *-lsecurity*) for ac_func in putprpwnam
6616 do
6617 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6618 echo "configure:6619: checking for $ac_func" >&5
6619 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6620   echo $ac_n "(cached) $ac_c" 1>&6
6621 else
6622   cat > conftest.$ac_ext <<EOF
6623 #line 6624 "configure"
6624 #include "confdefs.h"
6625 /* System header to define __stub macros and hopefully few prototypes,
6626     which can conflict with char $ac_func(); below.  */
6627 #include <assert.h>
6628 /* Override any gcc2 internal prototype to avoid an error.  */
6629 /* We use char because int might match the return type of a gcc2
6630     builtin and then its argument prototype would still apply.  */
6631 char $ac_func();
6632
6633 int main() {
6634
6635 /* The GNU C library defines this for functions which it implements
6636     to always fail with ENOSYS.  Some functions are actually named
6637     something starting with __ and the normal name is an alias.  */
6638 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6639 choke me
6640 #else
6641 $ac_func();
6642 #endif
6643
6644 ; return 0; }
6645 EOF
6646 if { (eval echo configure:6647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6647   rm -rf conftest*
6648   eval "ac_cv_func_$ac_func=yes"
6649 else
6650   echo "configure: failed program was:" >&5
6651   cat conftest.$ac_ext >&5
6652   rm -rf conftest*
6653   eval "ac_cv_func_$ac_func=no"
6654 fi
6655 rm -f conftest*
6656 fi
6657
6658 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6659   echo "$ac_t""yes" 1>&6
6660     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6661   cat >> confdefs.h <<EOF
6662 #define $ac_tr_func 1
6663 EOF
6664  
6665 else
6666   echo "$ac_t""no" 1>&6
6667 fi
6668 done
6669  ;;
6670   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6671 echo "configure:6672: checking for putprpwnam in -lsecurity" >&5
6672 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6673 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6674   echo $ac_n "(cached) $ac_c" 1>&6
6675 else
6676   ac_save_LIBS="$LIBS"
6677 LIBS="-lsecurity  $LIBS"
6678 cat > conftest.$ac_ext <<EOF
6679 #line 6680 "configure"
6680 #include "confdefs.h"
6681 /* Override any gcc2 internal prototype to avoid an error.  */
6682 /* We use char because int might match the return type of a gcc2
6683     builtin and then its argument prototype would still apply.  */
6684 char putprpwnam();
6685
6686 int main() {
6687 putprpwnam()
6688 ; return 0; }
6689 EOF
6690 if { (eval echo configure:6691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6691   rm -rf conftest*
6692   eval "ac_cv_lib_$ac_lib_var=yes"
6693 else
6694   echo "configure: failed program was:" >&5
6695   cat conftest.$ac_ext >&5
6696   rm -rf conftest*
6697   eval "ac_cv_lib_$ac_lib_var=no"
6698 fi
6699 rm -f conftest*
6700 LIBS="$ac_save_LIBS"
6701
6702 fi
6703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6704   echo "$ac_t""yes" 1>&6
6705     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6706     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6707   cat >> confdefs.h <<EOF
6708 #define $ac_tr_lib 1
6709 EOF
6710
6711   LIBS="-lsecurity $LIBS"
6712
6713 else
6714   echo "$ac_t""no" 1>&6
6715 fi
6716  
6717      for ac_func in putprpwnam
6718 do
6719 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6720 echo "configure:6721: checking for $ac_func" >&5
6721 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6722   echo $ac_n "(cached) $ac_c" 1>&6
6723 else
6724   cat > conftest.$ac_ext <<EOF
6725 #line 6726 "configure"
6726 #include "confdefs.h"
6727 /* System header to define __stub macros and hopefully few prototypes,
6728     which can conflict with char $ac_func(); below.  */
6729 #include <assert.h>
6730 /* Override any gcc2 internal prototype to avoid an error.  */
6731 /* We use char because int might match the return type of a gcc2
6732     builtin and then its argument prototype would still apply.  */
6733 char $ac_func();
6734
6735 int main() {
6736
6737 /* The GNU C library defines this for functions which it implements
6738     to always fail with ENOSYS.  Some functions are actually named
6739     something starting with __ and the normal name is an alias.  */
6740 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6741 choke me
6742 #else
6743 $ac_func();
6744 #endif
6745
6746 ; return 0; }
6747 EOF
6748 if { (eval echo configure:6749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6749   rm -rf conftest*
6750   eval "ac_cv_func_$ac_func=yes"
6751 else
6752   echo "configure: failed program was:" >&5
6753   cat conftest.$ac_ext >&5
6754   rm -rf conftest*
6755   eval "ac_cv_func_$ac_func=no"
6756 fi
6757 rm -f conftest*
6758 fi
6759
6760 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6761   echo "$ac_t""yes" 1>&6
6762     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6763   cat >> confdefs.h <<EOF
6764 #define $ac_tr_func 1
6765 EOF
6766  
6767 else
6768   echo "$ac_t""no" 1>&6
6769 fi
6770 done
6771
6772   ;;
6773   esac
6774
6775 case "$LIBS" in
6776   *-lsec*) for ac_func in putprpwnam
6777 do
6778 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6779 echo "configure:6780: checking for $ac_func" >&5
6780 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6781   echo $ac_n "(cached) $ac_c" 1>&6
6782 else
6783   cat > conftest.$ac_ext <<EOF
6784 #line 6785 "configure"
6785 #include "confdefs.h"
6786 /* System header to define __stub macros and hopefully few prototypes,
6787     which can conflict with char $ac_func(); below.  */
6788 #include <assert.h>
6789 /* Override any gcc2 internal prototype to avoid an error.  */
6790 /* We use char because int might match the return type of a gcc2
6791     builtin and then its argument prototype would still apply.  */
6792 char $ac_func();
6793
6794 int main() {
6795
6796 /* The GNU C library defines this for functions which it implements
6797     to always fail with ENOSYS.  Some functions are actually named
6798     something starting with __ and the normal name is an alias.  */
6799 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6800 choke me
6801 #else
6802 $ac_func();
6803 #endif
6804
6805 ; return 0; }
6806 EOF
6807 if { (eval echo configure:6808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6808   rm -rf conftest*
6809   eval "ac_cv_func_$ac_func=yes"
6810 else
6811   echo "configure: failed program was:" >&5
6812   cat conftest.$ac_ext >&5
6813   rm -rf conftest*
6814   eval "ac_cv_func_$ac_func=no"
6815 fi
6816 rm -f conftest*
6817 fi
6818
6819 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6820   echo "$ac_t""yes" 1>&6
6821     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6822   cat >> confdefs.h <<EOF
6823 #define $ac_tr_func 1
6824 EOF
6825  
6826 else
6827   echo "$ac_t""no" 1>&6
6828 fi
6829 done
6830  ;;
6831   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6832 echo "configure:6833: checking for putprpwnam in -lsec" >&5
6833 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6834 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6835   echo $ac_n "(cached) $ac_c" 1>&6
6836 else
6837   ac_save_LIBS="$LIBS"
6838 LIBS="-lsec  $LIBS"
6839 cat > conftest.$ac_ext <<EOF
6840 #line 6841 "configure"
6841 #include "confdefs.h"
6842 /* Override any gcc2 internal prototype to avoid an error.  */
6843 /* We use char because int might match the return type of a gcc2
6844     builtin and then its argument prototype would still apply.  */
6845 char putprpwnam();
6846
6847 int main() {
6848 putprpwnam()
6849 ; return 0; }
6850 EOF
6851 if { (eval echo configure:6852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6852   rm -rf conftest*
6853   eval "ac_cv_lib_$ac_lib_var=yes"
6854 else
6855   echo "configure: failed program was:" >&5
6856   cat conftest.$ac_ext >&5
6857   rm -rf conftest*
6858   eval "ac_cv_lib_$ac_lib_var=no"
6859 fi
6860 rm -f conftest*
6861 LIBS="$ac_save_LIBS"
6862
6863 fi
6864 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6865   echo "$ac_t""yes" 1>&6
6866     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6867     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6868   cat >> confdefs.h <<EOF
6869 #define $ac_tr_lib 1
6870 EOF
6871
6872   LIBS="-lsec $LIBS"
6873
6874 else
6875   echo "$ac_t""no" 1>&6
6876 fi
6877  
6878      for ac_func in putprpwnam
6879 do
6880 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6881 echo "configure:6882: checking for $ac_func" >&5
6882 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6883   echo $ac_n "(cached) $ac_c" 1>&6
6884 else
6885   cat > conftest.$ac_ext <<EOF
6886 #line 6887 "configure"
6887 #include "confdefs.h"
6888 /* System header to define __stub macros and hopefully few prototypes,
6889     which can conflict with char $ac_func(); below.  */
6890 #include <assert.h>
6891 /* Override any gcc2 internal prototype to avoid an error.  */
6892 /* We use char because int might match the return type of a gcc2
6893     builtin and then its argument prototype would still apply.  */
6894 char $ac_func();
6895
6896 int main() {
6897
6898 /* The GNU C library defines this for functions which it implements
6899     to always fail with ENOSYS.  Some functions are actually named
6900     something starting with __ and the normal name is an alias.  */
6901 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6902 choke me
6903 #else
6904 $ac_func();
6905 #endif
6906
6907 ; return 0; }
6908 EOF
6909 if { (eval echo configure:6910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6910   rm -rf conftest*
6911   eval "ac_cv_func_$ac_func=yes"
6912 else
6913   echo "configure: failed program was:" >&5
6914   cat conftest.$ac_ext >&5
6915   rm -rf conftest*
6916   eval "ac_cv_func_$ac_func=no"
6917 fi
6918 rm -f conftest*
6919 fi
6920
6921 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6922   echo "$ac_t""yes" 1>&6
6923     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6924   cat >> confdefs.h <<EOF
6925 #define $ac_tr_func 1
6926 EOF
6927  
6928 else
6929   echo "$ac_t""no" 1>&6
6930 fi
6931 done
6932
6933   ;;
6934   esac
6935
6936
6937 case "$LIBS" in
6938   *-lsecurity*) for ac_func in set_auth_parameters
6939 do
6940 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6941 echo "configure:6942: checking for $ac_func" >&5
6942 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6943   echo $ac_n "(cached) $ac_c" 1>&6
6944 else
6945   cat > conftest.$ac_ext <<EOF
6946 #line 6947 "configure"
6947 #include "confdefs.h"
6948 /* System header to define __stub macros and hopefully few prototypes,
6949     which can conflict with char $ac_func(); below.  */
6950 #include <assert.h>
6951 /* Override any gcc2 internal prototype to avoid an error.  */
6952 /* We use char because int might match the return type of a gcc2
6953     builtin and then its argument prototype would still apply.  */
6954 char $ac_func();
6955
6956 int main() {
6957
6958 /* The GNU C library defines this for functions which it implements
6959     to always fail with ENOSYS.  Some functions are actually named
6960     something starting with __ and the normal name is an alias.  */
6961 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6962 choke me
6963 #else
6964 $ac_func();
6965 #endif
6966
6967 ; return 0; }
6968 EOF
6969 if { (eval echo configure:6970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6970   rm -rf conftest*
6971   eval "ac_cv_func_$ac_func=yes"
6972 else
6973   echo "configure: failed program was:" >&5
6974   cat conftest.$ac_ext >&5
6975   rm -rf conftest*
6976   eval "ac_cv_func_$ac_func=no"
6977 fi
6978 rm -f conftest*
6979 fi
6980
6981 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6982   echo "$ac_t""yes" 1>&6
6983     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6984   cat >> confdefs.h <<EOF
6985 #define $ac_tr_func 1
6986 EOF
6987  
6988 else
6989   echo "$ac_t""no" 1>&6
6990 fi
6991 done
6992  ;;
6993   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
6994 echo "configure:6995: checking for set_auth_parameters in -lsecurity" >&5
6995 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
6996 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6997   echo $ac_n "(cached) $ac_c" 1>&6
6998 else
6999   ac_save_LIBS="$LIBS"
7000 LIBS="-lsecurity  $LIBS"
7001 cat > conftest.$ac_ext <<EOF
7002 #line 7003 "configure"
7003 #include "confdefs.h"
7004 /* Override any gcc2 internal prototype to avoid an error.  */
7005 /* We use char because int might match the return type of a gcc2
7006     builtin and then its argument prototype would still apply.  */
7007 char set_auth_parameters();
7008
7009 int main() {
7010 set_auth_parameters()
7011 ; return 0; }
7012 EOF
7013 if { (eval echo configure:7014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7014   rm -rf conftest*
7015   eval "ac_cv_lib_$ac_lib_var=yes"
7016 else
7017   echo "configure: failed program was:" >&5
7018   cat conftest.$ac_ext >&5
7019   rm -rf conftest*
7020   eval "ac_cv_lib_$ac_lib_var=no"
7021 fi
7022 rm -f conftest*
7023 LIBS="$ac_save_LIBS"
7024
7025 fi
7026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7027   echo "$ac_t""yes" 1>&6
7028     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7029     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7030   cat >> confdefs.h <<EOF
7031 #define $ac_tr_lib 1
7032 EOF
7033
7034   LIBS="-lsecurity $LIBS"
7035
7036 else
7037   echo "$ac_t""no" 1>&6
7038 fi
7039  
7040      for ac_func in set_auth_parameters
7041 do
7042 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7043 echo "configure:7044: checking for $ac_func" >&5
7044 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7045   echo $ac_n "(cached) $ac_c" 1>&6
7046 else
7047   cat > conftest.$ac_ext <<EOF
7048 #line 7049 "configure"
7049 #include "confdefs.h"
7050 /* System header to define __stub macros and hopefully few prototypes,
7051     which can conflict with char $ac_func(); below.  */
7052 #include <assert.h>
7053 /* Override any gcc2 internal prototype to avoid an error.  */
7054 /* We use char because int might match the return type of a gcc2
7055     builtin and then its argument prototype would still apply.  */
7056 char $ac_func();
7057
7058 int main() {
7059
7060 /* The GNU C library defines this for functions which it implements
7061     to always fail with ENOSYS.  Some functions are actually named
7062     something starting with __ and the normal name is an alias.  */
7063 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7064 choke me
7065 #else
7066 $ac_func();
7067 #endif
7068
7069 ; return 0; }
7070 EOF
7071 if { (eval echo configure:7072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7072   rm -rf conftest*
7073   eval "ac_cv_func_$ac_func=yes"
7074 else
7075   echo "configure: failed program was:" >&5
7076   cat conftest.$ac_ext >&5
7077   rm -rf conftest*
7078   eval "ac_cv_func_$ac_func=no"
7079 fi
7080 rm -f conftest*
7081 fi
7082
7083 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7084   echo "$ac_t""yes" 1>&6
7085     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7086   cat >> confdefs.h <<EOF
7087 #define $ac_tr_func 1
7088 EOF
7089  
7090 else
7091   echo "$ac_t""no" 1>&6
7092 fi
7093 done
7094
7095   ;;
7096   esac
7097
7098 case "$LIBS" in
7099   *-lsec*) for ac_func in set_auth_parameters
7100 do
7101 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7102 echo "configure:7103: checking for $ac_func" >&5
7103 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7104   echo $ac_n "(cached) $ac_c" 1>&6
7105 else
7106   cat > conftest.$ac_ext <<EOF
7107 #line 7108 "configure"
7108 #include "confdefs.h"
7109 /* System header to define __stub macros and hopefully few prototypes,
7110     which can conflict with char $ac_func(); below.  */
7111 #include <assert.h>
7112 /* Override any gcc2 internal prototype to avoid an error.  */
7113 /* We use char because int might match the return type of a gcc2
7114     builtin and then its argument prototype would still apply.  */
7115 char $ac_func();
7116
7117 int main() {
7118
7119 /* The GNU C library defines this for functions which it implements
7120     to always fail with ENOSYS.  Some functions are actually named
7121     something starting with __ and the normal name is an alias.  */
7122 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7123 choke me
7124 #else
7125 $ac_func();
7126 #endif
7127
7128 ; return 0; }
7129 EOF
7130 if { (eval echo configure:7131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7131   rm -rf conftest*
7132   eval "ac_cv_func_$ac_func=yes"
7133 else
7134   echo "configure: failed program was:" >&5
7135   cat conftest.$ac_ext >&5
7136   rm -rf conftest*
7137   eval "ac_cv_func_$ac_func=no"
7138 fi
7139 rm -f conftest*
7140 fi
7141
7142 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7143   echo "$ac_t""yes" 1>&6
7144     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7145   cat >> confdefs.h <<EOF
7146 #define $ac_tr_func 1
7147 EOF
7148  
7149 else
7150   echo "$ac_t""no" 1>&6
7151 fi
7152 done
7153  ;;
7154   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7155 echo "configure:7156: checking for set_auth_parameters in -lsec" >&5
7156 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7157 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7158   echo $ac_n "(cached) $ac_c" 1>&6
7159 else
7160   ac_save_LIBS="$LIBS"
7161 LIBS="-lsec  $LIBS"
7162 cat > conftest.$ac_ext <<EOF
7163 #line 7164 "configure"
7164 #include "confdefs.h"
7165 /* Override any gcc2 internal prototype to avoid an error.  */
7166 /* We use char because int might match the return type of a gcc2
7167     builtin and then its argument prototype would still apply.  */
7168 char set_auth_parameters();
7169
7170 int main() {
7171 set_auth_parameters()
7172 ; return 0; }
7173 EOF
7174 if { (eval echo configure:7175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7175   rm -rf conftest*
7176   eval "ac_cv_lib_$ac_lib_var=yes"
7177 else
7178   echo "configure: failed program was:" >&5
7179   cat conftest.$ac_ext >&5
7180   rm -rf conftest*
7181   eval "ac_cv_lib_$ac_lib_var=no"
7182 fi
7183 rm -f conftest*
7184 LIBS="$ac_save_LIBS"
7185
7186 fi
7187 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7188   echo "$ac_t""yes" 1>&6
7189     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7190     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7191   cat >> confdefs.h <<EOF
7192 #define $ac_tr_lib 1
7193 EOF
7194
7195   LIBS="-lsec $LIBS"
7196
7197 else
7198   echo "$ac_t""no" 1>&6
7199 fi
7200  
7201      for ac_func in set_auth_parameters
7202 do
7203 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7204 echo "configure:7205: checking for $ac_func" >&5
7205 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7206   echo $ac_n "(cached) $ac_c" 1>&6
7207 else
7208   cat > conftest.$ac_ext <<EOF
7209 #line 7210 "configure"
7210 #include "confdefs.h"
7211 /* System header to define __stub macros and hopefully few prototypes,
7212     which can conflict with char $ac_func(); below.  */
7213 #include <assert.h>
7214 /* Override any gcc2 internal prototype to avoid an error.  */
7215 /* We use char because int might match the return type of a gcc2
7216     builtin and then its argument prototype would still apply.  */
7217 char $ac_func();
7218
7219 int main() {
7220
7221 /* The GNU C library defines this for functions which it implements
7222     to always fail with ENOSYS.  Some functions are actually named
7223     something starting with __ and the normal name is an alias.  */
7224 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7225 choke me
7226 #else
7227 $ac_func();
7228 #endif
7229
7230 ; return 0; }
7231 EOF
7232 if { (eval echo configure:7233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7233   rm -rf conftest*
7234   eval "ac_cv_func_$ac_func=yes"
7235 else
7236   echo "configure: failed program was:" >&5
7237   cat conftest.$ac_ext >&5
7238   rm -rf conftest*
7239   eval "ac_cv_func_$ac_func=no"
7240 fi
7241 rm -f conftest*
7242 fi
7243
7244 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7245   echo "$ac_t""yes" 1>&6
7246     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7247   cat >> confdefs.h <<EOF
7248 #define $ac_tr_func 1
7249 EOF
7250  
7251 else
7252   echo "$ac_t""no" 1>&6
7253 fi
7254 done
7255
7256   ;;
7257   esac
7258
7259
7260 # UnixWare 7.x has its getspnam in -lgen
7261 case "$LIBS" in
7262   *-lgen*) for ac_func in getspnam
7263 do
7264 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7265 echo "configure:7266: checking for $ac_func" >&5
7266 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7267   echo $ac_n "(cached) $ac_c" 1>&6
7268 else
7269   cat > conftest.$ac_ext <<EOF
7270 #line 7271 "configure"
7271 #include "confdefs.h"
7272 /* System header to define __stub macros and hopefully few prototypes,
7273     which can conflict with char $ac_func(); below.  */
7274 #include <assert.h>
7275 /* Override any gcc2 internal prototype to avoid an error.  */
7276 /* We use char because int might match the return type of a gcc2
7277     builtin and then its argument prototype would still apply.  */
7278 char $ac_func();
7279
7280 int main() {
7281
7282 /* The GNU C library defines this for functions which it implements
7283     to always fail with ENOSYS.  Some functions are actually named
7284     something starting with __ and the normal name is an alias.  */
7285 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7286 choke me
7287 #else
7288 $ac_func();
7289 #endif
7290
7291 ; return 0; }
7292 EOF
7293 if { (eval echo configure:7294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7294   rm -rf conftest*
7295   eval "ac_cv_func_$ac_func=yes"
7296 else
7297   echo "configure: failed program was:" >&5
7298   cat conftest.$ac_ext >&5
7299   rm -rf conftest*
7300   eval "ac_cv_func_$ac_func=no"
7301 fi
7302 rm -f conftest*
7303 fi
7304
7305 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7306   echo "$ac_t""yes" 1>&6
7307     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7308   cat >> confdefs.h <<EOF
7309 #define $ac_tr_func 1
7310 EOF
7311  
7312 else
7313   echo "$ac_t""no" 1>&6
7314 fi
7315 done
7316  ;;
7317   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7318 echo "configure:7319: checking for getspnam in -lgen" >&5
7319 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7320 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7321   echo $ac_n "(cached) $ac_c" 1>&6
7322 else
7323   ac_save_LIBS="$LIBS"
7324 LIBS="-lgen  $LIBS"
7325 cat > conftest.$ac_ext <<EOF
7326 #line 7327 "configure"
7327 #include "confdefs.h"
7328 /* Override any gcc2 internal prototype to avoid an error.  */
7329 /* We use char because int might match the return type of a gcc2
7330     builtin and then its argument prototype would still apply.  */
7331 char getspnam();
7332
7333 int main() {
7334 getspnam()
7335 ; return 0; }
7336 EOF
7337 if { (eval echo configure:7338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7338   rm -rf conftest*
7339   eval "ac_cv_lib_$ac_lib_var=yes"
7340 else
7341   echo "configure: failed program was:" >&5
7342   cat conftest.$ac_ext >&5
7343   rm -rf conftest*
7344   eval "ac_cv_lib_$ac_lib_var=no"
7345 fi
7346 rm -f conftest*
7347 LIBS="$ac_save_LIBS"
7348
7349 fi
7350 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7351   echo "$ac_t""yes" 1>&6
7352     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7353     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7354   cat >> confdefs.h <<EOF
7355 #define $ac_tr_lib 1
7356 EOF
7357
7358   LIBS="-lgen $LIBS"
7359
7360 else
7361   echo "$ac_t""no" 1>&6
7362 fi
7363  
7364      for ac_func in getspnam
7365 do
7366 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7367 echo "configure:7368: checking for $ac_func" >&5
7368 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7369   echo $ac_n "(cached) $ac_c" 1>&6
7370 else
7371   cat > conftest.$ac_ext <<EOF
7372 #line 7373 "configure"
7373 #include "confdefs.h"
7374 /* System header to define __stub macros and hopefully few prototypes,
7375     which can conflict with char $ac_func(); below.  */
7376 #include <assert.h>
7377 /* Override any gcc2 internal prototype to avoid an error.  */
7378 /* We use char because int might match the return type of a gcc2
7379     builtin and then its argument prototype would still apply.  */
7380 char $ac_func();
7381
7382 int main() {
7383
7384 /* The GNU C library defines this for functions which it implements
7385     to always fail with ENOSYS.  Some functions are actually named
7386     something starting with __ and the normal name is an alias.  */
7387 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7388 choke me
7389 #else
7390 $ac_func();
7391 #endif
7392
7393 ; return 0; }
7394 EOF
7395 if { (eval echo configure:7396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7396   rm -rf conftest*
7397   eval "ac_cv_func_$ac_func=yes"
7398 else
7399   echo "configure: failed program was:" >&5
7400   cat conftest.$ac_ext >&5
7401   rm -rf conftest*
7402   eval "ac_cv_func_$ac_func=no"
7403 fi
7404 rm -f conftest*
7405 fi
7406
7407 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7408   echo "$ac_t""yes" 1>&6
7409     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7410   cat >> confdefs.h <<EOF
7411 #define $ac_tr_func 1
7412 EOF
7413  
7414 else
7415   echo "$ac_t""no" 1>&6
7416 fi
7417 done
7418
7419   ;;
7420   esac
7421
7422
7423 case "$LIBS" in
7424   *-lsecurity*) for ac_func in getspnam
7425 do
7426 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7427 echo "configure:7428: checking for $ac_func" >&5
7428 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7429   echo $ac_n "(cached) $ac_c" 1>&6
7430 else
7431   cat > conftest.$ac_ext <<EOF
7432 #line 7433 "configure"
7433 #include "confdefs.h"
7434 /* System header to define __stub macros and hopefully few prototypes,
7435     which can conflict with char $ac_func(); below.  */
7436 #include <assert.h>
7437 /* Override any gcc2 internal prototype to avoid an error.  */
7438 /* We use char because int might match the return type of a gcc2
7439     builtin and then its argument prototype would still apply.  */
7440 char $ac_func();
7441
7442 int main() {
7443
7444 /* The GNU C library defines this for functions which it implements
7445     to always fail with ENOSYS.  Some functions are actually named
7446     something starting with __ and the normal name is an alias.  */
7447 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7448 choke me
7449 #else
7450 $ac_func();
7451 #endif
7452
7453 ; return 0; }
7454 EOF
7455 if { (eval echo configure:7456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7456   rm -rf conftest*
7457   eval "ac_cv_func_$ac_func=yes"
7458 else
7459   echo "configure: failed program was:" >&5
7460   cat conftest.$ac_ext >&5
7461   rm -rf conftest*
7462   eval "ac_cv_func_$ac_func=no"
7463 fi
7464 rm -f conftest*
7465 fi
7466
7467 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7468   echo "$ac_t""yes" 1>&6
7469     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7470   cat >> confdefs.h <<EOF
7471 #define $ac_tr_func 1
7472 EOF
7473  
7474 else
7475   echo "$ac_t""no" 1>&6
7476 fi
7477 done
7478  ;;
7479   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7480 echo "configure:7481: checking for getspnam in -lsecurity" >&5
7481 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7482 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7483   echo $ac_n "(cached) $ac_c" 1>&6
7484 else
7485   ac_save_LIBS="$LIBS"
7486 LIBS="-lsecurity  $LIBS"
7487 cat > conftest.$ac_ext <<EOF
7488 #line 7489 "configure"
7489 #include "confdefs.h"
7490 /* Override any gcc2 internal prototype to avoid an error.  */
7491 /* We use char because int might match the return type of a gcc2
7492     builtin and then its argument prototype would still apply.  */
7493 char getspnam();
7494
7495 int main() {
7496 getspnam()
7497 ; return 0; }
7498 EOF
7499 if { (eval echo configure:7500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7500   rm -rf conftest*
7501   eval "ac_cv_lib_$ac_lib_var=yes"
7502 else
7503   echo "configure: failed program was:" >&5
7504   cat conftest.$ac_ext >&5
7505   rm -rf conftest*
7506   eval "ac_cv_lib_$ac_lib_var=no"
7507 fi
7508 rm -f conftest*
7509 LIBS="$ac_save_LIBS"
7510
7511 fi
7512 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7513   echo "$ac_t""yes" 1>&6
7514     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7515     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7516   cat >> confdefs.h <<EOF
7517 #define $ac_tr_lib 1
7518 EOF
7519
7520   LIBS="-lsecurity $LIBS"
7521
7522 else
7523   echo "$ac_t""no" 1>&6
7524 fi
7525  
7526      for ac_func in getspnam
7527 do
7528 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7529 echo "configure:7530: checking for $ac_func" >&5
7530 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7531   echo $ac_n "(cached) $ac_c" 1>&6
7532 else
7533   cat > conftest.$ac_ext <<EOF
7534 #line 7535 "configure"
7535 #include "confdefs.h"
7536 /* System header to define __stub macros and hopefully few prototypes,
7537     which can conflict with char $ac_func(); below.  */
7538 #include <assert.h>
7539 /* Override any gcc2 internal prototype to avoid an error.  */
7540 /* We use char because int might match the return type of a gcc2
7541     builtin and then its argument prototype would still apply.  */
7542 char $ac_func();
7543
7544 int main() {
7545
7546 /* The GNU C library defines this for functions which it implements
7547     to always fail with ENOSYS.  Some functions are actually named
7548     something starting with __ and the normal name is an alias.  */
7549 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7550 choke me
7551 #else
7552 $ac_func();
7553 #endif
7554
7555 ; return 0; }
7556 EOF
7557 if { (eval echo configure:7558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7558   rm -rf conftest*
7559   eval "ac_cv_func_$ac_func=yes"
7560 else
7561   echo "configure: failed program was:" >&5
7562   cat conftest.$ac_ext >&5
7563   rm -rf conftest*
7564   eval "ac_cv_func_$ac_func=no"
7565 fi
7566 rm -f conftest*
7567 fi
7568
7569 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7570   echo "$ac_t""yes" 1>&6
7571     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7572   cat >> confdefs.h <<EOF
7573 #define $ac_tr_func 1
7574 EOF
7575  
7576 else
7577   echo "$ac_t""no" 1>&6
7578 fi
7579 done
7580
7581   ;;
7582   esac
7583
7584 case "$LIBS" in
7585   *-lsec*) for ac_func in getspnam
7586 do
7587 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7588 echo "configure:7589: checking for $ac_func" >&5
7589 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7590   echo $ac_n "(cached) $ac_c" 1>&6
7591 else
7592   cat > conftest.$ac_ext <<EOF
7593 #line 7594 "configure"
7594 #include "confdefs.h"
7595 /* System header to define __stub macros and hopefully few prototypes,
7596     which can conflict with char $ac_func(); below.  */
7597 #include <assert.h>
7598 /* Override any gcc2 internal prototype to avoid an error.  */
7599 /* We use char because int might match the return type of a gcc2
7600     builtin and then its argument prototype would still apply.  */
7601 char $ac_func();
7602
7603 int main() {
7604
7605 /* The GNU C library defines this for functions which it implements
7606     to always fail with ENOSYS.  Some functions are actually named
7607     something starting with __ and the normal name is an alias.  */
7608 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7609 choke me
7610 #else
7611 $ac_func();
7612 #endif
7613
7614 ; return 0; }
7615 EOF
7616 if { (eval echo configure:7617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7617   rm -rf conftest*
7618   eval "ac_cv_func_$ac_func=yes"
7619 else
7620   echo "configure: failed program was:" >&5
7621   cat conftest.$ac_ext >&5
7622   rm -rf conftest*
7623   eval "ac_cv_func_$ac_func=no"
7624 fi
7625 rm -f conftest*
7626 fi
7627
7628 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7629   echo "$ac_t""yes" 1>&6
7630     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7631   cat >> confdefs.h <<EOF
7632 #define $ac_tr_func 1
7633 EOF
7634  
7635 else
7636   echo "$ac_t""no" 1>&6
7637 fi
7638 done
7639  ;;
7640   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7641 echo "configure:7642: checking for getspnam in -lsec" >&5
7642 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7643 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7644   echo $ac_n "(cached) $ac_c" 1>&6
7645 else
7646   ac_save_LIBS="$LIBS"
7647 LIBS="-lsec  $LIBS"
7648 cat > conftest.$ac_ext <<EOF
7649 #line 7650 "configure"
7650 #include "confdefs.h"
7651 /* Override any gcc2 internal prototype to avoid an error.  */
7652 /* We use char because int might match the return type of a gcc2
7653     builtin and then its argument prototype would still apply.  */
7654 char getspnam();
7655
7656 int main() {
7657 getspnam()
7658 ; return 0; }
7659 EOF
7660 if { (eval echo configure:7661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7661   rm -rf conftest*
7662   eval "ac_cv_lib_$ac_lib_var=yes"
7663 else
7664   echo "configure: failed program was:" >&5
7665   cat conftest.$ac_ext >&5
7666   rm -rf conftest*
7667   eval "ac_cv_lib_$ac_lib_var=no"
7668 fi
7669 rm -f conftest*
7670 LIBS="$ac_save_LIBS"
7671
7672 fi
7673 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7674   echo "$ac_t""yes" 1>&6
7675     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7676     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7677   cat >> confdefs.h <<EOF
7678 #define $ac_tr_lib 1
7679 EOF
7680
7681   LIBS="-lsec $LIBS"
7682
7683 else
7684   echo "$ac_t""no" 1>&6
7685 fi
7686  
7687      for ac_func in getspnam
7688 do
7689 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7690 echo "configure:7691: checking for $ac_func" >&5
7691 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7692   echo $ac_n "(cached) $ac_c" 1>&6
7693 else
7694   cat > conftest.$ac_ext <<EOF
7695 #line 7696 "configure"
7696 #include "confdefs.h"
7697 /* System header to define __stub macros and hopefully few prototypes,
7698     which can conflict with char $ac_func(); below.  */
7699 #include <assert.h>
7700 /* Override any gcc2 internal prototype to avoid an error.  */
7701 /* We use char because int might match the return type of a gcc2
7702     builtin and then its argument prototype would still apply.  */
7703 char $ac_func();
7704
7705 int main() {
7706
7707 /* The GNU C library defines this for functions which it implements
7708     to always fail with ENOSYS.  Some functions are actually named
7709     something starting with __ and the normal name is an alias.  */
7710 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7711 choke me
7712 #else
7713 $ac_func();
7714 #endif
7715
7716 ; return 0; }
7717 EOF
7718 if { (eval echo configure:7719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7719   rm -rf conftest*
7720   eval "ac_cv_func_$ac_func=yes"
7721 else
7722   echo "configure: failed program was:" >&5
7723   cat conftest.$ac_ext >&5
7724   rm -rf conftest*
7725   eval "ac_cv_func_$ac_func=no"
7726 fi
7727 rm -f conftest*
7728 fi
7729
7730 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7731   echo "$ac_t""yes" 1>&6
7732     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7733   cat >> confdefs.h <<EOF
7734 #define $ac_tr_func 1
7735 EOF
7736  
7737 else
7738   echo "$ac_t""no" 1>&6
7739 fi
7740 done
7741
7742   ;;
7743   esac
7744
7745
7746 case "$LIBS" in
7747   *-lsecurity*) for ac_func in bigcrypt
7748 do
7749 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7750 echo "configure:7751: checking for $ac_func" >&5
7751 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7752   echo $ac_n "(cached) $ac_c" 1>&6
7753 else
7754   cat > conftest.$ac_ext <<EOF
7755 #line 7756 "configure"
7756 #include "confdefs.h"
7757 /* System header to define __stub macros and hopefully few prototypes,
7758     which can conflict with char $ac_func(); below.  */
7759 #include <assert.h>
7760 /* Override any gcc2 internal prototype to avoid an error.  */
7761 /* We use char because int might match the return type of a gcc2
7762     builtin and then its argument prototype would still apply.  */
7763 char $ac_func();
7764
7765 int main() {
7766
7767 /* The GNU C library defines this for functions which it implements
7768     to always fail with ENOSYS.  Some functions are actually named
7769     something starting with __ and the normal name is an alias.  */
7770 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7771 choke me
7772 #else
7773 $ac_func();
7774 #endif
7775
7776 ; return 0; }
7777 EOF
7778 if { (eval echo configure:7779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7779   rm -rf conftest*
7780   eval "ac_cv_func_$ac_func=yes"
7781 else
7782   echo "configure: failed program was:" >&5
7783   cat conftest.$ac_ext >&5
7784   rm -rf conftest*
7785   eval "ac_cv_func_$ac_func=no"
7786 fi
7787 rm -f conftest*
7788 fi
7789
7790 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7791   echo "$ac_t""yes" 1>&6
7792     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7793   cat >> confdefs.h <<EOF
7794 #define $ac_tr_func 1
7795 EOF
7796  
7797 else
7798   echo "$ac_t""no" 1>&6
7799 fi
7800 done
7801  ;;
7802   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7803 echo "configure:7804: checking for bigcrypt in -lsecurity" >&5
7804 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7805 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7806   echo $ac_n "(cached) $ac_c" 1>&6
7807 else
7808   ac_save_LIBS="$LIBS"
7809 LIBS="-lsecurity  $LIBS"
7810 cat > conftest.$ac_ext <<EOF
7811 #line 7812 "configure"
7812 #include "confdefs.h"
7813 /* Override any gcc2 internal prototype to avoid an error.  */
7814 /* We use char because int might match the return type of a gcc2
7815     builtin and then its argument prototype would still apply.  */
7816 char bigcrypt();
7817
7818 int main() {
7819 bigcrypt()
7820 ; return 0; }
7821 EOF
7822 if { (eval echo configure:7823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7823   rm -rf conftest*
7824   eval "ac_cv_lib_$ac_lib_var=yes"
7825 else
7826   echo "configure: failed program was:" >&5
7827   cat conftest.$ac_ext >&5
7828   rm -rf conftest*
7829   eval "ac_cv_lib_$ac_lib_var=no"
7830 fi
7831 rm -f conftest*
7832 LIBS="$ac_save_LIBS"
7833
7834 fi
7835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7836   echo "$ac_t""yes" 1>&6
7837     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7838     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7839   cat >> confdefs.h <<EOF
7840 #define $ac_tr_lib 1
7841 EOF
7842
7843   LIBS="-lsecurity $LIBS"
7844
7845 else
7846   echo "$ac_t""no" 1>&6
7847 fi
7848  
7849      for ac_func in bigcrypt
7850 do
7851 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7852 echo "configure:7853: checking for $ac_func" >&5
7853 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7854   echo $ac_n "(cached) $ac_c" 1>&6
7855 else
7856   cat > conftest.$ac_ext <<EOF
7857 #line 7858 "configure"
7858 #include "confdefs.h"
7859 /* System header to define __stub macros and hopefully few prototypes,
7860     which can conflict with char $ac_func(); below.  */
7861 #include <assert.h>
7862 /* Override any gcc2 internal prototype to avoid an error.  */
7863 /* We use char because int might match the return type of a gcc2
7864     builtin and then its argument prototype would still apply.  */
7865 char $ac_func();
7866
7867 int main() {
7868
7869 /* The GNU C library defines this for functions which it implements
7870     to always fail with ENOSYS.  Some functions are actually named
7871     something starting with __ and the normal name is an alias.  */
7872 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7873 choke me
7874 #else
7875 $ac_func();
7876 #endif
7877
7878 ; return 0; }
7879 EOF
7880 if { (eval echo configure:7881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7881   rm -rf conftest*
7882   eval "ac_cv_func_$ac_func=yes"
7883 else
7884   echo "configure: failed program was:" >&5
7885   cat conftest.$ac_ext >&5
7886   rm -rf conftest*
7887   eval "ac_cv_func_$ac_func=no"
7888 fi
7889 rm -f conftest*
7890 fi
7891
7892 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7893   echo "$ac_t""yes" 1>&6
7894     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7895   cat >> confdefs.h <<EOF
7896 #define $ac_tr_func 1
7897 EOF
7898  
7899 else
7900   echo "$ac_t""no" 1>&6
7901 fi
7902 done
7903
7904   ;;
7905   esac
7906
7907 case "$LIBS" in
7908   *-lsec*) for ac_func in bigcrypt
7909 do
7910 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7911 echo "configure:7912: checking for $ac_func" >&5
7912 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7913   echo $ac_n "(cached) $ac_c" 1>&6
7914 else
7915   cat > conftest.$ac_ext <<EOF
7916 #line 7917 "configure"
7917 #include "confdefs.h"
7918 /* System header to define __stub macros and hopefully few prototypes,
7919     which can conflict with char $ac_func(); below.  */
7920 #include <assert.h>
7921 /* Override any gcc2 internal prototype to avoid an error.  */
7922 /* We use char because int might match the return type of a gcc2
7923     builtin and then its argument prototype would still apply.  */
7924 char $ac_func();
7925
7926 int main() {
7927
7928 /* The GNU C library defines this for functions which it implements
7929     to always fail with ENOSYS.  Some functions are actually named
7930     something starting with __ and the normal name is an alias.  */
7931 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7932 choke me
7933 #else
7934 $ac_func();
7935 #endif
7936
7937 ; return 0; }
7938 EOF
7939 if { (eval echo configure:7940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7940   rm -rf conftest*
7941   eval "ac_cv_func_$ac_func=yes"
7942 else
7943   echo "configure: failed program was:" >&5
7944   cat conftest.$ac_ext >&5
7945   rm -rf conftest*
7946   eval "ac_cv_func_$ac_func=no"
7947 fi
7948 rm -f conftest*
7949 fi
7950
7951 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7952   echo "$ac_t""yes" 1>&6
7953     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7954   cat >> confdefs.h <<EOF
7955 #define $ac_tr_func 1
7956 EOF
7957  
7958 else
7959   echo "$ac_t""no" 1>&6
7960 fi
7961 done
7962  ;;
7963   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
7964 echo "configure:7965: checking for bigcrypt in -lsec" >&5
7965 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
7966 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7967   echo $ac_n "(cached) $ac_c" 1>&6
7968 else
7969   ac_save_LIBS="$LIBS"
7970 LIBS="-lsec  $LIBS"
7971 cat > conftest.$ac_ext <<EOF
7972 #line 7973 "configure"
7973 #include "confdefs.h"
7974 /* Override any gcc2 internal prototype to avoid an error.  */
7975 /* We use char because int might match the return type of a gcc2
7976     builtin and then its argument prototype would still apply.  */
7977 char bigcrypt();
7978
7979 int main() {
7980 bigcrypt()
7981 ; return 0; }
7982 EOF
7983 if { (eval echo configure:7984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7984   rm -rf conftest*
7985   eval "ac_cv_lib_$ac_lib_var=yes"
7986 else
7987   echo "configure: failed program was:" >&5
7988   cat conftest.$ac_ext >&5
7989   rm -rf conftest*
7990   eval "ac_cv_lib_$ac_lib_var=no"
7991 fi
7992 rm -f conftest*
7993 LIBS="$ac_save_LIBS"
7994
7995 fi
7996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7997   echo "$ac_t""yes" 1>&6
7998     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7999     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8000   cat >> confdefs.h <<EOF
8001 #define $ac_tr_lib 1
8002 EOF
8003
8004   LIBS="-lsec $LIBS"
8005
8006 else
8007   echo "$ac_t""no" 1>&6
8008 fi
8009  
8010      for ac_func in bigcrypt
8011 do
8012 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8013 echo "configure:8014: checking for $ac_func" >&5
8014 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8015   echo $ac_n "(cached) $ac_c" 1>&6
8016 else
8017   cat > conftest.$ac_ext <<EOF
8018 #line 8019 "configure"
8019 #include "confdefs.h"
8020 /* System header to define __stub macros and hopefully few prototypes,
8021     which can conflict with char $ac_func(); below.  */
8022 #include <assert.h>
8023 /* Override any gcc2 internal prototype to avoid an error.  */
8024 /* We use char because int might match the return type of a gcc2
8025     builtin and then its argument prototype would still apply.  */
8026 char $ac_func();
8027
8028 int main() {
8029
8030 /* The GNU C library defines this for functions which it implements
8031     to always fail with ENOSYS.  Some functions are actually named
8032     something starting with __ and the normal name is an alias.  */
8033 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8034 choke me
8035 #else
8036 $ac_func();
8037 #endif
8038
8039 ; return 0; }
8040 EOF
8041 if { (eval echo configure:8042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8042   rm -rf conftest*
8043   eval "ac_cv_func_$ac_func=yes"
8044 else
8045   echo "configure: failed program was:" >&5
8046   cat conftest.$ac_ext >&5
8047   rm -rf conftest*
8048   eval "ac_cv_func_$ac_func=no"
8049 fi
8050 rm -f conftest*
8051 fi
8052
8053 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8054   echo "$ac_t""yes" 1>&6
8055     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8056   cat >> confdefs.h <<EOF
8057 #define $ac_tr_func 1
8058 EOF
8059  
8060 else
8061   echo "$ac_t""no" 1>&6
8062 fi
8063 done
8064
8065   ;;
8066   esac
8067
8068
8069 case "$LIBS" in
8070   *-lsecurity*) for ac_func in getprpwnam
8071 do
8072 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8073 echo "configure:8074: checking for $ac_func" >&5
8074 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8075   echo $ac_n "(cached) $ac_c" 1>&6
8076 else
8077   cat > conftest.$ac_ext <<EOF
8078 #line 8079 "configure"
8079 #include "confdefs.h"
8080 /* System header to define __stub macros and hopefully few prototypes,
8081     which can conflict with char $ac_func(); below.  */
8082 #include <assert.h>
8083 /* Override any gcc2 internal prototype to avoid an error.  */
8084 /* We use char because int might match the return type of a gcc2
8085     builtin and then its argument prototype would still apply.  */
8086 char $ac_func();
8087
8088 int main() {
8089
8090 /* The GNU C library defines this for functions which it implements
8091     to always fail with ENOSYS.  Some functions are actually named
8092     something starting with __ and the normal name is an alias.  */
8093 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8094 choke me
8095 #else
8096 $ac_func();
8097 #endif
8098
8099 ; return 0; }
8100 EOF
8101 if { (eval echo configure:8102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8102   rm -rf conftest*
8103   eval "ac_cv_func_$ac_func=yes"
8104 else
8105   echo "configure: failed program was:" >&5
8106   cat conftest.$ac_ext >&5
8107   rm -rf conftest*
8108   eval "ac_cv_func_$ac_func=no"
8109 fi
8110 rm -f conftest*
8111 fi
8112
8113 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8114   echo "$ac_t""yes" 1>&6
8115     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8116   cat >> confdefs.h <<EOF
8117 #define $ac_tr_func 1
8118 EOF
8119  
8120 else
8121   echo "$ac_t""no" 1>&6
8122 fi
8123 done
8124  ;;
8125   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8126 echo "configure:8127: checking for getprpwnam in -lsecurity" >&5
8127 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8128 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8129   echo $ac_n "(cached) $ac_c" 1>&6
8130 else
8131   ac_save_LIBS="$LIBS"
8132 LIBS="-lsecurity  $LIBS"
8133 cat > conftest.$ac_ext <<EOF
8134 #line 8135 "configure"
8135 #include "confdefs.h"
8136 /* Override any gcc2 internal prototype to avoid an error.  */
8137 /* We use char because int might match the return type of a gcc2
8138     builtin and then its argument prototype would still apply.  */
8139 char getprpwnam();
8140
8141 int main() {
8142 getprpwnam()
8143 ; return 0; }
8144 EOF
8145 if { (eval echo configure:8146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8146   rm -rf conftest*
8147   eval "ac_cv_lib_$ac_lib_var=yes"
8148 else
8149   echo "configure: failed program was:" >&5
8150   cat conftest.$ac_ext >&5
8151   rm -rf conftest*
8152   eval "ac_cv_lib_$ac_lib_var=no"
8153 fi
8154 rm -f conftest*
8155 LIBS="$ac_save_LIBS"
8156
8157 fi
8158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8159   echo "$ac_t""yes" 1>&6
8160     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8161     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8162   cat >> confdefs.h <<EOF
8163 #define $ac_tr_lib 1
8164 EOF
8165
8166   LIBS="-lsecurity $LIBS"
8167
8168 else
8169   echo "$ac_t""no" 1>&6
8170 fi
8171  
8172      for ac_func in getprpwnam
8173 do
8174 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8175 echo "configure:8176: checking for $ac_func" >&5
8176 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8177   echo $ac_n "(cached) $ac_c" 1>&6
8178 else
8179   cat > conftest.$ac_ext <<EOF
8180 #line 8181 "configure"
8181 #include "confdefs.h"
8182 /* System header to define __stub macros and hopefully few prototypes,
8183     which can conflict with char $ac_func(); below.  */
8184 #include <assert.h>
8185 /* Override any gcc2 internal prototype to avoid an error.  */
8186 /* We use char because int might match the return type of a gcc2
8187     builtin and then its argument prototype would still apply.  */
8188 char $ac_func();
8189
8190 int main() {
8191
8192 /* The GNU C library defines this for functions which it implements
8193     to always fail with ENOSYS.  Some functions are actually named
8194     something starting with __ and the normal name is an alias.  */
8195 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8196 choke me
8197 #else
8198 $ac_func();
8199 #endif
8200
8201 ; return 0; }
8202 EOF
8203 if { (eval echo configure:8204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8204   rm -rf conftest*
8205   eval "ac_cv_func_$ac_func=yes"
8206 else
8207   echo "configure: failed program was:" >&5
8208   cat conftest.$ac_ext >&5
8209   rm -rf conftest*
8210   eval "ac_cv_func_$ac_func=no"
8211 fi
8212 rm -f conftest*
8213 fi
8214
8215 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8216   echo "$ac_t""yes" 1>&6
8217     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8218   cat >> confdefs.h <<EOF
8219 #define $ac_tr_func 1
8220 EOF
8221  
8222 else
8223   echo "$ac_t""no" 1>&6
8224 fi
8225 done
8226
8227   ;;
8228   esac
8229
8230 case "$LIBS" in
8231   *-lsec*) for ac_func in getprpwnam
8232 do
8233 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8234 echo "configure:8235: checking for $ac_func" >&5
8235 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8236   echo $ac_n "(cached) $ac_c" 1>&6
8237 else
8238   cat > conftest.$ac_ext <<EOF
8239 #line 8240 "configure"
8240 #include "confdefs.h"
8241 /* System header to define __stub macros and hopefully few prototypes,
8242     which can conflict with char $ac_func(); below.  */
8243 #include <assert.h>
8244 /* Override any gcc2 internal prototype to avoid an error.  */
8245 /* We use char because int might match the return type of a gcc2
8246     builtin and then its argument prototype would still apply.  */
8247 char $ac_func();
8248
8249 int main() {
8250
8251 /* The GNU C library defines this for functions which it implements
8252     to always fail with ENOSYS.  Some functions are actually named
8253     something starting with __ and the normal name is an alias.  */
8254 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8255 choke me
8256 #else
8257 $ac_func();
8258 #endif
8259
8260 ; return 0; }
8261 EOF
8262 if { (eval echo configure:8263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8263   rm -rf conftest*
8264   eval "ac_cv_func_$ac_func=yes"
8265 else
8266   echo "configure: failed program was:" >&5
8267   cat conftest.$ac_ext >&5
8268   rm -rf conftest*
8269   eval "ac_cv_func_$ac_func=no"
8270 fi
8271 rm -f conftest*
8272 fi
8273
8274 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8275   echo "$ac_t""yes" 1>&6
8276     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8277   cat >> confdefs.h <<EOF
8278 #define $ac_tr_func 1
8279 EOF
8280  
8281 else
8282   echo "$ac_t""no" 1>&6
8283 fi
8284 done
8285  ;;
8286   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8287 echo "configure:8288: checking for getprpwnam in -lsec" >&5
8288 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8289 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8290   echo $ac_n "(cached) $ac_c" 1>&6
8291 else
8292   ac_save_LIBS="$LIBS"
8293 LIBS="-lsec  $LIBS"
8294 cat > conftest.$ac_ext <<EOF
8295 #line 8296 "configure"
8296 #include "confdefs.h"
8297 /* Override any gcc2 internal prototype to avoid an error.  */
8298 /* We use char because int might match the return type of a gcc2
8299     builtin and then its argument prototype would still apply.  */
8300 char getprpwnam();
8301
8302 int main() {
8303 getprpwnam()
8304 ; return 0; }
8305 EOF
8306 if { (eval echo configure:8307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8307   rm -rf conftest*
8308   eval "ac_cv_lib_$ac_lib_var=yes"
8309 else
8310   echo "configure: failed program was:" >&5
8311   cat conftest.$ac_ext >&5
8312   rm -rf conftest*
8313   eval "ac_cv_lib_$ac_lib_var=no"
8314 fi
8315 rm -f conftest*
8316 LIBS="$ac_save_LIBS"
8317
8318 fi
8319 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8320   echo "$ac_t""yes" 1>&6
8321     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8322     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8323   cat >> confdefs.h <<EOF
8324 #define $ac_tr_lib 1
8325 EOF
8326
8327   LIBS="-lsec $LIBS"
8328
8329 else
8330   echo "$ac_t""no" 1>&6
8331 fi
8332  
8333      for ac_func in getprpwnam
8334 do
8335 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8336 echo "configure:8337: checking for $ac_func" >&5
8337 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8338   echo $ac_n "(cached) $ac_c" 1>&6
8339 else
8340   cat > conftest.$ac_ext <<EOF
8341 #line 8342 "configure"
8342 #include "confdefs.h"
8343 /* System header to define __stub macros and hopefully few prototypes,
8344     which can conflict with char $ac_func(); below.  */
8345 #include <assert.h>
8346 /* Override any gcc2 internal prototype to avoid an error.  */
8347 /* We use char because int might match the return type of a gcc2
8348     builtin and then its argument prototype would still apply.  */
8349 char $ac_func();
8350
8351 int main() {
8352
8353 /* The GNU C library defines this for functions which it implements
8354     to always fail with ENOSYS.  Some functions are actually named
8355     something starting with __ and the normal name is an alias.  */
8356 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8357 choke me
8358 #else
8359 $ac_func();
8360 #endif
8361
8362 ; return 0; }
8363 EOF
8364 if { (eval echo configure:8365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8365   rm -rf conftest*
8366   eval "ac_cv_func_$ac_func=yes"
8367 else
8368   echo "configure: failed program was:" >&5
8369   cat conftest.$ac_ext >&5
8370   rm -rf conftest*
8371   eval "ac_cv_func_$ac_func=no"
8372 fi
8373 rm -f conftest*
8374 fi
8375
8376 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8377   echo "$ac_t""yes" 1>&6
8378     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8379   cat >> confdefs.h <<EOF
8380 #define $ac_tr_func 1
8381 EOF
8382  
8383 else
8384   echo "$ac_t""no" 1>&6
8385 fi
8386 done
8387
8388   ;;
8389   esac
8390
8391
8392 # this bit needs to be modified for each OS that is suported by
8393 # smbwrapper. You need to specify how to created a shared library and
8394 # how to compile C code to produce PIC object files
8395
8396 # these are the defaults, good for lots of systems
8397 HOST_OS="$host_os"
8398 LDSHFLAGS="-shared"
8399 PICFLAG=""
8400 SHLIBEXT="so"
8401
8402 # and these are for particular systems
8403 case "$host_os" in
8404                 *linux*)   cat >> confdefs.h <<\EOF
8405 #define LINUX 1
8406 EOF
8407 ;;
8408                 *solaris*) cat >> confdefs.h <<\EOF
8409 #define SUNOS5 1
8410 EOF
8411
8412                                         LDSHFLAGS="-G"
8413                 ;;
8414                 *sunos*) cat >> confdefs.h <<\EOF
8415 #define SUNOS4 1
8416 EOF
8417
8418                                         LDSHFLAGS=""
8419                 ;;
8420                 *bsd*) LDSHFLAGS="-shared -Bshareable"
8421                 ;;
8422                 *irix*) cat >> confdefs.h <<\EOF
8423 #define IRIX 1
8424 EOF
8425
8426                         case "$host_os" in
8427                         *irix6*) cat >> confdefs.h <<\EOF
8428 #define IRIX6 1
8429 EOF
8430
8431                         ;;
8432                         esac
8433                         ATTEMPT_WRAP32_BUILD=yes
8434                 ;;
8435                 *aix*) cat >> confdefs.h <<\EOF
8436 #define AIX 1
8437 EOF
8438 ;;
8439                 *hpux*) cat >> confdefs.h <<\EOF
8440 #define HPUX 1
8441 EOF
8442
8443                         SHLIBEXT="sl"
8444                         # Use special PIC flags for the native HP-UX compiler.
8445                         if test $ac_cv_prog_cc_Ae = yes; then
8446                                 LDSHFLAGS="-b"
8447                                 PICFLAG="+z"
8448                         fi
8449                 ;;
8450                 *qnx*) cat >> confdefs.h <<\EOF
8451 #define QNX 1
8452 EOF
8453 ;;
8454                 *osf*) cat >> confdefs.h <<\EOF
8455 #define OSF1 1
8456 EOF
8457 ;;
8458                 *sco*) cat >> confdefs.h <<\EOF
8459 #define SCO 1
8460 EOF
8461 ;;
8462                 *next2*) cat >> confdefs.h <<\EOF
8463 #define NEXT2 1
8464 EOF
8465 ;;
8466                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8467 set dummy groff; ac_word=$2
8468 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8469 echo "configure:8470: checking for $ac_word" >&5
8470 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8471   echo $ac_n "(cached) $ac_c" 1>&6
8472 else
8473   if test -n "$ROFF"; then
8474   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8475 else
8476   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8477   ac_dummy="$PATH"
8478   for ac_dir in $ac_dummy; do
8479     test -z "$ac_dir" && ac_dir=.
8480     if test -f $ac_dir/$ac_word; then
8481       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8482       break
8483     fi
8484   done
8485   IFS="$ac_save_ifs"
8486 fi
8487 fi
8488 ROFF="$ac_cv_prog_ROFF"
8489 if test -n "$ROFF"; then
8490   echo "$ac_t""$ROFF" 1>&6
8491 else
8492   echo "$ac_t""no" 1>&6
8493 fi
8494 ;;
8495                 *sysv4*)
8496                         case "$host" in
8497                                 *-univel-*)     if  test "$GCC" != yes ; then
8498                                                                         cat >> confdefs.h <<\EOF
8499 #define HAVE_MEMSET 1
8500 EOF
8501
8502                                                                 fi
8503                                                                 LDSHFLAGS="-G"
8504                                 ;;
8505                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8506 #define RELIANTUNIX 1
8507 EOF
8508 ;;
8509                         esac
8510                         ;;
8511                 *sysv5*)
8512                         if  test "$GCC" != yes ; then
8513                                 cat >> confdefs.h <<\EOF
8514 #define HAVE_MEMSET 1
8515 EOF
8516
8517                         fi
8518                         LDSHFLAGS="-G"
8519                         ;;
8520 esac
8521
8522 # try to work out how to produce pic code with this compiler
8523 echo $ac_n "checking whether ${CC-cc} accepts -fpic""... $ac_c" 1>&6
8524 echo "configure:8525: checking whether ${CC-cc} accepts -fpic" >&5
8525 if eval "test \"`echo '$''{'ac_cv_prog_cc_fpic'+set}'`\" = set"; then
8526   echo $ac_n "(cached) $ac_c" 1>&6
8527 else
8528   echo 'void f(){}' > conftest.c
8529 if test -z "`${CC-cc} -fpic -c conftest.c 2>&1`"; then
8530   ac_cv_prog_cc_fpic=yes
8531 else
8532   ac_cv_prog_cc_fpic=no
8533 fi
8534 rm -f conftest*
8535
8536 fi
8537
8538 echo "$ac_t""$ac_cv_prog_cc_fpic" 1>&6
8539 if test $ac_cv_prog_cc_fpic = yes; then
8540     PICFLAG="-fpic";
8541 fi
8542 if test x$PICFLAG = x; then
8543   echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
8544 echo "configure:8545: checking whether ${CC-cc} accepts -KPIC" >&5
8545 if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
8546   echo $ac_n "(cached) $ac_c" 1>&6
8547 else
8548   echo 'void f(){}' > conftest.c
8549 if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then
8550   ac_cv_prog_cc_KPIC=yes
8551 else
8552   ac_cv_prog_cc_KPIC=no
8553 fi
8554 rm -f conftest*
8555
8556 fi
8557
8558 echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6
8559   if test $ac_cv_prog_cc_KPIC = yes; then
8560     PICFLAG="-KPIC";
8561   fi
8562 fi
8563 if test x$PICFLAG = x; then
8564   echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
8565 echo "configure:8566: checking whether ${CC-cc} accepts -Kpic" >&5
8566 if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
8567   echo $ac_n "(cached) $ac_c" 1>&6
8568 else
8569   echo 'void f(){}' > conftest.c
8570 if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then
8571   ac_cv_prog_cc_Kpic=yes
8572 else
8573   ac_cv_prog_cc_Kpic=no
8574 fi
8575 rm -f conftest*
8576
8577 fi
8578
8579 echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6
8580   if test $ac_cv_prog_cc_Kpic = yes; then
8581     PICFLAG="-Kpic";
8582   fi
8583 fi
8584
8585 ################
8586
8587 echo $ac_n "checking for long long""... $ac_c" 1>&6
8588 echo "configure:8589: checking for long long" >&5
8589 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8590   echo $ac_n "(cached) $ac_c" 1>&6
8591 else
8592   
8593 if test "$cross_compiling" = yes; then
8594   samba_cv_have_longlong=cross
8595 else
8596   cat > conftest.$ac_ext <<EOF
8597 #line 8598 "configure"
8598 #include "confdefs.h"
8599 #include <stdio.h>
8600 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8601 EOF
8602 if { (eval echo configure:8603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8603 then
8604   samba_cv_have_longlong=yes
8605 else
8606   echo "configure: failed program was:" >&5
8607   cat conftest.$ac_ext >&5
8608   rm -fr conftest*
8609   samba_cv_have_longlong=no
8610 fi
8611 rm -fr conftest*
8612 fi
8613
8614 fi
8615
8616 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8617 if test x"$samba_cv_have_longlong" = x"yes"; then
8618     cat >> confdefs.h <<\EOF
8619 #define HAVE_LONGLONG 1
8620 EOF
8621
8622 fi
8623
8624 #
8625 # Check if the compiler supports the LL prefix on long long integers.
8626 # AIX needs this.
8627
8628 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8629 echo "configure:8630: checking for LL suffix on long long integers" >&5
8630 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8631   echo $ac_n "(cached) $ac_c" 1>&6
8632 else
8633   
8634     cat > conftest.$ac_ext <<EOF
8635 #line 8636 "configure"
8636 #include "confdefs.h"
8637 #include <stdio.h>
8638 int main() {
8639 long long i = 0x8000000000LL
8640 ; return 0; }
8641 EOF
8642 if { (eval echo configure:8643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8643   rm -rf conftest*
8644   samba_cv_compiler_supports_ll=yes
8645 else
8646   echo "configure: failed program was:" >&5
8647   cat conftest.$ac_ext >&5
8648   rm -rf conftest*
8649   samba_cv_compiler_supports_ll=no
8650 fi
8651 rm -f conftest*
8652 fi
8653
8654 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8655 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8656    cat >> confdefs.h <<\EOF
8657 #define COMPILER_SUPPORTS_LL 1
8658 EOF
8659
8660 fi
8661
8662   
8663 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8664 echo "configure:8665: checking for 64 bit off_t" >&5
8665 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8666   echo $ac_n "(cached) $ac_c" 1>&6
8667 else
8668   
8669 if test "$cross_compiling" = yes; then
8670   samba_cv_SIZEOF_OFF_T=cross
8671 else
8672   cat > conftest.$ac_ext <<EOF
8673 #line 8674 "configure"
8674 #include "confdefs.h"
8675 #include <stdio.h>
8676 #include <sys/stat.h>
8677 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8678 EOF
8679 if { (eval echo configure:8680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8680 then
8681   samba_cv_SIZEOF_OFF_T=yes
8682 else
8683   echo "configure: failed program was:" >&5
8684   cat conftest.$ac_ext >&5
8685   rm -fr conftest*
8686   samba_cv_SIZEOF_OFF_T=no
8687 fi
8688 rm -fr conftest*
8689 fi
8690
8691 fi
8692
8693 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8694 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8695     cat >> confdefs.h <<\EOF
8696 #define SIZEOF_OFF_T 8
8697 EOF
8698
8699 fi
8700
8701 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8702 echo "configure:8703: checking for off64_t" >&5
8703 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8704   echo $ac_n "(cached) $ac_c" 1>&6
8705 else
8706   
8707 if test "$cross_compiling" = yes; then
8708   samba_cv_HAVE_OFF64_T=cross
8709 else
8710   cat > conftest.$ac_ext <<EOF
8711 #line 8712 "configure"
8712 #include "confdefs.h"
8713
8714 #if defined(HAVE_UNISTD_H)
8715 #include <unistd.h>
8716 #endif
8717 #include <stdio.h>
8718 #include <sys/stat.h>
8719 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8720 EOF
8721 if { (eval echo configure:8722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8722 then
8723   samba_cv_HAVE_OFF64_T=yes
8724 else
8725   echo "configure: failed program was:" >&5
8726   cat conftest.$ac_ext >&5
8727   rm -fr conftest*
8728   samba_cv_HAVE_OFF64_T=no
8729 fi
8730 rm -fr conftest*
8731 fi
8732
8733 fi
8734
8735 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8736 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8737     cat >> confdefs.h <<\EOF
8738 #define HAVE_OFF64_T 1
8739 EOF
8740
8741 fi
8742
8743 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8744 echo "configure:8745: checking for 64 bit ino_t" >&5
8745 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8746   echo $ac_n "(cached) $ac_c" 1>&6
8747 else
8748   
8749 if test "$cross_compiling" = yes; then
8750   samba_cv_SIZEOF_INO_T=cross
8751 else
8752   cat > conftest.$ac_ext <<EOF
8753 #line 8754 "configure"
8754 #include "confdefs.h"
8755 #include <stdio.h>
8756 #include <sys/stat.h>
8757 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8758 EOF
8759 if { (eval echo configure:8760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8760 then
8761   samba_cv_SIZEOF_INO_T=yes
8762 else
8763   echo "configure: failed program was:" >&5
8764   cat conftest.$ac_ext >&5
8765   rm -fr conftest*
8766   samba_cv_SIZEOF_INO_T=no
8767 fi
8768 rm -fr conftest*
8769 fi
8770
8771 fi
8772
8773 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8774 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8775     cat >> confdefs.h <<\EOF
8776 #define SIZEOF_INO_T 8
8777 EOF
8778
8779 fi
8780
8781 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8782 echo "configure:8783: checking for ino64_t" >&5
8783 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8784   echo $ac_n "(cached) $ac_c" 1>&6
8785 else
8786   
8787 if test "$cross_compiling" = yes; then
8788   samba_cv_HAVE_INO64_T=cross
8789 else
8790   cat > conftest.$ac_ext <<EOF
8791 #line 8792 "configure"
8792 #include "confdefs.h"
8793
8794 #if defined(HAVE_UNISTD_H)
8795 #include <unistd.h>
8796 #endif
8797 #include <stdio.h>
8798 #include <sys/stat.h>
8799 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8800 EOF
8801 if { (eval echo configure:8802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8802 then
8803   samba_cv_HAVE_INO64_T=yes
8804 else
8805   echo "configure: failed program was:" >&5
8806   cat conftest.$ac_ext >&5
8807   rm -fr conftest*
8808   samba_cv_HAVE_INO64_T=no
8809 fi
8810 rm -fr conftest*
8811 fi
8812
8813 fi
8814
8815 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8816 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8817     cat >> confdefs.h <<\EOF
8818 #define HAVE_INO64_T 1
8819 EOF
8820
8821 fi
8822
8823 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8824 echo "configure:8825: checking for struct dirent64" >&5
8825 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8826   echo $ac_n "(cached) $ac_c" 1>&6
8827 else
8828   
8829 cat > conftest.$ac_ext <<EOF
8830 #line 8831 "configure"
8831 #include "confdefs.h"
8832
8833 #if defined(HAVE_UNISTD_H)
8834 #include <unistd.h>
8835 #endif
8836 #include <sys/types.h>
8837 #include <dirent.h>
8838 int main() {
8839 struct dirent64 de;
8840 ; return 0; }
8841 EOF
8842 if { (eval echo configure:8843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8843   rm -rf conftest*
8844   samba_cv_HAVE_STRUCT_DIRENT64=yes
8845 else
8846   echo "configure: failed program was:" >&5
8847   cat conftest.$ac_ext >&5
8848   rm -rf conftest*
8849   samba_cv_HAVE_STRUCT_DIRENT64=no
8850 fi
8851 rm -f conftest*
8852 fi
8853
8854 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
8855 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
8856     cat >> confdefs.h <<\EOF
8857 #define HAVE_STRUCT_DIRENT64 1
8858 EOF
8859
8860 fi
8861
8862 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
8863 echo "configure:8864: checking for unsigned char" >&5
8864 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
8865   echo $ac_n "(cached) $ac_c" 1>&6
8866 else
8867   
8868 if test "$cross_compiling" = yes; then
8869   samba_cv_HAVE_UNSIGNED_CHAR=cross
8870 else
8871   cat > conftest.$ac_ext <<EOF
8872 #line 8873 "configure"
8873 #include "confdefs.h"
8874 #include <stdio.h>
8875 main() { char c; c=250; exit((c > 0)?0:1); }
8876 EOF
8877 if { (eval echo configure:8878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8878 then
8879   samba_cv_HAVE_UNSIGNED_CHAR=yes
8880 else
8881   echo "configure: failed program was:" >&5
8882   cat conftest.$ac_ext >&5
8883   rm -fr conftest*
8884   samba_cv_HAVE_UNSIGNED_CHAR=no
8885 fi
8886 rm -fr conftest*
8887 fi
8888
8889 fi
8890
8891 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
8892 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
8893     cat >> confdefs.h <<\EOF
8894 #define HAVE_UNSIGNED_CHAR 1
8895 EOF
8896
8897 fi
8898
8899 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
8900 echo "configure:8901: checking for sin_len in sock" >&5
8901 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
8902   echo $ac_n "(cached) $ac_c" 1>&6
8903 else
8904   
8905 cat > conftest.$ac_ext <<EOF
8906 #line 8907 "configure"
8907 #include "confdefs.h"
8908 #include <sys/types.h>
8909 #include <sys/socket.h>
8910 #include <netinet/in.h>
8911 int main() {
8912 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
8913 ; return 0; }
8914 EOF
8915 if { (eval echo configure:8916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8916   rm -rf conftest*
8917   samba_cv_HAVE_SOCK_SIN_LEN=yes
8918 else
8919   echo "configure: failed program was:" >&5
8920   cat conftest.$ac_ext >&5
8921   rm -rf conftest*
8922   samba_cv_HAVE_SOCK_SIN_LEN=no
8923 fi
8924 rm -f conftest*
8925 fi
8926
8927 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
8928 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
8929     cat >> confdefs.h <<\EOF
8930 #define HAVE_SOCK_SIN_LEN 1
8931 EOF
8932
8933 fi
8934
8935 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
8936 echo "configure:8937: checking whether seekdir returns void" >&5
8937 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
8938   echo $ac_n "(cached) $ac_c" 1>&6
8939 else
8940   
8941 cat > conftest.$ac_ext <<EOF
8942 #line 8943 "configure"
8943 #include "confdefs.h"
8944 #include <sys/types.h>
8945 #include <dirent.h>
8946 void seekdir(DIR *d, long loc) { return; }
8947 int main() {
8948 return 0;
8949 ; return 0; }
8950 EOF
8951 if { (eval echo configure:8952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8952   rm -rf conftest*
8953   samba_cv_SEEKDIR_RETURNS_VOID=yes
8954 else
8955   echo "configure: failed program was:" >&5
8956   cat conftest.$ac_ext >&5
8957   rm -rf conftest*
8958   samba_cv_SEEKDIR_RETURNS_VOID=no
8959 fi
8960 rm -f conftest*
8961 fi
8962
8963 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
8964 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
8965     cat >> confdefs.h <<\EOF
8966 #define SEEKDIR_RETURNS_VOID 1
8967 EOF
8968
8969 fi
8970
8971 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
8972 echo "configure:8973: checking for __FILE__ macro" >&5
8973 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
8974   echo $ac_n "(cached) $ac_c" 1>&6
8975 else
8976   
8977 cat > conftest.$ac_ext <<EOF
8978 #line 8979 "configure"
8979 #include "confdefs.h"
8980 #include <stdio.h>
8981 int main() {
8982 printf("%s\n", __FILE__);
8983 ; return 0; }
8984 EOF
8985 if { (eval echo configure:8986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8986   rm -rf conftest*
8987   samba_cv_HAVE_FILE_MACRO=yes
8988 else
8989   echo "configure: failed program was:" >&5
8990   cat conftest.$ac_ext >&5
8991   rm -rf conftest*
8992   samba_cv_HAVE_FILE_MACRO=no
8993 fi
8994 rm -f conftest*
8995 fi
8996
8997 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
8998 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
8999     cat >> confdefs.h <<\EOF
9000 #define HAVE_FILE_MACRO 1
9001 EOF
9002
9003 fi
9004
9005 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9006 echo "configure:9007: checking for __FUNCTION__ macro" >&5
9007 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9008   echo $ac_n "(cached) $ac_c" 1>&6
9009 else
9010   
9011 cat > conftest.$ac_ext <<EOF
9012 #line 9013 "configure"
9013 #include "confdefs.h"
9014 #include <stdio.h>
9015 int main() {
9016 printf("%s\n", __FUNCTION__);
9017 ; return 0; }
9018 EOF
9019 if { (eval echo configure:9020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9020   rm -rf conftest*
9021   samba_cv_HAVE_FUNCTION_MACRO=yes
9022 else
9023   echo "configure: failed program was:" >&5
9024   cat conftest.$ac_ext >&5
9025   rm -rf conftest*
9026   samba_cv_HAVE_FUNCTION_MACRO=no
9027 fi
9028 rm -f conftest*
9029 fi
9030
9031 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9032 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9033     cat >> confdefs.h <<\EOF
9034 #define HAVE_FUNCTION_MACRO 1
9035 EOF
9036
9037 fi
9038
9039 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9040 echo "configure:9041: checking if gettimeofday takes tz argument" >&5
9041 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9042   echo $ac_n "(cached) $ac_c" 1>&6
9043 else
9044   
9045 if test "$cross_compiling" = yes; then
9046   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9047 else
9048   cat > conftest.$ac_ext <<EOF
9049 #line 9050 "configure"
9050 #include "confdefs.h"
9051
9052 #include <sys/time.h>
9053 #include <unistd.h>
9054 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9055 EOF
9056 if { (eval echo configure:9057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9057 then
9058   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9059 else
9060   echo "configure: failed program was:" >&5
9061   cat conftest.$ac_ext >&5
9062   rm -fr conftest*
9063   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9064 fi
9065 rm -fr conftest*
9066 fi
9067
9068 fi
9069
9070 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9071 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9072     cat >> confdefs.h <<\EOF
9073 #define HAVE_GETTIMEOFDAY_TZ 1
9074 EOF
9075
9076 fi
9077
9078
9079 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9080 echo "configure:9081: checking for broken readdir" >&5
9081 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9082   echo $ac_n "(cached) $ac_c" 1>&6
9083 else
9084   
9085 if test "$cross_compiling" = yes; then
9086   samba_cv_HAVE_BROKEN_READDIR=cross
9087 else
9088   cat > conftest.$ac_ext <<EOF
9089 #line 9090 "configure"
9090 #include "confdefs.h"
9091 #include <sys/types.h>
9092 #include <dirent.h>
9093 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9094 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9095 di->d_name[0] == 0) exit(0); exit(1);} 
9096 EOF
9097 if { (eval echo configure:9098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9098 then
9099   samba_cv_HAVE_BROKEN_READDIR=yes
9100 else
9101   echo "configure: failed program was:" >&5
9102   cat conftest.$ac_ext >&5
9103   rm -fr conftest*
9104   samba_cv_HAVE_BROKEN_READDIR=no
9105 fi
9106 rm -fr conftest*
9107 fi
9108
9109 fi
9110
9111 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9112 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9113     cat >> confdefs.h <<\EOF
9114 #define HAVE_BROKEN_READDIR 1
9115 EOF
9116
9117 fi
9118
9119 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9120 echo "configure:9121: checking for utimbuf" >&5
9121 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9122   echo $ac_n "(cached) $ac_c" 1>&6
9123 else
9124   
9125 cat > conftest.$ac_ext <<EOF
9126 #line 9127 "configure"
9127 #include "confdefs.h"
9128 #include <sys/types.h>
9129 #include <utime.h>
9130 int main() {
9131 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9132 ; return 0; }
9133 EOF
9134 if { (eval echo configure:9135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9135   rm -rf conftest*
9136   samba_cv_HAVE_UTIMBUF=yes
9137 else
9138   echo "configure: failed program was:" >&5
9139   cat conftest.$ac_ext >&5
9140   rm -rf conftest*
9141   samba_cv_HAVE_UTIMBUF=no
9142 fi
9143 rm -f conftest*
9144 fi
9145
9146 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9147 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9148     cat >> confdefs.h <<\EOF
9149 #define HAVE_UTIMBUF 1
9150 EOF
9151
9152 fi
9153
9154
9155 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9156 do
9157 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9158 echo "configure:9159: checking for $ac_func" >&5
9159 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9160   echo $ac_n "(cached) $ac_c" 1>&6
9161 else
9162   cat > conftest.$ac_ext <<EOF
9163 #line 9164 "configure"
9164 #include "confdefs.h"
9165 /* System header to define __stub macros and hopefully few prototypes,
9166     which can conflict with char $ac_func(); below.  */
9167 #include <assert.h>
9168 /* Override any gcc2 internal prototype to avoid an error.  */
9169 /* We use char because int might match the return type of a gcc2
9170     builtin and then its argument prototype would still apply.  */
9171 char $ac_func();
9172
9173 int main() {
9174
9175 /* The GNU C library defines this for functions which it implements
9176     to always fail with ENOSYS.  Some functions are actually named
9177     something starting with __ and the normal name is an alias.  */
9178 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9179 choke me
9180 #else
9181 $ac_func();
9182 #endif
9183
9184 ; return 0; }
9185 EOF
9186 if { (eval echo configure:9187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9187   rm -rf conftest*
9188   eval "ac_cv_func_$ac_func=yes"
9189 else
9190   echo "configure: failed program was:" >&5
9191   cat conftest.$ac_ext >&5
9192   rm -rf conftest*
9193   eval "ac_cv_func_$ac_func=no"
9194 fi
9195 rm -f conftest*
9196 fi
9197
9198 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9199   echo "$ac_t""yes" 1>&6
9200     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9201   cat >> confdefs.h <<EOF
9202 #define $ac_tr_func 1
9203 EOF
9204  
9205 else
9206   echo "$ac_t""no" 1>&6
9207 fi
9208 done
9209
9210
9211 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9212 echo "configure:9213: checking for ut_name in utmp" >&5
9213 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9214   echo $ac_n "(cached) $ac_c" 1>&6
9215 else
9216   
9217 cat > conftest.$ac_ext <<EOF
9218 #line 9219 "configure"
9219 #include "confdefs.h"
9220 #include <sys/types.h>
9221 #include <utmp.h>
9222 int main() {
9223 struct utmp ut;  ut.ut_name[0] = 'a';
9224 ; return 0; }
9225 EOF
9226 if { (eval echo configure:9227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9227   rm -rf conftest*
9228   samba_cv_HAVE_UT_UT_NAME=yes
9229 else
9230   echo "configure: failed program was:" >&5
9231   cat conftest.$ac_ext >&5
9232   rm -rf conftest*
9233   samba_cv_HAVE_UT_UT_NAME=no
9234 fi
9235 rm -f conftest*
9236 fi
9237
9238 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9239 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9240     cat >> confdefs.h <<\EOF
9241 #define HAVE_UT_UT_NAME 1
9242 EOF
9243
9244 fi 
9245
9246 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9247 echo "configure:9248: checking for ut_user in utmp" >&5
9248 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9249   echo $ac_n "(cached) $ac_c" 1>&6
9250 else
9251   
9252 cat > conftest.$ac_ext <<EOF
9253 #line 9254 "configure"
9254 #include "confdefs.h"
9255 #include <sys/types.h>
9256 #include <utmp.h>
9257 int main() {
9258 struct utmp ut;  ut.ut_user[0] = 'a';
9259 ; return 0; }
9260 EOF
9261 if { (eval echo configure:9262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9262   rm -rf conftest*
9263   samba_cv_HAVE_UT_UT_USER=yes
9264 else
9265   echo "configure: failed program was:" >&5
9266   cat conftest.$ac_ext >&5
9267   rm -rf conftest*
9268   samba_cv_HAVE_UT_UT_USER=no
9269 fi
9270 rm -f conftest*
9271 fi
9272
9273 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9274 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9275     cat >> confdefs.h <<\EOF
9276 #define HAVE_UT_UT_USER 1
9277 EOF
9278
9279 fi 
9280
9281 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9282 echo "configure:9283: checking for ut_id in utmp" >&5
9283 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9284   echo $ac_n "(cached) $ac_c" 1>&6
9285 else
9286   
9287 cat > conftest.$ac_ext <<EOF
9288 #line 9289 "configure"
9289 #include "confdefs.h"
9290 #include <sys/types.h>
9291 #include <utmp.h>
9292 int main() {
9293 struct utmp ut;  ut.ut_id[0] = 'a';
9294 ; return 0; }
9295 EOF
9296 if { (eval echo configure:9297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9297   rm -rf conftest*
9298   samba_cv_HAVE_UT_UT_ID=yes
9299 else
9300   echo "configure: failed program was:" >&5
9301   cat conftest.$ac_ext >&5
9302   rm -rf conftest*
9303   samba_cv_HAVE_UT_UT_ID=no
9304 fi
9305 rm -f conftest*
9306 fi
9307
9308 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9309 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9310     cat >> confdefs.h <<\EOF
9311 #define HAVE_UT_UT_ID 1
9312 EOF
9313
9314 fi 
9315
9316 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9317 echo "configure:9318: checking for ut_host in utmp" >&5
9318 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9319   echo $ac_n "(cached) $ac_c" 1>&6
9320 else
9321   
9322 cat > conftest.$ac_ext <<EOF
9323 #line 9324 "configure"
9324 #include "confdefs.h"
9325 #include <sys/types.h>
9326 #include <utmp.h>
9327 int main() {
9328 struct utmp ut;  ut.ut_host[0] = 'a';
9329 ; return 0; }
9330 EOF
9331 if { (eval echo configure:9332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9332   rm -rf conftest*
9333   samba_cv_HAVE_UT_UT_HOST=yes
9334 else
9335   echo "configure: failed program was:" >&5
9336   cat conftest.$ac_ext >&5
9337   rm -rf conftest*
9338   samba_cv_HAVE_UT_UT_HOST=no
9339 fi
9340 rm -f conftest*
9341 fi
9342
9343 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9344 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9345     cat >> confdefs.h <<\EOF
9346 #define HAVE_UT_UT_HOST 1
9347 EOF
9348
9349 fi 
9350
9351 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9352 echo "configure:9353: checking for ut_time in utmp" >&5
9353 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9354   echo $ac_n "(cached) $ac_c" 1>&6
9355 else
9356   
9357 cat > conftest.$ac_ext <<EOF
9358 #line 9359 "configure"
9359 #include "confdefs.h"
9360 #include <sys/types.h>
9361 #include <utmp.h>
9362 int main() {
9363 struct utmp ut;  time_t t; ut.ut_time = t;
9364 ; return 0; }
9365 EOF
9366 if { (eval echo configure:9367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9367   rm -rf conftest*
9368   samba_cv_HAVE_UT_UT_TIME=yes
9369 else
9370   echo "configure: failed program was:" >&5
9371   cat conftest.$ac_ext >&5
9372   rm -rf conftest*
9373   samba_cv_HAVE_UT_UT_TIME=no
9374 fi
9375 rm -f conftest*
9376 fi
9377
9378 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9379 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9380     cat >> confdefs.h <<\EOF
9381 #define HAVE_UT_UT_TIME 1
9382 EOF
9383
9384 fi 
9385
9386 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9387 echo "configure:9388: checking for ut_tv in utmp" >&5
9388 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9389   echo $ac_n "(cached) $ac_c" 1>&6
9390 else
9391   
9392 cat > conftest.$ac_ext <<EOF
9393 #line 9394 "configure"
9394 #include "confdefs.h"
9395 #include <sys/types.h>
9396 #include <utmp.h>
9397 int main() {
9398 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9399 ; return 0; }
9400 EOF
9401 if { (eval echo configure:9402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9402   rm -rf conftest*
9403   samba_cv_HAVE_UT_UT_TV=yes
9404 else
9405   echo "configure: failed program was:" >&5
9406   cat conftest.$ac_ext >&5
9407   rm -rf conftest*
9408   samba_cv_HAVE_UT_UT_TV=no
9409 fi
9410 rm -f conftest*
9411 fi
9412
9413 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9414 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9415     cat >> confdefs.h <<\EOF
9416 #define HAVE_UT_UT_TV 1
9417 EOF
9418
9419 fi 
9420
9421 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9422 echo "configure:9423: checking for ut_type in utmp" >&5
9423 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9424   echo $ac_n "(cached) $ac_c" 1>&6
9425 else
9426   
9427 cat > conftest.$ac_ext <<EOF
9428 #line 9429 "configure"
9429 #include "confdefs.h"
9430 #include <sys/types.h>
9431 #include <utmp.h>
9432 int main() {
9433 struct utmp ut;  ut.ut_type = 0;
9434 ; return 0; }
9435 EOF
9436 if { (eval echo configure:9437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9437   rm -rf conftest*
9438   samba_cv_HAVE_UT_UT_TYPE=yes
9439 else
9440   echo "configure: failed program was:" >&5
9441   cat conftest.$ac_ext >&5
9442   rm -rf conftest*
9443   samba_cv_HAVE_UT_UT_TYPE=no
9444 fi
9445 rm -f conftest*
9446 fi
9447
9448 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9449 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9450     cat >> confdefs.h <<\EOF
9451 #define HAVE_UT_UT_TYPE 1
9452 EOF
9453
9454 fi 
9455
9456 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9457 echo "configure:9458: checking for ut_pid in utmp" >&5
9458 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9459   echo $ac_n "(cached) $ac_c" 1>&6
9460 else
9461   
9462 cat > conftest.$ac_ext <<EOF
9463 #line 9464 "configure"
9464 #include "confdefs.h"
9465 #include <sys/types.h>
9466 #include <utmp.h>
9467 int main() {
9468 struct utmp ut;  ut.ut_pid = 0;
9469 ; return 0; }
9470 EOF
9471 if { (eval echo configure:9472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9472   rm -rf conftest*
9473   samba_cv_HAVE_UT_UT_PID=yes
9474 else
9475   echo "configure: failed program was:" >&5
9476   cat conftest.$ac_ext >&5
9477   rm -rf conftest*
9478   samba_cv_HAVE_UT_UT_PID=no
9479 fi
9480 rm -f conftest*
9481 fi
9482
9483 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9484 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9485     cat >> confdefs.h <<\EOF
9486 #define HAVE_UT_UT_PID 1
9487 EOF
9488
9489 fi 
9490
9491 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9492 echo "configure:9493: checking for ut_exit in utmp" >&5
9493 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9494   echo $ac_n "(cached) $ac_c" 1>&6
9495 else
9496   
9497 cat > conftest.$ac_ext <<EOF
9498 #line 9499 "configure"
9499 #include "confdefs.h"
9500 #include <sys/types.h>
9501 #include <utmp.h>
9502 int main() {
9503 struct utmp ut;  ut.ut_exit.e_exit = 0;
9504 ; return 0; }
9505 EOF
9506 if { (eval echo configure:9507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9507   rm -rf conftest*
9508   samba_cv_HAVE_UT_UT_EXIT=yes
9509 else
9510   echo "configure: failed program was:" >&5
9511   cat conftest.$ac_ext >&5
9512   rm -rf conftest*
9513   samba_cv_HAVE_UT_UT_EXIT=no
9514 fi
9515 rm -f conftest*
9516 fi
9517
9518 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9519 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9520     cat >> confdefs.h <<\EOF
9521 #define HAVE_UT_UT_EXIT 1
9522 EOF
9523
9524 fi 
9525
9526 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9527 echo "configure:9528: checking for ut_addr in utmp" >&5
9528 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9529   echo $ac_n "(cached) $ac_c" 1>&6
9530 else
9531   
9532 cat > conftest.$ac_ext <<EOF
9533 #line 9534 "configure"
9534 #include "confdefs.h"
9535 #include <sys/types.h>
9536 #include <utmp.h>
9537 int main() {
9538 struct utmp ut;  ut.ut_addr = 0;
9539 ; return 0; }
9540 EOF
9541 if { (eval echo configure:9542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9542   rm -rf conftest*
9543   samba_cv_HAVE_UT_UT_ADDR=yes
9544 else
9545   echo "configure: failed program was:" >&5
9546   cat conftest.$ac_ext >&5
9547   rm -rf conftest*
9548   samba_cv_HAVE_UT_UT_ADDR=no
9549 fi
9550 rm -f conftest*
9551 fi
9552
9553 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9554 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9555     cat >> confdefs.h <<\EOF
9556 #define HAVE_UT_UT_ADDR 1
9557 EOF
9558
9559 fi 
9560
9561 if test x$ac_cv_func_pututline = xyes ; then
9562   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9563 echo "configure:9564: checking whether pututline returns pointer" >&5
9564 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9565   echo $ac_n "(cached) $ac_c" 1>&6
9566 else
9567   
9568   cat > conftest.$ac_ext <<EOF
9569 #line 9570 "configure"
9570 #include "confdefs.h"
9571 #include <sys/types.h>
9572 #include <utmp.h>
9573 int main() {
9574 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9575 ; return 0; }
9576 EOF
9577 if { (eval echo configure:9578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9578   rm -rf conftest*
9579   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9580 else
9581   echo "configure: failed program was:" >&5
9582   cat conftest.$ac_ext >&5
9583   rm -rf conftest*
9584   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9585 fi
9586 rm -f conftest*
9587 fi
9588
9589 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9590   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9591       cat >> confdefs.h <<\EOF
9592 #define PUTUTLINE_RETURNS_UTMP 1
9593 EOF
9594
9595   fi
9596 fi
9597
9598 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9599 echo "configure:9600: checking for ut_syslen in utmpx" >&5
9600 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9601   echo $ac_n "(cached) $ac_c" 1>&6
9602 else
9603   
9604 cat > conftest.$ac_ext <<EOF
9605 #line 9606 "configure"
9606 #include "confdefs.h"
9607 #include <sys/types.h>
9608 #include <utmpx.h>
9609 int main() {
9610 struct utmpx ux;  ux.ut_syslen = 0;
9611 ; return 0; }
9612 EOF
9613 if { (eval echo configure:9614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9614   rm -rf conftest*
9615   samba_cv_HAVE_UX_UT_SYSLEN=yes
9616 else
9617   echo "configure: failed program was:" >&5
9618   cat conftest.$ac_ext >&5
9619   rm -rf conftest*
9620   samba_cv_HAVE_UX_UT_SYSLEN=no
9621 fi
9622 rm -f conftest*
9623 fi
9624
9625 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9626 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9627     cat >> confdefs.h <<\EOF
9628 #define HAVE_UX_UT_SYSLEN 1
9629 EOF
9630
9631 fi 
9632
9633 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9634 echo "configure:9635: checking for Linux kernel oplocks" >&5
9635 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9636   echo $ac_n "(cached) $ac_c" 1>&6
9637 else
9638   
9639 if test "$cross_compiling" = yes; then
9640   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9641 else
9642   cat > conftest.$ac_ext <<EOF
9643 #line 9644 "configure"
9644 #include "confdefs.h"
9645
9646 #include <sys/types.h>
9647 #include <fcntl.h>
9648 #ifndef F_GETLEASE
9649 #define F_GETLEASE      1025
9650 #endif
9651 main() {
9652        int fd = open("/dev/null", O_RDONLY);
9653        return fcntl(fd, F_GETLEASE, 0) == -1;
9654 }
9655
9656 EOF
9657 if { (eval echo configure:9658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9658 then
9659   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9660 else
9661   echo "configure: failed program was:" >&5
9662   cat conftest.$ac_ext >&5
9663   rm -fr conftest*
9664   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9665 fi
9666 rm -fr conftest*
9667 fi
9668
9669 fi
9670
9671 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9672 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9673     cat >> confdefs.h <<\EOF
9674 #define HAVE_KERNEL_OPLOCKS_LINUX 1
9675 EOF
9676
9677 fi
9678
9679 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
9680 echo "configure:9681: checking for kernel change notify support" >&5
9681 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
9682   echo $ac_n "(cached) $ac_c" 1>&6
9683 else
9684   
9685 if test "$cross_compiling" = yes; then
9686   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
9687 else
9688   cat > conftest.$ac_ext <<EOF
9689 #line 9690 "configure"
9690 #include "confdefs.h"
9691
9692 #include <sys/types.h>
9693 #include <fcntl.h>
9694 #include <signal.h>
9695 #ifndef F_NOTIFY
9696 #define F_NOTIFY 1026
9697 #endif
9698 main() {
9699         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
9700 }
9701
9702 EOF
9703 if { (eval echo configure:9704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9704 then
9705   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
9706 else
9707   echo "configure: failed program was:" >&5
9708   cat conftest.$ac_ext >&5
9709   rm -fr conftest*
9710   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
9711 fi
9712 rm -fr conftest*
9713 fi
9714
9715 fi
9716
9717 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
9718 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
9719     cat >> confdefs.h <<\EOF
9720 #define HAVE_KERNEL_CHANGE_NOTIFY 1
9721 EOF
9722
9723 fi
9724
9725 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
9726 echo "configure:9727: checking for kernel share modes" >&5
9727 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
9728   echo $ac_n "(cached) $ac_c" 1>&6
9729 else
9730   
9731 if test "$cross_compiling" = yes; then
9732   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
9733 else
9734   cat > conftest.$ac_ext <<EOF
9735 #line 9736 "configure"
9736 #include "confdefs.h"
9737
9738 #include <sys/types.h>
9739 #include <fcntl.h>
9740 #include <signal.h>
9741 #include <sys/file.h>
9742 #ifndef LOCK_MAND
9743 #define LOCK_MAND       32
9744 #define LOCK_READ       64
9745 #endif
9746 main() {
9747         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
9748 }
9749
9750 EOF
9751 if { (eval echo configure:9752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9752 then
9753   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
9754 else
9755   echo "configure: failed program was:" >&5
9756   cat conftest.$ac_ext >&5
9757   rm -fr conftest*
9758   samba_cv_HAVE_KERNEL_SHARE_MODES=no
9759 fi
9760 rm -fr conftest*
9761 fi
9762
9763 fi
9764
9765 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
9766 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
9767     cat >> confdefs.h <<\EOF
9768 #define HAVE_KERNEL_SHARE_MODES 1
9769 EOF
9770
9771 fi
9772
9773
9774
9775
9776 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
9777 echo "configure:9778: checking for IRIX kernel oplock type definitions" >&5
9778 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
9779   echo $ac_n "(cached) $ac_c" 1>&6
9780 else
9781   
9782 cat > conftest.$ac_ext <<EOF
9783 #line 9784 "configure"
9784 #include "confdefs.h"
9785 #include <sys/types.h>
9786 #include <fcntl.h>
9787 int main() {
9788 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
9789 ; return 0; }
9790 EOF
9791 if { (eval echo configure:9792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9792   rm -rf conftest*
9793   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
9794 else
9795   echo "configure: failed program was:" >&5
9796   cat conftest.$ac_ext >&5
9797   rm -rf conftest*
9798   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
9799 fi
9800 rm -f conftest*
9801 fi
9802
9803 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
9804 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
9805     cat >> confdefs.h <<\EOF
9806 #define HAVE_KERNEL_OPLOCKS_IRIX 1
9807 EOF
9808
9809 fi
9810
9811 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
9812 echo "configure:9813: checking for irix specific capabilities" >&5
9813 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
9814   echo $ac_n "(cached) $ac_c" 1>&6
9815 else
9816   
9817 if test "$cross_compiling" = yes; then
9818   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
9819 else
9820   cat > conftest.$ac_ext <<EOF
9821 #line 9822 "configure"
9822 #include "confdefs.h"
9823 #include <sys/types.h>
9824 #include <sys/capability.h>
9825 main() {
9826  cap_t cap;
9827  if ((cap = cap_get_proc()) == NULL)
9828    exit(1);
9829  cap->cap_effective |= CAP_NETWORK_MGT;
9830  cap->cap_inheritable |= CAP_NETWORK_MGT;
9831  cap_set_proc(cap);
9832  exit(0);
9833 }
9834
9835 EOF
9836 if { (eval echo configure:9837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9837 then
9838   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
9839 else
9840   echo "configure: failed program was:" >&5
9841   cat conftest.$ac_ext >&5
9842   rm -fr conftest*
9843   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
9844 fi
9845 rm -fr conftest*
9846 fi
9847
9848 fi
9849
9850 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
9851 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
9852     cat >> confdefs.h <<\EOF
9853 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
9854 EOF
9855
9856 fi
9857
9858 #
9859 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
9860 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
9861 #
9862
9863 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9864 echo "configure:9865: checking for int16 typedef included by rpc/rpc.h" >&5
9865 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
9866   echo $ac_n "(cached) $ac_c" 1>&6
9867 else
9868   
9869 cat > conftest.$ac_ext <<EOF
9870 #line 9871 "configure"
9871 #include "confdefs.h"
9872 #include <sys/types.h>
9873 #if defined(HAVE_RPC_RPC_H)
9874 #include <rpc/rpc.h>
9875 #endif
9876 int main() {
9877 int16 testvar;
9878 ; return 0; }
9879 EOF
9880 if { (eval echo configure:9881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9881   rm -rf conftest*
9882   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
9883 else
9884   echo "configure: failed program was:" >&5
9885   cat conftest.$ac_ext >&5
9886   rm -rf conftest*
9887   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
9888 fi
9889 rm -f conftest*
9890 fi
9891
9892 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
9893 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
9894     cat >> confdefs.h <<\EOF
9895 #define HAVE_INT16_FROM_RPC_RPC_H 1
9896 EOF
9897
9898 fi
9899
9900 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9901 echo "configure:9902: checking for uint16 typedef included by rpc/rpc.h" >&5
9902 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
9903   echo $ac_n "(cached) $ac_c" 1>&6
9904 else
9905   
9906 cat > conftest.$ac_ext <<EOF
9907 #line 9908 "configure"
9908 #include "confdefs.h"
9909 #include <sys/types.h>
9910 #if defined(HAVE_RPC_RPC_H)
9911 #include <rpc/rpc.h>
9912 #endif
9913 int main() {
9914 uint16 testvar;
9915 ; return 0; }
9916 EOF
9917 if { (eval echo configure:9918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9918   rm -rf conftest*
9919   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
9920 else
9921   echo "configure: failed program was:" >&5
9922   cat conftest.$ac_ext >&5
9923   rm -rf conftest*
9924   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
9925 fi
9926 rm -f conftest*
9927 fi
9928
9929 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
9930 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
9931     cat >> confdefs.h <<\EOF
9932 #define HAVE_UINT16_FROM_RPC_RPC_H 1
9933 EOF
9934
9935 fi
9936
9937 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9938 echo "configure:9939: checking for int32 typedef included by rpc/rpc.h" >&5
9939 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
9940   echo $ac_n "(cached) $ac_c" 1>&6
9941 else
9942   
9943 cat > conftest.$ac_ext <<EOF
9944 #line 9945 "configure"
9945 #include "confdefs.h"
9946 #include <sys/types.h>
9947 #if defined(HAVE_RPC_RPC_H)
9948 #include <rpc/rpc.h>
9949 #endif
9950 int main() {
9951 int32 testvar;
9952 ; return 0; }
9953 EOF
9954 if { (eval echo configure:9955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9955   rm -rf conftest*
9956   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
9957 else
9958   echo "configure: failed program was:" >&5
9959   cat conftest.$ac_ext >&5
9960   rm -rf conftest*
9961   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
9962 fi
9963 rm -f conftest*
9964 fi
9965
9966 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
9967 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
9968     cat >> confdefs.h <<\EOF
9969 #define HAVE_INT32_FROM_RPC_RPC_H 1
9970 EOF
9971
9972 fi
9973
9974 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
9975 echo "configure:9976: checking for uint32 typedef included by rpc/rpc.h" >&5
9976 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
9977   echo $ac_n "(cached) $ac_c" 1>&6
9978 else
9979   
9980 cat > conftest.$ac_ext <<EOF
9981 #line 9982 "configure"
9982 #include "confdefs.h"
9983 #include <sys/types.h>
9984 #if defined(HAVE_RPC_RPC_H)
9985 #include <rpc/rpc.h>
9986 #endif
9987 int main() {
9988 uint32 testvar;
9989 ; return 0; }
9990 EOF
9991 if { (eval echo configure:9992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9992   rm -rf conftest*
9993   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
9994 else
9995   echo "configure: failed program was:" >&5
9996   cat conftest.$ac_ext >&5
9997   rm -rf conftest*
9998   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
9999 fi
10000 rm -f conftest*
10001 fi
10002
10003 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10004 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10005     cat >> confdefs.h <<\EOF
10006 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10007 EOF
10008
10009 fi
10010
10011
10012 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10013 echo "configure:10014: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10014 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10015   echo $ac_n "(cached) $ac_c" 1>&6
10016 else
10017   
10018 cat > conftest.$ac_ext <<EOF
10019 #line 10020 "configure"
10020 #include "confdefs.h"
10021 #include <sys/types.h>
10022 #ifdef HAVE_SYS_SECURITY_H
10023 #include <sys/security.h>
10024 #include <prot.h>
10025 #endif  /* HAVE_SYS_SECURITY_H */
10026 #if defined(HAVE_RPC_RPC_H)
10027 #include <rpc/rpc.h>
10028 #endif
10029 int main() {
10030 int testvar;
10031 ; return 0; }
10032 EOF
10033 if { (eval echo configure:10034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10034   rm -rf conftest*
10035   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10036 else
10037   echo "configure: failed program was:" >&5
10038   cat conftest.$ac_ext >&5
10039   rm -rf conftest*
10040   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10041 fi
10042 rm -f conftest*
10043 fi
10044
10045 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10046 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10047     cat >> confdefs.h <<\EOF
10048 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10049 EOF
10050
10051 fi
10052
10053 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10054 echo "configure:10055: checking for test routines" >&5
10055 if test "$cross_compiling" = yes; then
10056   echo "configure: warning: cannot run when cross-compiling" 1>&2
10057 else
10058   cat > conftest.$ac_ext <<EOF
10059 #line 10060 "configure"
10060 #include "confdefs.h"
10061 #include "${srcdir-.}/tests/trivial.c"
10062 EOF
10063 if { (eval echo configure:10064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10064 then
10065   echo "$ac_t""yes" 1>&6
10066 else
10067   echo "configure: failed program was:" >&5
10068   cat conftest.$ac_ext >&5
10069   rm -fr conftest*
10070   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10071 fi
10072 rm -fr conftest*
10073 fi
10074
10075
10076 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10077 echo "configure:10078: checking for ftruncate extend" >&5
10078 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10079   echo $ac_n "(cached) $ac_c" 1>&6
10080 else
10081   
10082 if test "$cross_compiling" = yes; then
10083   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10084 else
10085   cat > conftest.$ac_ext <<EOF
10086 #line 10087 "configure"
10087 #include "confdefs.h"
10088 #include "${srcdir-.}/tests/ftruncate.c"
10089 EOF
10090 if { (eval echo configure:10091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10091 then
10092   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10093 else
10094   echo "configure: failed program was:" >&5
10095   cat conftest.$ac_ext >&5
10096   rm -fr conftest*
10097   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10098 fi
10099 rm -fr conftest*
10100 fi
10101
10102 fi
10103
10104 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10105 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10106     cat >> confdefs.h <<\EOF
10107 #define HAVE_FTRUNCATE_EXTEND 1
10108 EOF
10109
10110 fi
10111
10112 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10113 echo "configure:10114: checking for broken getgroups" >&5
10114 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10115   echo $ac_n "(cached) $ac_c" 1>&6
10116 else
10117   
10118 if test "$cross_compiling" = yes; then
10119   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10120 else
10121   cat > conftest.$ac_ext <<EOF
10122 #line 10123 "configure"
10123 #include "confdefs.h"
10124 #include "${srcdir-.}/tests/getgroups.c"
10125 EOF
10126 if { (eval echo configure:10127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10127 then
10128   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10129 else
10130   echo "configure: failed program was:" >&5
10131   cat conftest.$ac_ext >&5
10132   rm -fr conftest*
10133   samba_cv_HAVE_BROKEN_GETGROUPS=no
10134 fi
10135 rm -fr conftest*
10136 fi
10137
10138 fi
10139
10140 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10141 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10142     cat >> confdefs.h <<\EOF
10143 #define HAVE_BROKEN_GETGROUPS 1
10144 EOF
10145
10146 fi
10147
10148 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10149 echo "configure:10150: checking whether getpass should be replaced" >&5
10150 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10151   echo $ac_n "(cached) $ac_c" 1>&6
10152 else
10153   
10154 SAVE_CPPFLAGS="$CPPFLAGS"
10155 CPPFLAGS="$CPPFLAGS -I${srcdor-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10156 cat > conftest.$ac_ext <<EOF
10157 #line 10158 "configure"
10158 #include "confdefs.h"
10159
10160 #define REPLACE_GETPASS 1
10161 #define NO_CONFIG_H 1
10162 #define main dont_declare_main
10163 #include "${srcdir-.}/lib/getsmbpass.c"
10164 #undef main
10165
10166 int main() {
10167
10168 ; return 0; }
10169 EOF
10170 if { (eval echo configure:10171: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10171   rm -rf conftest*
10172   samba_cv_REPLACE_GETPASS=yes
10173 else
10174   echo "configure: failed program was:" >&5
10175   cat conftest.$ac_ext >&5
10176   rm -rf conftest*
10177   samba_cv_REPLACE_GETPASS=no
10178 fi
10179 rm -f conftest*
10180 CPPFLAGS="$SAVE_CPPFLAGS"
10181
10182 fi
10183
10184 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10185 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10186         cat >> confdefs.h <<\EOF
10187 #define REPLACE_GETPASS 1
10188 EOF
10189
10190 fi
10191
10192 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10193 echo "configure:10194: checking for broken inet_ntoa" >&5
10194 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10195   echo $ac_n "(cached) $ac_c" 1>&6
10196 else
10197   
10198 if test "$cross_compiling" = yes; then
10199   samba_cv_REPLACE_INET_NTOA=cross
10200 else
10201   cat > conftest.$ac_ext <<EOF
10202 #line 10203 "configure"
10203 #include "confdefs.h"
10204
10205 #include <stdio.h>
10206 #include <sys/types.h>
10207 #include <netinet/in.h>
10208 #ifdef HAVE_ARPA_INET_H
10209 #include <arpa/inet.h>
10210 #endif
10211 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10212 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10213     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10214 exit(1);}
10215 EOF
10216 if { (eval echo configure:10217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10217 then
10218   samba_cv_REPLACE_INET_NTOA=yes
10219 else
10220   echo "configure: failed program was:" >&5
10221   cat conftest.$ac_ext >&5
10222   rm -fr conftest*
10223   samba_cv_REPLACE_INET_NTOA=no
10224 fi
10225 rm -fr conftest*
10226 fi
10227
10228 fi
10229
10230 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10231 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10232     cat >> confdefs.h <<\EOF
10233 #define REPLACE_INET_NTOA 1
10234 EOF
10235
10236 fi
10237
10238 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10239 echo "configure:10240: checking for secure mkstemp" >&5
10240 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10241   echo $ac_n "(cached) $ac_c" 1>&6
10242 else
10243   
10244 if test "$cross_compiling" = yes; then
10245   samba_cv_HAVE_SECURE_MKSTEMP=cross
10246 else
10247   cat > conftest.$ac_ext <<EOF
10248 #line 10249 "configure"
10249 #include "confdefs.h"
10250 #include <stdlib.h>
10251 #include <sys/types.h>
10252 #include <sys/stat.h>
10253 #include <unistd.h>
10254 main() { 
10255   struct stat st;
10256   char tpl[20]="/tmp/test.XXXXXX"; 
10257   int fd = mkstemp(tpl); 
10258   if (fd == -1) exit(1);
10259   unlink(tpl);
10260   if (fstat(fd, &st) != 0) exit(1);
10261   if ((st.st_mode & 0777) != 0600) exit(1);
10262   exit(0);
10263 }
10264 EOF
10265 if { (eval echo configure:10266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10266 then
10267   samba_cv_HAVE_SECURE_MKSTEMP=yes
10268 else
10269   echo "configure: failed program was:" >&5
10270   cat conftest.$ac_ext >&5
10271   rm -fr conftest*
10272   samba_cv_HAVE_SECURE_MKSTEMP=no
10273 fi
10274 rm -fr conftest*
10275 fi
10276
10277 fi
10278
10279 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10280 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10281     cat >> confdefs.h <<\EOF
10282 #define HAVE_SECURE_MKSTEMP 1
10283 EOF
10284
10285 fi
10286
10287 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10288 echo "configure:10289: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10289 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10290   echo $ac_n "(cached) $ac_c" 1>&6
10291 else
10292   
10293 if test "$cross_compiling" = yes; then
10294   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10295 else
10296   cat > conftest.$ac_ext <<EOF
10297 #line 10298 "configure"
10298 #include "confdefs.h"
10299 #include <unistd.h>
10300 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10301 EOF
10302 if { (eval echo configure:10303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10303 then
10304   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10305 else
10306   echo "configure: failed program was:" >&5
10307   cat conftest.$ac_ext >&5
10308   rm -fr conftest*
10309   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10310 fi
10311 rm -fr conftest*
10312 fi
10313
10314 fi
10315
10316 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10317 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10318     cat >> confdefs.h <<\EOF
10319 #define SYSCONF_SC_NGROUPS_MAX 1
10320 EOF
10321
10322 fi
10323
10324 echo $ac_n "checking for root""... $ac_c" 1>&6
10325 echo "configure:10326: checking for root" >&5
10326 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10327   echo $ac_n "(cached) $ac_c" 1>&6
10328 else
10329   
10330 if test "$cross_compiling" = yes; then
10331   samba_cv_HAVE_ROOT=cross
10332 else
10333   cat > conftest.$ac_ext <<EOF
10334 #line 10335 "configure"
10335 #include "confdefs.h"
10336 main() { exit(getuid() != 0); }
10337 EOF
10338 if { (eval echo configure:10339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10339 then
10340   samba_cv_HAVE_ROOT=yes
10341 else
10342   echo "configure: failed program was:" >&5
10343   cat conftest.$ac_ext >&5
10344   rm -fr conftest*
10345   samba_cv_HAVE_ROOT=no
10346 fi
10347 rm -fr conftest*
10348 fi
10349
10350 fi
10351
10352 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10353 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10354     cat >> confdefs.h <<\EOF
10355 #define HAVE_ROOT 1
10356 EOF
10357
10358 else
10359     echo "configure: warning: running as non-root will disable some tests" 1>&2
10360 fi
10361
10362 ##################
10363 # look for a method of finding the list of network interfaces
10364 iface=no;
10365 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10366 echo "configure:10367: checking for iface AIX" >&5
10367 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10368   echo $ac_n "(cached) $ac_c" 1>&6
10369 else
10370   
10371 if test "$cross_compiling" = yes; then
10372   samba_cv_HAVE_IFACE_AIX=cross
10373 else
10374   cat > conftest.$ac_ext <<EOF
10375 #line 10376 "configure"
10376 #include "confdefs.h"
10377
10378 #define HAVE_IFACE_AIX 1
10379 #define AUTOCONF_TEST 1
10380 #include "confdefs.h"
10381 #include "${srcdir-.}/lib/interfaces.c"
10382 EOF
10383 if { (eval echo configure:10384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10384 then
10385   samba_cv_HAVE_IFACE_AIX=yes
10386 else
10387   echo "configure: failed program was:" >&5
10388   cat conftest.$ac_ext >&5
10389   rm -fr conftest*
10390   samba_cv_HAVE_IFACE_AIX=no
10391 fi
10392 rm -fr conftest*
10393 fi
10394
10395 fi
10396
10397 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10398 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10399     iface=yes;cat >> confdefs.h <<\EOF
10400 #define HAVE_IFACE_AIX 1
10401 EOF
10402
10403 fi
10404
10405 if test $iface = no; then
10406 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10407 echo "configure:10408: checking for iface ifconf" >&5
10408 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10409   echo $ac_n "(cached) $ac_c" 1>&6
10410 else
10411   
10412 if test "$cross_compiling" = yes; then
10413   samba_cv_HAVE_IFACE_IFCONF=cross
10414 else
10415   cat > conftest.$ac_ext <<EOF
10416 #line 10417 "configure"
10417 #include "confdefs.h"
10418
10419 #define HAVE_IFACE_IFCONF 1
10420 #define AUTOCONF_TEST 1
10421 #include "confdefs.h"
10422 #include "${srcdir-.}/lib/interfaces.c"
10423 EOF
10424 if { (eval echo configure:10425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10425 then
10426   samba_cv_HAVE_IFACE_IFCONF=yes
10427 else
10428   echo "configure: failed program was:" >&5
10429   cat conftest.$ac_ext >&5
10430   rm -fr conftest*
10431   samba_cv_HAVE_IFACE_IFCONF=no
10432 fi
10433 rm -fr conftest*
10434 fi
10435
10436 fi
10437
10438 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10439 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10440     iface=yes;cat >> confdefs.h <<\EOF
10441 #define HAVE_IFACE_IFCONF 1
10442 EOF
10443
10444 fi
10445 fi
10446
10447 if test $iface = no; then
10448 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10449 echo "configure:10450: checking for iface ifreq" >&5
10450 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10451   echo $ac_n "(cached) $ac_c" 1>&6
10452 else
10453   
10454 if test "$cross_compiling" = yes; then
10455   samba_cv_HAVE_IFACE_IFREQ=cross
10456 else
10457   cat > conftest.$ac_ext <<EOF
10458 #line 10459 "configure"
10459 #include "confdefs.h"
10460
10461 #define HAVE_IFACE_IFREQ 1
10462 #define AUTOCONF_TEST 1
10463 #include "confdefs.h"
10464 #include "${srcdir-.}/lib/interfaces.c"
10465 EOF
10466 if { (eval echo configure:10467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10467 then
10468   samba_cv_HAVE_IFACE_IFREQ=yes
10469 else
10470   echo "configure: failed program was:" >&5
10471   cat conftest.$ac_ext >&5
10472   rm -fr conftest*
10473   samba_cv_HAVE_IFACE_IFREQ=no
10474 fi
10475 rm -fr conftest*
10476 fi
10477
10478 fi
10479
10480 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10481 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10482     iface=yes;cat >> confdefs.h <<\EOF
10483 #define HAVE_IFACE_IFREQ 1
10484 EOF
10485
10486 fi
10487 fi
10488
10489
10490 ################################################
10491 # look for a method of setting the effective uid
10492 seteuid=no;
10493 if test $seteuid = no; then
10494 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10495 echo "configure:10496: checking for setresuid" >&5
10496 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10497   echo $ac_n "(cached) $ac_c" 1>&6
10498 else
10499   
10500 if test "$cross_compiling" = yes; then
10501   samba_cv_USE_SETRESUID=cross
10502 else
10503   cat > conftest.$ac_ext <<EOF
10504 #line 10505 "configure"
10505 #include "confdefs.h"
10506
10507 #define AUTOCONF_TEST 1
10508 #define USE_SETRESUID 1
10509 #include "confdefs.h"
10510 #include "${srcdir-.}/lib/util_sec.c"
10511 EOF
10512 if { (eval echo configure:10513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10513 then
10514   samba_cv_USE_SETRESUID=yes
10515 else
10516   echo "configure: failed program was:" >&5
10517   cat conftest.$ac_ext >&5
10518   rm -fr conftest*
10519   samba_cv_USE_SETRESUID=no
10520 fi
10521 rm -fr conftest*
10522 fi
10523
10524 fi
10525
10526 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10527 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10528     seteuid=yes;cat >> confdefs.h <<\EOF
10529 #define USE_SETRESUID 1
10530 EOF
10531
10532 fi
10533 fi
10534
10535
10536 if test $seteuid = no; then
10537 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10538 echo "configure:10539: checking for setreuid" >&5
10539 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10540   echo $ac_n "(cached) $ac_c" 1>&6
10541 else
10542   
10543 if test "$cross_compiling" = yes; then
10544   samba_cv_USE_SETREUID=cross
10545 else
10546   cat > conftest.$ac_ext <<EOF
10547 #line 10548 "configure"
10548 #include "confdefs.h"
10549
10550 #define AUTOCONF_TEST 1
10551 #define USE_SETREUID 1
10552 #include "confdefs.h"
10553 #include "${srcdir-.}/lib/util_sec.c"
10554 EOF
10555 if { (eval echo configure:10556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10556 then
10557   samba_cv_USE_SETREUID=yes
10558 else
10559   echo "configure: failed program was:" >&5
10560   cat conftest.$ac_ext >&5
10561   rm -fr conftest*
10562   samba_cv_USE_SETREUID=no
10563 fi
10564 rm -fr conftest*
10565 fi
10566
10567 fi
10568
10569 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10570 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10571     seteuid=yes;cat >> confdefs.h <<\EOF
10572 #define USE_SETREUID 1
10573 EOF
10574
10575 fi
10576 fi
10577
10578 if test $seteuid = no; then
10579 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10580 echo "configure:10581: checking for seteuid" >&5
10581 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10582   echo $ac_n "(cached) $ac_c" 1>&6
10583 else
10584   
10585 if test "$cross_compiling" = yes; then
10586   samba_cv_USE_SETEUID=cross
10587 else
10588   cat > conftest.$ac_ext <<EOF
10589 #line 10590 "configure"
10590 #include "confdefs.h"
10591
10592 #define AUTOCONF_TEST 1
10593 #define USE_SETEUID 1
10594 #include "confdefs.h"
10595 #include "${srcdir-.}/lib/util_sec.c"
10596 EOF
10597 if { (eval echo configure:10598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10598 then
10599   samba_cv_USE_SETEUID=yes
10600 else
10601   echo "configure: failed program was:" >&5
10602   cat conftest.$ac_ext >&5
10603   rm -fr conftest*
10604   samba_cv_USE_SETEUID=no
10605 fi
10606 rm -fr conftest*
10607 fi
10608
10609 fi
10610
10611 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10612 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10613     seteuid=yes;cat >> confdefs.h <<\EOF
10614 #define USE_SETEUID 1
10615 EOF
10616
10617 fi
10618 fi
10619
10620 if test $seteuid = no; then
10621 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10622 echo "configure:10623: checking for setuidx" >&5
10623 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10624   echo $ac_n "(cached) $ac_c" 1>&6
10625 else
10626   
10627 if test "$cross_compiling" = yes; then
10628   samba_cv_USE_SETUIDX=cross
10629 else
10630   cat > conftest.$ac_ext <<EOF
10631 #line 10632 "configure"
10632 #include "confdefs.h"
10633
10634 #define AUTOCONF_TEST 1
10635 #define USE_SETUIDX 1
10636 #include "confdefs.h"
10637 #include "${srcdir-.}/lib/util_sec.c"
10638 EOF
10639 if { (eval echo configure:10640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10640 then
10641   samba_cv_USE_SETUIDX=yes
10642 else
10643   echo "configure: failed program was:" >&5
10644   cat conftest.$ac_ext >&5
10645   rm -fr conftest*
10646   samba_cv_USE_SETUIDX=no
10647 fi
10648 rm -fr conftest*
10649 fi
10650
10651 fi
10652
10653 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
10654 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
10655     seteuid=yes;cat >> confdefs.h <<\EOF
10656 #define USE_SETUIDX 1
10657 EOF
10658
10659 fi
10660 fi
10661
10662
10663 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10664 echo "configure:10665: checking for working mmap" >&5
10665 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
10666   echo $ac_n "(cached) $ac_c" 1>&6
10667 else
10668   
10669 if test "$cross_compiling" = yes; then
10670   samba_cv_HAVE_MMAP=cross
10671 else
10672   cat > conftest.$ac_ext <<EOF
10673 #line 10674 "configure"
10674 #include "confdefs.h"
10675 #include "${srcdir-.}/tests/shared_mmap.c"
10676 EOF
10677 if { (eval echo configure:10678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10678 then
10679   samba_cv_HAVE_MMAP=yes
10680 else
10681   echo "configure: failed program was:" >&5
10682   cat conftest.$ac_ext >&5
10683   rm -fr conftest*
10684   samba_cv_HAVE_MMAP=no
10685 fi
10686 rm -fr conftest*
10687 fi
10688
10689 fi
10690
10691 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
10692 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
10693     cat >> confdefs.h <<\EOF
10694 #define HAVE_MMAP 1
10695 EOF
10696
10697 fi
10698
10699 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
10700 echo "configure:10701: checking for ftruncate needs root" >&5
10701 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
10702   echo $ac_n "(cached) $ac_c" 1>&6
10703 else
10704   
10705 if test "$cross_compiling" = yes; then
10706   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
10707 else
10708   cat > conftest.$ac_ext <<EOF
10709 #line 10710 "configure"
10710 #include "confdefs.h"
10711 #include "${srcdir-.}/tests/ftruncroot.c"
10712 EOF
10713 if { (eval echo configure:10714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10714 then
10715   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
10716 else
10717   echo "configure: failed program was:" >&5
10718   cat conftest.$ac_ext >&5
10719   rm -fr conftest*
10720   samba_cv_FTRUNCATE_NEEDS_ROOT=no
10721 fi
10722 rm -fr conftest*
10723 fi
10724
10725 fi
10726
10727 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
10728 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
10729     cat >> confdefs.h <<\EOF
10730 #define FTRUNCATE_NEEDS_ROOT 1
10731 EOF
10732
10733 fi
10734
10735 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
10736 echo "configure:10737: checking for fcntl locking" >&5
10737 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
10738   echo $ac_n "(cached) $ac_c" 1>&6
10739 else
10740   
10741 if test "$cross_compiling" = yes; then
10742   samba_cv_HAVE_FCNTL_LOCK=cross
10743 else
10744   cat > conftest.$ac_ext <<EOF
10745 #line 10746 "configure"
10746 #include "confdefs.h"
10747 #include "${srcdir-.}/tests/fcntl_lock.c"
10748 EOF
10749 if { (eval echo configure:10750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10750 then
10751   samba_cv_HAVE_FCNTL_LOCK=yes
10752 else
10753   echo "configure: failed program was:" >&5
10754   cat conftest.$ac_ext >&5
10755   rm -fr conftest*
10756   samba_cv_HAVE_FCNTL_LOCK=no
10757 fi
10758 rm -fr conftest*
10759 fi
10760
10761 fi
10762
10763 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
10764 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
10765     cat >> confdefs.h <<\EOF
10766 #define HAVE_FCNTL_LOCK 1
10767 EOF
10768
10769 fi
10770
10771 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
10772 echo "configure:10773: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
10773 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
10774   echo $ac_n "(cached) $ac_c" 1>&6
10775 else
10776   
10777 if test "$cross_compiling" = yes; then
10778   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
10779 else
10780   cat > conftest.$ac_ext <<EOF
10781 #line 10782 "configure"
10782 #include "confdefs.h"
10783 #include "${srcdir-.}/tests/fcntl_lock64.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_HAVE_BROKEN_FCNTL64_LOCKS=yes
10788 else
10789   echo "configure: failed program was:" >&5
10790   cat conftest.$ac_ext >&5
10791   rm -fr conftest*
10792   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
10793 fi
10794 rm -fr conftest*
10795 fi
10796
10797 fi
10798
10799 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
10800 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
10801     cat >> confdefs.h <<\EOF
10802 #define HAVE_BROKEN_FCNTL64_LOCKS 1
10803 EOF
10804
10805
10806 else
10807
10808
10809   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
10810 echo "configure:10811: checking for 64 bit fcntl locking" >&5
10811 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+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_STRUCT_FLOCK64=cross
10817 else
10818   cat > conftest.$ac_ext <<EOF
10819 #line 10820 "configure"
10820 #include "confdefs.h"
10821
10822 #if defined(HAVE_UNISTD_H)
10823 #include <unistd.h>
10824 #endif
10825 #include <stdio.h>
10826 #include <stdlib.h>
10827
10828 #ifdef HAVE_FCNTL_H
10829 #include <fcntl.h>
10830 #endif
10831
10832 #ifdef HAVE_SYS_FCNTL_H
10833 #include <sys/fcntl.h>
10834 #endif
10835 main() { struct flock64 fl64;
10836 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
10837 exit(0);
10838 #else
10839 exit(1);
10840 #endif
10841 }
10842 EOF
10843 if { (eval echo configure:10844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10844 then
10845   samba_cv_HAVE_STRUCT_FLOCK64=yes
10846 else
10847   echo "configure: failed program was:" >&5
10848   cat conftest.$ac_ext >&5
10849   rm -fr conftest*
10850   samba_cv_HAVE_STRUCT_FLOCK64=no
10851 fi
10852 rm -fr conftest*
10853 fi
10854
10855 fi
10856
10857 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
10858
10859   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
10860       cat >> confdefs.h <<\EOF
10861 #define HAVE_STRUCT_FLOCK64 1
10862 EOF
10863
10864   fi
10865 fi
10866
10867 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
10868 echo "configure:10869: checking for a crypt that needs truncated salt" >&5
10869 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
10870   echo $ac_n "(cached) $ac_c" 1>&6
10871 else
10872   
10873 if test "$cross_compiling" = yes; then
10874   samba_cv_HAVE_TRUNCATED_SALT=cross
10875 else
10876   cat > conftest.$ac_ext <<EOF
10877 #line 10878 "configure"
10878 #include "confdefs.h"
10879 #include "${srcdir-.}/tests/crypttest.c"
10880 EOF
10881 if { (eval echo configure:10882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10882 then
10883   samba_cv_HAVE_TRUNCATED_SALT=no
10884 else
10885   echo "configure: failed program was:" >&5
10886   cat conftest.$ac_ext >&5
10887   rm -fr conftest*
10888   samba_cv_HAVE_TRUNCATED_SALT=yes
10889 fi
10890 rm -fr conftest*
10891 fi
10892
10893 fi
10894
10895 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
10896 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
10897     cat >> confdefs.h <<\EOF
10898 #define HAVE_TRUNCATED_SALT 1
10899 EOF
10900
10901 fi
10902
10903 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
10904 echo "configure:10905: checking for broken nisplus include files" >&5
10905 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
10906   echo $ac_n "(cached) $ac_c" 1>&6
10907 else
10908   
10909 cat > conftest.$ac_ext <<EOF
10910 #line 10911 "configure"
10911 #include "confdefs.h"
10912 #include <sys/acl.h>
10913 #if defined(HAVE_RPCSVC_NIS_H)
10914 #include <rpcsvc/nis.h>
10915 #endif
10916 int main() {
10917 return 0;
10918 ; return 0; }
10919 EOF
10920 if { (eval echo configure:10921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10921   rm -rf conftest*
10922   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
10923 else
10924   echo "configure: failed program was:" >&5
10925   cat conftest.$ac_ext >&5
10926   rm -rf conftest*
10927   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
10928 fi
10929 rm -f conftest*
10930 fi
10931
10932 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
10933 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
10934     cat >> confdefs.h <<\EOF
10935 #define BROKEN_NISPLUS_INCLUDE_FILES 1
10936 EOF
10937
10938 fi
10939
10940
10941 #################################################
10942 # check for smbwrapper support
10943 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
10944 echo "configure:10945: checking whether to use smbwrapper" >&5
10945 # Check whether --with-smbwrapper or --without-smbwrapper was given.
10946 if test "${with_smbwrapper+set}" = set; then
10947   withval="$with_smbwrapper"
10948    case "$withval" in
10949   yes)
10950     echo "$ac_t""yes" 1>&6
10951     cat >> confdefs.h <<\EOF
10952 #define WITH_SMBWRAPPER 1
10953 EOF
10954
10955         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
10956
10957         if test x$ATTEMPT_WRAP32_BUILD = x; then
10958                 WRAP32=""
10959         else
10960                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
10961         fi
10962
10963 # Conditions under which smbwrapper should not be built.
10964
10965         if test x$PICFLAG = x; then
10966            echo No support for PIC code - disabling smbwrapper and smbsh
10967            WRAP=""
10968            WRAP32=""
10969         elif test x$ac_cv_func_syscall = xno; then
10970            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
10971            WRAP=""
10972            WRAP32=""
10973         fi
10974     ;;
10975   *)
10976     echo "$ac_t""no" 1>&6
10977     ;;
10978   esac 
10979 else
10980   echo "$ac_t""no" 1>&6
10981
10982 fi
10983
10984
10985 #################################################
10986 # check for the AFS filesystem
10987 echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6
10988 echo "configure:10989: checking whether to use AFS" >&5
10989 # Check whether --with-afs or --without-afs was given.
10990 if test "${with_afs+set}" = set; then
10991   withval="$with_afs"
10992    case "$withval" in
10993   yes)
10994     echo "$ac_t""yes" 1>&6
10995     cat >> confdefs.h <<\EOF
10996 #define WITH_AFS 1
10997 EOF
10998
10999     ;;
11000   *)
11001     echo "$ac_t""no" 1>&6
11002     ;;
11003   esac 
11004 else
11005   echo "$ac_t""no" 1>&6
11006
11007 fi
11008
11009
11010
11011 #################################################
11012 # check for the DFS auth system
11013 echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6
11014 echo "configure:11015: checking whether to use DFS auth" >&5
11015 # Check whether --with-dfs or --without-dfs was given.
11016 if test "${with_dfs+set}" = set; then
11017   withval="$with_dfs"
11018    case "$withval" in
11019   yes)
11020     echo "$ac_t""yes" 1>&6
11021     cat >> confdefs.h <<\EOF
11022 #define WITH_DFS 1
11023 EOF
11024
11025     ;;
11026   *)
11027     echo "$ac_t""no" 1>&6
11028     ;;
11029   esac 
11030 else
11031   echo "$ac_t""no" 1>&6
11032
11033 fi
11034
11035
11036 #################################################
11037 # check for Kerberos IV auth system
11038 echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6
11039 echo "configure:11040: checking whether to use Kerberos IV" >&5
11040 # Check whether --with-krb4 or --without-krb4 was given.
11041 if test "${with_krb4+set}" = set; then
11042   withval="$with_krb4"
11043      echo "$ac_t""yes" 1>&6
11044     cat >> confdefs.h <<\EOF
11045 #define KRB4_AUTH 1
11046 EOF
11047
11048     echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
11049 echo "configure:11050: checking for dn_expand in -lresolv" >&5
11050 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
11051 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11052   echo $ac_n "(cached) $ac_c" 1>&6
11053 else
11054   ac_save_LIBS="$LIBS"
11055 LIBS="-lresolv  $LIBS"
11056 cat > conftest.$ac_ext <<EOF
11057 #line 11058 "configure"
11058 #include "confdefs.h"
11059 /* Override any gcc2 internal prototype to avoid an error.  */
11060 /* We use char because int might match the return type of a gcc2
11061     builtin and then its argument prototype would still apply.  */
11062 char dn_expand();
11063
11064 int main() {
11065 dn_expand()
11066 ; return 0; }
11067 EOF
11068 if { (eval echo configure:11069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11069   rm -rf conftest*
11070   eval "ac_cv_lib_$ac_lib_var=yes"
11071 else
11072   echo "configure: failed program was:" >&5
11073   cat conftest.$ac_ext >&5
11074   rm -rf conftest*
11075   eval "ac_cv_lib_$ac_lib_var=no"
11076 fi
11077 rm -f conftest*
11078 LIBS="$ac_save_LIBS"
11079
11080 fi
11081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11082   echo "$ac_t""yes" 1>&6
11083     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11084     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11085   cat >> confdefs.h <<EOF
11086 #define $ac_tr_lib 1
11087 EOF
11088
11089   LIBS="-lresolv $LIBS"
11090
11091 else
11092   echo "$ac_t""no" 1>&6
11093 fi
11094
11095     LIBS="$LIBS -lkrb -ldes"
11096     CFLAGS="$CFLAGS -I$withval/include"
11097     LDFLAGS="$LDFLAGS -L$withval/lib"
11098 else
11099   echo "$ac_t""no" 1>&6
11100
11101 fi
11102
11103
11104 #################################################
11105 # check for Kerberos 5 auth system
11106 echo $ac_n "checking whether to use Kerberos 5""... $ac_c" 1>&6
11107 echo "configure:11108: checking whether to use Kerberos 5" >&5
11108 # Check whether --with-krb5 or --without-krb5 was given.
11109 if test "${with_krb5+set}" = set; then
11110   withval="$with_krb5"
11111      echo "$ac_t""yes" 1>&6
11112     cat >> confdefs.h <<\EOF
11113 #define KRB5_AUTH 1
11114 EOF
11115
11116     LIBS="$LIBS -ldes425 -lkrb5 -lcrypto -lcom_err"
11117     CFLAGS="$CFLAGS -I$withval/include"
11118     LDFLAGS="$LDFLAGS -L$withval/lib"
11119 else
11120   echo "$ac_t""no" 1>&6
11121
11122 fi
11123
11124
11125 #################################################
11126 # check for automount support
11127 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11128 echo "configure:11129: checking whether to use AUTOMOUNT" >&5
11129 # Check whether --with-automount or --without-automount was given.
11130 if test "${with_automount+set}" = set; then
11131   withval="$with_automount"
11132    case "$withval" in
11133   yes)
11134     echo "$ac_t""yes" 1>&6
11135     cat >> confdefs.h <<\EOF
11136 #define WITH_AUTOMOUNT 1
11137 EOF
11138
11139     ;;
11140   *)
11141     echo "$ac_t""no" 1>&6
11142     ;;
11143   esac 
11144 else
11145   echo "$ac_t""no" 1>&6
11146
11147 fi
11148
11149
11150 #################################################
11151 # check for smbmount support
11152 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11153 echo "configure:11154: checking whether to use SMBMOUNT" >&5
11154 # Check whether --with-smbmount or --without-smbmount was given.
11155 if test "${with_smbmount+set}" = set; then
11156   withval="$with_smbmount"
11157    case "$withval" in
11158   yes)
11159     echo "$ac_t""yes" 1>&6
11160     cat >> confdefs.h <<\EOF
11161 #define WITH_SMBMOUNT 1
11162 EOF
11163
11164     MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11165     ;;
11166   *)
11167     echo "$ac_t""no" 1>&6
11168     MPROGS=
11169     ;;
11170   esac 
11171 else
11172   echo "$ac_t""no" 1>&6
11173   MPROGS=
11174
11175 fi
11176
11177
11178
11179 #################################################
11180 # check for a PAM password database
11181 with_pam_for_crypt=no
11182 echo $ac_n "checking whether to use PAM password database""... $ac_c" 1>&6
11183 echo "configure:11184: checking whether to use PAM password database" >&5
11184 # Check whether --with-pam or --without-pam was given.
11185 if test "${with_pam+set}" = set; then
11186   withval="$with_pam"
11187    case "$withval" in
11188   yes)
11189     echo "$ac_t""yes" 1>&6
11190     cat >> confdefs.h <<\EOF
11191 #define WITH_PAM 1
11192 EOF
11193
11194     LIBS="$LIBS -lpam"
11195     with_pam_for_crypt=yes
11196     ;;
11197   *)
11198     echo "$ac_t""no" 1>&6
11199     ;;
11200   esac 
11201 else
11202   echo "$ac_t""no" 1>&6
11203
11204 fi
11205
11206
11207 # we can't build a pam module if we don't have pam.
11208 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11209 echo "configure:11210: checking for pam_get_data in -lpam" >&5
11210 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11211 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11212   echo $ac_n "(cached) $ac_c" 1>&6
11213 else
11214   ac_save_LIBS="$LIBS"
11215 LIBS="-lpam  $LIBS"
11216 cat > conftest.$ac_ext <<EOF
11217 #line 11218 "configure"
11218 #include "confdefs.h"
11219 /* Override any gcc2 internal prototype to avoid an error.  */
11220 /* We use char because int might match the return type of a gcc2
11221     builtin and then its argument prototype would still apply.  */
11222 char pam_get_data();
11223
11224 int main() {
11225 pam_get_data()
11226 ; return 0; }
11227 EOF
11228 if { (eval echo configure:11229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11229   rm -rf conftest*
11230   eval "ac_cv_lib_$ac_lib_var=yes"
11231 else
11232   echo "configure: failed program was:" >&5
11233   cat conftest.$ac_ext >&5
11234   rm -rf conftest*
11235   eval "ac_cv_lib_$ac_lib_var=no"
11236 fi
11237 rm -f conftest*
11238 LIBS="$ac_save_LIBS"
11239
11240 fi
11241 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11242   echo "$ac_t""yes" 1>&6
11243   cat >> confdefs.h <<\EOF
11244 #define HAVE_LIBPAM 1
11245 EOF
11246
11247 else
11248   echo "$ac_t""no" 1>&6
11249 fi
11250
11251
11252 #################################################
11253 # check for pam_smbpass support
11254 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11255 echo "configure:11256: checking whether to use pam_smbpass" >&5
11256 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11257 if test "${with_pam_smbpass+set}" = set; then
11258   withval="$with_pam_smbpass"
11259    case "$withval" in
11260   yes)
11261     echo "$ac_t""yes" 1>&6
11262
11263 # Conditions under which pam_smbpass should not be built.
11264
11265        if test x$PICFLAG = x; then
11266           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11267           PAM_MOD=""
11268        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11269           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11270           PAM_MOD=""
11271        else
11272           cat >> confdefs.h <<\EOF
11273 #define WITH_PAM_SMBPASS 1
11274 EOF
11275
11276           PAM_MOD="bin/pam_smbpass.so"
11277        fi
11278     ;;
11279   *)
11280     echo "$ac_t""no" 1>&6
11281     ;;
11282   esac 
11283 else
11284   echo "$ac_t""no" 1>&6
11285
11286 fi
11287
11288
11289
11290 ###############################################
11291 # test for where we get crypt() from, but only
11292 # if not using PAM
11293 if test $with_pam_for_crypt = no; then
11294 for ac_func in crypt
11295 do
11296 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11297 echo "configure:11298: checking for $ac_func" >&5
11298 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
11299   echo $ac_n "(cached) $ac_c" 1>&6
11300 else
11301   cat > conftest.$ac_ext <<EOF
11302 #line 11303 "configure"
11303 #include "confdefs.h"
11304 /* System header to define __stub macros and hopefully few prototypes,
11305     which can conflict with char $ac_func(); below.  */
11306 #include <assert.h>
11307 /* Override any gcc2 internal prototype to avoid an error.  */
11308 /* We use char because int might match the return type of a gcc2
11309     builtin and then its argument prototype would still apply.  */
11310 char $ac_func();
11311
11312 int main() {
11313
11314 /* The GNU C library defines this for functions which it implements
11315     to always fail with ENOSYS.  Some functions are actually named
11316     something starting with __ and the normal name is an alias.  */
11317 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11318 choke me
11319 #else
11320 $ac_func();
11321 #endif
11322
11323 ; return 0; }
11324 EOF
11325 if { (eval echo configure:11326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11326   rm -rf conftest*
11327   eval "ac_cv_func_$ac_func=yes"
11328 else
11329   echo "configure: failed program was:" >&5
11330   cat conftest.$ac_ext >&5
11331   rm -rf conftest*
11332   eval "ac_cv_func_$ac_func=no"
11333 fi
11334 rm -f conftest*
11335 fi
11336
11337 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11338   echo "$ac_t""yes" 1>&6
11339     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11340   cat >> confdefs.h <<EOF
11341 #define $ac_tr_func 1
11342 EOF
11343  
11344 else
11345   echo "$ac_t""no" 1>&6
11346 fi
11347 done
11348
11349 if test x"$ac_cv_func_crypt" = x"no"; then
11350     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
11351 echo "configure:11352: checking for crypt in -lcrypt" >&5
11352 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
11353 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11354   echo $ac_n "(cached) $ac_c" 1>&6
11355 else
11356   ac_save_LIBS="$LIBS"
11357 LIBS="-lcrypt  $LIBS"
11358 cat > conftest.$ac_ext <<EOF
11359 #line 11360 "configure"
11360 #include "confdefs.h"
11361 /* Override any gcc2 internal prototype to avoid an error.  */
11362 /* We use char because int might match the return type of a gcc2
11363     builtin and then its argument prototype would still apply.  */
11364 char crypt();
11365
11366 int main() {
11367 crypt()
11368 ; return 0; }
11369 EOF
11370 if { (eval echo configure:11371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11371   rm -rf conftest*
11372   eval "ac_cv_lib_$ac_lib_var=yes"
11373 else
11374   echo "configure: failed program was:" >&5
11375   cat conftest.$ac_ext >&5
11376   rm -rf conftest*
11377   eval "ac_cv_lib_$ac_lib_var=no"
11378 fi
11379 rm -f conftest*
11380 LIBS="$ac_save_LIBS"
11381
11382 fi
11383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11384   echo "$ac_t""yes" 1>&6
11385   LIBS="$LIBS -lcrypt";
11386         cat >> confdefs.h <<\EOF
11387 #define HAVE_CRYPT 1
11388 EOF
11389
11390 else
11391   echo "$ac_t""no" 1>&6
11392 fi
11393
11394 fi
11395 fi
11396
11397
11398 #################################################
11399 # check for a TDB password database
11400 echo $ac_n "checking whether to use TDB password database""... $ac_c" 1>&6
11401 echo "configure:11402: checking whether to use TDB password database" >&5
11402 # Check whether --with-tdbsam or --without-tdbsam was given.
11403 if test "${with_tdbsam+set}" = set; then
11404   withval="$with_tdbsam"
11405    case "$withval" in
11406   yes)
11407     echo "$ac_t""yes" 1>&6
11408     cat >> confdefs.h <<\EOF
11409 #define WITH_TDBPWD 1
11410 EOF
11411
11412 #    AC_MSG_ERROR([TDB password database not supported in this version.])
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 # check for a LDAP password database
11426 echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6
11427 echo "configure:11428: checking whether to use LDAP password database" >&5
11428 # Check whether --with-ldap or --without-ldap was given.
11429 if test "${with_ldap+set}" = set; then
11430   withval="$with_ldap"
11431    case "$withval" in
11432   yes)
11433     echo "$ac_t""yes" 1>&6
11434     cat >> confdefs.h <<\EOF
11435 #define WITH_LDAP 1
11436 EOF
11437
11438     { echo "configure: error: LDAP password database not supported in this version." 1>&2; exit 1; }
11439     ;;
11440   *)
11441     echo "$ac_t""no" 1>&6
11442     ;;
11443   esac 
11444 else
11445   echo "$ac_t""no" 1>&6
11446
11447 fi
11448
11449
11450 #################################################
11451 # check for a NISPLUS password database
11452 echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6
11453 echo "configure:11454: checking whether to use NISPLUS password database" >&5
11454 # Check whether --with-nisplus or --without-nisplus was given.
11455 if test "${with_nisplus+set}" = set; then
11456   withval="$with_nisplus"
11457    case "$withval" in
11458   yes)
11459     echo "$ac_t""yes" 1>&6
11460     cat >> confdefs.h <<\EOF
11461 #define WITH_NISPLUS 1
11462 EOF
11463
11464     ;;
11465   *)
11466     echo "$ac_t""no" 1>&6
11467     ;;
11468   esac 
11469 else
11470   echo "$ac_t""no" 1>&6
11471
11472 fi
11473
11474
11475 #################################################
11476 # check for a NISPLUS_HOME support 
11477 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
11478 echo "configure:11479: checking whether to use NISPLUS_HOME" >&5
11479 # Check whether --with-nisplus-home or --without-nisplus-home was given.
11480 if test "${with_nisplus_home+set}" = set; then
11481   withval="$with_nisplus_home"
11482    case "$withval" in
11483   yes)
11484     echo "$ac_t""yes" 1>&6
11485     cat >> confdefs.h <<\EOF
11486 #define WITH_NISPLUS_HOME 1
11487 EOF
11488
11489     ;;
11490   *)
11491     echo "$ac_t""no" 1>&6
11492     ;;
11493   esac 
11494 else
11495   echo "$ac_t""no" 1>&6
11496
11497 fi
11498
11499
11500 #################################################
11501 # check for the secure socket layer
11502 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
11503 echo "configure:11504: checking whether to use SSL" >&5
11504 # Check whether --with-ssl or --without-ssl was given.
11505 if test "${with_ssl+set}" = set; then
11506   withval="$with_ssl"
11507    case "$withval" in
11508   yes)
11509     echo "$ac_t""yes" 1>&6
11510     cat >> confdefs.h <<\EOF
11511 #define WITH_SSL 1
11512 EOF
11513
11514     withval="/usr/local/ssl"     # default
11515
11516     if test "${with_sslinc+set}" = set; then
11517
11518         withval="$with_sslinc"
11519         case "$withval" in
11520         yes|no)
11521           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
11522           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
11523           LIBS="-lssl -lcrypto $LIBS"
11524           LDFLAGS="=L/usr/local/ssl/lib $LDFLAGS"
11525         ;;
11526         * )
11527           CFLAGS="-I${withval}/include $CFLAGS"
11528           LIBS="-lssl -lcrypto $LIBS"
11529           LDFLAGS="-L${withval}/lib $LDFLAGS"
11530         ;;
11531         esac
11532
11533     else
11534
11535         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
11536         LIBS="-lssl -lcrypto $LIBS"
11537         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
11538
11539     fi
11540
11541     if test ! -d ${withval}; then
11542       echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
11543       exit 1
11544     fi 
11545
11546     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
11547
11548     ;;
11549   *)
11550     echo "$ac_t""no" 1>&6
11551     ;;
11552   esac 
11553 else
11554   echo "$ac_t""no" 1>&6
11555
11556 fi
11557
11558
11559 #################################################
11560 # check for syslog logging
11561 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
11562 echo "configure:11563: checking whether to use syslog logging" >&5
11563 # Check whether --with-syslog or --without-syslog was given.
11564 if test "${with_syslog+set}" = set; then
11565   withval="$with_syslog"
11566    case "$withval" in
11567   yes)
11568     echo "$ac_t""yes" 1>&6
11569     cat >> confdefs.h <<\EOF
11570 #define WITH_SYSLOG 1
11571 EOF
11572
11573     ;;
11574   *)
11575     echo "$ac_t""no" 1>&6
11576     ;;
11577   esac 
11578 else
11579   echo "$ac_t""no" 1>&6
11580
11581 fi
11582
11583
11584 #################################################
11585 # check for a shared memory profiling support
11586 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
11587 echo "configure:11588: checking whether to use profiling" >&5
11588 # Check whether --with-profile or --without-profile was given.
11589 if test "${with_profile+set}" = set; then
11590   withval="$with_profile"
11591    case "$withval" in
11592   yes)
11593     echo "$ac_t""yes" 1>&6
11594     cat >> confdefs.h <<\EOF
11595 #define WITH_PROFILE 1
11596 EOF
11597
11598     ;;
11599   *)
11600     echo "$ac_t""no" 1>&6
11601     ;;
11602   esac 
11603 else
11604   echo "$ac_t""no" 1>&6
11605
11606 fi
11607
11608
11609
11610 #################################################
11611 # check for experimental netatalk resource fork support
11612 echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6
11613 echo "configure:11614: checking whether to support netatalk" >&5
11614 # Check whether --with-netatalk or --without-netatalk was given.
11615 if test "${with_netatalk+set}" = set; then
11616   withval="$with_netatalk"
11617    case "$withval" in
11618   yes)
11619     echo "$ac_t""yes" 1>&6
11620     cat >> confdefs.h <<\EOF
11621 #define WITH_NETATALK 1
11622 EOF
11623
11624     ;;
11625   *)
11626     echo "$ac_t""no" 1>&6
11627     ;;
11628   esac 
11629 else
11630   echo "$ac_t""no" 1>&6
11631
11632 fi
11633
11634
11635 #################################################
11636 # check for experimental disk-quotas support
11637 QUOTAOBJS=smbd/noquotas.o
11638
11639 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
11640 echo "configure:11641: checking whether to support disk-quotas" >&5
11641 # Check whether --with-quotas or --without-quotas was given.
11642 if test "${with_quotas+set}" = set; then
11643   withval="$with_quotas"
11644    case "$withval" in
11645   yes)
11646     echo "$ac_t""yes" 1>&6
11647     QUOTAOBJS=smbd/quotas.o
11648     ;;
11649   *)
11650     echo "$ac_t""no" 1>&6
11651     ;;
11652   esac 
11653 else
11654   echo "$ac_t""no" 1>&6
11655
11656 fi
11657
11658
11659
11660 #################################################
11661 # check for experimental utmp accounting
11662
11663 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
11664 echo "configure:11665: checking whether to support utmp accounting" >&5
11665 # Check whether --with-utmp or --without-utmp was given.
11666 if test "${with_utmp+set}" = set; then
11667   withval="$with_utmp"
11668    case "$withval" in
11669   yes)
11670     echo "$ac_t""yes" 1>&6
11671     cat >> confdefs.h <<\EOF
11672 #define WITH_UTMP 1
11673 EOF
11674
11675     ;;
11676   *)
11677     echo "$ac_t""no" 1>&6
11678     ;;
11679   esac 
11680 else
11681   echo "$ac_t""no" 1>&6
11682
11683 fi
11684
11685
11686 #################################################
11687 # check for MS Dfs support
11688
11689 echo $ac_n "checking whether to support Microsoft Dfs""... $ac_c" 1>&6
11690 echo "configure:11691: checking whether to support Microsoft Dfs" >&5
11691 # Check whether --with-msdfs or --without-msdfs was given.
11692 if test "${with_msdfs+set}" = set; then
11693   withval="$with_msdfs"
11694    case "$withval" in
11695   yes)
11696      echo "$ac_t""yes" 1>&6
11697      cat >> confdefs.h <<\EOF
11698 #define WITH_MSDFS 1
11699 EOF
11700
11701      ;;
11702   *)
11703     echo "$ac_t""no" 1>&6
11704     ;;
11705   esac 
11706 else
11707   echo "$ac_t""no" 1>&6
11708
11709 fi
11710
11711
11712 #################################################
11713 # set private directory location
11714 # Check whether --with-privatedir or --without-privatedir was given.
11715 if test "${with_privatedir+set}" = set; then
11716   withval="$with_privatedir"
11717    case "$withval" in
11718   yes|no)
11719   #
11720   # Just in case anybody calls it without argument
11721   #
11722     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
11723     privatedir='${prefix}/private'
11724   ;;
11725   * )
11726     privatedir="$withval"
11727     ;;
11728   esac
11729   
11730 else
11731   privatedir='${prefix}/private'
11732    
11733
11734 fi
11735
11736
11737 #################################################
11738 # set lock directory location
11739 # Check whether --with-lockdir or --without-lockdir was given.
11740 if test "${with_lockdir+set}" = set; then
11741   withval="$with_lockdir"
11742    case "$withval" in
11743   yes|no)
11744   #
11745   # Just in case anybody calls it without argument
11746   #
11747     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
11748     lockdir='$(VARDIR)/locks'
11749   ;;
11750   * )
11751     lockdir="$withval"
11752     ;;
11753   esac
11754   
11755 else
11756   lockdir='$(VARDIR)/locks'
11757    
11758
11759 fi
11760
11761
11762 #################################################
11763 # set SWAT directory location
11764 # Check whether --with-swatdir or --without-swatdir was given.
11765 if test "${with_swatdir+set}" = set; then
11766   withval="$with_swatdir"
11767    case "$withval" in
11768   yes|no)
11769   #
11770   # Just in case anybody does it
11771   #
11772     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
11773     swatdir='${prefix}/swat'
11774   ;;
11775   * )
11776     swatdir="$withval"
11777     ;;
11778   esac
11779   
11780 else
11781   swatdir='${prefix}/swat'
11782    
11783
11784 fi
11785
11786
11787 #################################################
11788 # these tests are taken from the GNU fileutils package
11789 echo "checking how to get filesystem space usage" 1>&6
11790 echo "configure:11791: checking how to get filesystem space usage" >&5
11791 space=no
11792
11793 # Test for statvfs64.
11794 if test $space = no; then
11795   # SVR4
11796   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
11797 echo "configure:11798: checking statvfs64 function (SVR4)" >&5
11798 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
11799   echo $ac_n "(cached) $ac_c" 1>&6
11800 else
11801   if test "$cross_compiling" = yes; then
11802   fu_cv_sys_stat_statvfs64=cross
11803 else
11804   cat > conftest.$ac_ext <<EOF
11805 #line 11806 "configure"
11806 #include "confdefs.h"
11807
11808 #if defined(HAVE_UNISTD_H)
11809 #include <unistd.h>
11810 #endif
11811 #include <sys/types.h>
11812 #include <sys/statvfs.h>
11813   main ()
11814   {
11815     struct statvfs64 fsd;
11816     exit (statvfs64 (".", &fsd));
11817   }
11818 EOF
11819 if { (eval echo configure:11820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11820 then
11821   fu_cv_sys_stat_statvfs64=yes
11822 else
11823   echo "configure: failed program was:" >&5
11824   cat conftest.$ac_ext >&5
11825   rm -fr conftest*
11826   fu_cv_sys_stat_statvfs64=no
11827 fi
11828 rm -fr conftest*
11829 fi
11830
11831 fi
11832
11833 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
11834   if test $fu_cv_sys_stat_statvfs64 = yes; then
11835     space=yes
11836     cat >> confdefs.h <<\EOF
11837 #define STAT_STATVFS64 1
11838 EOF
11839
11840   fi
11841 fi
11842
11843 # Perform only the link test since it seems there are no variants of the
11844 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
11845 # because that got a false positive on SCO OSR5.  Adding the declaration
11846 # of a `struct statvfs' causes this test to fail (as it should) on such
11847 # systems.  That system is reported to work fine with STAT_STATFS4 which
11848 # is what it gets when this test fails.
11849 if test $space = no; then
11850   # SVR4
11851   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
11852 echo "configure:11853: checking statvfs function (SVR4)" >&5
11853 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
11854   echo $ac_n "(cached) $ac_c" 1>&6
11855 else
11856   cat > conftest.$ac_ext <<EOF
11857 #line 11858 "configure"
11858 #include "confdefs.h"
11859 #include <sys/types.h>
11860 #include <sys/statvfs.h>
11861 int main() {
11862 struct statvfs fsd; statvfs (0, &fsd);
11863 ; return 0; }
11864 EOF
11865 if { (eval echo configure:11866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11866   rm -rf conftest*
11867   fu_cv_sys_stat_statvfs=yes
11868 else
11869   echo "configure: failed program was:" >&5
11870   cat conftest.$ac_ext >&5
11871   rm -rf conftest*
11872   fu_cv_sys_stat_statvfs=no
11873 fi
11874 rm -f conftest*
11875 fi
11876
11877 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
11878   if test $fu_cv_sys_stat_statvfs = yes; then
11879     space=yes
11880     cat >> confdefs.h <<\EOF
11881 #define STAT_STATVFS 1
11882 EOF
11883
11884   fi
11885 fi
11886
11887 if test $space = no; then
11888   # DEC Alpha running OSF/1
11889   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
11890 echo "configure:11891: checking for 3-argument statfs function (DEC OSF/1)" >&5
11891   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
11892   echo $ac_n "(cached) $ac_c" 1>&6
11893 else
11894   if test "$cross_compiling" = yes; then
11895   fu_cv_sys_stat_statfs3_osf1=no
11896 else
11897   cat > conftest.$ac_ext <<EOF
11898 #line 11899 "configure"
11899 #include "confdefs.h"
11900
11901 #include <sys/param.h>
11902 #include <sys/types.h>
11903 #include <sys/mount.h>
11904   main ()
11905   {
11906     struct statfs fsd;
11907     fsd.f_fsize = 0;
11908     exit (statfs (".", &fsd, sizeof (struct statfs)));
11909   }
11910 EOF
11911 if { (eval echo configure:11912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11912 then
11913   fu_cv_sys_stat_statfs3_osf1=yes
11914 else
11915   echo "configure: failed program was:" >&5
11916   cat conftest.$ac_ext >&5
11917   rm -fr conftest*
11918   fu_cv_sys_stat_statfs3_osf1=no
11919 fi
11920 rm -fr conftest*
11921 fi
11922
11923 fi
11924
11925   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
11926   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
11927     space=yes
11928     cat >> confdefs.h <<\EOF
11929 #define STAT_STATFS3_OSF1 1
11930 EOF
11931
11932   fi
11933 fi
11934
11935 if test $space = no; then
11936 # AIX
11937   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
11938 echo "configure:11939: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
11939   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
11940   echo $ac_n "(cached) $ac_c" 1>&6
11941 else
11942   if test "$cross_compiling" = yes; then
11943   fu_cv_sys_stat_statfs2_bsize=no
11944 else
11945   cat > conftest.$ac_ext <<EOF
11946 #line 11947 "configure"
11947 #include "confdefs.h"
11948
11949 #ifdef HAVE_SYS_PARAM_H
11950 #include <sys/param.h>
11951 #endif
11952 #ifdef HAVE_SYS_MOUNT_H
11953 #include <sys/mount.h>
11954 #endif
11955 #ifdef HAVE_SYS_VFS_H
11956 #include <sys/vfs.h>
11957 #endif
11958   main ()
11959   {
11960   struct statfs fsd;
11961   fsd.f_bsize = 0;
11962   exit (statfs (".", &fsd));
11963   }
11964 EOF
11965 if { (eval echo configure:11966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11966 then
11967   fu_cv_sys_stat_statfs2_bsize=yes
11968 else
11969   echo "configure: failed program was:" >&5
11970   cat conftest.$ac_ext >&5
11971   rm -fr conftest*
11972   fu_cv_sys_stat_statfs2_bsize=no
11973 fi
11974 rm -fr conftest*
11975 fi
11976
11977 fi
11978
11979   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
11980   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
11981     space=yes
11982     cat >> confdefs.h <<\EOF
11983 #define STAT_STATFS2_BSIZE 1
11984 EOF
11985
11986   fi
11987 fi
11988
11989 if test $space = no; then
11990 # SVR3
11991   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
11992 echo "configure:11993: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
11993   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
11994   echo $ac_n "(cached) $ac_c" 1>&6
11995 else
11996   if test "$cross_compiling" = yes; then
11997   fu_cv_sys_stat_statfs4=no
11998 else
11999   cat > conftest.$ac_ext <<EOF
12000 #line 12001 "configure"
12001 #include "confdefs.h"
12002 #include <sys/types.h>
12003 #include <sys/statfs.h>
12004   main ()
12005   {
12006   struct statfs fsd;
12007   exit (statfs (".", &fsd, sizeof fsd, 0));
12008   }
12009 EOF
12010 if { (eval echo configure:12011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12011 then
12012   fu_cv_sys_stat_statfs4=yes
12013 else
12014   echo "configure: failed program was:" >&5
12015   cat conftest.$ac_ext >&5
12016   rm -fr conftest*
12017   fu_cv_sys_stat_statfs4=no
12018 fi
12019 rm -fr conftest*
12020 fi
12021
12022 fi
12023
12024   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12025   if test $fu_cv_sys_stat_statfs4 = yes; then
12026     space=yes
12027     cat >> confdefs.h <<\EOF
12028 #define STAT_STATFS4 1
12029 EOF
12030
12031   fi
12032 fi
12033
12034 if test $space = no; then
12035 # 4.4BSD and NetBSD
12036   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12037 echo "configure:12038: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12038   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12039   echo $ac_n "(cached) $ac_c" 1>&6
12040 else
12041   if test "$cross_compiling" = yes; then
12042   fu_cv_sys_stat_statfs2_fsize=no
12043 else
12044   cat > conftest.$ac_ext <<EOF
12045 #line 12046 "configure"
12046 #include "confdefs.h"
12047 #include <sys/types.h>
12048 #ifdef HAVE_SYS_PARAM_H
12049 #include <sys/param.h>
12050 #endif
12051 #ifdef HAVE_SYS_MOUNT_H
12052 #include <sys/mount.h>
12053 #endif
12054   main ()
12055   {
12056   struct statfs fsd;
12057   fsd.f_fsize = 0;
12058   exit (statfs (".", &fsd));
12059   }
12060 EOF
12061 if { (eval echo configure:12062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12062 then
12063   fu_cv_sys_stat_statfs2_fsize=yes
12064 else
12065   echo "configure: failed program was:" >&5
12066   cat conftest.$ac_ext >&5
12067   rm -fr conftest*
12068   fu_cv_sys_stat_statfs2_fsize=no
12069 fi
12070 rm -fr conftest*
12071 fi
12072
12073 fi
12074
12075   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12076   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12077     space=yes
12078     cat >> confdefs.h <<\EOF
12079 #define STAT_STATFS2_FSIZE 1
12080 EOF
12081
12082   fi
12083 fi
12084
12085 if test $space = no; then
12086   # Ultrix
12087   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12088 echo "configure:12089: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12089   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12090   echo $ac_n "(cached) $ac_c" 1>&6
12091 else
12092   if test "$cross_compiling" = yes; then
12093   fu_cv_sys_stat_fs_data=no
12094 else
12095   cat > conftest.$ac_ext <<EOF
12096 #line 12097 "configure"
12097 #include "confdefs.h"
12098 #include <sys/types.h>
12099 #ifdef HAVE_SYS_PARAM_H
12100 #include <sys/param.h>
12101 #endif
12102 #ifdef HAVE_SYS_MOUNT_H
12103 #include <sys/mount.h>
12104 #endif
12105 #ifdef HAVE_SYS_FS_TYPES_H
12106 #include <sys/fs_types.h>
12107 #endif
12108   main ()
12109   {
12110   struct fs_data fsd;
12111   /* Ultrix's statfs returns 1 for success,
12112      0 for not mounted, -1 for failure.  */
12113   exit (statfs (".", &fsd) != 1);
12114   }
12115 EOF
12116 if { (eval echo configure:12117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12117 then
12118   fu_cv_sys_stat_fs_data=yes
12119 else
12120   echo "configure: failed program was:" >&5
12121   cat conftest.$ac_ext >&5
12122   rm -fr conftest*
12123   fu_cv_sys_stat_fs_data=no
12124 fi
12125 rm -fr conftest*
12126 fi
12127
12128 fi
12129
12130   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12131   if test $fu_cv_sys_stat_fs_data = yes; then
12132     space=yes
12133     cat >> confdefs.h <<\EOF
12134 #define STAT_STATFS2_FS_DATA 1
12135 EOF
12136
12137   fi
12138 fi
12139
12140 #
12141 # As a gating factor for large file support, in order to
12142 # use <4GB files we must have the following minimal support
12143 # available.
12144 # long long, and a 64 bit off_t or off64_t.
12145 # If we don't have all of these then disable large
12146 # file support.
12147 #
12148 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12149 echo "configure:12150: checking if large file support can be enabled" >&5
12150 cat > conftest.$ac_ext <<EOF
12151 #line 12152 "configure"
12152 #include "confdefs.h"
12153
12154 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
12155 #include <sys/types.h>
12156 #else
12157 __COMPILE_ERROR_
12158 #endif
12159
12160 int main() {
12161 int i
12162 ; return 0; }
12163 EOF
12164 if { (eval echo configure:12165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12165   rm -rf conftest*
12166   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
12167 else
12168   echo "configure: failed program was:" >&5
12169   cat conftest.$ac_ext >&5
12170   rm -rf conftest*
12171   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
12172 fi
12173 rm -f conftest*
12174 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
12175         echo "$ac_t""yes" 1>&6
12176     cat >> confdefs.h <<\EOF
12177 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
12178 EOF
12179
12180 else
12181         echo "$ac_t""no" 1>&6
12182 fi
12183 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
12184
12185 # Check whether --with-spinlocks or --without-spinlocks was given.
12186 if test "${with_spinlocks+set}" = set; then
12187   withval="$with_spinlocks"
12188   :
12189 fi
12190
12191 if test "x$with_spinlocks" = "xyes"; then
12192     cat >> confdefs.h <<\EOF
12193 #define USE_SPINLOCKS 1
12194 EOF
12195
12196
12197     case "$host_cpu" in
12198         sparc)
12199             cat >> confdefs.h <<\EOF
12200 #define SPARC_SPINLOCKS 1
12201 EOF
12202
12203             ;;
12204
12205         i386|i486|i586|i686)
12206             cat >> confdefs.h <<\EOF
12207 #define INTEL_SPINLOCKS 1
12208 EOF
12209
12210             ;;
12211
12212         mips)
12213             cat >> confdefs.h <<\EOF
12214 #define MIPS_SPINLOCKS 1
12215 EOF
12216
12217             ;;
12218
12219         powerpc)
12220             cat >> confdefs.h <<\EOF
12221 #define POWERPC_SPINLOCKS 1
12222 EOF
12223
12224             ;;
12225     esac
12226 fi
12227
12228 #################################################
12229 # check for ACL support
12230
12231 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
12232 echo "configure:12233: checking whether to support ACLs" >&5
12233 # Check whether --with-acl-support or --without-acl-support was given.
12234 if test "${with_acl_support+set}" = set; then
12235   withval="$with_acl_support"
12236    case "$withval" in
12237   yes)
12238
12239         case "$host_os" in
12240         *sysv5*)
12241             echo "$ac_t""Using UnixWare ACLs" 1>&6
12242             cat >> confdefs.h <<\EOF
12243 #define HAVE_UNIXWARE_ACLS 1
12244 EOF
12245
12246             ;;
12247         *solaris*)
12248             echo "$ac_t""Using solaris ACLs" 1>&6
12249             cat >> confdefs.h <<\EOF
12250 #define HAVE_SOLARIS_ACLS 1
12251 EOF
12252
12253             ;;
12254                 *irix*)
12255                         echo "$ac_t""Using IRIX ACLs" 1>&6
12256                         cat >> confdefs.h <<\EOF
12257 #define HAVE_IRIX_ACLS 1
12258 EOF
12259
12260                         ;;
12261                 *aix*)
12262                         echo "$ac_t""Using AIX ACLs" 1>&6
12263                         cat >> confdefs.h <<\EOF
12264 #define HAVE_AIX_ACLS 1
12265 EOF
12266
12267                         ;;
12268         *)
12269                         echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
12270 echo "configure:12271: checking for acl_get_file in -lacl" >&5
12271 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
12272 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12273   echo $ac_n "(cached) $ac_c" 1>&6
12274 else
12275   ac_save_LIBS="$LIBS"
12276 LIBS="-lacl  $LIBS"
12277 cat > conftest.$ac_ext <<EOF
12278 #line 12279 "configure"
12279 #include "confdefs.h"
12280 /* Override any gcc2 internal prototype to avoid an error.  */
12281 /* We use char because int might match the return type of a gcc2
12282     builtin and then its argument prototype would still apply.  */
12283 char acl_get_file();
12284
12285 int main() {
12286 acl_get_file()
12287 ; return 0; }
12288 EOF
12289 if { (eval echo configure:12290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12290   rm -rf conftest*
12291   eval "ac_cv_lib_$ac_lib_var=yes"
12292 else
12293   echo "configure: failed program was:" >&5
12294   cat conftest.$ac_ext >&5
12295   rm -rf conftest*
12296   eval "ac_cv_lib_$ac_lib_var=no"
12297 fi
12298 rm -f conftest*
12299 LIBS="$ac_save_LIBS"
12300
12301 fi
12302 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12303   echo "$ac_t""yes" 1>&6
12304     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12305     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12306   cat >> confdefs.h <<EOF
12307 #define $ac_tr_lib 1
12308 EOF
12309
12310   LIBS="-lacl $LIBS"
12311
12312 else
12313   echo "$ac_t""no" 1>&6
12314 fi
12315
12316                         echo $ac_n "checking for ACL support""... $ac_c" 1>&6
12317 echo "configure:12318: checking for ACL support" >&5
12318 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
12319   echo $ac_n "(cached) $ac_c" 1>&6
12320 else
12321   
12322                         cat > conftest.$ac_ext <<EOF
12323 #line 12324 "configure"
12324 #include "confdefs.h"
12325 #include <sys/types.h>
12326 #include <sys/acl.h>
12327 int main() {
12328  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
12329 ; return 0; }
12330 EOF
12331 if { (eval echo configure:12332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12332   rm -rf conftest*
12333   samba_cv_HAVE_POSIX_ACLS=yes
12334 else
12335   echo "configure: failed program was:" >&5
12336   cat conftest.$ac_ext >&5
12337   rm -rf conftest*
12338   samba_cv_HAVE_POSIX_ACLS=no
12339 fi
12340 rm -f conftest*
12341 fi
12342
12343 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
12344                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
12345                                 echo "$ac_t""Using posix ACLs" 1>&6
12346                                 cat >> confdefs.h <<\EOF
12347 #define HAVE_POSIX_ACLS 1
12348 EOF
12349
12350                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
12351 echo "configure:12352: checking for acl_get_perm_np" >&5
12352 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
12353   echo $ac_n "(cached) $ac_c" 1>&6
12354 else
12355   
12356                                 cat > conftest.$ac_ext <<EOF
12357 #line 12358 "configure"
12358 #include "confdefs.h"
12359 #include <sys/types.h>
12360 #include <sys/acl.h>
12361 int main() {
12362  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
12363 ; return 0; }
12364 EOF
12365 if { (eval echo configure:12366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12366   rm -rf conftest*
12367   samba_cv_HAVE_ACL_GET_PERM_NP=yes
12368 else
12369   echo "configure: failed program was:" >&5
12370   cat conftest.$ac_ext >&5
12371   rm -rf conftest*
12372   samba_cv_HAVE_ACL_GET_PERM_NP=no
12373 fi
12374 rm -f conftest*
12375 fi
12376
12377 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
12378                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
12379                                         cat >> confdefs.h <<\EOF
12380 #define HAVE_ACL_GET_PERM_NP 1
12381 EOF
12382
12383                                 fi
12384                         fi
12385                         echo $ac_n "checking for XFS ACL support""... $ac_c" 1>&6
12386 echo "configure:12387: checking for XFS ACL support" >&5
12387 if eval "test \"`echo '$''{'samba_cv_HAVE_XFS_ACLS'+set}'`\" = set"; then
12388   echo $ac_n "(cached) $ac_c" 1>&6
12389 else
12390   
12391                         cat > conftest.$ac_ext <<EOF
12392 #line 12393 "configure"
12393 #include "confdefs.h"
12394 #include <sys/types.h>
12395 #include <acl/acl.h>
12396 int main() {
12397  char test_str[13] = SGI_ACL_FILE; 
12398 ; return 0; }
12399 EOF
12400 if { (eval echo configure:12401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12401   rm -rf conftest*
12402   samba_cv_HAVE_XFS_ACLS=yes
12403 else
12404   echo "configure: failed program was:" >&5
12405   cat conftest.$ac_ext >&5
12406   rm -rf conftest*
12407   samba_cv_XFS_POSIX_ACLS=no
12408 fi
12409 rm -f conftest*
12410 fi
12411
12412 echo "$ac_t""$samba_cv_HAVE_XFS_ACLS" 1>&6
12413                         if test x"$samba_cv_HAVE_XFS_ACLS" = x"yes"; then
12414                                 echo "$ac_t""Using XFS ACLs" 1>&6
12415                                 cat >> confdefs.h <<\EOF
12416 #define HAVE_XFS_ACLS 1
12417 EOF
12418
12419                         fi
12420             ;;
12421         esac
12422         ;;
12423   *)
12424     echo "$ac_t""no" 1>&6
12425     cat >> confdefs.h <<\EOF
12426 #define HAVE_NO_ACLS 1
12427 EOF
12428
12429     ;;
12430   esac 
12431 else
12432   cat >> confdefs.h <<\EOF
12433 #define HAVE_NO_ACLS 1
12434 EOF
12435
12436   echo "$ac_t""no" 1>&6
12437
12438 fi
12439
12440 echo "checking configure summary"
12441 if test "$cross_compiling" = yes; then
12442   :
12443 else
12444   cat > conftest.$ac_ext <<EOF
12445 #line 12446 "configure"
12446 #include "confdefs.h"
12447 #include "${srcdir-.}/tests/summary.c"
12448 EOF
12449 if { (eval echo configure:12450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12450 then
12451   echo "configure OK";
12452 else
12453   echo "configure: failed program was:" >&5
12454   cat conftest.$ac_ext >&5
12455   rm -fr conftest*
12456   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
12457 fi
12458 rm -fr conftest*
12459 fi
12460
12461
12462 builddir=`pwd`
12463
12464
12465 trap '' 1 2 15
12466 cat > confcache <<\EOF
12467 # This file is a shell script that caches the results of configure
12468 # tests run on this system so they can be shared between configure
12469 # scripts and configure runs.  It is not useful on other systems.
12470 # If it contains results you don't want to keep, you may remove or edit it.
12471 #
12472 # By default, configure uses ./config.cache as the cache file,
12473 # creating it if it does not exist already.  You can give configure
12474 # the --cache-file=FILE option to use a different cache file; that is
12475 # what configure does when it calls configure scripts in
12476 # subdirectories, so they share the cache.
12477 # Giving --cache-file=/dev/null disables caching, for debugging configure.
12478 # config.status only pays attention to the cache file if you give it the
12479 # --recheck option to rerun configure.
12480 #
12481 EOF
12482 # The following way of writing the cache mishandles newlines in values,
12483 # but we know of no workaround that is simple, portable, and efficient.
12484 # So, don't put newlines in cache variables' values.
12485 # Ultrix sh set writes to stderr and can't be redirected directly,
12486 # and sets the high bit in the cache file unless we assign to the vars.
12487 (set) 2>&1 |
12488   case `(ac_space=' '; set | grep ac_space) 2>&1` in
12489   *ac_space=\ *)
12490     # `set' does not quote correctly, so add quotes (double-quote substitution
12491     # turns \\\\ into \\, and sed turns \\ into \).
12492     sed -n \
12493       -e "s/'/'\\\\''/g" \
12494       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
12495     ;;
12496   *)
12497     # `set' quotes correctly as required by POSIX, so do not add quotes.
12498     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
12499     ;;
12500   esac >> confcache
12501 if cmp -s $cache_file confcache; then
12502   :
12503 else
12504   if test -w $cache_file; then
12505     echo "updating cache $cache_file"
12506     cat confcache > $cache_file
12507   else
12508     echo "not updating unwritable cache $cache_file"
12509   fi
12510 fi
12511 rm -f confcache
12512
12513 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12514
12515 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12516 # Let make expand exec_prefix.
12517 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12518
12519 # Any assignment to VPATH causes Sun make to only execute
12520 # the first set of double-colon rules, so remove it if not needed.
12521 # If there is a colon in the path, we need to keep it.
12522 if test "x$srcdir" = x.; then
12523   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12524 fi
12525
12526 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12527
12528 DEFS=-DHAVE_CONFIG_H
12529
12530 # Without the "./", some shells look in PATH for config.status.
12531 : ${CONFIG_STATUS=./config.status}
12532
12533 echo creating $CONFIG_STATUS
12534 rm -f $CONFIG_STATUS
12535 cat > $CONFIG_STATUS <<EOF
12536 #! /bin/sh
12537 # Generated automatically by configure.
12538 # Run this file to recreate the current configuration.
12539 # This directory was configured as follows,
12540 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12541 #
12542 # $0 $ac_configure_args
12543 #
12544 # Compiler output produced by configure, useful for debugging
12545 # configure, is in ./config.log if it exists.
12546
12547 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12548 for ac_option
12549 do
12550   case "\$ac_option" in
12551   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12552     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12553     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12554   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12555     echo "$CONFIG_STATUS generated by autoconf version 2.13"
12556     exit 0 ;;
12557   -help | --help | --hel | --he | --h)
12558     echo "\$ac_cs_usage"; exit 0 ;;
12559   *) echo "\$ac_cs_usage"; exit 1 ;;
12560   esac
12561 done
12562
12563 ac_given_srcdir=$srcdir
12564 ac_given_INSTALL="$INSTALL"
12565
12566 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12567 EOF
12568 cat >> $CONFIG_STATUS <<EOF
12569
12570 # Protect against being on the right side of a sed subst in config.status.
12571 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12572  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12573 $ac_vpsub
12574 $extrasub
12575 s%@SHELL@%$SHELL%g
12576 s%@CFLAGS@%$CFLAGS%g
12577 s%@CPPFLAGS@%$CPPFLAGS%g
12578 s%@CXXFLAGS@%$CXXFLAGS%g
12579 s%@FFLAGS@%$FFLAGS%g
12580 s%@DEFS@%$DEFS%g
12581 s%@LDFLAGS@%$LDFLAGS%g
12582 s%@LIBS@%$LIBS%g
12583 s%@exec_prefix@%$exec_prefix%g
12584 s%@prefix@%$prefix%g
12585 s%@program_transform_name@%$program_transform_name%g
12586 s%@bindir@%$bindir%g
12587 s%@sbindir@%$sbindir%g
12588 s%@libexecdir@%$libexecdir%g
12589 s%@datadir@%$datadir%g
12590 s%@sysconfdir@%$sysconfdir%g
12591 s%@sharedstatedir@%$sharedstatedir%g
12592 s%@localstatedir@%$localstatedir%g
12593 s%@libdir@%$libdir%g
12594 s%@includedir@%$includedir%g
12595 s%@oldincludedir@%$oldincludedir%g
12596 s%@infodir@%$infodir%g
12597 s%@mandir@%$mandir%g
12598 s%@RUNPROG@%$RUNPROG%g
12599 s%@MPROGS@%$MPROGS%g
12600 s%@LDSHFLAGS@%$LDSHFLAGS%g
12601 s%@HOST_OS@%$HOST_OS%g
12602 s%@PAM_MOD@%$PAM_MOD%g
12603 s%@WRAP@%$WRAP%g
12604 s%@WRAP32@%$WRAP32%g
12605 s%@PICFLAG@%$PICFLAG%g
12606 s%@SHLIBEXT@%$SHLIBEXT%g
12607 s%@CC@%$CC%g
12608 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12609 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
12610 s%@INSTALL_DATA@%$INSTALL_DATA%g
12611 s%@AWK@%$AWK%g
12612 s%@host@%$host%g
12613 s%@host_alias@%$host_alias%g
12614 s%@host_cpu@%$host_cpu%g
12615 s%@host_vendor@%$host_vendor%g
12616 s%@host_os@%$host_os%g
12617 s%@build@%$build%g
12618 s%@build_alias@%$build_alias%g
12619 s%@build_cpu@%$build_cpu%g
12620 s%@build_vendor@%$build_vendor%g
12621 s%@build_os@%$build_os%g
12622 s%@RANLIB@%$RANLIB%g
12623 s%@LN_S@%$LN_S%g
12624 s%@LIBTOOL@%$LIBTOOL%g
12625 s%@LIBTOOL_DEPS@%$LIBTOOL_DEPS%g
12626 s%@BROKEN_CC@%$BROKEN_CC%g
12627 s%@target@%$target%g
12628 s%@target_alias@%$target_alias%g
12629 s%@target_cpu@%$target_cpu%g
12630 s%@target_vendor@%$target_vendor%g
12631 s%@target_os@%$target_os%g
12632 s%@CPP@%$CPP%g
12633 s%@LIBOBJS@%$LIBOBJS%g
12634 s%@TERMLIBS@%$TERMLIBS%g
12635 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
12636 s%@ROFF@%$ROFF%g
12637 s%@QUOTAOBJS@%$QUOTAOBJS%g
12638 s%@privatedir@%$privatedir%g
12639 s%@lockdir@%$lockdir%g
12640 s%@swatdir@%$swatdir%g
12641 s%@builddir@%$builddir%g
12642
12643 CEOF
12644 EOF
12645
12646 cat >> $CONFIG_STATUS <<\EOF
12647
12648 # Split the substitutions into bite-sized pieces for seds with
12649 # small command number limits, like on Digital OSF/1 and HP-UX.
12650 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12651 ac_file=1 # Number of current file.
12652 ac_beg=1 # First line for current file.
12653 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12654 ac_more_lines=:
12655 ac_sed_cmds=""
12656 while $ac_more_lines; do
12657   if test $ac_beg -gt 1; then
12658     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12659   else
12660     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12661   fi
12662   if test ! -s conftest.s$ac_file; then
12663     ac_more_lines=false
12664     rm -f conftest.s$ac_file
12665   else
12666     if test -z "$ac_sed_cmds"; then
12667       ac_sed_cmds="sed -f conftest.s$ac_file"
12668     else
12669       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12670     fi
12671     ac_file=`expr $ac_file + 1`
12672     ac_beg=$ac_end
12673     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12674   fi
12675 done
12676 if test -z "$ac_sed_cmds"; then
12677   ac_sed_cmds=cat
12678 fi
12679 EOF
12680
12681 cat >> $CONFIG_STATUS <<EOF
12682
12683 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
12684 EOF
12685 cat >> $CONFIG_STATUS <<\EOF
12686 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12687   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12688   case "$ac_file" in
12689   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12690        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12691   *) ac_file_in="${ac_file}.in" ;;
12692   esac
12693
12694   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12695
12696   # Remove last slash and all that follows it.  Not all systems have dirname.
12697   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12698   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12699     # The file is in a subdirectory.
12700     test ! -d "$ac_dir" && mkdir "$ac_dir"
12701     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12702     # A "../" for each directory in $ac_dir_suffix.
12703     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12704   else
12705     ac_dir_suffix= ac_dots=
12706   fi
12707
12708   case "$ac_given_srcdir" in
12709   .)  srcdir=.
12710       if test -z "$ac_dots"; then top_srcdir=.
12711       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12712   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12713   *) # Relative path.
12714     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12715     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12716   esac
12717
12718   case "$ac_given_INSTALL" in
12719   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12720   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12721   esac
12722
12723   echo creating "$ac_file"
12724   rm -f "$ac_file"
12725   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12726   case "$ac_file" in
12727   *Makefile*) ac_comsub="1i\\
12728 # $configure_input" ;;
12729   *) ac_comsub= ;;
12730   esac
12731
12732   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12733   sed -e "$ac_comsub
12734 s%@configure_input@%$configure_input%g
12735 s%@srcdir@%$srcdir%g
12736 s%@top_srcdir@%$top_srcdir%g
12737 s%@INSTALL@%$INSTALL%g
12738 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12739 fi; done
12740 rm -f conftest.s*
12741
12742 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12743 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12744 #
12745 # ac_d sets the value in "#define NAME VALUE" lines.
12746 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12747 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12748 ac_dC='\3'
12749 ac_dD='%g'
12750 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12751 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12752 ac_uB='\([      ]\)%\1#\2define\3'
12753 ac_uC=' '
12754 ac_uD='\4%g'
12755 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12756 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12757 ac_eB='$%\1#\2define\3'
12758 ac_eC=' '
12759 ac_eD='%g'
12760
12761 if test "${CONFIG_HEADERS+set}" != set; then
12762 EOF
12763 cat >> $CONFIG_STATUS <<EOF
12764   CONFIG_HEADERS="include/config.h"
12765 EOF
12766 cat >> $CONFIG_STATUS <<\EOF
12767 fi
12768 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12769   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12770   case "$ac_file" in
12771   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12772        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12773   *) ac_file_in="${ac_file}.in" ;;
12774   esac
12775
12776   echo creating $ac_file
12777
12778   rm -f conftest.frag conftest.in conftest.out
12779   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12780   cat $ac_file_inputs > conftest.in
12781
12782 EOF
12783
12784 # Transform confdefs.h into a sed script conftest.vals that substitutes
12785 # the proper values into config.h.in to produce config.h.  And first:
12786 # Protect against being on the right side of a sed subst in config.status.
12787 # Protect against being in an unquoted here document in config.status.
12788 rm -f conftest.vals
12789 cat > conftest.hdr <<\EOF
12790 s/[\\&%]/\\&/g
12791 s%[\\$`]%\\&%g
12792 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12793 s%ac_d%ac_u%gp
12794 s%ac_u%ac_e%gp
12795 EOF
12796 sed -n -f conftest.hdr confdefs.h > conftest.vals
12797 rm -f conftest.hdr
12798
12799 # This sed command replaces #undef with comments.  This is necessary, for
12800 # example, in the case of _POSIX_SOURCE, which is predefined and required
12801 # on some systems where configure will not decide to define it.
12802 cat >> conftest.vals <<\EOF
12803 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12804 EOF
12805
12806 # Break up conftest.vals because some shells have a limit on
12807 # the size of here documents, and old seds have small limits too.
12808
12809 rm -f conftest.tail
12810 while :
12811 do
12812   ac_lines=`grep -c . conftest.vals`
12813   # grep -c gives empty output for an empty file on some AIX systems.
12814   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12815   # Write a limited-size here document to conftest.frag.
12816   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12817   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12818   echo 'CEOF
12819   sed -f conftest.frag conftest.in > conftest.out
12820   rm -f conftest.in
12821   mv conftest.out conftest.in
12822 ' >> $CONFIG_STATUS
12823   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12824   rm -f conftest.vals
12825   mv conftest.tail conftest.vals
12826 done
12827 rm -f conftest.vals
12828
12829 cat >> $CONFIG_STATUS <<\EOF
12830   rm -f conftest.frag conftest.h
12831   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
12832   cat conftest.in >> conftest.h
12833   rm -f conftest.in
12834   if cmp -s $ac_file conftest.h 2>/dev/null; then
12835     echo "$ac_file is unchanged"
12836     rm -f conftest.h
12837   else
12838     # Remove last slash and all that follows it.  Not all systems have dirname.
12839       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12840       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12841       # The file is in a subdirectory.
12842       test ! -d "$ac_dir" && mkdir "$ac_dir"
12843     fi
12844     rm -f $ac_file
12845     mv conftest.h $ac_file
12846   fi
12847 fi; done
12848
12849 EOF
12850 cat >> $CONFIG_STATUS <<EOF
12851
12852 EOF
12853 cat >> $CONFIG_STATUS <<\EOF
12854
12855 exit 0
12856 EOF
12857 chmod +x $CONFIG_STATUS
12858 rm -fr confdefs* $ac_clean_files
12859 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
12860