33ceb1b97b08c9cb2fccbdc994d272c5e22873e6
[ira/wip.git] / source3 / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_default_prefix=/usr/local/samba
15 ac_help="$ac_help
16   --enable-debug          turn on debugging [default=no]"
17 ac_help="$ac_help
18   --enable-developer      turn on developer warnings and debugging [default=no]"
19 ac_help="$ac_help
20   --enable-dmalloc          enable heap debugging [default=no]"
21 ac_help="$ac_help
22   --with-readline[=DIR]   Look for readline include/libs in DIR (default=auto) "
23 ac_help="$ac_help
24   --with-libiconv=BASEDIR Use libiconv in BASEDIR/lib and BASEDIR/include (default=auto) "
25 ac_help="$ac_help
26   --with-smbwrapper       Include SMB wrapper support (default=no) "
27 ac_help="$ac_help
28   --with-afs              Include AFS clear-text auth support (default=no) "
29 ac_help="$ac_help
30   --with-dce-dfs          Include DCE/DFS clear-text auth support (default=no)"
31 ac_help="$ac_help
32   --with-krb5=base-dir    Locate Kerberos 5 support (default=/usr)"
33 ac_help="$ac_help
34   --with-automount        Include AUTOMOUNT support (default=no)"
35 ac_help="$ac_help
36   --with-smbmount         Include SMBMOUNT (Linux only) support (default=no)"
37 ac_help="$ac_help
38   --with-pam              Include PAM support (default=no)"
39 ac_help="$ac_help
40   --with-pam_smbpass      Build a PAM module to allow other applications to use our smbpasswd file (default=no)"
41 ac_help="$ac_help
42   --with-tdbsam           Include experimental TDB SAM support (default=no)"
43 ac_help="$ac_help
44   --with-ldapsam          Include experimental LDAP SAM support (default=no)"
45 ac_help="$ac_help
46   --with-nisplussam       Include NISPLUS SAM support (default=no)"
47 ac_help="$ac_help
48   --with-nisplus-home     Include NISPLUS_HOME support (default=no)"
49 ac_help="$ac_help
50   --with-ssl              Include SSL support (default=no)
51   --with-sslinc=DIR          Where the SSL includes are (defaults to /usr/local/ssl/include)
52   --with-ssllib=DIR          Where the SSL libraries are (defaults to /usr/local/ssl/lib)"
53 ac_help="$ac_help
54   --with-syslog           Include experimental SYSLOG support (default=no)"
55 ac_help="$ac_help
56   --with-profiling-data   Include gathering source code profile information (default=no)"
57 ac_help="$ac_help
58   --with-quotas           Include experimental disk-quota support (default=no)"
59 ac_help="$ac_help
60   --with-utmp             Include experimental utmp accounting (default=no)"
61 ac_help="$ac_help
62   --with-privatedir=DIR   Where to put smbpasswd ($ac_default_prefix/private)"
63 ac_help="$ac_help
64   --with-lockdir=DIR      Where to put lock files ($ac_default_prefix/var/locks)"
65 ac_help="$ac_help
66   --with-swatdir=DIR      Where to put SWAT files ($ac_default_prefix/swat)"
67 ac_help="$ac_help
68   --with-manpages-langs={en,ja,pl}  Choose man pages' language(s). (en)"
69 ac_help="$ac_help
70   --with-spinlocks        Use spin locks instead of fcntl locks (default=no) "
71 ac_help="$ac_help
72   --with-acl-support      Include ACL support (default=no)"
73 ac_help="$ac_help
74   --with-winbind          Build winbind (default, if supported by OS)"
75 ac_help="$ac_help
76   --with-included-popt    use bundled popt library, not from system"
77
78 # Initialize some variables set by options.
79 # The variables have the same names as the options, with
80 # dashes changed to underlines.
81 build=NONE
82 cache_file=./config.cache
83 exec_prefix=NONE
84 host=NONE
85 no_create=
86 nonopt=NONE
87 no_recursion=
88 prefix=NONE
89 program_prefix=NONE
90 program_suffix=NONE
91 program_transform_name=s,x,x,
92 silent=
93 site=
94 srcdir=
95 target=NONE
96 verbose=
97 x_includes=NONE
98 x_libraries=NONE
99 bindir='${exec_prefix}/bin'
100 sbindir='${exec_prefix}/sbin'
101 libexecdir='${exec_prefix}/libexec'
102 datadir='${prefix}/share'
103 sysconfdir='${prefix}/etc'
104 sharedstatedir='${prefix}/com'
105 localstatedir='${prefix}/var'
106 libdir='${exec_prefix}/lib'
107 includedir='${prefix}/include'
108 oldincludedir='/usr/include'
109 infodir='${prefix}/info'
110 mandir='${prefix}/man'
111
112 # Initialize some other variables.
113 subdirs=
114 MFLAGS= MAKEFLAGS=
115 SHELL=${CONFIG_SHELL-/bin/sh}
116 # Maximum number of lines to put in a shell here document.
117 ac_max_here_lines=12
118
119 ac_prev=
120 for ac_option
121 do
122
123   # If the previous option needs an argument, assign it.
124   if test -n "$ac_prev"; then
125     eval "$ac_prev=\$ac_option"
126     ac_prev=
127     continue
128   fi
129
130   case "$ac_option" in
131   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
132   *) ac_optarg= ;;
133   esac
134
135   # Accept the important Cygnus configure options, so we can diagnose typos.
136
137   case "$ac_option" in
138
139   -bindir | --bindir | --bindi | --bind | --bin | --bi)
140     ac_prev=bindir ;;
141   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
142     bindir="$ac_optarg" ;;
143
144   -build | --build | --buil | --bui | --bu)
145     ac_prev=build ;;
146   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
147     build="$ac_optarg" ;;
148
149   -cache-file | --cache-file | --cache-fil | --cache-fi \
150   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
151     ac_prev=cache_file ;;
152   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
153   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
154     cache_file="$ac_optarg" ;;
155
156   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
157     ac_prev=datadir ;;
158   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
159   | --da=*)
160     datadir="$ac_optarg" ;;
161
162   -disable-* | --disable-*)
163     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
164     # Reject names that are not valid shell variable names.
165     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
166       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
167     fi
168     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
169     eval "enable_${ac_feature}=no" ;;
170
171   -enable-* | --enable-*)
172     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
173     # Reject names that are not valid shell variable names.
174     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
175       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
176     fi
177     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
178     case "$ac_option" in
179       *=*) ;;
180       *) ac_optarg=yes ;;
181     esac
182     eval "enable_${ac_feature}='$ac_optarg'" ;;
183
184   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
185   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
186   | --exec | --exe | --ex)
187     ac_prev=exec_prefix ;;
188   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
189   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
190   | --exec=* | --exe=* | --ex=*)
191     exec_prefix="$ac_optarg" ;;
192
193   -gas | --gas | --ga | --g)
194     # Obsolete; use --with-gas.
195     with_gas=yes ;;
196
197   -help | --help | --hel | --he)
198     # Omit some internal or obsolete options to make the list less imposing.
199     # This message is too long to be a string in the A/UX 3.1 sh.
200     cat << EOF
201 Usage: configure [options] [host]
202 Options: [defaults in brackets after descriptions]
203 Configuration:
204   --cache-file=FILE       cache test results in FILE
205   --help                  print this message
206   --no-create             do not create output files
207   --quiet, --silent       do not print \`checking...' messages
208   --version               print the version of autoconf that created configure
209 Directory and file names:
210   --prefix=PREFIX         install architecture-independent files in PREFIX
211                           [$ac_default_prefix]
212   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
213                           [same as prefix]
214   --bindir=DIR            user executables in DIR [EPREFIX/bin]
215   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
216   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
217   --datadir=DIR           read-only architecture-independent data in DIR
218                           [PREFIX/share]
219   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
220   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
221                           [PREFIX/com]
222   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
223   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
224   --includedir=DIR        C header files in DIR [PREFIX/include]
225   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
226   --infodir=DIR           info documentation in DIR [PREFIX/info]
227   --mandir=DIR            man documentation in DIR [PREFIX/man]
228   --srcdir=DIR            find the sources in DIR [configure dir or ..]
229   --program-prefix=PREFIX prepend PREFIX to installed program names
230   --program-suffix=SUFFIX append SUFFIX to installed program names
231   --program-transform-name=PROGRAM
232                           run sed PROGRAM on installed program names
233 EOF
234     cat << EOF
235 Host type:
236   --build=BUILD           configure for building on BUILD [BUILD=HOST]
237   --host=HOST             configure for HOST [guessed]
238   --target=TARGET         configure for TARGET [TARGET=HOST]
239 Features and packages:
240   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
241   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
242   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
243   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
244   --x-includes=DIR        X include files are in DIR
245   --x-libraries=DIR       X library files are in DIR
246 EOF
247     if test -n "$ac_help"; then
248       echo "--enable and --with options recognized:$ac_help"
249     fi
250     exit 0 ;;
251
252   -host | --host | --hos | --ho)
253     ac_prev=host ;;
254   -host=* | --host=* | --hos=* | --ho=*)
255     host="$ac_optarg" ;;
256
257   -includedir | --includedir | --includedi | --included | --include \
258   | --includ | --inclu | --incl | --inc)
259     ac_prev=includedir ;;
260   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
261   | --includ=* | --inclu=* | --incl=* | --inc=*)
262     includedir="$ac_optarg" ;;
263
264   -infodir | --infodir | --infodi | --infod | --info | --inf)
265     ac_prev=infodir ;;
266   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
267     infodir="$ac_optarg" ;;
268
269   -libdir | --libdir | --libdi | --libd)
270     ac_prev=libdir ;;
271   -libdir=* | --libdir=* | --libdi=* | --libd=*)
272     libdir="$ac_optarg" ;;
273
274   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
275   | --libexe | --libex | --libe)
276     ac_prev=libexecdir ;;
277   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
278   | --libexe=* | --libex=* | --libe=*)
279     libexecdir="$ac_optarg" ;;
280
281   -localstatedir | --localstatedir | --localstatedi | --localstated \
282   | --localstate | --localstat | --localsta | --localst \
283   | --locals | --local | --loca | --loc | --lo)
284     ac_prev=localstatedir ;;
285   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
286   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
287   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
288     localstatedir="$ac_optarg" ;;
289
290   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
291     ac_prev=mandir ;;
292   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
293     mandir="$ac_optarg" ;;
294
295   -nfp | --nfp | --nf)
296     # Obsolete; use --without-fp.
297     with_fp=no ;;
298
299   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
300   | --no-cr | --no-c)
301     no_create=yes ;;
302
303   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
304   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
305     no_recursion=yes ;;
306
307   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
308   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
309   | --oldin | --oldi | --old | --ol | --o)
310     ac_prev=oldincludedir ;;
311   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
312   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
313   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
314     oldincludedir="$ac_optarg" ;;
315
316   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
317     ac_prev=prefix ;;
318   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
319     prefix="$ac_optarg" ;;
320
321   -program-prefix | --program-prefix | --program-prefi | --program-pref \
322   | --program-pre | --program-pr | --program-p)
323     ac_prev=program_prefix ;;
324   -program-prefix=* | --program-prefix=* | --program-prefi=* \
325   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
326     program_prefix="$ac_optarg" ;;
327
328   -program-suffix | --program-suffix | --program-suffi | --program-suff \
329   | --program-suf | --program-su | --program-s)
330     ac_prev=program_suffix ;;
331   -program-suffix=* | --program-suffix=* | --program-suffi=* \
332   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
333     program_suffix="$ac_optarg" ;;
334
335   -program-transform-name | --program-transform-name \
336   | --program-transform-nam | --program-transform-na \
337   | --program-transform-n | --program-transform- \
338   | --program-transform | --program-transfor \
339   | --program-transfo | --program-transf \
340   | --program-trans | --program-tran \
341   | --progr-tra | --program-tr | --program-t)
342     ac_prev=program_transform_name ;;
343   -program-transform-name=* | --program-transform-name=* \
344   | --program-transform-nam=* | --program-transform-na=* \
345   | --program-transform-n=* | --program-transform-=* \
346   | --program-transform=* | --program-transfor=* \
347   | --program-transfo=* | --program-transf=* \
348   | --program-trans=* | --program-tran=* \
349   | --progr-tra=* | --program-tr=* | --program-t=*)
350     program_transform_name="$ac_optarg" ;;
351
352   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
353   | -silent | --silent | --silen | --sile | --sil)
354     silent=yes ;;
355
356   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
357     ac_prev=sbindir ;;
358   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
359   | --sbi=* | --sb=*)
360     sbindir="$ac_optarg" ;;
361
362   -sharedstatedir | --sharedstatedir | --sharedstatedi \
363   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
364   | --sharedst | --shareds | --shared | --share | --shar \
365   | --sha | --sh)
366     ac_prev=sharedstatedir ;;
367   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
368   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
369   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
370   | --sha=* | --sh=*)
371     sharedstatedir="$ac_optarg" ;;
372
373   -site | --site | --sit)
374     ac_prev=site ;;
375   -site=* | --site=* | --sit=*)
376     site="$ac_optarg" ;;
377
378   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
379     ac_prev=srcdir ;;
380   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
381     srcdir="$ac_optarg" ;;
382
383   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
384   | --syscon | --sysco | --sysc | --sys | --sy)
385     ac_prev=sysconfdir ;;
386   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
387   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
388     sysconfdir="$ac_optarg" ;;
389
390   -target | --target | --targe | --targ | --tar | --ta | --t)
391     ac_prev=target ;;
392   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
393     target="$ac_optarg" ;;
394
395   -v | -verbose | --verbose | --verbos | --verbo | --verb)
396     verbose=yes ;;
397
398   -version | --version | --versio | --versi | --vers)
399     echo "configure generated by autoconf version 2.13"
400     exit 0 ;;
401
402   -with-* | --with-*)
403     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
404     # Reject names that are not valid shell variable names.
405     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
406       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
407     fi
408     ac_package=`echo $ac_package| sed 's/-/_/g'`
409     case "$ac_option" in
410       *=*) ;;
411       *) ac_optarg=yes ;;
412     esac
413     eval "with_${ac_package}='$ac_optarg'" ;;
414
415   -without-* | --without-*)
416     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
417     # Reject names that are not valid shell variable names.
418     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
419       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
420     fi
421     ac_package=`echo $ac_package| sed 's/-/_/g'`
422     eval "with_${ac_package}=no" ;;
423
424   --x)
425     # Obsolete; use --with-x.
426     with_x=yes ;;
427
428   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
429   | --x-incl | --x-inc | --x-in | --x-i)
430     ac_prev=x_includes ;;
431   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
432   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
433     x_includes="$ac_optarg" ;;
434
435   -x-libraries | --x-libraries | --x-librarie | --x-librari \
436   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
437     ac_prev=x_libraries ;;
438   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
439   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
440     x_libraries="$ac_optarg" ;;
441
442   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
443     ;;
444
445   *)
446     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
447       echo "configure: warning: $ac_option: invalid host type" 1>&2
448     fi
449     if test "x$nonopt" != xNONE; then
450       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
451     fi
452     nonopt="$ac_option"
453     ;;
454
455   esac
456 done
457
458 if test -n "$ac_prev"; then
459   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
460 fi
461
462 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
463
464 # File descriptor usage:
465 # 0 standard input
466 # 1 file creation
467 # 2 errors and warnings
468 # 3 some systems may open it to /dev/tty
469 # 4 used on the Kubota Titan
470 # 6 checking for... messages and results
471 # 5 compiler messages saved in config.log
472 if test "$silent" = yes; then
473   exec 6>/dev/null
474 else
475   exec 6>&1
476 fi
477 exec 5>./config.log
478
479 echo "\
480 This file contains any messages produced by compilers while
481 running configure, to aid debugging if configure makes a mistake.
482 " 1>&5
483
484 # Strip out --no-create and --no-recursion so they do not pile up.
485 # Also quote any args containing shell metacharacters.
486 ac_configure_args=
487 for ac_arg
488 do
489   case "$ac_arg" in
490   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
491   | --no-cr | --no-c) ;;
492   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
493   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
494   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
495   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
496   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
497   esac
498 done
499
500 # NLS nuisances.
501 # Only set these to C if already set.  These must not be set unconditionally
502 # because not all systems understand e.g. LANG=C (notably SCO).
503 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
504 # Non-C LC_CTYPE values break the ctype check.
505 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
506 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
507 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
508 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
509
510 # confdefs.h avoids OS command line length limits that DEFS can exceed.
511 rm -rf conftest* confdefs.h
512 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
513 echo > confdefs.h
514
515 # A filename unique to this package, relative to the directory that
516 # configure is in, which we can look for to find out if srcdir is correct.
517 ac_unique_file=include/includes.h
518
519 # Find the source files, if location was not specified.
520 if test -z "$srcdir"; then
521   ac_srcdir_defaulted=yes
522   # Try the directory containing this script, then its parent.
523   ac_prog=$0
524   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
525   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
526   srcdir=$ac_confdir
527   if test ! -r $srcdir/$ac_unique_file; then
528     srcdir=..
529   fi
530 else
531   ac_srcdir_defaulted=no
532 fi
533 if test ! -r $srcdir/$ac_unique_file; then
534   if test "$ac_srcdir_defaulted" = yes; then
535     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
536   else
537     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
538   fi
539 fi
540 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
541
542 # Prefer explicitly selected file to automatically selected ones.
543 if test -z "$CONFIG_SITE"; then
544   if test "x$prefix" != xNONE; then
545     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
546   else
547     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
548   fi
549 fi
550 for ac_site_file in $CONFIG_SITE; do
551   if test -r "$ac_site_file"; then
552     echo "loading site script $ac_site_file"
553     . "$ac_site_file"
554   fi
555 done
556
557 if test -r "$cache_file"; then
558   echo "loading cache $cache_file"
559   . $cache_file
560 else
561   echo "creating cache $cache_file"
562   > $cache_file
563 fi
564
565 ac_ext=c
566 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
567 ac_cpp='$CPP $CPPFLAGS'
568 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
569 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
570 cross_compiling=$ac_cv_prog_cc_cross
571
572 ac_exeext=
573 ac_objext=o
574 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
575   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
576   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
577     ac_n= ac_c='
578 ' ac_t='        '
579   else
580     ac_n=-n ac_c= ac_t=
581   fi
582 else
583   ac_n= ac_c='\c' ac_t=
584 fi
585
586
587
588 # we want to be compatible with older versions of Samba
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606 # compile with optimisation and without debugging by default
607 CFLAGS="-O ${CFLAGS}"
608
609 # Check whether --enable-debug or --disable-debug was given.
610 if test "${enable_debug+set}" = set; then
611   enableval="$enable_debug"
612   if eval "test x$enable_debug = xyes"; then
613         CFLAGS="${CFLAGS} -g"
614     fi
615 fi
616
617
618 # Check whether --enable-developer or --disable-developer was given.
619 if test "${enable_developer+set}" = set; then
620   enableval="$enable_developer"
621   if eval "test x$enable_developer = xyes"; then
622         CFLAGS="${CFLAGS} -g -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -DDEBUG_PASSWORD -DDEVELOPER"
623     fi
624 fi
625
626
627 # Check whether --enable-dmalloc or --disable-dmalloc was given.
628 if test "${enable_dmalloc+set}" = set; then
629   enableval="$enable_dmalloc"
630   :
631 fi
632
633
634 if test "x$enable_dmalloc" = xyes
635 then
636         cat >> confdefs.h <<\EOF
637 #define ENABLE_DMALLOC 1
638 EOF
639
640         LIBS="$LIBS -ldmalloc"  
641 fi
642
643 # Extract the first word of "gcc", so it can be a program name with args.
644 set dummy gcc; ac_word=$2
645 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
646 echo "configure:647: checking for $ac_word" >&5
647 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
648   echo $ac_n "(cached) $ac_c" 1>&6
649 else
650   if test -n "$CC"; then
651   ac_cv_prog_CC="$CC" # Let the user override the test.
652 else
653   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
654   ac_dummy="$PATH"
655   for ac_dir in $ac_dummy; do
656     test -z "$ac_dir" && ac_dir=.
657     if test -f $ac_dir/$ac_word; then
658       ac_cv_prog_CC="gcc"
659       break
660     fi
661   done
662   IFS="$ac_save_ifs"
663 fi
664 fi
665 CC="$ac_cv_prog_CC"
666 if test -n "$CC"; then
667   echo "$ac_t""$CC" 1>&6
668 else
669   echo "$ac_t""no" 1>&6
670 fi
671
672 if test -z "$CC"; then
673   # Extract the first word of "cc", so it can be a program name with args.
674 set dummy cc; ac_word=$2
675 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
676 echo "configure:677: checking for $ac_word" >&5
677 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
678   echo $ac_n "(cached) $ac_c" 1>&6
679 else
680   if test -n "$CC"; then
681   ac_cv_prog_CC="$CC" # Let the user override the test.
682 else
683   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
684   ac_prog_rejected=no
685   ac_dummy="$PATH"
686   for ac_dir in $ac_dummy; do
687     test -z "$ac_dir" && ac_dir=.
688     if test -f $ac_dir/$ac_word; then
689       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
690         ac_prog_rejected=yes
691         continue
692       fi
693       ac_cv_prog_CC="cc"
694       break
695     fi
696   done
697   IFS="$ac_save_ifs"
698 if test $ac_prog_rejected = yes; then
699   # We found a bogon in the path, so make sure we never use it.
700   set dummy $ac_cv_prog_CC
701   shift
702   if test $# -gt 0; then
703     # We chose a different compiler from the bogus one.
704     # However, it has the same basename, so the bogon will be chosen
705     # first if we set CC to just the basename; use the full file name.
706     shift
707     set dummy "$ac_dir/$ac_word" "$@"
708     shift
709     ac_cv_prog_CC="$@"
710   fi
711 fi
712 fi
713 fi
714 CC="$ac_cv_prog_CC"
715 if test -n "$CC"; then
716   echo "$ac_t""$CC" 1>&6
717 else
718   echo "$ac_t""no" 1>&6
719 fi
720
721   if test -z "$CC"; then
722     case "`uname -s`" in
723     *win32* | *WIN32*)
724       # Extract the first word of "cl", so it can be a program name with args.
725 set dummy cl; ac_word=$2
726 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
727 echo "configure:728: checking for $ac_word" >&5
728 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
729   echo $ac_n "(cached) $ac_c" 1>&6
730 else
731   if test -n "$CC"; then
732   ac_cv_prog_CC="$CC" # Let the user override the test.
733 else
734   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
735   ac_dummy="$PATH"
736   for ac_dir in $ac_dummy; do
737     test -z "$ac_dir" && ac_dir=.
738     if test -f $ac_dir/$ac_word; then
739       ac_cv_prog_CC="cl"
740       break
741     fi
742   done
743   IFS="$ac_save_ifs"
744 fi
745 fi
746 CC="$ac_cv_prog_CC"
747 if test -n "$CC"; then
748   echo "$ac_t""$CC" 1>&6
749 else
750   echo "$ac_t""no" 1>&6
751 fi
752  ;;
753     esac
754   fi
755   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
756 fi
757
758 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
759 echo "configure:760: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
760
761 ac_ext=c
762 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
763 ac_cpp='$CPP $CPPFLAGS'
764 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
765 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
766 cross_compiling=$ac_cv_prog_cc_cross
767
768 cat > conftest.$ac_ext << EOF
769
770 #line 771 "configure"
771 #include "confdefs.h"
772
773 main(){return(0);}
774 EOF
775 if { (eval echo configure:776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
776   ac_cv_prog_cc_works=yes
777   # If we can't run a trivial program, we are probably using a cross compiler.
778   if (./conftest; exit) 2>/dev/null; then
779     ac_cv_prog_cc_cross=no
780   else
781     ac_cv_prog_cc_cross=yes
782   fi
783 else
784   echo "configure: failed program was:" >&5
785   cat conftest.$ac_ext >&5
786   ac_cv_prog_cc_works=no
787 fi
788 rm -fr conftest*
789 ac_ext=c
790 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
791 ac_cpp='$CPP $CPPFLAGS'
792 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
793 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
794 cross_compiling=$ac_cv_prog_cc_cross
795
796 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
797 if test $ac_cv_prog_cc_works = no; then
798   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
799 fi
800 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
801 echo "configure:802: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
802 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
803 cross_compiling=$ac_cv_prog_cc_cross
804
805 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
806 echo "configure:807: checking whether we are using GNU C" >&5
807 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
808   echo $ac_n "(cached) $ac_c" 1>&6
809 else
810   cat > conftest.c <<EOF
811 #ifdef __GNUC__
812   yes;
813 #endif
814 EOF
815 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
816   ac_cv_prog_gcc=yes
817 else
818   ac_cv_prog_gcc=no
819 fi
820 fi
821
822 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
823
824 if test $ac_cv_prog_gcc = yes; then
825   GCC=yes
826 else
827   GCC=
828 fi
829
830 ac_test_CFLAGS="${CFLAGS+set}"
831 ac_save_CFLAGS="$CFLAGS"
832 CFLAGS=
833 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
834 echo "configure:835: checking whether ${CC-cc} accepts -g" >&5
835 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
836   echo $ac_n "(cached) $ac_c" 1>&6
837 else
838   echo 'void f(){}' > conftest.c
839 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
840   ac_cv_prog_cc_g=yes
841 else
842   ac_cv_prog_cc_g=no
843 fi
844 rm -f conftest*
845
846 fi
847
848 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
849 if test "$ac_test_CFLAGS" = set; then
850   CFLAGS="$ac_save_CFLAGS"
851 elif test $ac_cv_prog_cc_g = yes; then
852   if test "$GCC" = yes; then
853     CFLAGS="-g -O2"
854   else
855     CFLAGS="-g"
856   fi
857 else
858   if test "$GCC" = yes; then
859     CFLAGS="-O2"
860   else
861     CFLAGS=
862   fi
863 fi
864
865 ac_aux_dir=
866 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
867   if test -f $ac_dir/install-sh; then
868     ac_aux_dir=$ac_dir
869     ac_install_sh="$ac_aux_dir/install-sh -c"
870     break
871   elif test -f $ac_dir/install.sh; then
872     ac_aux_dir=$ac_dir
873     ac_install_sh="$ac_aux_dir/install.sh -c"
874     break
875   fi
876 done
877 if test -z "$ac_aux_dir"; then
878   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
879 fi
880 ac_config_guess=$ac_aux_dir/config.guess
881 ac_config_sub=$ac_aux_dir/config.sub
882 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
883
884 # Find a good install program.  We prefer a C program (faster),
885 # so one script is as good as another.  But avoid the broken or
886 # incompatible versions:
887 # SysV /etc/install, /usr/sbin/install
888 # SunOS /usr/etc/install
889 # IRIX /sbin/install
890 # AIX /bin/install
891 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
892 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
893 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
894 # ./install, which can be erroneously created by make from ./install.sh.
895 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
896 echo "configure:897: checking for a BSD compatible install" >&5
897 if test -z "$INSTALL"; then
898 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
899   echo $ac_n "(cached) $ac_c" 1>&6
900 else
901     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
902   for ac_dir in $PATH; do
903     # Account for people who put trailing slashes in PATH elements.
904     case "$ac_dir/" in
905     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
906     *)
907       # OSF1 and SCO ODT 3.0 have their own names for install.
908       # Don't use installbsd from OSF since it installs stuff as root
909       # by default.
910       for ac_prog in ginstall scoinst install; do
911         if test -f $ac_dir/$ac_prog; then
912           if test $ac_prog = install &&
913             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
914             # AIX install.  It has an incompatible calling convention.
915             :
916           else
917             ac_cv_path_install="$ac_dir/$ac_prog -c"
918             break 2
919           fi
920         fi
921       done
922       ;;
923     esac
924   done
925   IFS="$ac_save_IFS"
926
927 fi
928   if test "${ac_cv_path_install+set}" = set; then
929     INSTALL="$ac_cv_path_install"
930   else
931     # As a last resort, use the slow shell script.  We don't cache a
932     # path for INSTALL within a source directory, because that will
933     # break other packages using the cache if that directory is
934     # removed, or if the path is relative.
935     INSTALL="$ac_install_sh"
936   fi
937 fi
938 echo "$ac_t""$INSTALL" 1>&6
939
940 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
941 # It thinks the first close brace ends the variable substitution.
942 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
943
944 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
945
946 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
947
948 for ac_prog in gawk mawk nawk awk
949 do
950 # Extract the first word of "$ac_prog", so it can be a program name with args.
951 set dummy $ac_prog; ac_word=$2
952 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
953 echo "configure:954: checking for $ac_word" >&5
954 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
955   echo $ac_n "(cached) $ac_c" 1>&6
956 else
957   if test -n "$AWK"; then
958   ac_cv_prog_AWK="$AWK" # Let the user override the test.
959 else
960   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
961   ac_dummy="$PATH"
962   for ac_dir in $ac_dummy; do
963     test -z "$ac_dir" && ac_dir=.
964     if test -f $ac_dir/$ac_word; then
965       ac_cv_prog_AWK="$ac_prog"
966       break
967     fi
968   done
969   IFS="$ac_save_ifs"
970 fi
971 fi
972 AWK="$ac_cv_prog_AWK"
973 if test -n "$AWK"; then
974   echo "$ac_t""$AWK" 1>&6
975 else
976   echo "$ac_t""no" 1>&6
977 fi
978
979 test -n "$AWK" && break
980 done
981
982
983 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
984 echo "configure:985: checking for POSIXized ISC" >&5
985 if test -d /etc/conf/kconfig.d &&
986   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
987 then
988   echo "$ac_t""yes" 1>&6
989   ISC=yes # If later tests want to check for ISC.
990   cat >> confdefs.h <<\EOF
991 #define _POSIX_SOURCE 1
992 EOF
993
994   if test "$GCC" = yes; then
995     CC="$CC -posix"
996   else
997     CC="$CC -Xp"
998   fi
999 else
1000   echo "$ac_t""no" 1>&6
1001   ISC=
1002 fi
1003
1004
1005 if test "x$CC" != xcc; then
1006   echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6
1007 echo "configure:1008: checking whether $CC and cc understand -c and -o together" >&5
1008 else
1009   echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6
1010 echo "configure:1011: checking whether cc understands -c and -o together" >&5
1011 fi
1012 set dummy $CC; ac_cc="`echo $2 |
1013                        sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
1014 if eval "test \"`echo '$''{'ac_cv_prog_cc_${ac_cc}_c_o'+set}'`\" = set"; then
1015   echo $ac_n "(cached) $ac_c" 1>&6
1016 else
1017   echo 'foo(){}' > conftest.c
1018 # Make sure it works both with $CC and with simple cc.
1019 # We do the test twice because some compilers refuse to overwrite an
1020 # existing .o file with -o, though they will create one.
1021 ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5'
1022 if { (eval echo configure:1023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1023    test -f conftest.o && { (eval echo configure:1024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1024 then
1025   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
1026   if test "x$CC" != xcc; then
1027     # Test first that cc exists at all.
1028     if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
1029       ac_try='cc -c conftest.c -o conftest.o 1>&5'
1030       if { (eval echo configure:1031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } &&
1031          test -f conftest.o && { (eval echo configure:1032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; };
1032       then
1033         # cc works too.
1034         :
1035       else
1036         # cc exists but doesn't like -o.
1037         eval ac_cv_prog_cc_${ac_cc}_c_o=no
1038       fi
1039     fi
1040   fi
1041 else
1042   eval ac_cv_prog_cc_${ac_cc}_c_o=no
1043 fi
1044 rm -f conftest*
1045
1046 fi
1047 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
1048   echo "$ac_t""yes" 1>&6
1049 else
1050   echo "$ac_t""no" 1>&6
1051   cat >> confdefs.h <<\EOF
1052 #define NO_MINUS_C_MINUS_O 1
1053 EOF
1054
1055 fi
1056
1057 if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = no"; then
1058       BROKEN_CC=
1059 else
1060       BROKEN_CC=#
1061 fi
1062
1063
1064 echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6
1065 echo "configure:1066: checking that the C compiler understands volatile" >&5
1066 if eval "test \"`echo '$''{'samba_cv_volatile'+set}'`\" = set"; then
1067   echo $ac_n "(cached) $ac_c" 1>&6
1068 else
1069   
1070     cat > conftest.$ac_ext <<EOF
1071 #line 1072 "configure"
1072 #include "confdefs.h"
1073 #include <sys/types.h>
1074 int main() {
1075 volatile int i = 0
1076 ; return 0; }
1077 EOF
1078 if { (eval echo configure:1079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1079   rm -rf conftest*
1080   samba_cv_volatile=yes
1081 else
1082   echo "configure: failed program was:" >&5
1083   cat conftest.$ac_ext >&5
1084   rm -rf conftest*
1085   samba_cv_volatile=no
1086 fi
1087 rm -f conftest*
1088 fi
1089
1090 echo "$ac_t""$samba_cv_volatile" 1>&6
1091 if test x"$samba_cv_volatile" = x"yes"; then
1092    cat >> confdefs.h <<\EOF
1093 #define HAVE_VOLATILE 1
1094 EOF
1095
1096 fi
1097
1098
1099
1100 # Do some error checking and defaulting for the host and target type.
1101 # The inputs are:
1102 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1103 #
1104 # The rules are:
1105 # 1. You are not allowed to specify --host, --target, and nonopt at the
1106 #    same time.
1107 # 2. Host defaults to nonopt.
1108 # 3. If nonopt is not specified, then host defaults to the current host,
1109 #    as determined by config.guess.
1110 # 4. Target and build default to nonopt.
1111 # 5. If nonopt is not specified, then target and build default to host.
1112
1113 # The aliases save the names the user supplied, while $host etc.
1114 # will get canonicalized.
1115 case $host---$target---$nonopt in
1116 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1117 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1118 esac
1119
1120
1121 # Make sure we can run config.sub.
1122 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1123 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1124 fi
1125
1126 echo $ac_n "checking host system type""... $ac_c" 1>&6
1127 echo "configure:1128: checking host system type" >&5
1128
1129 host_alias=$host
1130 case "$host_alias" in
1131 NONE)
1132   case $nonopt in
1133   NONE)
1134     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1135     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1136     fi ;;
1137   *) host_alias=$nonopt ;;
1138   esac ;;
1139 esac
1140
1141 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1142 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1143 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1144 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1145 echo "$ac_t""$host" 1>&6
1146
1147 echo $ac_n "checking target system type""... $ac_c" 1>&6
1148 echo "configure:1149: checking target system type" >&5
1149
1150 target_alias=$target
1151 case "$target_alias" in
1152 NONE)
1153   case $nonopt in
1154   NONE) target_alias=$host_alias ;;
1155   *) target_alias=$nonopt ;;
1156   esac ;;
1157 esac
1158
1159 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1160 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1161 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1162 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1163 echo "$ac_t""$target" 1>&6
1164
1165 echo $ac_n "checking build system type""... $ac_c" 1>&6
1166 echo "configure:1167: checking build system type" >&5
1167
1168 build_alias=$build
1169 case "$build_alias" in
1170 NONE)
1171   case $nonopt in
1172   NONE) build_alias=$host_alias ;;
1173   *) build_alias=$nonopt ;;
1174   esac ;;
1175 esac
1176
1177 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1178 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1179 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1180 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1181 echo "$ac_t""$build" 1>&6
1182
1183 test "$host_alias" != "$target_alias" &&
1184   test "$program_prefix$program_suffix$program_transform_name" = \
1185     NONENONEs,x,x, &&
1186   program_prefix=${target_alias}-
1187
1188
1189   case "$host_os" in
1190         *irix6*) cat >> confdefs.h <<\EOF
1191 #include <standards.h>
1192 EOF
1193
1194         ;;
1195 esac
1196
1197
1198     
1199     echo $ac_n "checking config.cache system type""... $ac_c" 1>&6
1200 echo "configure:1201: checking config.cache system type" >&5
1201     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
1202          test x"$ac_cv_host_system_type" != x"$host"; } ||
1203        { test x"${ac_cv_build_system_type+set}" = x"set" &&
1204          test x"$ac_cv_build_system_type" != x"$build"; } ||
1205        { test x"${ac_cv_target_system_type+set}" = x"set" &&
1206          test x"$ac_cv_target_system_type" != x"$target"; }; then
1207         echo "$ac_t""different" 1>&6
1208         { echo "configure: error: "you must remove config.cache and restart configure"" 1>&2; exit 1; }
1209     else
1210         echo "$ac_t""same" 1>&6
1211     fi
1212     ac_cv_host_system_type="$host"
1213     ac_cv_build_system_type="$build"
1214     ac_cv_target_system_type="$target"
1215
1216
1217 #
1218 # Config CPPFLAG settings for strange OS's that must be set
1219 # before other tests.
1220 #
1221 case "$host_os" in
1222 # Try to work out if this is the native HPUX compiler that uses the -Ae flag.
1223     *hpux*)
1224       echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6
1225 echo "configure:1226: checking whether ${CC-cc} accepts -Ae" >&5
1226 if eval "test \"`echo '$''{'ac_cv_prog_cc_Ae'+set}'`\" = set"; then
1227   echo $ac_n "(cached) $ac_c" 1>&6
1228 else
1229   echo 'void f(){}' > conftest.c
1230 if test -z "`${CC-cc} -Ae -c conftest.c 2>&1`"; then
1231   ac_cv_prog_cc_Ae=yes
1232 else
1233   ac_cv_prog_cc_Ae=no
1234 fi
1235 rm -f conftest*
1236
1237 fi
1238
1239 echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6
1240       # mmap on HPUX is completely broken...
1241       cat >> confdefs.h <<\EOF
1242 #define MMAP_BLACKLIST 1
1243 EOF
1244
1245       if test $ac_cv_prog_cc_Ae = yes; then
1246         CPPFLAGS="$CPPFLAGS -Ae"
1247       fi
1248 #
1249 # Defines needed for HPUX support.
1250 # HPUX has bigcrypt but (sometimes?) doesn't use it for
1251 # password hashing - hence the USE_BOTH_CRYPT_CALLS define.
1252 #
1253       case `uname -r` in
1254                         *9*|*10*)
1255                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE"
1256                                 cat >> confdefs.h <<\EOF
1257 #define USE_BOTH_CRYPT_CALLS 1
1258 EOF
1259
1260                                 ;;
1261                         *11*)
1262                                 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE -D_LARGEFILE64_SOURCE"
1263                                 cat >> confdefs.h <<\EOF
1264 #define USE_BOTH_CRYPT_CALLS 1
1265 EOF
1266
1267                                 ;;
1268       esac
1269       ;;
1270
1271 #
1272 # CRAY Unicos has broken const handling
1273        *unicos*)
1274           echo "$ac_t""disabling const" 1>&6
1275           CPPFLAGS="$CPPFLAGS -Dconst="
1276           ;;
1277         
1278 #
1279 # AIX4.x doesn't even admit to having large
1280 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
1281 #
1282     *aix4*)
1283           echo "$ac_t""enabling large file support" 1>&6
1284       CPPFLAGS="$CPPFLAGS -D_LARGE_FILES"
1285       ;;    
1286 #
1287 # Defines needed for Solaris 2.6/2.7 aka 7.0 to make it admit
1288 # to the existance of large files..
1289 # Note that -D_LARGEFILE64_SOURCE is different from the Sun
1290 # recommendations on large file support, however it makes the
1291 # compile work using gcc 2.7 and 2.8, whereas using the Sun
1292 # recommendation makes the compile fail on gcc2.7. JRA.
1293 #
1294         *solaris*)
1295                 case `uname -r` in
1296                         5.0*|5.1*|5.2*|5.3*|5.5*)
1297                                 echo "$ac_t""no large file support" 1>&6
1298                                 ;;
1299                         5.*)
1300                         echo "$ac_t""enabling large file support" 1>&6
1301                         if test "$ac_cv_prog_gcc" = yes; then
1302                                 ${CC-cc} -v >conftest.c 2>&1
1303                                 ac_cv_gcc_compiler_version_number=`grep 'gcc version' conftest.c`
1304                                 rm -fr conftest.c
1305                                 case "$ac_cv_gcc_compiler_version_number" in
1306                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
1307                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
1308                                                 ;;
1309                                         *)
1310                                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1311                                                 ;;
1312                                 esac
1313                         else
1314                                 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
1315                         fi
1316                         ;;
1317                 esac
1318                 ;;
1319 #
1320 # Tests needed for SINIX large file support.
1321 #
1322     *sysv4*)
1323       if test $host = mips-sni-sysv4 ; then
1324         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1325 echo "configure:1326: checking for LFS support" >&5
1326         old_CPPFLAGS="$CPPFLAGS"
1327         CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1328         if test "$cross_compiling" = yes; then
1329   SINIX_LFS_SUPPORT=cross
1330 else
1331   cat > conftest.$ac_ext <<EOF
1332 #line 1333 "configure"
1333 #include "confdefs.h"
1334
1335 #include <unistd.h>
1336 main () {
1337 #if _LFS64_LARGEFILE == 1
1338 exit(0);
1339 #else
1340 exit(1);
1341 #endif
1342 }
1343 EOF
1344 if { (eval echo configure:1345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1345 then
1346   SINIX_LFS_SUPPORT=yes
1347 else
1348   echo "configure: failed program was:" >&5
1349   cat conftest.$ac_ext >&5
1350   rm -fr conftest*
1351   SINIX_LFS_SUPPORT=no
1352 fi
1353 rm -fr conftest*
1354 fi
1355
1356         CPPFLAGS="$old_CPPFLAGS"
1357         if test x$SINIX_LFS_SUPPORT = xyes ; then
1358           CPPFLAGS="-D_LARGEFILE64_SOURCE $CPPFLAGS"
1359           CFLAGS="`getconf LFS64_CFLAGS` $CFLAGS"
1360           LDFLAGS="`getconf LFS64_LDFLAGS` $LDFLAGS"
1361           LIBS="`getconf LFS64_LIBS` $LIBS"
1362         fi
1363       echo "$ac_t""$SINIX_LFS_SUPPORT" 1>&6
1364       fi
1365     ;;
1366
1367 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
1368 #
1369     *linux*)
1370         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1371 echo "configure:1372: checking for LFS support" >&5
1372         old_CPPFLAGS="$CPPFLAGS"
1373         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1374        if test "$cross_compiling" = yes; then
1375   LINUX_LFS_SUPPORT=cross
1376 else
1377   cat > conftest.$ac_ext <<EOF
1378 #line 1379 "configure"
1379 #include "confdefs.h"
1380
1381 #include <unistd.h>
1382 #include <sys/utsname.h>
1383 main() {
1384 #if _LFS64_LARGEFILE == 1
1385        struct utsname uts;
1386        char *release;
1387        int major, minor;
1388
1389        /* Ensure this is glibc 2.2 or higher */
1390 #if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1391        int libc_major = __GLIBC__;
1392        int libc_minor = __GLIBC_MINOR__;
1393
1394        if (libc_major < 2)
1395               exit(1);
1396        if (libc_minor < 2)
1397               exit(1);
1398 #endif
1399
1400        /* Ensure this is kernel 2.4 or higher */
1401
1402        uname(&uts);
1403        release = uts.release;
1404        major = atoi(strsep(&release, "."));
1405        minor = atoi(strsep(&release, "."));
1406
1407        if (major > 2 || (major == 2 && minor > 3))
1408                exit(0);
1409        exit(1);
1410 #else
1411        exit(1);
1412 #endif
1413 }
1414
1415 EOF
1416 if { (eval echo configure:1417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1417 then
1418   LINUX_LFS_SUPPORT=yes
1419 else
1420   echo "configure: failed program was:" >&5
1421   cat conftest.$ac_ext >&5
1422   rm -fr conftest*
1423   LINUX_LFS_SUPPORT=no
1424 fi
1425 rm -fr conftest*
1426 fi
1427
1428         CPPFLAGS="$old_CPPFLAGS"
1429         if test x$LINUX_LFS_SUPPORT = xyes ; then
1430           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
1431         fi
1432        echo "$ac_t""$LINUX_LFS_SUPPORT" 1>&6
1433                 ;;
1434
1435     *hurd*)
1436         echo $ac_n "checking for LFS support""... $ac_c" 1>&6
1437 echo "configure:1438: checking for LFS support" >&5
1438         old_CPPFLAGS="$CPPFLAGS"
1439         CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1440         if test "$cross_compiling" = yes; then
1441   GLIBC_LFS_SUPPORT=cross
1442 else
1443   cat > conftest.$ac_ext <<EOF
1444 #line 1445 "configure"
1445 #include "confdefs.h"
1446
1447 #include <unistd.h>
1448 main () {
1449 #if _LFS64_LARGEFILE == 1
1450 exit(0);
1451 #else
1452 exit(1);
1453 #endif
1454 }
1455 EOF
1456 if { (eval echo configure:1457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1457 then
1458   GLIBC_LFS_SUPPORT=yes
1459 else
1460   echo "configure: failed program was:" >&5
1461   cat conftest.$ac_ext >&5
1462   rm -fr conftest*
1463   GLIBC_LFS_SUPPORT=no
1464 fi
1465 rm -fr conftest*
1466 fi
1467
1468         CPPFLAGS="$old_CPPFLAGS"
1469         if test x$GLIBC_LFS_SUPPORT = xyes ; then
1470           CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS"
1471         fi
1472       echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6
1473     ;;
1474
1475 esac
1476
1477 echo $ac_n "checking for inline""... $ac_c" 1>&6
1478 echo "configure:1479: checking for inline" >&5
1479 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1480   echo $ac_n "(cached) $ac_c" 1>&6
1481 else
1482   ac_cv_c_inline=no
1483 for ac_kw in inline __inline__ __inline; do
1484   cat > conftest.$ac_ext <<EOF
1485 #line 1486 "configure"
1486 #include "confdefs.h"
1487
1488 int main() {
1489 } $ac_kw foo() {
1490 ; return 0; }
1491 EOF
1492 if { (eval echo configure:1493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1493   rm -rf conftest*
1494   ac_cv_c_inline=$ac_kw; break
1495 else
1496   echo "configure: failed program was:" >&5
1497   cat conftest.$ac_ext >&5
1498 fi
1499 rm -f conftest*
1500 done
1501
1502 fi
1503
1504 echo "$ac_t""$ac_cv_c_inline" 1>&6
1505 case "$ac_cv_c_inline" in
1506   inline | yes) ;;
1507   no) cat >> confdefs.h <<\EOF
1508 #define inline 
1509 EOF
1510  ;;
1511   *)  cat >> confdefs.h <<EOF
1512 #define inline $ac_cv_c_inline
1513 EOF
1514  ;;
1515 esac
1516
1517 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1518 echo "configure:1519: checking how to run the C preprocessor" >&5
1519 # On Suns, sometimes $CPP names a directory.
1520 if test -n "$CPP" && test -d "$CPP"; then
1521   CPP=
1522 fi
1523 if test -z "$CPP"; then
1524 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1525   echo $ac_n "(cached) $ac_c" 1>&6
1526 else
1527     # This must be in double quotes, not single quotes, because CPP may get
1528   # substituted into the Makefile and "${CC-cc}" will confuse make.
1529   CPP="${CC-cc} -E"
1530   # On the NeXT, cc -E runs the code through the compiler's parser,
1531   # not just through cpp.
1532   cat > conftest.$ac_ext <<EOF
1533 #line 1534 "configure"
1534 #include "confdefs.h"
1535 #include <assert.h>
1536 Syntax Error
1537 EOF
1538 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1539 { (eval echo configure:1540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1540 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1541 if test -z "$ac_err"; then
1542   :
1543 else
1544   echo "$ac_err" >&5
1545   echo "configure: failed program was:" >&5
1546   cat conftest.$ac_ext >&5
1547   rm -rf conftest*
1548   CPP="${CC-cc} -E -traditional-cpp"
1549   cat > conftest.$ac_ext <<EOF
1550 #line 1551 "configure"
1551 #include "confdefs.h"
1552 #include <assert.h>
1553 Syntax Error
1554 EOF
1555 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1556 { (eval echo configure:1557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1557 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1558 if test -z "$ac_err"; then
1559   :
1560 else
1561   echo "$ac_err" >&5
1562   echo "configure: failed program was:" >&5
1563   cat conftest.$ac_ext >&5
1564   rm -rf conftest*
1565   CPP="${CC-cc} -nologo -E"
1566   cat > conftest.$ac_ext <<EOF
1567 #line 1568 "configure"
1568 #include "confdefs.h"
1569 #include <assert.h>
1570 Syntax Error
1571 EOF
1572 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1573 { (eval echo configure:1574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1574 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1575 if test -z "$ac_err"; then
1576   :
1577 else
1578   echo "$ac_err" >&5
1579   echo "configure: failed program was:" >&5
1580   cat conftest.$ac_ext >&5
1581   rm -rf conftest*
1582   CPP=/lib/cpp
1583 fi
1584 rm -f conftest*
1585 fi
1586 rm -f conftest*
1587 fi
1588 rm -f conftest*
1589   ac_cv_prog_CPP="$CPP"
1590 fi
1591   CPP="$ac_cv_prog_CPP"
1592 else
1593   ac_cv_prog_CPP="$CPP"
1594 fi
1595 echo "$ac_t""$CPP" 1>&6
1596
1597 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1598 echo "configure:1599: checking for ANSI C header files" >&5
1599 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1600   echo $ac_n "(cached) $ac_c" 1>&6
1601 else
1602   cat > conftest.$ac_ext <<EOF
1603 #line 1604 "configure"
1604 #include "confdefs.h"
1605 #include <stdlib.h>
1606 #include <stdarg.h>
1607 #include <string.h>
1608 #include <float.h>
1609 EOF
1610 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1611 { (eval echo configure:1612: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1612 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1613 if test -z "$ac_err"; then
1614   rm -rf conftest*
1615   ac_cv_header_stdc=yes
1616 else
1617   echo "$ac_err" >&5
1618   echo "configure: failed program was:" >&5
1619   cat conftest.$ac_ext >&5
1620   rm -rf conftest*
1621   ac_cv_header_stdc=no
1622 fi
1623 rm -f conftest*
1624
1625 if test $ac_cv_header_stdc = yes; then
1626   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1627 cat > conftest.$ac_ext <<EOF
1628 #line 1629 "configure"
1629 #include "confdefs.h"
1630 #include <string.h>
1631 EOF
1632 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1633   egrep "memchr" >/dev/null 2>&1; then
1634   :
1635 else
1636   rm -rf conftest*
1637   ac_cv_header_stdc=no
1638 fi
1639 rm -f conftest*
1640
1641 fi
1642
1643 if test $ac_cv_header_stdc = yes; then
1644   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1645 cat > conftest.$ac_ext <<EOF
1646 #line 1647 "configure"
1647 #include "confdefs.h"
1648 #include <stdlib.h>
1649 EOF
1650 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1651   egrep "free" >/dev/null 2>&1; then
1652   :
1653 else
1654   rm -rf conftest*
1655   ac_cv_header_stdc=no
1656 fi
1657 rm -f conftest*
1658
1659 fi
1660
1661 if test $ac_cv_header_stdc = yes; then
1662   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1663 if test "$cross_compiling" = yes; then
1664   :
1665 else
1666   cat > conftest.$ac_ext <<EOF
1667 #line 1668 "configure"
1668 #include "confdefs.h"
1669 #include <ctype.h>
1670 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1671 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1672 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1673 int main () { int i; for (i = 0; i < 256; i++)
1674 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1675 exit (0); }
1676
1677 EOF
1678 if { (eval echo configure:1679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1679 then
1680   :
1681 else
1682   echo "configure: failed program was:" >&5
1683   cat conftest.$ac_ext >&5
1684   rm -fr conftest*
1685   ac_cv_header_stdc=no
1686 fi
1687 rm -fr conftest*
1688 fi
1689
1690 fi
1691 fi
1692
1693 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1694 if test $ac_cv_header_stdc = yes; then
1695   cat >> confdefs.h <<\EOF
1696 #define STDC_HEADERS 1
1697 EOF
1698
1699 fi
1700
1701 ac_header_dirent=no
1702 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1703 do
1704 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1705 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1706 echo "configure:1707: checking for $ac_hdr that defines DIR" >&5
1707 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1708   echo $ac_n "(cached) $ac_c" 1>&6
1709 else
1710   cat > conftest.$ac_ext <<EOF
1711 #line 1712 "configure"
1712 #include "confdefs.h"
1713 #include <sys/types.h>
1714 #include <$ac_hdr>
1715 int main() {
1716 DIR *dirp = 0;
1717 ; return 0; }
1718 EOF
1719 if { (eval echo configure:1720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1720   rm -rf conftest*
1721   eval "ac_cv_header_dirent_$ac_safe=yes"
1722 else
1723   echo "configure: failed program was:" >&5
1724   cat conftest.$ac_ext >&5
1725   rm -rf conftest*
1726   eval "ac_cv_header_dirent_$ac_safe=no"
1727 fi
1728 rm -f conftest*
1729 fi
1730 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1731   echo "$ac_t""yes" 1>&6
1732     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1733   cat >> confdefs.h <<EOF
1734 #define $ac_tr_hdr 1
1735 EOF
1736  ac_header_dirent=$ac_hdr; break
1737 else
1738   echo "$ac_t""no" 1>&6
1739 fi
1740 done
1741 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1742 if test $ac_header_dirent = dirent.h; then
1743 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1744 echo "configure:1745: checking for opendir in -ldir" >&5
1745 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1746 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1747   echo $ac_n "(cached) $ac_c" 1>&6
1748 else
1749   ac_save_LIBS="$LIBS"
1750 LIBS="-ldir  $LIBS"
1751 cat > conftest.$ac_ext <<EOF
1752 #line 1753 "configure"
1753 #include "confdefs.h"
1754 /* Override any gcc2 internal prototype to avoid an error.  */
1755 /* We use char because int might match the return type of a gcc2
1756     builtin and then its argument prototype would still apply.  */
1757 char opendir();
1758
1759 int main() {
1760 opendir()
1761 ; return 0; }
1762 EOF
1763 if { (eval echo configure:1764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1764   rm -rf conftest*
1765   eval "ac_cv_lib_$ac_lib_var=yes"
1766 else
1767   echo "configure: failed program was:" >&5
1768   cat conftest.$ac_ext >&5
1769   rm -rf conftest*
1770   eval "ac_cv_lib_$ac_lib_var=no"
1771 fi
1772 rm -f conftest*
1773 LIBS="$ac_save_LIBS"
1774
1775 fi
1776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1777   echo "$ac_t""yes" 1>&6
1778   LIBS="$LIBS -ldir"
1779 else
1780   echo "$ac_t""no" 1>&6
1781 fi
1782
1783 else
1784 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1785 echo "configure:1786: checking for opendir in -lx" >&5
1786 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1787 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1788   echo $ac_n "(cached) $ac_c" 1>&6
1789 else
1790   ac_save_LIBS="$LIBS"
1791 LIBS="-lx  $LIBS"
1792 cat > conftest.$ac_ext <<EOF
1793 #line 1794 "configure"
1794 #include "confdefs.h"
1795 /* Override any gcc2 internal prototype to avoid an error.  */
1796 /* We use char because int might match the return type of a gcc2
1797     builtin and then its argument prototype would still apply.  */
1798 char opendir();
1799
1800 int main() {
1801 opendir()
1802 ; return 0; }
1803 EOF
1804 if { (eval echo configure:1805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1805   rm -rf conftest*
1806   eval "ac_cv_lib_$ac_lib_var=yes"
1807 else
1808   echo "configure: failed program was:" >&5
1809   cat conftest.$ac_ext >&5
1810   rm -rf conftest*
1811   eval "ac_cv_lib_$ac_lib_var=no"
1812 fi
1813 rm -f conftest*
1814 LIBS="$ac_save_LIBS"
1815
1816 fi
1817 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1818   echo "$ac_t""yes" 1>&6
1819   LIBS="$LIBS -lx"
1820 else
1821   echo "$ac_t""no" 1>&6
1822 fi
1823
1824 fi
1825
1826 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
1827 echo "configure:1828: checking whether time.h and sys/time.h may both be included" >&5
1828 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
1829   echo $ac_n "(cached) $ac_c" 1>&6
1830 else
1831   cat > conftest.$ac_ext <<EOF
1832 #line 1833 "configure"
1833 #include "confdefs.h"
1834 #include <sys/types.h>
1835 #include <sys/time.h>
1836 #include <time.h>
1837 int main() {
1838 struct tm *tp;
1839 ; return 0; }
1840 EOF
1841 if { (eval echo configure:1842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1842   rm -rf conftest*
1843   ac_cv_header_time=yes
1844 else
1845   echo "configure: failed program was:" >&5
1846   cat conftest.$ac_ext >&5
1847   rm -rf conftest*
1848   ac_cv_header_time=no
1849 fi
1850 rm -f conftest*
1851 fi
1852
1853 echo "$ac_t""$ac_cv_header_time" 1>&6
1854 if test $ac_cv_header_time = yes; then
1855   cat >> confdefs.h <<\EOF
1856 #define TIME_WITH_SYS_TIME 1
1857 EOF
1858
1859 fi
1860
1861 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1862 echo "configure:1863: checking for sys/wait.h that is POSIX.1 compatible" >&5
1863 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1864   echo $ac_n "(cached) $ac_c" 1>&6
1865 else
1866   cat > conftest.$ac_ext <<EOF
1867 #line 1868 "configure"
1868 #include "confdefs.h"
1869 #include <sys/types.h>
1870 #include <sys/wait.h>
1871 #ifndef WEXITSTATUS
1872 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1873 #endif
1874 #ifndef WIFEXITED
1875 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1876 #endif
1877 int main() {
1878 int s;
1879 wait (&s);
1880 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1881 ; return 0; }
1882 EOF
1883 if { (eval echo configure:1884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1884   rm -rf conftest*
1885   ac_cv_header_sys_wait_h=yes
1886 else
1887   echo "configure: failed program was:" >&5
1888   cat conftest.$ac_ext >&5
1889   rm -rf conftest*
1890   ac_cv_header_sys_wait_h=no
1891 fi
1892 rm -f conftest*
1893 fi
1894
1895 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1896 if test $ac_cv_header_sys_wait_h = yes; then
1897   cat >> confdefs.h <<\EOF
1898 #define HAVE_SYS_WAIT_H 1
1899 EOF
1900
1901 fi
1902
1903 for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd.h
1904 do
1905 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1906 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1907 echo "configure:1908: checking for $ac_hdr" >&5
1908 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1909   echo $ac_n "(cached) $ac_c" 1>&6
1910 else
1911   cat > conftest.$ac_ext <<EOF
1912 #line 1913 "configure"
1913 #include "confdefs.h"
1914 #include <$ac_hdr>
1915 EOF
1916 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1917 { (eval echo configure:1918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1918 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1919 if test -z "$ac_err"; then
1920   rm -rf conftest*
1921   eval "ac_cv_header_$ac_safe=yes"
1922 else
1923   echo "$ac_err" >&5
1924   echo "configure: failed program was:" >&5
1925   cat conftest.$ac_ext >&5
1926   rm -rf conftest*
1927   eval "ac_cv_header_$ac_safe=no"
1928 fi
1929 rm -f conftest*
1930 fi
1931 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1932   echo "$ac_t""yes" 1>&6
1933     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1934   cat >> confdefs.h <<EOF
1935 #define $ac_tr_hdr 1
1936 EOF
1937  
1938 else
1939   echo "$ac_t""no" 1>&6
1940 fi
1941 done
1942
1943 for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h
1944 do
1945 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1946 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1947 echo "configure:1948: checking for $ac_hdr" >&5
1948 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1949   echo $ac_n "(cached) $ac_c" 1>&6
1950 else
1951   cat > conftest.$ac_ext <<EOF
1952 #line 1953 "configure"
1953 #include "confdefs.h"
1954 #include <$ac_hdr>
1955 EOF
1956 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1957 { (eval echo configure:1958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1958 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1959 if test -z "$ac_err"; then
1960   rm -rf conftest*
1961   eval "ac_cv_header_$ac_safe=yes"
1962 else
1963   echo "$ac_err" >&5
1964   echo "configure: failed program was:" >&5
1965   cat conftest.$ac_ext >&5
1966   rm -rf conftest*
1967   eval "ac_cv_header_$ac_safe=no"
1968 fi
1969 rm -f conftest*
1970 fi
1971 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1972   echo "$ac_t""yes" 1>&6
1973     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1974   cat >> confdefs.h <<EOF
1975 #define $ac_tr_hdr 1
1976 EOF
1977  
1978 else
1979   echo "$ac_t""no" 1>&6
1980 fi
1981 done
1982
1983 for ac_hdr in compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h
1984 do
1985 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1986 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1987 echo "configure:1988: checking for $ac_hdr" >&5
1988 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1989   echo $ac_n "(cached) $ac_c" 1>&6
1990 else
1991   cat > conftest.$ac_ext <<EOF
1992 #line 1993 "configure"
1993 #include "confdefs.h"
1994 #include <$ac_hdr>
1995 EOF
1996 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1997 { (eval echo configure:1998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1998 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1999 if test -z "$ac_err"; then
2000   rm -rf conftest*
2001   eval "ac_cv_header_$ac_safe=yes"
2002 else
2003   echo "$ac_err" >&5
2004   echo "configure: failed program was:" >&5
2005   cat conftest.$ac_ext >&5
2006   rm -rf conftest*
2007   eval "ac_cv_header_$ac_safe=no"
2008 fi
2009 rm -f conftest*
2010 fi
2011 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2012   echo "$ac_t""yes" 1>&6
2013     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2014   cat >> confdefs.h <<EOF
2015 #define $ac_tr_hdr 1
2016 EOF
2017  
2018 else
2019   echo "$ac_t""no" 1>&6
2020 fi
2021 done
2022
2023 for ac_hdr in sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h
2024 do
2025 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2026 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2027 echo "configure:2028: checking for $ac_hdr" >&5
2028 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2029   echo $ac_n "(cached) $ac_c" 1>&6
2030 else
2031   cat > conftest.$ac_ext <<EOF
2032 #line 2033 "configure"
2033 #include "confdefs.h"
2034 #include <$ac_hdr>
2035 EOF
2036 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2037 { (eval echo configure:2038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2038 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2039 if test -z "$ac_err"; then
2040   rm -rf conftest*
2041   eval "ac_cv_header_$ac_safe=yes"
2042 else
2043   echo "$ac_err" >&5
2044   echo "configure: failed program was:" >&5
2045   cat conftest.$ac_ext >&5
2046   rm -rf conftest*
2047   eval "ac_cv_header_$ac_safe=no"
2048 fi
2049 rm -f conftest*
2050 fi
2051 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2052   echo "$ac_t""yes" 1>&6
2053     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2054   cat >> confdefs.h <<EOF
2055 #define $ac_tr_hdr 1
2056 EOF
2057  
2058 else
2059   echo "$ac_t""no" 1>&6
2060 fi
2061 done
2062
2063 for ac_hdr in sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h
2064 do
2065 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2066 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2067 echo "configure:2068: checking for $ac_hdr" >&5
2068 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2069   echo $ac_n "(cached) $ac_c" 1>&6
2070 else
2071   cat > conftest.$ac_ext <<EOF
2072 #line 2073 "configure"
2073 #include "confdefs.h"
2074 #include <$ac_hdr>
2075 EOF
2076 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2077 { (eval echo configure:2078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2078 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2079 if test -z "$ac_err"; then
2080   rm -rf conftest*
2081   eval "ac_cv_header_$ac_safe=yes"
2082 else
2083   echo "$ac_err" >&5
2084   echo "configure: failed program was:" >&5
2085   cat conftest.$ac_ext >&5
2086   rm -rf conftest*
2087   eval "ac_cv_header_$ac_safe=no"
2088 fi
2089 rm -f conftest*
2090 fi
2091 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2092   echo "$ac_t""yes" 1>&6
2093     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2094   cat >> confdefs.h <<EOF
2095 #define $ac_tr_hdr 1
2096 EOF
2097  
2098 else
2099   echo "$ac_t""no" 1>&6
2100 fi
2101 done
2102
2103 for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h
2104 do
2105 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2106 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2107 echo "configure:2108: checking for $ac_hdr" >&5
2108 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2109   echo $ac_n "(cached) $ac_c" 1>&6
2110 else
2111   cat > conftest.$ac_ext <<EOF
2112 #line 2113 "configure"
2113 #include "confdefs.h"
2114 #include <$ac_hdr>
2115 EOF
2116 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2117 { (eval echo configure:2118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2118 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2119 if test -z "$ac_err"; then
2120   rm -rf conftest*
2121   eval "ac_cv_header_$ac_safe=yes"
2122 else
2123   echo "$ac_err" >&5
2124   echo "configure: failed program was:" >&5
2125   cat conftest.$ac_ext >&5
2126   rm -rf conftest*
2127   eval "ac_cv_header_$ac_safe=no"
2128 fi
2129 rm -f conftest*
2130 fi
2131 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2132   echo "$ac_t""yes" 1>&6
2133     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2134   cat >> confdefs.h <<EOF
2135 #define $ac_tr_hdr 1
2136 EOF
2137  
2138 else
2139   echo "$ac_t""no" 1>&6
2140 fi
2141 done
2142
2143 for ac_hdr in sys/termio.h sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h
2144 do
2145 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2146 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2147 echo "configure:2148: checking for $ac_hdr" >&5
2148 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2149   echo $ac_n "(cached) $ac_c" 1>&6
2150 else
2151   cat > conftest.$ac_ext <<EOF
2152 #line 2153 "configure"
2153 #include "confdefs.h"
2154 #include <$ac_hdr>
2155 EOF
2156 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2157 { (eval echo configure:2158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2158 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2159 if test -z "$ac_err"; then
2160   rm -rf conftest*
2161   eval "ac_cv_header_$ac_safe=yes"
2162 else
2163   echo "$ac_err" >&5
2164   echo "configure: failed program was:" >&5
2165   cat conftest.$ac_ext >&5
2166   rm -rf conftest*
2167   eval "ac_cv_header_$ac_safe=no"
2168 fi
2169 rm -f conftest*
2170 fi
2171 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2172   echo "$ac_t""yes" 1>&6
2173     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2174   cat >> confdefs.h <<EOF
2175 #define $ac_tr_hdr 1
2176 EOF
2177  
2178 else
2179   echo "$ac_t""no" 1>&6
2180 fi
2181 done
2182
2183 for ac_hdr in security/pam_modules.h security/_pam_macros.h ldap.h lber.h
2184 do
2185 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2186 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2187 echo "configure:2188: checking for $ac_hdr" >&5
2188 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2189   echo $ac_n "(cached) $ac_c" 1>&6
2190 else
2191   cat > conftest.$ac_ext <<EOF
2192 #line 2193 "configure"
2193 #include "confdefs.h"
2194 #include <$ac_hdr>
2195 EOF
2196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2197 { (eval echo configure:2198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2199 if test -z "$ac_err"; then
2200   rm -rf conftest*
2201   eval "ac_cv_header_$ac_safe=yes"
2202 else
2203   echo "$ac_err" >&5
2204   echo "configure: failed program was:" >&5
2205   cat conftest.$ac_ext >&5
2206   rm -rf conftest*
2207   eval "ac_cv_header_$ac_safe=no"
2208 fi
2209 rm -f conftest*
2210 fi
2211 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2212   echo "$ac_t""yes" 1>&6
2213     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2214   cat >> confdefs.h <<EOF
2215 #define $ac_tr_hdr 1
2216 EOF
2217  
2218 else
2219   echo "$ac_t""no" 1>&6
2220 fi
2221 done
2222
2223
2224 #
2225 # HPUX has a bug in that including shadow.h causes a re-definition of MAXINT.
2226 # This causes configure to fail to detect it. Check for shadow separately on HPUX.
2227 #
2228 case "$host_os" in
2229     *hpux*)
2230                 cat > conftest.$ac_ext <<EOF
2231 #line 2232 "configure"
2232 #include "confdefs.h"
2233 #include <shadow.h>
2234 int main() {
2235 struct spwd testme
2236 ; return 0; }
2237 EOF
2238 if { (eval echo configure:2239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2239   rm -rf conftest*
2240   ac_cv_header_shadow_h=yes
2241 else
2242   echo "configure: failed program was:" >&5
2243   cat conftest.$ac_ext >&5
2244   rm -rf conftest*
2245   ac_cv_header_shadow_h=no
2246 fi
2247 rm -f conftest*
2248                 if test x"$ac_cv_header_shadow_h" = x"yes"; then
2249                    cat >> confdefs.h <<\EOF
2250 #define HAVE_SHADOW_H 1
2251 EOF
2252
2253                 fi
2254         ;;
2255 esac
2256 for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h
2257 do
2258 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2259 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2260 echo "configure:2261: checking for $ac_hdr" >&5
2261 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2262   echo $ac_n "(cached) $ac_c" 1>&6
2263 else
2264   cat > conftest.$ac_ext <<EOF
2265 #line 2266 "configure"
2266 #include "confdefs.h"
2267 #include <$ac_hdr>
2268 EOF
2269 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2270 { (eval echo configure:2271: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2271 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2272 if test -z "$ac_err"; then
2273   rm -rf conftest*
2274   eval "ac_cv_header_$ac_safe=yes"
2275 else
2276   echo "$ac_err" >&5
2277   echo "configure: failed program was:" >&5
2278   cat conftest.$ac_ext >&5
2279   rm -rf conftest*
2280   eval "ac_cv_header_$ac_safe=no"
2281 fi
2282 rm -f conftest*
2283 fi
2284 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2285   echo "$ac_t""yes" 1>&6
2286     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2287   cat >> confdefs.h <<EOF
2288 #define $ac_tr_hdr 1
2289 EOF
2290  
2291 else
2292   echo "$ac_t""no" 1>&6
2293 fi
2294 done
2295
2296 for ac_hdr in nss.h nss_common.h ns_api.h sys/security.h security/pam_appl.h security/pam_modules.h
2297 do
2298 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2299 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2300 echo "configure:2301: checking for $ac_hdr" >&5
2301 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2302   echo $ac_n "(cached) $ac_c" 1>&6
2303 else
2304   cat > conftest.$ac_ext <<EOF
2305 #line 2306 "configure"
2306 #include "confdefs.h"
2307 #include <$ac_hdr>
2308 EOF
2309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2310 { (eval echo configure:2311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2312 if test -z "$ac_err"; then
2313   rm -rf conftest*
2314   eval "ac_cv_header_$ac_safe=yes"
2315 else
2316   echo "$ac_err" >&5
2317   echo "configure: failed program was:" >&5
2318   cat conftest.$ac_ext >&5
2319   rm -rf conftest*
2320   eval "ac_cv_header_$ac_safe=no"
2321 fi
2322 rm -f conftest*
2323 fi
2324 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2325   echo "$ac_t""yes" 1>&6
2326     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2327   cat >> confdefs.h <<EOF
2328 #define $ac_tr_hdr 1
2329 EOF
2330  
2331 else
2332   echo "$ac_t""no" 1>&6
2333 fi
2334 done
2335
2336 for ac_hdr in stropts.h poll.h
2337 do
2338 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2339 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2340 echo "configure:2341: checking for $ac_hdr" >&5
2341 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2342   echo $ac_n "(cached) $ac_c" 1>&6
2343 else
2344   cat > conftest.$ac_ext <<EOF
2345 #line 2346 "configure"
2346 #include "confdefs.h"
2347 #include <$ac_hdr>
2348 EOF
2349 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2350 { (eval echo configure:2351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2351 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2352 if test -z "$ac_err"; then
2353   rm -rf conftest*
2354   eval "ac_cv_header_$ac_safe=yes"
2355 else
2356   echo "$ac_err" >&5
2357   echo "configure: failed program was:" >&5
2358   cat conftest.$ac_ext >&5
2359   rm -rf conftest*
2360   eval "ac_cv_header_$ac_safe=no"
2361 fi
2362 rm -f conftest*
2363 fi
2364 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2365   echo "$ac_t""yes" 1>&6
2366     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2367   cat >> confdefs.h <<EOF
2368 #define $ac_tr_hdr 1
2369 EOF
2370  
2371 else
2372   echo "$ac_t""no" 1>&6
2373 fi
2374 done
2375
2376 for ac_hdr in sys/capability.h syscall.h sys/syscall.h
2377 do
2378 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2379 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2380 echo "configure:2381: checking for $ac_hdr" >&5
2381 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2382   echo $ac_n "(cached) $ac_c" 1>&6
2383 else
2384   cat > conftest.$ac_ext <<EOF
2385 #line 2386 "configure"
2386 #include "confdefs.h"
2387 #include <$ac_hdr>
2388 EOF
2389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2390 { (eval echo configure:2391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2392 if test -z "$ac_err"; then
2393   rm -rf conftest*
2394   eval "ac_cv_header_$ac_safe=yes"
2395 else
2396   echo "$ac_err" >&5
2397   echo "configure: failed program was:" >&5
2398   cat conftest.$ac_ext >&5
2399   rm -rf conftest*
2400   eval "ac_cv_header_$ac_safe=no"
2401 fi
2402 rm -f conftest*
2403 fi
2404 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2405   echo "$ac_t""yes" 1>&6
2406     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2407   cat >> confdefs.h <<EOF
2408 #define $ac_tr_hdr 1
2409 EOF
2410  
2411 else
2412   echo "$ac_t""no" 1>&6
2413 fi
2414 done
2415
2416 for ac_hdr in sys/acl.h sys/cdefs.h glob.h
2417 do
2418 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2419 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2420 echo "configure:2421: checking for $ac_hdr" >&5
2421 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2422   echo $ac_n "(cached) $ac_c" 1>&6
2423 else
2424   cat > conftest.$ac_ext <<EOF
2425 #line 2426 "configure"
2426 #include "confdefs.h"
2427 #include <$ac_hdr>
2428 EOF
2429 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2430 { (eval echo configure:2431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2431 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2432 if test -z "$ac_err"; then
2433   rm -rf conftest*
2434   eval "ac_cv_header_$ac_safe=yes"
2435 else
2436   echo "$ac_err" >&5
2437   echo "configure: failed program was:" >&5
2438   cat conftest.$ac_ext >&5
2439   rm -rf conftest*
2440   eval "ac_cv_header_$ac_safe=no"
2441 fi
2442 rm -f conftest*
2443 fi
2444 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2445   echo "$ac_t""yes" 1>&6
2446     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2447   cat >> confdefs.h <<EOF
2448 #define $ac_tr_hdr 1
2449 EOF
2450  
2451 else
2452   echo "$ac_t""no" 1>&6
2453 fi
2454 done
2455
2456
2457 # For experimental utmp support (lastlog on some BSD-like systems)
2458 for ac_hdr in utmp.h utmpx.h lastlog.h
2459 do
2460 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2461 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2462 echo "configure:2463: checking for $ac_hdr" >&5
2463 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2464   echo $ac_n "(cached) $ac_c" 1>&6
2465 else
2466   cat > conftest.$ac_ext <<EOF
2467 #line 2468 "configure"
2468 #include "confdefs.h"
2469 #include <$ac_hdr>
2470 EOF
2471 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2472 { (eval echo configure:2473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2473 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2474 if test -z "$ac_err"; then
2475   rm -rf conftest*
2476   eval "ac_cv_header_$ac_safe=yes"
2477 else
2478   echo "$ac_err" >&5
2479   echo "configure: failed program was:" >&5
2480   cat conftest.$ac_ext >&5
2481   rm -rf conftest*
2482   eval "ac_cv_header_$ac_safe=no"
2483 fi
2484 rm -f conftest*
2485 fi
2486 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2487   echo "$ac_t""yes" 1>&6
2488     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2489   cat >> confdefs.h <<EOF
2490 #define $ac_tr_hdr 1
2491 EOF
2492  
2493 else
2494   echo "$ac_t""no" 1>&6
2495 fi
2496 done
2497
2498  
2499 # For quotas on Veritas VxFS filesystems
2500 for ac_hdr in sys/fs/vx_quota.h
2501 do
2502 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2503 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2504 echo "configure:2505: checking for $ac_hdr" >&5
2505 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2506   echo $ac_n "(cached) $ac_c" 1>&6
2507 else
2508   cat > conftest.$ac_ext <<EOF
2509 #line 2510 "configure"
2510 #include "confdefs.h"
2511 #include <$ac_hdr>
2512 EOF
2513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2514 { (eval echo configure:2515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2516 if test -z "$ac_err"; then
2517   rm -rf conftest*
2518   eval "ac_cv_header_$ac_safe=yes"
2519 else
2520   echo "$ac_err" >&5
2521   echo "configure: failed program was:" >&5
2522   cat conftest.$ac_ext >&5
2523   rm -rf conftest*
2524   eval "ac_cv_header_$ac_safe=no"
2525 fi
2526 rm -f conftest*
2527 fi
2528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2529   echo "$ac_t""yes" 1>&6
2530     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2531   cat >> confdefs.h <<EOF
2532 #define $ac_tr_hdr 1
2533 EOF
2534  
2535 else
2536   echo "$ac_t""no" 1>&6
2537 fi
2538 done
2539
2540
2541 # For quotas on Linux XFS filesystems
2542 for ac_hdr in linux/xqm.h
2543 do
2544 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2545 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2546 echo "configure:2547: checking for $ac_hdr" >&5
2547 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2548   echo $ac_n "(cached) $ac_c" 1>&6
2549 else
2550   cat > conftest.$ac_ext <<EOF
2551 #line 2552 "configure"
2552 #include "confdefs.h"
2553 #include <$ac_hdr>
2554 EOF
2555 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2556 { (eval echo configure:2557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2557 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2558 if test -z "$ac_err"; then
2559   rm -rf conftest*
2560   eval "ac_cv_header_$ac_safe=yes"
2561 else
2562   echo "$ac_err" >&5
2563   echo "configure: failed program was:" >&5
2564   cat conftest.$ac_ext >&5
2565   rm -rf conftest*
2566   eval "ac_cv_header_$ac_safe=no"
2567 fi
2568 rm -f conftest*
2569 fi
2570 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2571   echo "$ac_t""yes" 1>&6
2572     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2573   cat >> confdefs.h <<EOF
2574 #define $ac_tr_hdr 1
2575 EOF
2576  
2577 else
2578   echo "$ac_t""no" 1>&6
2579 fi
2580 done
2581
2582
2583 echo $ac_n "checking size of int""... $ac_c" 1>&6
2584 echo "configure:2585: checking size of int" >&5
2585 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2586   echo $ac_n "(cached) $ac_c" 1>&6
2587 else
2588   if test "$cross_compiling" = yes; then
2589   ac_cv_sizeof_int=cross
2590 else
2591   cat > conftest.$ac_ext <<EOF
2592 #line 2593 "configure"
2593 #include "confdefs.h"
2594 #include <stdio.h>
2595 main()
2596 {
2597   FILE *f=fopen("conftestval", "w");
2598   if (!f) exit(1);
2599   fprintf(f, "%d\n", sizeof(int));
2600   exit(0);
2601 }
2602 EOF
2603 if { (eval echo configure:2604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2604 then
2605   ac_cv_sizeof_int=`cat conftestval`
2606 else
2607   echo "configure: failed program was:" >&5
2608   cat conftest.$ac_ext >&5
2609   rm -fr conftest*
2610   ac_cv_sizeof_int=0
2611 fi
2612 rm -fr conftest*
2613 fi
2614
2615 fi
2616 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2617 cat >> confdefs.h <<EOF
2618 #define SIZEOF_INT $ac_cv_sizeof_int
2619 EOF
2620
2621
2622 echo $ac_n "checking size of long""... $ac_c" 1>&6
2623 echo "configure:2624: checking size of long" >&5
2624 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2625   echo $ac_n "(cached) $ac_c" 1>&6
2626 else
2627   if test "$cross_compiling" = yes; then
2628   ac_cv_sizeof_long=cross
2629 else
2630   cat > conftest.$ac_ext <<EOF
2631 #line 2632 "configure"
2632 #include "confdefs.h"
2633 #include <stdio.h>
2634 main()
2635 {
2636   FILE *f=fopen("conftestval", "w");
2637   if (!f) exit(1);
2638   fprintf(f, "%d\n", sizeof(long));
2639   exit(0);
2640 }
2641 EOF
2642 if { (eval echo configure:2643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2643 then
2644   ac_cv_sizeof_long=`cat conftestval`
2645 else
2646   echo "configure: failed program was:" >&5
2647   cat conftest.$ac_ext >&5
2648   rm -fr conftest*
2649   ac_cv_sizeof_long=0
2650 fi
2651 rm -fr conftest*
2652 fi
2653
2654 fi
2655 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2656 cat >> confdefs.h <<EOF
2657 #define SIZEOF_LONG $ac_cv_sizeof_long
2658 EOF
2659
2660
2661 echo $ac_n "checking size of short""... $ac_c" 1>&6
2662 echo "configure:2663: checking size of short" >&5
2663 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2664   echo $ac_n "(cached) $ac_c" 1>&6
2665 else
2666   if test "$cross_compiling" = yes; then
2667   ac_cv_sizeof_short=cross
2668 else
2669   cat > conftest.$ac_ext <<EOF
2670 #line 2671 "configure"
2671 #include "confdefs.h"
2672 #include <stdio.h>
2673 main()
2674 {
2675   FILE *f=fopen("conftestval", "w");
2676   if (!f) exit(1);
2677   fprintf(f, "%d\n", sizeof(short));
2678   exit(0);
2679 }
2680 EOF
2681 if { (eval echo configure:2682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2682 then
2683   ac_cv_sizeof_short=`cat conftestval`
2684 else
2685   echo "configure: failed program was:" >&5
2686   cat conftest.$ac_ext >&5
2687   rm -fr conftest*
2688   ac_cv_sizeof_short=0
2689 fi
2690 rm -fr conftest*
2691 fi
2692
2693 fi
2694 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2695 cat >> confdefs.h <<EOF
2696 #define SIZEOF_SHORT $ac_cv_sizeof_short
2697 EOF
2698
2699
2700
2701 echo $ac_n "checking for working const""... $ac_c" 1>&6
2702 echo "configure:2703: checking for working const" >&5
2703 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2704   echo $ac_n "(cached) $ac_c" 1>&6
2705 else
2706   cat > conftest.$ac_ext <<EOF
2707 #line 2708 "configure"
2708 #include "confdefs.h"
2709
2710 int main() {
2711
2712 /* Ultrix mips cc rejects this.  */
2713 typedef int charset[2]; const charset x;
2714 /* SunOS 4.1.1 cc rejects this.  */
2715 char const *const *ccp;
2716 char **p;
2717 /* NEC SVR4.0.2 mips cc rejects this.  */
2718 struct point {int x, y;};
2719 static struct point const zero = {0,0};
2720 /* AIX XL C 1.02.0.0 rejects this.
2721    It does not let you subtract one const X* pointer from another in an arm
2722    of an if-expression whose if-part is not a constant expression */
2723 const char *g = "string";
2724 ccp = &g + (g ? g-g : 0);
2725 /* HPUX 7.0 cc rejects these. */
2726 ++ccp;
2727 p = (char**) ccp;
2728 ccp = (char const *const *) p;
2729 { /* SCO 3.2v4 cc rejects this.  */
2730   char *t;
2731   char const *s = 0 ? (char *) 0 : (char const *) 0;
2732
2733   *t++ = 0;
2734 }
2735 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
2736   int x[] = {25, 17};
2737   const int *foo = &x[0];
2738   ++foo;
2739 }
2740 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2741   typedef const int *iptr;
2742   iptr p = 0;
2743   ++p;
2744 }
2745 { /* AIX XL C 1.02.0.0 rejects this saying
2746      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2747   struct s { int j; const int *ap[3]; };
2748   struct s *b; b->j = 5;
2749 }
2750 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2751   const int foo = 10;
2752 }
2753
2754 ; return 0; }
2755 EOF
2756 if { (eval echo configure:2757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2757   rm -rf conftest*
2758   ac_cv_c_const=yes
2759 else
2760   echo "configure: failed program was:" >&5
2761   cat conftest.$ac_ext >&5
2762   rm -rf conftest*
2763   ac_cv_c_const=no
2764 fi
2765 rm -f conftest*
2766 fi
2767
2768 echo "$ac_t""$ac_cv_c_const" 1>&6
2769 if test $ac_cv_c_const = no; then
2770   cat >> confdefs.h <<\EOF
2771 #define const 
2772 EOF
2773
2774 fi
2775
2776 echo $ac_n "checking for inline""... $ac_c" 1>&6
2777 echo "configure:2778: checking for inline" >&5
2778 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2779   echo $ac_n "(cached) $ac_c" 1>&6
2780 else
2781   ac_cv_c_inline=no
2782 for ac_kw in inline __inline__ __inline; do
2783   cat > conftest.$ac_ext <<EOF
2784 #line 2785 "configure"
2785 #include "confdefs.h"
2786
2787 int main() {
2788 } $ac_kw foo() {
2789 ; return 0; }
2790 EOF
2791 if { (eval echo configure:2792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2792   rm -rf conftest*
2793   ac_cv_c_inline=$ac_kw; break
2794 else
2795   echo "configure: failed program was:" >&5
2796   cat conftest.$ac_ext >&5
2797 fi
2798 rm -f conftest*
2799 done
2800
2801 fi
2802
2803 echo "$ac_t""$ac_cv_c_inline" 1>&6
2804 case "$ac_cv_c_inline" in
2805   inline | yes) ;;
2806   no) cat >> confdefs.h <<\EOF
2807 #define inline 
2808 EOF
2809  ;;
2810   *)  cat >> confdefs.h <<EOF
2811 #define inline $ac_cv_c_inline
2812 EOF
2813  ;;
2814 esac
2815
2816 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2817 echo "configure:2818: checking whether byte ordering is bigendian" >&5
2818 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2819   echo $ac_n "(cached) $ac_c" 1>&6
2820 else
2821   ac_cv_c_bigendian=unknown
2822 # See if sys/param.h defines the BYTE_ORDER macro.
2823 cat > conftest.$ac_ext <<EOF
2824 #line 2825 "configure"
2825 #include "confdefs.h"
2826 #include <sys/types.h>
2827 #include <sys/param.h>
2828 int main() {
2829
2830 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2831  bogus endian macros
2832 #endif
2833 ; return 0; }
2834 EOF
2835 if { (eval echo configure:2836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2836   rm -rf conftest*
2837   # It does; now see whether it defined to BIG_ENDIAN or not.
2838 cat > conftest.$ac_ext <<EOF
2839 #line 2840 "configure"
2840 #include "confdefs.h"
2841 #include <sys/types.h>
2842 #include <sys/param.h>
2843 int main() {
2844
2845 #if BYTE_ORDER != BIG_ENDIAN
2846  not big endian
2847 #endif
2848 ; return 0; }
2849 EOF
2850 if { (eval echo configure:2851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2851   rm -rf conftest*
2852   ac_cv_c_bigendian=yes
2853 else
2854   echo "configure: failed program was:" >&5
2855   cat conftest.$ac_ext >&5
2856   rm -rf conftest*
2857   ac_cv_c_bigendian=no
2858 fi
2859 rm -f conftest*
2860 else
2861   echo "configure: failed program was:" >&5
2862   cat conftest.$ac_ext >&5
2863 fi
2864 rm -f conftest*
2865 if test $ac_cv_c_bigendian = unknown; then
2866 if test "$cross_compiling" = yes; then
2867     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2868 else
2869   cat > conftest.$ac_ext <<EOF
2870 #line 2871 "configure"
2871 #include "confdefs.h"
2872 main () {
2873   /* Are we little or big endian?  From Harbison&Steele.  */
2874   union
2875   {
2876     long l;
2877     char c[sizeof (long)];
2878   } u;
2879   u.l = 1;
2880   exit (u.c[sizeof (long) - 1] == 1);
2881 }
2882 EOF
2883 if { (eval echo configure:2884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2884 then
2885   ac_cv_c_bigendian=no
2886 else
2887   echo "configure: failed program was:" >&5
2888   cat conftest.$ac_ext >&5
2889   rm -fr conftest*
2890   ac_cv_c_bigendian=yes
2891 fi
2892 rm -fr conftest*
2893 fi
2894
2895 fi
2896 fi
2897
2898 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2899 if test $ac_cv_c_bigendian = yes; then
2900   cat >> confdefs.h <<\EOF
2901 #define WORDS_BIGENDIAN 1
2902 EOF
2903
2904 fi
2905
2906 echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
2907 echo "configure:2908: checking whether char is unsigned" >&5
2908 if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
2909   echo $ac_n "(cached) $ac_c" 1>&6
2910 else
2911   if test "$GCC" = yes; then
2912   # GCC predefines this symbol on systems where it applies.
2913 cat > conftest.$ac_ext <<EOF
2914 #line 2915 "configure"
2915 #include "confdefs.h"
2916 #ifdef __CHAR_UNSIGNED__
2917   yes
2918 #endif
2919
2920 EOF
2921 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2922   egrep "yes" >/dev/null 2>&1; then
2923   rm -rf conftest*
2924   ac_cv_c_char_unsigned=yes
2925 else
2926   rm -rf conftest*
2927   ac_cv_c_char_unsigned=no
2928 fi
2929 rm -f conftest*
2930
2931 else
2932 if test "$cross_compiling" = yes; then
2933     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2934 else
2935   cat > conftest.$ac_ext <<EOF
2936 #line 2937 "configure"
2937 #include "confdefs.h"
2938 /* volatile prevents gcc2 from optimizing the test away on sparcs.  */
2939 #if !defined(__STDC__) || __STDC__ != 1
2940 #define volatile
2941 #endif
2942 main() {
2943   volatile char c = 255; exit(c < 0);
2944 }
2945 EOF
2946 if { (eval echo configure:2947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2947 then
2948   ac_cv_c_char_unsigned=yes
2949 else
2950   echo "configure: failed program was:" >&5
2951   cat conftest.$ac_ext >&5
2952   rm -fr conftest*
2953   ac_cv_c_char_unsigned=no
2954 fi
2955 rm -fr conftest*
2956 fi
2957
2958 fi
2959 fi
2960
2961 echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
2962 if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
2963   cat >> confdefs.h <<\EOF
2964 #define __CHAR_UNSIGNED__ 1
2965 EOF
2966
2967 fi
2968
2969
2970 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2971 echo "configure:2972: checking return type of signal handlers" >&5
2972 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2973   echo $ac_n "(cached) $ac_c" 1>&6
2974 else
2975   cat > conftest.$ac_ext <<EOF
2976 #line 2977 "configure"
2977 #include "confdefs.h"
2978 #include <sys/types.h>
2979 #include <signal.h>
2980 #ifdef signal
2981 #undef signal
2982 #endif
2983 #ifdef __cplusplus
2984 extern "C" void (*signal (int, void (*)(int)))(int);
2985 #else
2986 void (*signal ()) ();
2987 #endif
2988
2989 int main() {
2990 int i;
2991 ; return 0; }
2992 EOF
2993 if { (eval echo configure:2994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2994   rm -rf conftest*
2995   ac_cv_type_signal=void
2996 else
2997   echo "configure: failed program was:" >&5
2998   cat conftest.$ac_ext >&5
2999   rm -rf conftest*
3000   ac_cv_type_signal=int
3001 fi
3002 rm -f conftest*
3003 fi
3004
3005 echo "$ac_t""$ac_cv_type_signal" 1>&6
3006 cat >> confdefs.h <<EOF
3007 #define RETSIGTYPE $ac_cv_type_signal
3008 EOF
3009
3010
3011 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3012 echo "configure:3013: checking for uid_t in sys/types.h" >&5
3013 if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
3014   echo $ac_n "(cached) $ac_c" 1>&6
3015 else
3016   cat > conftest.$ac_ext <<EOF
3017 #line 3018 "configure"
3018 #include "confdefs.h"
3019 #include <sys/types.h>
3020 EOF
3021 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3022   egrep "uid_t" >/dev/null 2>&1; then
3023   rm -rf conftest*
3024   ac_cv_type_uid_t=yes
3025 else
3026   rm -rf conftest*
3027   ac_cv_type_uid_t=no
3028 fi
3029 rm -f conftest*
3030
3031 fi
3032
3033 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3034 if test $ac_cv_type_uid_t = no; then
3035   cat >> confdefs.h <<\EOF
3036 #define uid_t int
3037 EOF
3038
3039   cat >> confdefs.h <<\EOF
3040 #define gid_t int
3041 EOF
3042
3043 fi
3044
3045 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3046 echo "configure:3047: checking for mode_t" >&5
3047 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
3048   echo $ac_n "(cached) $ac_c" 1>&6
3049 else
3050   cat > conftest.$ac_ext <<EOF
3051 #line 3052 "configure"
3052 #include "confdefs.h"
3053 #include <sys/types.h>
3054 #if STDC_HEADERS
3055 #include <stdlib.h>
3056 #include <stddef.h>
3057 #endif
3058 EOF
3059 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3060   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3061   rm -rf conftest*
3062   ac_cv_type_mode_t=yes
3063 else
3064   rm -rf conftest*
3065   ac_cv_type_mode_t=no
3066 fi
3067 rm -f conftest*
3068
3069 fi
3070 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3071 if test $ac_cv_type_mode_t = no; then
3072   cat >> confdefs.h <<\EOF
3073 #define mode_t int
3074 EOF
3075
3076 fi
3077
3078 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3079 echo "configure:3080: checking for off_t" >&5
3080 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
3081   echo $ac_n "(cached) $ac_c" 1>&6
3082 else
3083   cat > conftest.$ac_ext <<EOF
3084 #line 3085 "configure"
3085 #include "confdefs.h"
3086 #include <sys/types.h>
3087 #if STDC_HEADERS
3088 #include <stdlib.h>
3089 #include <stddef.h>
3090 #endif
3091 EOF
3092 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3093   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3094   rm -rf conftest*
3095   ac_cv_type_off_t=yes
3096 else
3097   rm -rf conftest*
3098   ac_cv_type_off_t=no
3099 fi
3100 rm -f conftest*
3101
3102 fi
3103 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3104 if test $ac_cv_type_off_t = no; then
3105   cat >> confdefs.h <<\EOF
3106 #define off_t long
3107 EOF
3108
3109 fi
3110
3111 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3112 echo "configure:3113: checking for size_t" >&5
3113 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
3114   echo $ac_n "(cached) $ac_c" 1>&6
3115 else
3116   cat > conftest.$ac_ext <<EOF
3117 #line 3118 "configure"
3118 #include "confdefs.h"
3119 #include <sys/types.h>
3120 #if STDC_HEADERS
3121 #include <stdlib.h>
3122 #include <stddef.h>
3123 #endif
3124 EOF
3125 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3126   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3127   rm -rf conftest*
3128   ac_cv_type_size_t=yes
3129 else
3130   rm -rf conftest*
3131   ac_cv_type_size_t=no
3132 fi
3133 rm -f conftest*
3134
3135 fi
3136 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3137 if test $ac_cv_type_size_t = no; then
3138   cat >> confdefs.h <<\EOF
3139 #define size_t unsigned
3140 EOF
3141
3142 fi
3143
3144 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3145 echo "configure:3146: checking for pid_t" >&5
3146 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3147   echo $ac_n "(cached) $ac_c" 1>&6
3148 else
3149   cat > conftest.$ac_ext <<EOF
3150 #line 3151 "configure"
3151 #include "confdefs.h"
3152 #include <sys/types.h>
3153 #if STDC_HEADERS
3154 #include <stdlib.h>
3155 #include <stddef.h>
3156 #endif
3157 EOF
3158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3159   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3160   rm -rf conftest*
3161   ac_cv_type_pid_t=yes
3162 else
3163   rm -rf conftest*
3164   ac_cv_type_pid_t=no
3165 fi
3166 rm -f conftest*
3167
3168 fi
3169 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3170 if test $ac_cv_type_pid_t = no; then
3171   cat >> confdefs.h <<\EOF
3172 #define pid_t int
3173 EOF
3174
3175 fi
3176
3177 echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
3178 echo "configure:3179: checking for st_rdev in struct stat" >&5
3179 if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
3180   echo $ac_n "(cached) $ac_c" 1>&6
3181 else
3182   cat > conftest.$ac_ext <<EOF
3183 #line 3184 "configure"
3184 #include "confdefs.h"
3185 #include <sys/types.h>
3186 #include <sys/stat.h>
3187 int main() {
3188 struct stat s; s.st_rdev;
3189 ; return 0; }
3190 EOF
3191 if { (eval echo configure:3192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3192   rm -rf conftest*
3193   ac_cv_struct_st_rdev=yes
3194 else
3195   echo "configure: failed program was:" >&5
3196   cat conftest.$ac_ext >&5
3197   rm -rf conftest*
3198   ac_cv_struct_st_rdev=no
3199 fi
3200 rm -f conftest*
3201 fi
3202
3203 echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
3204 if test $ac_cv_struct_st_rdev = yes; then
3205   cat >> confdefs.h <<\EOF
3206 #define HAVE_ST_RDEV 1
3207 EOF
3208
3209 fi
3210
3211 echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6
3212 echo "configure:3213: checking for d_off in dirent" >&5
3213 if eval "test \"`echo '$''{'ac_cv_dirent_d_off'+set}'`\" = set"; then
3214   echo $ac_n "(cached) $ac_c" 1>&6
3215 else
3216   cat > conftest.$ac_ext <<EOF
3217 #line 3218 "configure"
3218 #include "confdefs.h"
3219
3220 #include <unistd.h>
3221 #include <sys/types.h>
3222 #include <dirent.h>
3223 int main() {
3224 struct dirent d; d.d_off;
3225 ; return 0; }
3226 EOF
3227 if { (eval echo configure:3228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3228   rm -rf conftest*
3229   ac_cv_dirent_d_off=yes
3230 else
3231   echo "configure: failed program was:" >&5
3232   cat conftest.$ac_ext >&5
3233   rm -rf conftest*
3234   ac_cv_dirent_d_off=no
3235 fi
3236 rm -f conftest*
3237 fi
3238
3239 echo "$ac_t""$ac_cv_dirent_d_off" 1>&6
3240 if test $ac_cv_dirent_d_off = yes; then
3241   cat >> confdefs.h <<\EOF
3242 #define HAVE_DIRENT_D_OFF 1
3243 EOF
3244
3245 fi
3246
3247 echo $ac_n "checking for ino_t""... $ac_c" 1>&6
3248 echo "configure:3249: checking for ino_t" >&5
3249 if eval "test \"`echo '$''{'ac_cv_type_ino_t'+set}'`\" = set"; then
3250   echo $ac_n "(cached) $ac_c" 1>&6
3251 else
3252   cat > conftest.$ac_ext <<EOF
3253 #line 3254 "configure"
3254 #include "confdefs.h"
3255 #include <sys/types.h>
3256 #if STDC_HEADERS
3257 #include <stdlib.h>
3258 #include <stddef.h>
3259 #endif
3260 EOF
3261 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3262   egrep "(^|[^a-zA-Z_0-9])ino_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3263   rm -rf conftest*
3264   ac_cv_type_ino_t=yes
3265 else
3266   rm -rf conftest*
3267   ac_cv_type_ino_t=no
3268 fi
3269 rm -f conftest*
3270
3271 fi
3272 echo "$ac_t""$ac_cv_type_ino_t" 1>&6
3273 if test $ac_cv_type_ino_t = no; then
3274   cat >> confdefs.h <<\EOF
3275 #define ino_t unsigned
3276 EOF
3277
3278 fi
3279
3280 echo $ac_n "checking for loff_t""... $ac_c" 1>&6
3281 echo "configure:3282: checking for loff_t" >&5
3282 if eval "test \"`echo '$''{'ac_cv_type_loff_t'+set}'`\" = set"; then
3283   echo $ac_n "(cached) $ac_c" 1>&6
3284 else
3285   cat > conftest.$ac_ext <<EOF
3286 #line 3287 "configure"
3287 #include "confdefs.h"
3288 #include <sys/types.h>
3289 #if STDC_HEADERS
3290 #include <stdlib.h>
3291 #include <stddef.h>
3292 #endif
3293 EOF
3294 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3295   egrep "(^|[^a-zA-Z_0-9])loff_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3296   rm -rf conftest*
3297   ac_cv_type_loff_t=yes
3298 else
3299   rm -rf conftest*
3300   ac_cv_type_loff_t=no
3301 fi
3302 rm -f conftest*
3303
3304 fi
3305 echo "$ac_t""$ac_cv_type_loff_t" 1>&6
3306 if test $ac_cv_type_loff_t = no; then
3307   cat >> confdefs.h <<\EOF
3308 #define loff_t off_t
3309 EOF
3310
3311 fi
3312
3313 echo $ac_n "checking for offset_t""... $ac_c" 1>&6
3314 echo "configure:3315: checking for offset_t" >&5
3315 if eval "test \"`echo '$''{'ac_cv_type_offset_t'+set}'`\" = set"; then
3316   echo $ac_n "(cached) $ac_c" 1>&6
3317 else
3318   cat > conftest.$ac_ext <<EOF
3319 #line 3320 "configure"
3320 #include "confdefs.h"
3321 #include <sys/types.h>
3322 #if STDC_HEADERS
3323 #include <stdlib.h>
3324 #include <stddef.h>
3325 #endif
3326 EOF
3327 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3328   egrep "(^|[^a-zA-Z_0-9])offset_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3329   rm -rf conftest*
3330   ac_cv_type_offset_t=yes
3331 else
3332   rm -rf conftest*
3333   ac_cv_type_offset_t=no
3334 fi
3335 rm -f conftest*
3336
3337 fi
3338 echo "$ac_t""$ac_cv_type_offset_t" 1>&6
3339 if test $ac_cv_type_offset_t = no; then
3340   cat >> confdefs.h <<\EOF
3341 #define offset_t loff_t
3342 EOF
3343
3344 fi
3345
3346 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3347 echo "configure:3348: checking for ssize_t" >&5
3348 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
3349   echo $ac_n "(cached) $ac_c" 1>&6
3350 else
3351   cat > conftest.$ac_ext <<EOF
3352 #line 3353 "configure"
3353 #include "confdefs.h"
3354 #include <sys/types.h>
3355 #if STDC_HEADERS
3356 #include <stdlib.h>
3357 #include <stddef.h>
3358 #endif
3359 EOF
3360 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3361   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3362   rm -rf conftest*
3363   ac_cv_type_ssize_t=yes
3364 else
3365   rm -rf conftest*
3366   ac_cv_type_ssize_t=no
3367 fi
3368 rm -f conftest*
3369
3370 fi
3371 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3372 if test $ac_cv_type_ssize_t = no; then
3373   cat >> confdefs.h <<\EOF
3374 #define ssize_t int
3375 EOF
3376
3377 fi
3378
3379 echo $ac_n "checking for wchar_t""... $ac_c" 1>&6
3380 echo "configure:3381: checking for wchar_t" >&5
3381 if eval "test \"`echo '$''{'ac_cv_type_wchar_t'+set}'`\" = set"; then
3382   echo $ac_n "(cached) $ac_c" 1>&6
3383 else
3384   cat > conftest.$ac_ext <<EOF
3385 #line 3386 "configure"
3386 #include "confdefs.h"
3387 #include <sys/types.h>
3388 #if STDC_HEADERS
3389 #include <stdlib.h>
3390 #include <stddef.h>
3391 #endif
3392 EOF
3393 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3394   egrep "(^|[^a-zA-Z_0-9])wchar_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3395   rm -rf conftest*
3396   ac_cv_type_wchar_t=yes
3397 else
3398   rm -rf conftest*
3399   ac_cv_type_wchar_t=no
3400 fi
3401 rm -f conftest*
3402
3403 fi
3404 echo "$ac_t""$ac_cv_type_wchar_t" 1>&6
3405 if test $ac_cv_type_wchar_t = no; then
3406   cat >> confdefs.h <<\EOF
3407 #define wchar_t unsigned short
3408 EOF
3409
3410 fi
3411
3412
3413 ############################################
3414 # for cups support we need libcups, and a handful of header files
3415
3416 echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6
3417 echo "configure:3418: checking for httpConnect in -lcups" >&5
3418 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'`
3419 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3420   echo $ac_n "(cached) $ac_c" 1>&6
3421 else
3422   ac_save_LIBS="$LIBS"
3423 LIBS="-lcups  $LIBS"
3424 cat > conftest.$ac_ext <<EOF
3425 #line 3426 "configure"
3426 #include "confdefs.h"
3427 /* Override any gcc2 internal prototype to avoid an error.  */
3428 /* We use char because int might match the return type of a gcc2
3429     builtin and then its argument prototype would still apply.  */
3430 char httpConnect();
3431
3432 int main() {
3433 httpConnect()
3434 ; return 0; }
3435 EOF
3436 if { (eval echo configure:3437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3437   rm -rf conftest*
3438   eval "ac_cv_lib_$ac_lib_var=yes"
3439 else
3440   echo "configure: failed program was:" >&5
3441   cat conftest.$ac_ext >&5
3442   rm -rf conftest*
3443   eval "ac_cv_lib_$ac_lib_var=no"
3444 fi
3445 rm -f conftest*
3446 LIBS="$ac_save_LIBS"
3447
3448 fi
3449 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3450   echo "$ac_t""yes" 1>&6
3451     ac_tr_lib=HAVE_LIB`echo cups | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3452     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3453   cat >> confdefs.h <<EOF
3454 #define $ac_tr_lib 1
3455 EOF
3456
3457   LIBS="-lcups $LIBS"
3458
3459 else
3460   echo "$ac_t""no" 1>&6
3461 fi
3462
3463
3464 # I wonder if there is a nicer way of doing this?
3465
3466 if test x"$ac_cv_lib_cups_httpConnect" = x"yes"; then
3467         for ac_hdr in cups/cups.h cups/language.h
3468 do
3469 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3470 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3471 echo "configure:3472: checking for $ac_hdr" >&5
3472 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3473   echo $ac_n "(cached) $ac_c" 1>&6
3474 else
3475   cat > conftest.$ac_ext <<EOF
3476 #line 3477 "configure"
3477 #include "confdefs.h"
3478 #include <$ac_hdr>
3479 EOF
3480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3481 { (eval echo configure:3482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3483 if test -z "$ac_err"; then
3484   rm -rf conftest*
3485   eval "ac_cv_header_$ac_safe=yes"
3486 else
3487   echo "$ac_err" >&5
3488   echo "configure: failed program was:" >&5
3489   cat conftest.$ac_ext >&5
3490   rm -rf conftest*
3491   eval "ac_cv_header_$ac_safe=no"
3492 fi
3493 rm -f conftest*
3494 fi
3495 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3496   echo "$ac_t""yes" 1>&6
3497     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3498   cat >> confdefs.h <<EOF
3499 #define $ac_tr_hdr 1
3500 EOF
3501  
3502 else
3503   echo "$ac_t""no" 1>&6
3504 fi
3505 done
3506
3507         if test x"$ac_cv_header_cups_cups_h" = x"yes"; then
3508                 if test x"$ac_cv_header_cups_language_h" = x"yes"; then
3509                         cat >> confdefs.h <<\EOF
3510 #define HAVE_CUPS 1
3511 EOF
3512
3513                 fi
3514         fi
3515 fi
3516
3517 ############################################
3518 # we need libdl for PAM and the new VFS code
3519 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
3520 echo "configure:3521: checking for dlopen in -ldl" >&5
3521 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3522 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3523   echo $ac_n "(cached) $ac_c" 1>&6
3524 else
3525   ac_save_LIBS="$LIBS"
3526 LIBS="-ldl  $LIBS"
3527 cat > conftest.$ac_ext <<EOF
3528 #line 3529 "configure"
3529 #include "confdefs.h"
3530 /* Override any gcc2 internal prototype to avoid an error.  */
3531 /* We use char because int might match the return type of a gcc2
3532     builtin and then its argument prototype would still apply.  */
3533 char dlopen();
3534
3535 int main() {
3536 dlopen()
3537 ; return 0; }
3538 EOF
3539 if { (eval echo configure:3540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3540   rm -rf conftest*
3541   eval "ac_cv_lib_$ac_lib_var=yes"
3542 else
3543   echo "configure: failed program was:" >&5
3544   cat conftest.$ac_ext >&5
3545   rm -rf conftest*
3546   eval "ac_cv_lib_$ac_lib_var=no"
3547 fi
3548 rm -f conftest*
3549 LIBS="$ac_save_LIBS"
3550
3551 fi
3552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3553   echo "$ac_t""yes" 1>&6
3554   LIBS="$LIBS -ldl";
3555         cat >> confdefs.h <<\EOF
3556 #define HAVE_LIBDL 1
3557 EOF
3558
3559 else
3560   echo "$ac_t""no" 1>&6
3561 fi
3562
3563
3564 ############################################
3565 # check if the compiler can do immediate structures
3566 echo $ac_n "checking for immediate structures""... $ac_c" 1>&6
3567 echo "configure:3568: checking for immediate structures" >&5
3568 if eval "test \"`echo '$''{'samba_cv_immediate_structures'+set}'`\" = set"; then
3569   echo $ac_n "(cached) $ac_c" 1>&6
3570 else
3571   
3572     cat > conftest.$ac_ext <<EOF
3573 #line 3574 "configure"
3574 #include "confdefs.h"
3575
3576 #include <stdio.h>
3577 int main() {
3578
3579    #define X_FOOBAR(x) ((FOOBAR) { x })
3580    typedef struct {unsigned x;} FOOBAR;
3581    FOOBAR f = X_FOOBAR(1);   
3582
3583 ; return 0; }
3584 EOF
3585 if { (eval echo configure:3586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3586   rm -rf conftest*
3587   samba_cv_immediate_structures=yes
3588 else
3589   echo "configure: failed program was:" >&5
3590   cat conftest.$ac_ext >&5
3591   rm -rf conftest*
3592   samba_cv_immediate_structures=no
3593 fi
3594 rm -f conftest*
3595 fi
3596
3597 echo "$ac_t""$samba_cv_immediate_structures" 1>&6
3598 if test x"$samba_cv_immediate_structures" = x"yes"; then
3599    cat >> confdefs.h <<\EOF
3600 #define HAVE_IMMEDIATE_STRUCTURES 1
3601 EOF
3602
3603 fi
3604
3605 ############################################
3606 # check for unix domain sockets
3607 echo $ac_n "checking for unix domain sockets""... $ac_c" 1>&6
3608 echo "configure:3609: checking for unix domain sockets" >&5
3609 if eval "test \"`echo '$''{'samba_cv_unixsocket'+set}'`\" = set"; then
3610   echo $ac_n "(cached) $ac_c" 1>&6
3611 else
3612   
3613     cat > conftest.$ac_ext <<EOF
3614 #line 3615 "configure"
3615 #include "confdefs.h"
3616
3617 #include <sys/types.h>
3618 #include <stdlib.h>
3619 #include <stddef.h>
3620 #include <sys/socket.h>
3621 #include <sys/un.h>
3622 int main() {
3623
3624   struct sockaddr_un sunaddr; 
3625   sunaddr.sun_family = AF_UNIX;
3626
3627 ; return 0; }
3628 EOF
3629 if { (eval echo configure:3630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3630   rm -rf conftest*
3631   samba_cv_unixsocket=yes
3632 else
3633   echo "configure: failed program was:" >&5
3634   cat conftest.$ac_ext >&5
3635   rm -rf conftest*
3636   samba_cv_unixsocket=no
3637 fi
3638 rm -f conftest*
3639 fi
3640
3641 echo "$ac_t""$samba_cv_unixsocket" 1>&6
3642 if test x"$samba_cv_unixsocket" = x"yes"; then
3643    cat >> confdefs.h <<\EOF
3644 #define HAVE_UNIXSOCKET 1
3645 EOF
3646
3647 fi
3648
3649
3650 echo $ac_n "checking for socklen_t type""... $ac_c" 1>&6
3651 echo "configure:3652: checking for socklen_t type" >&5
3652 if eval "test \"`echo '$''{'samba_cv_socklen_t'+set}'`\" = set"; then
3653   echo $ac_n "(cached) $ac_c" 1>&6
3654 else
3655   
3656     cat > conftest.$ac_ext <<EOF
3657 #line 3658 "configure"
3658 #include "confdefs.h"
3659
3660 #include <sys/types.h>
3661 #if STDC_HEADERS
3662 #include <stdlib.h>
3663 #include <stddef.h>
3664 #endif
3665 #include <sys/socket.h>
3666 int main() {
3667 socklen_t i = 0
3668 ; return 0; }
3669 EOF
3670 if { (eval echo configure:3671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3671   rm -rf conftest*
3672   samba_cv_socklen_t=yes
3673 else
3674   echo "configure: failed program was:" >&5
3675   cat conftest.$ac_ext >&5
3676   rm -rf conftest*
3677   samba_cv_socklen_t=no
3678 fi
3679 rm -f conftest*
3680 fi
3681
3682 echo "$ac_t""$samba_cv_socklen_t" 1>&6
3683 if test x"$samba_cv_socklen_t" = x"yes"; then
3684    cat >> confdefs.h <<\EOF
3685 #define HAVE_SOCKLEN_T_TYPE 1
3686 EOF
3687
3688 fi
3689
3690 echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6
3691 echo "configure:3692: checking for sig_atomic_t type" >&5
3692 if eval "test \"`echo '$''{'samba_cv_sig_atomic_t'+set}'`\" = set"; then
3693   echo $ac_n "(cached) $ac_c" 1>&6
3694 else
3695   
3696     cat > conftest.$ac_ext <<EOF
3697 #line 3698 "configure"
3698 #include "confdefs.h"
3699
3700 #include <sys/types.h>
3701 #if STDC_HEADERS
3702 #include <stdlib.h>
3703 #include <stddef.h>
3704 #endif
3705 #include <signal.h>
3706 int main() {
3707 sig_atomic_t i = 0
3708 ; return 0; }
3709 EOF
3710 if { (eval echo configure:3711: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3711   rm -rf conftest*
3712   samba_cv_sig_atomic_t=yes
3713 else
3714   echo "configure: failed program was:" >&5
3715   cat conftest.$ac_ext >&5
3716   rm -rf conftest*
3717   samba_cv_sig_atomic_t=no
3718 fi
3719 rm -f conftest*
3720 fi
3721
3722 echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6
3723 if test x"$samba_cv_sig_atomic_t" = x"yes"; then
3724    cat >> confdefs.h <<\EOF
3725 #define HAVE_SIG_ATOMIC_T_TYPE 1
3726 EOF
3727
3728 fi
3729
3730 # stupid headers have the functions but no declaration. grrrr.
3731
3732  echo $ac_n "checking for errno declaration""... $ac_c" 1>&6
3733 echo "configure:3734: checking for errno declaration" >&5
3734 if eval "test \"`echo '$''{'ac_cv_have_errno_decl'+set}'`\" = set"; then
3735   echo $ac_n "(cached) $ac_c" 1>&6
3736 else
3737   
3738     cat > conftest.$ac_ext <<EOF
3739 #line 3740 "configure"
3740 #include "confdefs.h"
3741 #include <errno.h>
3742 int main() {
3743 int i = (int)errno
3744 ; return 0; }
3745 EOF
3746 if { (eval echo configure:3747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3747   rm -rf conftest*
3748   ac_cv_have_errno_decl=yes
3749 else
3750   echo "configure: failed program was:" >&5
3751   cat conftest.$ac_ext >&5
3752   rm -rf conftest*
3753   ac_cv_have_errno_decl=no
3754 fi
3755 rm -f conftest*
3756 fi
3757
3758 echo "$ac_t""$ac_cv_have_errno_decl" 1>&6
3759  if test x"$ac_cv_have_errno_decl" = x"yes"; then
3760     cat >> confdefs.h <<\EOF
3761 #define HAVE_ERRNO_DECL 1
3762 EOF
3763
3764  fi
3765
3766
3767  echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6
3768 echo "configure:3769: checking for setresuid declaration" >&5
3769 if eval "test \"`echo '$''{'ac_cv_have_setresuid_decl'+set}'`\" = set"; then
3770   echo $ac_n "(cached) $ac_c" 1>&6
3771 else
3772   
3773     cat > conftest.$ac_ext <<EOF
3774 #line 3775 "configure"
3775 #include "confdefs.h"
3776 #include <unistd.h>
3777 int main() {
3778 int i = (int)setresuid
3779 ; return 0; }
3780 EOF
3781 if { (eval echo configure:3782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3782   rm -rf conftest*
3783   ac_cv_have_setresuid_decl=yes
3784 else
3785   echo "configure: failed program was:" >&5
3786   cat conftest.$ac_ext >&5
3787   rm -rf conftest*
3788   ac_cv_have_setresuid_decl=no
3789 fi
3790 rm -f conftest*
3791 fi
3792
3793 echo "$ac_t""$ac_cv_have_setresuid_decl" 1>&6
3794  if test x"$ac_cv_have_setresuid_decl" = x"yes"; then
3795     cat >> confdefs.h <<\EOF
3796 #define HAVE_SETRESUID_DECL 1
3797 EOF
3798
3799  fi
3800
3801
3802  echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6
3803 echo "configure:3804: checking for setresgid declaration" >&5
3804 if eval "test \"`echo '$''{'ac_cv_have_setresgid_decl'+set}'`\" = set"; then
3805   echo $ac_n "(cached) $ac_c" 1>&6
3806 else
3807   
3808     cat > conftest.$ac_ext <<EOF
3809 #line 3810 "configure"
3810 #include "confdefs.h"
3811 #include <unistd.h>
3812 int main() {
3813 int i = (int)setresgid
3814 ; return 0; }
3815 EOF
3816 if { (eval echo configure:3817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3817   rm -rf conftest*
3818   ac_cv_have_setresgid_decl=yes
3819 else
3820   echo "configure: failed program was:" >&5
3821   cat conftest.$ac_ext >&5
3822   rm -rf conftest*
3823   ac_cv_have_setresgid_decl=no
3824 fi
3825 rm -f conftest*
3826 fi
3827
3828 echo "$ac_t""$ac_cv_have_setresgid_decl" 1>&6
3829  if test x"$ac_cv_have_setresgid_decl" = x"yes"; then
3830     cat >> confdefs.h <<\EOF
3831 #define HAVE_SETRESGID_DECL 1
3832 EOF
3833
3834  fi
3835
3836
3837  echo $ac_n "checking for asprintf declaration""... $ac_c" 1>&6
3838 echo "configure:3839: checking for asprintf declaration" >&5
3839 if eval "test \"`echo '$''{'ac_cv_have_asprintf_decl'+set}'`\" = set"; then
3840   echo $ac_n "(cached) $ac_c" 1>&6
3841 else
3842   
3843     cat > conftest.$ac_ext <<EOF
3844 #line 3845 "configure"
3845 #include "confdefs.h"
3846 #include <stdio.h>
3847 int main() {
3848 int i = (int)asprintf
3849 ; return 0; }
3850 EOF
3851 if { (eval echo configure:3852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3852   rm -rf conftest*
3853   ac_cv_have_asprintf_decl=yes
3854 else
3855   echo "configure: failed program was:" >&5
3856   cat conftest.$ac_ext >&5
3857   rm -rf conftest*
3858   ac_cv_have_asprintf_decl=no
3859 fi
3860 rm -f conftest*
3861 fi
3862
3863 echo "$ac_t""$ac_cv_have_asprintf_decl" 1>&6
3864  if test x"$ac_cv_have_asprintf_decl" = x"yes"; then
3865     cat >> confdefs.h <<\EOF
3866 #define HAVE_ASPRINTF_DECL 1
3867 EOF
3868
3869  fi
3870
3871
3872  echo $ac_n "checking for vasprintf declaration""... $ac_c" 1>&6
3873 echo "configure:3874: checking for vasprintf declaration" >&5
3874 if eval "test \"`echo '$''{'ac_cv_have_vasprintf_decl'+set}'`\" = set"; then
3875   echo $ac_n "(cached) $ac_c" 1>&6
3876 else
3877   
3878     cat > conftest.$ac_ext <<EOF
3879 #line 3880 "configure"
3880 #include "confdefs.h"
3881 #include <stdio.h>
3882 int main() {
3883 int i = (int)vasprintf
3884 ; return 0; }
3885 EOF
3886 if { (eval echo configure:3887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3887   rm -rf conftest*
3888   ac_cv_have_vasprintf_decl=yes
3889 else
3890   echo "configure: failed program was:" >&5
3891   cat conftest.$ac_ext >&5
3892   rm -rf conftest*
3893   ac_cv_have_vasprintf_decl=no
3894 fi
3895 rm -f conftest*
3896 fi
3897
3898 echo "$ac_t""$ac_cv_have_vasprintf_decl" 1>&6
3899  if test x"$ac_cv_have_vasprintf_decl" = x"yes"; then
3900     cat >> confdefs.h <<\EOF
3901 #define HAVE_VASPRINTF_DECL 1
3902 EOF
3903
3904  fi
3905
3906
3907  echo $ac_n "checking for vsnprintf declaration""... $ac_c" 1>&6
3908 echo "configure:3909: checking for vsnprintf declaration" >&5
3909 if eval "test \"`echo '$''{'ac_cv_have_vsnprintf_decl'+set}'`\" = set"; then
3910   echo $ac_n "(cached) $ac_c" 1>&6
3911 else
3912   
3913     cat > conftest.$ac_ext <<EOF
3914 #line 3915 "configure"
3915 #include "confdefs.h"
3916 #include <stdio.h>
3917 int main() {
3918 int i = (int)vsnprintf
3919 ; return 0; }
3920 EOF
3921 if { (eval echo configure:3922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3922   rm -rf conftest*
3923   ac_cv_have_vsnprintf_decl=yes
3924 else
3925   echo "configure: failed program was:" >&5
3926   cat conftest.$ac_ext >&5
3927   rm -rf conftest*
3928   ac_cv_have_vsnprintf_decl=no
3929 fi
3930 rm -f conftest*
3931 fi
3932
3933 echo "$ac_t""$ac_cv_have_vsnprintf_decl" 1>&6
3934  if test x"$ac_cv_have_vsnprintf_decl" = x"yes"; then
3935     cat >> confdefs.h <<\EOF
3936 #define HAVE_VSNPRINTF_DECL 1
3937 EOF
3938
3939  fi
3940
3941
3942  echo $ac_n "checking for snprintf declaration""... $ac_c" 1>&6
3943 echo "configure:3944: checking for snprintf declaration" >&5
3944 if eval "test \"`echo '$''{'ac_cv_have_snprintf_decl'+set}'`\" = set"; then
3945   echo $ac_n "(cached) $ac_c" 1>&6
3946 else
3947   
3948     cat > conftest.$ac_ext <<EOF
3949 #line 3950 "configure"
3950 #include "confdefs.h"
3951 #include <stdio.h>
3952 int main() {
3953 int i = (int)snprintf
3954 ; return 0; }
3955 EOF
3956 if { (eval echo configure:3957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3957   rm -rf conftest*
3958   ac_cv_have_snprintf_decl=yes
3959 else
3960   echo "configure: failed program was:" >&5
3961   cat conftest.$ac_ext >&5
3962   rm -rf conftest*
3963   ac_cv_have_snprintf_decl=no
3964 fi
3965 rm -f conftest*
3966 fi
3967
3968 echo "$ac_t""$ac_cv_have_snprintf_decl" 1>&6
3969  if test x"$ac_cv_have_snprintf_decl" = x"yes"; then
3970     cat >> confdefs.h <<\EOF
3971 #define HAVE_SNPRINTF_DECL 1
3972 EOF
3973
3974  fi
3975
3976
3977 # and glibc has setresuid under linux but the function does
3978 # nothing until kernel 2.1.44! very dumb.
3979 echo $ac_n "checking for real setresuid""... $ac_c" 1>&6
3980 echo "configure:3981: checking for real setresuid" >&5
3981 if eval "test \"`echo '$''{'samba_cv_have_setresuid'+set}'`\" = set"; then
3982   echo $ac_n "(cached) $ac_c" 1>&6
3983 else
3984   
3985     if test "$cross_compiling" = yes; then
3986   samba_cv_have_setresuid=cross
3987 else
3988   cat > conftest.$ac_ext <<EOF
3989 #line 3990 "configure"
3990 #include "confdefs.h"
3991 #include <errno.h>
3992 main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);}
3993 EOF
3994 if { (eval echo configure:3995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3995 then
3996   samba_cv_have_setresuid=yes
3997 else
3998   echo "configure: failed program was:" >&5
3999   cat conftest.$ac_ext >&5
4000   rm -fr conftest*
4001   samba_cv_have_setresuid=no
4002 fi
4003 rm -fr conftest*
4004 fi
4005
4006 fi
4007
4008 echo "$ac_t""$samba_cv_have_setresuid" 1>&6
4009 if test x"$samba_cv_have_setresuid" = x"yes"; then
4010     cat >> confdefs.h <<\EOF
4011 #define HAVE_SETRESUID 1
4012 EOF
4013
4014 fi
4015
4016 # Do the same check for setresguid...
4017 #
4018 echo $ac_n "checking for real setresgid""... $ac_c" 1>&6
4019 echo "configure:4020: checking for real setresgid" >&5
4020 if eval "test \"`echo '$''{'samba_cv_have_setresgid'+set}'`\" = set"; then
4021   echo $ac_n "(cached) $ac_c" 1>&6
4022 else
4023   
4024     if test "$cross_compiling" = yes; then
4025   samba_cv_have_setresgid=cross
4026 else
4027   cat > conftest.$ac_ext <<EOF
4028 #line 4029 "configure"
4029 #include "confdefs.h"
4030 #include <unistd.h>
4031 #include <errno.h>
4032 main() { errno = 0; setresgid(1,1,1); exit(errno != 0 ? (errno==EPERM ? 0 : 1) : 0);}
4033 EOF
4034 if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4035 then
4036   samba_cv_have_setresgid=yes
4037 else
4038   echo "configure: failed program was:" >&5
4039   cat conftest.$ac_ext >&5
4040   rm -fr conftest*
4041   samba_cv_have_setresgid=no
4042 fi
4043 rm -fr conftest*
4044 fi
4045
4046 fi
4047
4048 echo "$ac_t""$samba_cv_have_setresgid" 1>&6
4049 if test x"$samba_cv_have_setresgid" = x"yes"; then
4050     cat >> confdefs.h <<\EOF
4051 #define HAVE_SETRESGID 1
4052 EOF
4053
4054 fi
4055
4056 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
4057 echo "configure:4058: checking for 8-bit clean memcmp" >&5
4058 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
4059   echo $ac_n "(cached) $ac_c" 1>&6
4060 else
4061   if test "$cross_compiling" = yes; then
4062   ac_cv_func_memcmp_clean=no
4063 else
4064   cat > conftest.$ac_ext <<EOF
4065 #line 4066 "configure"
4066 #include "confdefs.h"
4067
4068 main()
4069 {
4070   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
4071   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
4072 }
4073
4074 EOF
4075 if { (eval echo configure:4076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4076 then
4077   ac_cv_func_memcmp_clean=yes
4078 else
4079   echo "configure: failed program was:" >&5
4080   cat conftest.$ac_ext >&5
4081   rm -fr conftest*
4082   ac_cv_func_memcmp_clean=no
4083 fi
4084 rm -fr conftest*
4085 fi
4086
4087 fi
4088
4089 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
4090 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
4091
4092
4093 ###############################################
4094 # test for where we get crypt() from
4095 for ac_func in crypt
4096 do
4097 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4098 echo "configure:4099: checking for $ac_func" >&5
4099 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4100   echo $ac_n "(cached) $ac_c" 1>&6
4101 else
4102   cat > conftest.$ac_ext <<EOF
4103 #line 4104 "configure"
4104 #include "confdefs.h"
4105 /* System header to define __stub macros and hopefully few prototypes,
4106     which can conflict with char $ac_func(); below.  */
4107 #include <assert.h>
4108 /* Override any gcc2 internal prototype to avoid an error.  */
4109 /* We use char because int might match the return type of a gcc2
4110     builtin and then its argument prototype would still apply.  */
4111 char $ac_func();
4112
4113 int main() {
4114
4115 /* The GNU C library defines this for functions which it implements
4116     to always fail with ENOSYS.  Some functions are actually named
4117     something starting with __ and the normal name is an alias.  */
4118 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4119 choke me
4120 #else
4121 $ac_func();
4122 #endif
4123
4124 ; return 0; }
4125 EOF
4126 if { (eval echo configure:4127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4127   rm -rf conftest*
4128   eval "ac_cv_func_$ac_func=yes"
4129 else
4130   echo "configure: failed program was:" >&5
4131   cat conftest.$ac_ext >&5
4132   rm -rf conftest*
4133   eval "ac_cv_func_$ac_func=no"
4134 fi
4135 rm -f conftest*
4136 fi
4137
4138 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4139   echo "$ac_t""yes" 1>&6
4140     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4141   cat >> confdefs.h <<EOF
4142 #define $ac_tr_func 1
4143 EOF
4144  
4145 else
4146   echo "$ac_t""no" 1>&6
4147 fi
4148 done
4149
4150 if test x"$ac_cv_func_crypt" = x"no"; then
4151     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
4152 echo "configure:4153: checking for crypt in -lcrypt" >&5
4153 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
4154 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4155   echo $ac_n "(cached) $ac_c" 1>&6
4156 else
4157   ac_save_LIBS="$LIBS"
4158 LIBS="-lcrypt  $LIBS"
4159 cat > conftest.$ac_ext <<EOF
4160 #line 4161 "configure"
4161 #include "confdefs.h"
4162 /* Override any gcc2 internal prototype to avoid an error.  */
4163 /* We use char because int might match the return type of a gcc2
4164     builtin and then its argument prototype would still apply.  */
4165 char crypt();
4166
4167 int main() {
4168 crypt()
4169 ; return 0; }
4170 EOF
4171 if { (eval echo configure:4172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4172   rm -rf conftest*
4173   eval "ac_cv_lib_$ac_lib_var=yes"
4174 else
4175   echo "configure: failed program was:" >&5
4176   cat conftest.$ac_ext >&5
4177   rm -rf conftest*
4178   eval "ac_cv_lib_$ac_lib_var=no"
4179 fi
4180 rm -f conftest*
4181 LIBS="$ac_save_LIBS"
4182
4183 fi
4184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4185   echo "$ac_t""yes" 1>&6
4186   LIBS="$LIBS -lcrypt";
4187         cat >> confdefs.h <<\EOF
4188 #define HAVE_CRYPT 1
4189 EOF
4190
4191 else
4192   echo "$ac_t""no" 1>&6
4193 fi
4194
4195 fi
4196
4197
4198 ###############################################
4199 # Readline included by default unless explicitly asked not to
4200 test "${with_readline+set}" != "set" && with_readline=yes
4201
4202 # test for where we get readline() from
4203 echo $ac_n "checking whether to use readline""... $ac_c" 1>&6
4204 echo "configure:4205: checking whether to use readline" >&5
4205 # Check whether --with-readline or --without-readline was given.
4206 if test "${with_readline+set}" = set; then
4207   withval="$with_readline"
4208     case "$with_readline" in
4209   yes)
4210     echo "$ac_t""yes" 1>&6
4211
4212     for ac_hdr in readline.h history.h readline/readline.h
4213 do
4214 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4215 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4216 echo "configure:4217: checking for $ac_hdr" >&5
4217 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4218   echo $ac_n "(cached) $ac_c" 1>&6
4219 else
4220   cat > conftest.$ac_ext <<EOF
4221 #line 4222 "configure"
4222 #include "confdefs.h"
4223 #include <$ac_hdr>
4224 EOF
4225 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4226 { (eval echo configure:4227: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4227 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4228 if test -z "$ac_err"; then
4229   rm -rf conftest*
4230   eval "ac_cv_header_$ac_safe=yes"
4231 else
4232   echo "$ac_err" >&5
4233   echo "configure: failed program was:" >&5
4234   cat conftest.$ac_ext >&5
4235   rm -rf conftest*
4236   eval "ac_cv_header_$ac_safe=no"
4237 fi
4238 rm -f conftest*
4239 fi
4240 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4241   echo "$ac_t""yes" 1>&6
4242     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4243   cat >> confdefs.h <<EOF
4244 #define $ac_tr_hdr 1
4245 EOF
4246  
4247 else
4248   echo "$ac_t""no" 1>&6
4249 fi
4250 done
4251
4252     for ac_hdr in readline/history.h
4253 do
4254 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4255 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4256 echo "configure:4257: checking for $ac_hdr" >&5
4257 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4258   echo $ac_n "(cached) $ac_c" 1>&6
4259 else
4260   cat > conftest.$ac_ext <<EOF
4261 #line 4262 "configure"
4262 #include "confdefs.h"
4263 #include <$ac_hdr>
4264 EOF
4265 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4266 { (eval echo configure:4267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4267 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4268 if test -z "$ac_err"; then
4269   rm -rf conftest*
4270   eval "ac_cv_header_$ac_safe=yes"
4271 else
4272   echo "$ac_err" >&5
4273   echo "configure: failed program was:" >&5
4274   cat conftest.$ac_ext >&5
4275   rm -rf conftest*
4276   eval "ac_cv_header_$ac_safe=no"
4277 fi
4278 rm -f conftest*
4279 fi
4280 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4281   echo "$ac_t""yes" 1>&6
4282     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4283   cat >> confdefs.h <<EOF
4284 #define $ac_tr_hdr 1
4285 EOF
4286  
4287 else
4288   echo "$ac_t""no" 1>&6
4289 fi
4290 done
4291
4292
4293     for ac_hdr in readline.h readline/readline.h
4294 do
4295 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4296 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4297 echo "configure:4298: checking for $ac_hdr" >&5
4298 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4299   echo $ac_n "(cached) $ac_c" 1>&6
4300 else
4301   cat > conftest.$ac_ext <<EOF
4302 #line 4303 "configure"
4303 #include "confdefs.h"
4304 #include <$ac_hdr>
4305 EOF
4306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4307 { (eval echo configure:4308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4309 if test -z "$ac_err"; then
4310   rm -rf conftest*
4311   eval "ac_cv_header_$ac_safe=yes"
4312 else
4313   echo "$ac_err" >&5
4314   echo "configure: failed program was:" >&5
4315   cat conftest.$ac_ext >&5
4316   rm -rf conftest*
4317   eval "ac_cv_header_$ac_safe=no"
4318 fi
4319 rm -f conftest*
4320 fi
4321 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4322   echo "$ac_t""yes" 1>&6
4323     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4324   cat >> confdefs.h <<EOF
4325 #define $ac_tr_hdr 1
4326 EOF
4327  
4328       for termlib in ncurses curses termcap terminfo termlib; do
4329        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4330 echo "configure:4331: checking for tgetent in -l${termlib}" >&5
4331 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4332 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4333   echo $ac_n "(cached) $ac_c" 1>&6
4334 else
4335   ac_save_LIBS="$LIBS"
4336 LIBS="-l${termlib}  $LIBS"
4337 cat > conftest.$ac_ext <<EOF
4338 #line 4339 "configure"
4339 #include "confdefs.h"
4340 /* Override any gcc2 internal prototype to avoid an error.  */
4341 /* We use char because int might match the return type of a gcc2
4342     builtin and then its argument prototype would still apply.  */
4343 char tgetent();
4344
4345 int main() {
4346 tgetent()
4347 ; return 0; }
4348 EOF
4349 if { (eval echo configure:4350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4350   rm -rf conftest*
4351   eval "ac_cv_lib_$ac_lib_var=yes"
4352 else
4353   echo "configure: failed program was:" >&5
4354   cat conftest.$ac_ext >&5
4355   rm -rf conftest*
4356   eval "ac_cv_lib_$ac_lib_var=no"
4357 fi
4358 rm -f conftest*
4359 LIBS="$ac_save_LIBS"
4360
4361 fi
4362 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4363   echo "$ac_t""yes" 1>&6
4364   TERMLIBS="-l${termlib}"; break
4365 else
4366   echo "$ac_t""no" 1>&6
4367 fi
4368
4369       done
4370       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4371 echo "configure:4372: checking for rl_callback_handler_install in -lreadline" >&5
4372 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4373 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4374   echo $ac_n "(cached) $ac_c" 1>&6
4375 else
4376   ac_save_LIBS="$LIBS"
4377 LIBS="-lreadline $TERMLIBS $LIBS"
4378 cat > conftest.$ac_ext <<EOF
4379 #line 4380 "configure"
4380 #include "confdefs.h"
4381 /* Override any gcc2 internal prototype to avoid an error.  */
4382 /* We use char because int might match the return type of a gcc2
4383     builtin and then its argument prototype would still apply.  */
4384 char rl_callback_handler_install();
4385
4386 int main() {
4387 rl_callback_handler_install()
4388 ; return 0; }
4389 EOF
4390 if { (eval echo configure:4391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4391   rm -rf conftest*
4392   eval "ac_cv_lib_$ac_lib_var=yes"
4393 else
4394   echo "configure: failed program was:" >&5
4395   cat conftest.$ac_ext >&5
4396   rm -rf conftest*
4397   eval "ac_cv_lib_$ac_lib_var=no"
4398 fi
4399 rm -f conftest*
4400 LIBS="$ac_save_LIBS"
4401
4402 fi
4403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4404   echo "$ac_t""yes" 1>&6
4405   TERMLIBS="-lreadline $TERMLIBS"
4406        cat >> confdefs.h <<\EOF
4407 #define HAVE_LIBREADLINE 1
4408 EOF
4409
4410        break
4411 else
4412   echo "$ac_t""no" 1>&6
4413 TERMLIBS=
4414 fi
4415
4416 else
4417   echo "$ac_t""no" 1>&6
4418 fi
4419 done
4420
4421     ;;
4422   no)
4423     echo "$ac_t""no" 1>&6
4424     ;;
4425   *)
4426     echo "$ac_t""yes" 1>&6
4427
4428     # Needed for AC_CHECK_HEADERS and AC_CHECK_LIB to look at
4429     # alternate readline path
4430     _ldflags=${LDFLAGS}
4431     _cppflags=${CPPFLAGS}
4432
4433     # Add additional search path
4434     LDFLAGS="-L$with_readline/lib $LDFLAGS"
4435     CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4436
4437     for ac_hdr in readline.h history.h readline/readline.h
4438 do
4439 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4440 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4441 echo "configure:4442: checking for $ac_hdr" >&5
4442 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4443   echo $ac_n "(cached) $ac_c" 1>&6
4444 else
4445   cat > conftest.$ac_ext <<EOF
4446 #line 4447 "configure"
4447 #include "confdefs.h"
4448 #include <$ac_hdr>
4449 EOF
4450 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4451 { (eval echo configure:4452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4452 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4453 if test -z "$ac_err"; then
4454   rm -rf conftest*
4455   eval "ac_cv_header_$ac_safe=yes"
4456 else
4457   echo "$ac_err" >&5
4458   echo "configure: failed program was:" >&5
4459   cat conftest.$ac_ext >&5
4460   rm -rf conftest*
4461   eval "ac_cv_header_$ac_safe=no"
4462 fi
4463 rm -f conftest*
4464 fi
4465 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4466   echo "$ac_t""yes" 1>&6
4467     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4468   cat >> confdefs.h <<EOF
4469 #define $ac_tr_hdr 1
4470 EOF
4471  
4472 else
4473   echo "$ac_t""no" 1>&6
4474 fi
4475 done
4476
4477     for ac_hdr in readline/history.h
4478 do
4479 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4480 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4481 echo "configure:4482: checking for $ac_hdr" >&5
4482 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4483   echo $ac_n "(cached) $ac_c" 1>&6
4484 else
4485   cat > conftest.$ac_ext <<EOF
4486 #line 4487 "configure"
4487 #include "confdefs.h"
4488 #include <$ac_hdr>
4489 EOF
4490 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4491 { (eval echo configure:4492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4492 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4493 if test -z "$ac_err"; then
4494   rm -rf conftest*
4495   eval "ac_cv_header_$ac_safe=yes"
4496 else
4497   echo "$ac_err" >&5
4498   echo "configure: failed program was:" >&5
4499   cat conftest.$ac_ext >&5
4500   rm -rf conftest*
4501   eval "ac_cv_header_$ac_safe=no"
4502 fi
4503 rm -f conftest*
4504 fi
4505 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4506   echo "$ac_t""yes" 1>&6
4507     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4508   cat >> confdefs.h <<EOF
4509 #define $ac_tr_hdr 1
4510 EOF
4511  
4512 else
4513   echo "$ac_t""no" 1>&6
4514 fi
4515 done
4516
4517
4518     for ac_hdr in readline.h readline/readline.h
4519 do
4520 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4521 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4522 echo "configure:4523: checking for $ac_hdr" >&5
4523 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4524   echo $ac_n "(cached) $ac_c" 1>&6
4525 else
4526   cat > conftest.$ac_ext <<EOF
4527 #line 4528 "configure"
4528 #include "confdefs.h"
4529 #include <$ac_hdr>
4530 EOF
4531 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4532 { (eval echo configure:4533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4533 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4534 if test -z "$ac_err"; then
4535   rm -rf conftest*
4536   eval "ac_cv_header_$ac_safe=yes"
4537 else
4538   echo "$ac_err" >&5
4539   echo "configure: failed program was:" >&5
4540   cat conftest.$ac_ext >&5
4541   rm -rf conftest*
4542   eval "ac_cv_header_$ac_safe=no"
4543 fi
4544 rm -f conftest*
4545 fi
4546 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4547   echo "$ac_t""yes" 1>&6
4548     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4549   cat >> confdefs.h <<EOF
4550 #define $ac_tr_hdr 1
4551 EOF
4552  
4553       for termlib in ncurses curses termcap terminfo termlib; do
4554        echo $ac_n "checking for tgetent in -l${termlib}""... $ac_c" 1>&6
4555 echo "configure:4556: checking for tgetent in -l${termlib}" >&5
4556 ac_lib_var=`echo ${termlib}'_'tgetent | sed 'y%./+-%__p_%'`
4557 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4558   echo $ac_n "(cached) $ac_c" 1>&6
4559 else
4560   ac_save_LIBS="$LIBS"
4561 LIBS="-l${termlib}  $LIBS"
4562 cat > conftest.$ac_ext <<EOF
4563 #line 4564 "configure"
4564 #include "confdefs.h"
4565 /* Override any gcc2 internal prototype to avoid an error.  */
4566 /* We use char because int might match the return type of a gcc2
4567     builtin and then its argument prototype would still apply.  */
4568 char tgetent();
4569
4570 int main() {
4571 tgetent()
4572 ; return 0; }
4573 EOF
4574 if { (eval echo configure:4575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4575   rm -rf conftest*
4576   eval "ac_cv_lib_$ac_lib_var=yes"
4577 else
4578   echo "configure: failed program was:" >&5
4579   cat conftest.$ac_ext >&5
4580   rm -rf conftest*
4581   eval "ac_cv_lib_$ac_lib_var=no"
4582 fi
4583 rm -f conftest*
4584 LIBS="$ac_save_LIBS"
4585
4586 fi
4587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4588   echo "$ac_t""yes" 1>&6
4589   TERMLIBS="-l${termlib}"; break
4590 else
4591   echo "$ac_t""no" 1>&6
4592 fi
4593
4594       done
4595       echo $ac_n "checking for rl_callback_handler_install in -lreadline""... $ac_c" 1>&6
4596 echo "configure:4597: checking for rl_callback_handler_install in -lreadline" >&5
4597 ac_lib_var=`echo readline'_'rl_callback_handler_install | sed 'y%./+-%__p_%'`
4598 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4599   echo $ac_n "(cached) $ac_c" 1>&6
4600 else
4601   ac_save_LIBS="$LIBS"
4602 LIBS="-lreadline $TERMLIBS $LIBS"
4603 cat > conftest.$ac_ext <<EOF
4604 #line 4605 "configure"
4605 #include "confdefs.h"
4606 /* Override any gcc2 internal prototype to avoid an error.  */
4607 /* We use char because int might match the return type of a gcc2
4608     builtin and then its argument prototype would still apply.  */
4609 char rl_callback_handler_install();
4610
4611 int main() {
4612 rl_callback_handler_install()
4613 ; return 0; }
4614 EOF
4615 if { (eval echo configure:4616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4616   rm -rf conftest*
4617   eval "ac_cv_lib_$ac_lib_var=yes"
4618 else
4619   echo "configure: failed program was:" >&5
4620   cat conftest.$ac_ext >&5
4621   rm -rf conftest*
4622   eval "ac_cv_lib_$ac_lib_var=no"
4623 fi
4624 rm -f conftest*
4625 LIBS="$ac_save_LIBS"
4626
4627 fi
4628 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4629   echo "$ac_t""yes" 1>&6
4630   TERMLDFLAGS="-L$with_readline/lib"
4631        TERMCPPFLAGS="-I$with_readline/include"
4632        CPPFLAGS="-I$with_readline/include $CPPFLAGS"
4633        TERMLIBS="-lreadline $TERMLIBS"
4634        cat >> confdefs.h <<\EOF
4635 #define HAVE_LIBREADLINE 1
4636 EOF
4637
4638        break
4639 else
4640   echo "$ac_t""no" 1>&6
4641 TERMLIBS= CPPFLAGS=$_cppflags
4642 fi
4643
4644 else
4645   echo "$ac_t""no" 1>&6
4646 fi
4647 done
4648
4649
4650     LDFLAGS=$_ldflags
4651     ;;
4652   esac
4653 else
4654   echo "$ac_t""no" 1>&6
4655
4656 fi
4657
4658
4659
4660
4661 # The readline API changed slightly from readline3 to readline4, so
4662 # code will generate warnings on one of them unless we have a few
4663 # special cases.
4664 echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
4665 echo "configure:4666: checking for rl_completion_matches in -lreadline" >&5
4666 ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
4667 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4668   echo $ac_n "(cached) $ac_c" 1>&6
4669 else
4670   ac_save_LIBS="$LIBS"
4671 LIBS="-lreadline $TERMLIBS $LIBS"
4672 cat > conftest.$ac_ext <<EOF
4673 #line 4674 "configure"
4674 #include "confdefs.h"
4675 /* Override any gcc2 internal prototype to avoid an error.  */
4676 /* We use char because int might match the return type of a gcc2
4677     builtin and then its argument prototype would still apply.  */
4678 char rl_completion_matches();
4679
4680 int main() {
4681 rl_completion_matches()
4682 ; return 0; }
4683 EOF
4684 if { (eval echo configure:4685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4685   rm -rf conftest*
4686   eval "ac_cv_lib_$ac_lib_var=yes"
4687 else
4688   echo "configure: failed program was:" >&5
4689   cat conftest.$ac_ext >&5
4690   rm -rf conftest*
4691   eval "ac_cv_lib_$ac_lib_var=no"
4692 fi
4693 rm -f conftest*
4694 LIBS="$ac_save_LIBS"
4695
4696 fi
4697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4698   echo "$ac_t""yes" 1>&6
4699   cat >> confdefs.h <<\EOF
4700 #define HAVE_NEW_LIBREADLINE 1
4701 EOF
4702
4703 else
4704   echo "$ac_t""no" 1>&6
4705 fi
4706
4707
4708 # The following test taken from the cvs sources
4709 # If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
4710 # The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
4711 # libsocket.so which has a bad implementation of gethostbyname (it
4712 # only looks in /etc/hosts), so we only look for -lsocket if we need
4713 # it.
4714 for ac_func in connect
4715 do
4716 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4717 echo "configure:4718: checking for $ac_func" >&5
4718 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4719   echo $ac_n "(cached) $ac_c" 1>&6
4720 else
4721   cat > conftest.$ac_ext <<EOF
4722 #line 4723 "configure"
4723 #include "confdefs.h"
4724 /* System header to define __stub macros and hopefully few prototypes,
4725     which can conflict with char $ac_func(); below.  */
4726 #include <assert.h>
4727 /* Override any gcc2 internal prototype to avoid an error.  */
4728 /* We use char because int might match the return type of a gcc2
4729     builtin and then its argument prototype would still apply.  */
4730 char $ac_func();
4731
4732 int main() {
4733
4734 /* The GNU C library defines this for functions which it implements
4735     to always fail with ENOSYS.  Some functions are actually named
4736     something starting with __ and the normal name is an alias.  */
4737 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4738 choke me
4739 #else
4740 $ac_func();
4741 #endif
4742
4743 ; return 0; }
4744 EOF
4745 if { (eval echo configure:4746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4746   rm -rf conftest*
4747   eval "ac_cv_func_$ac_func=yes"
4748 else
4749   echo "configure: failed program was:" >&5
4750   cat conftest.$ac_ext >&5
4751   rm -rf conftest*
4752   eval "ac_cv_func_$ac_func=no"
4753 fi
4754 rm -f conftest*
4755 fi
4756
4757 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4758   echo "$ac_t""yes" 1>&6
4759     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4760   cat >> confdefs.h <<EOF
4761 #define $ac_tr_func 1
4762 EOF
4763  
4764 else
4765   echo "$ac_t""no" 1>&6
4766 fi
4767 done
4768
4769 if test x"$ac_cv_func_connect" = x"no"; then
4770     case "$LIBS" in
4771     *-lnsl*) ;;
4772     *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6
4773 echo "configure:4774: checking for printf in -lnsl_s" >&5
4774 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'`
4775 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4776   echo $ac_n "(cached) $ac_c" 1>&6
4777 else
4778   ac_save_LIBS="$LIBS"
4779 LIBS="-lnsl_s  $LIBS"
4780 cat > conftest.$ac_ext <<EOF
4781 #line 4782 "configure"
4782 #include "confdefs.h"
4783 /* Override any gcc2 internal prototype to avoid an error.  */
4784 /* We use char because int might match the return type of a gcc2
4785     builtin and then its argument prototype would still apply.  */
4786 char printf();
4787
4788 int main() {
4789 printf()
4790 ; return 0; }
4791 EOF
4792 if { (eval echo configure:4793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4793   rm -rf conftest*
4794   eval "ac_cv_lib_$ac_lib_var=yes"
4795 else
4796   echo "configure: failed program was:" >&5
4797   cat conftest.$ac_ext >&5
4798   rm -rf conftest*
4799   eval "ac_cv_lib_$ac_lib_var=no"
4800 fi
4801 rm -f conftest*
4802 LIBS="$ac_save_LIBS"
4803
4804 fi
4805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4806   echo "$ac_t""yes" 1>&6
4807     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4808     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4809   cat >> confdefs.h <<EOF
4810 #define $ac_tr_lib 1
4811 EOF
4812
4813   LIBS="-lnsl_s $LIBS"
4814
4815 else
4816   echo "$ac_t""no" 1>&6
4817 fi
4818  ;;
4819     esac
4820     case "$LIBS" in
4821     *-lnsl*) ;;
4822     *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6
4823 echo "configure:4824: checking for printf in -lnsl" >&5
4824 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'`
4825 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4826   echo $ac_n "(cached) $ac_c" 1>&6
4827 else
4828   ac_save_LIBS="$LIBS"
4829 LIBS="-lnsl  $LIBS"
4830 cat > conftest.$ac_ext <<EOF
4831 #line 4832 "configure"
4832 #include "confdefs.h"
4833 /* Override any gcc2 internal prototype to avoid an error.  */
4834 /* We use char because int might match the return type of a gcc2
4835     builtin and then its argument prototype would still apply.  */
4836 char printf();
4837
4838 int main() {
4839 printf()
4840 ; return 0; }
4841 EOF
4842 if { (eval echo configure:4843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4843   rm -rf conftest*
4844   eval "ac_cv_lib_$ac_lib_var=yes"
4845 else
4846   echo "configure: failed program was:" >&5
4847   cat conftest.$ac_ext >&5
4848   rm -rf conftest*
4849   eval "ac_cv_lib_$ac_lib_var=no"
4850 fi
4851 rm -f conftest*
4852 LIBS="$ac_save_LIBS"
4853
4854 fi
4855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4856   echo "$ac_t""yes" 1>&6
4857     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4858     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4859   cat >> confdefs.h <<EOF
4860 #define $ac_tr_lib 1
4861 EOF
4862
4863   LIBS="-lnsl $LIBS"
4864
4865 else
4866   echo "$ac_t""no" 1>&6
4867 fi
4868  ;;
4869     esac
4870     case "$LIBS" in
4871     *-lsocket*) ;;
4872     *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
4873 echo "configure:4874: checking for connect in -lsocket" >&5
4874 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4875 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4876   echo $ac_n "(cached) $ac_c" 1>&6
4877 else
4878   ac_save_LIBS="$LIBS"
4879 LIBS="-lsocket  $LIBS"
4880 cat > conftest.$ac_ext <<EOF
4881 #line 4882 "configure"
4882 #include "confdefs.h"
4883 /* Override any gcc2 internal prototype to avoid an error.  */
4884 /* We use char because int might match the return type of a gcc2
4885     builtin and then its argument prototype would still apply.  */
4886 char connect();
4887
4888 int main() {
4889 connect()
4890 ; return 0; }
4891 EOF
4892 if { (eval echo configure:4893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4893   rm -rf conftest*
4894   eval "ac_cv_lib_$ac_lib_var=yes"
4895 else
4896   echo "configure: failed program was:" >&5
4897   cat conftest.$ac_ext >&5
4898   rm -rf conftest*
4899   eval "ac_cv_lib_$ac_lib_var=no"
4900 fi
4901 rm -f conftest*
4902 LIBS="$ac_save_LIBS"
4903
4904 fi
4905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4906   echo "$ac_t""yes" 1>&6
4907     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4908     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4909   cat >> confdefs.h <<EOF
4910 #define $ac_tr_lib 1
4911 EOF
4912
4913   LIBS="-lsocket $LIBS"
4914
4915 else
4916   echo "$ac_t""no" 1>&6
4917 fi
4918  ;;
4919     esac
4920     case "$LIBS" in
4921     *-linet*) ;;
4922     *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6
4923 echo "configure:4924: checking for connect in -linet" >&5
4924 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'`
4925 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4926   echo $ac_n "(cached) $ac_c" 1>&6
4927 else
4928   ac_save_LIBS="$LIBS"
4929 LIBS="-linet  $LIBS"
4930 cat > conftest.$ac_ext <<EOF
4931 #line 4932 "configure"
4932 #include "confdefs.h"
4933 /* Override any gcc2 internal prototype to avoid an error.  */
4934 /* We use char because int might match the return type of a gcc2
4935     builtin and then its argument prototype would still apply.  */
4936 char connect();
4937
4938 int main() {
4939 connect()
4940 ; return 0; }
4941 EOF
4942 if { (eval echo configure:4943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4943   rm -rf conftest*
4944   eval "ac_cv_lib_$ac_lib_var=yes"
4945 else
4946   echo "configure: failed program was:" >&5
4947   cat conftest.$ac_ext >&5
4948   rm -rf conftest*
4949   eval "ac_cv_lib_$ac_lib_var=no"
4950 fi
4951 rm -f conftest*
4952 LIBS="$ac_save_LIBS"
4953
4954 fi
4955 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4956   echo "$ac_t""yes" 1>&6
4957     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4958     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4959   cat >> confdefs.h <<EOF
4960 #define $ac_tr_lib 1
4961 EOF
4962
4963   LIBS="-linet $LIBS"
4964
4965 else
4966   echo "$ac_t""no" 1>&6
4967 fi
4968  ;;
4969     esac
4970             if test x"$ac_cv_lib_socket_connect" = x"yes" || 
4971        test x"$ac_cv_lib_inet_connect" = x"yes"; then
4972         # ac_cv_func_connect=yes
4973         # don't!  it would cause AC_CHECK_FUNC to succeed next time configure is run
4974         cat >> confdefs.h <<\EOF
4975 #define HAVE_CONNECT 1
4976 EOF
4977
4978     fi
4979 fi
4980
4981 ###############################################
4982 # test for where we get get_yp_default_domain() from
4983 for ac_func in yp_get_default_domain
4984 do
4985 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4986 echo "configure:4987: checking for $ac_func" >&5
4987 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4988   echo $ac_n "(cached) $ac_c" 1>&6
4989 else
4990   cat > conftest.$ac_ext <<EOF
4991 #line 4992 "configure"
4992 #include "confdefs.h"
4993 /* System header to define __stub macros and hopefully few prototypes,
4994     which can conflict with char $ac_func(); below.  */
4995 #include <assert.h>
4996 /* Override any gcc2 internal prototype to avoid an error.  */
4997 /* We use char because int might match the return type of a gcc2
4998     builtin and then its argument prototype would still apply.  */
4999 char $ac_func();
5000
5001 int main() {
5002
5003 /* The GNU C library defines this for functions which it implements
5004     to always fail with ENOSYS.  Some functions are actually named
5005     something starting with __ and the normal name is an alias.  */
5006 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5007 choke me
5008 #else
5009 $ac_func();
5010 #endif
5011
5012 ; return 0; }
5013 EOF
5014 if { (eval echo configure:5015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5015   rm -rf conftest*
5016   eval "ac_cv_func_$ac_func=yes"
5017 else
5018   echo "configure: failed program was:" >&5
5019   cat conftest.$ac_ext >&5
5020   rm -rf conftest*
5021   eval "ac_cv_func_$ac_func=no"
5022 fi
5023 rm -f conftest*
5024 fi
5025
5026 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5027   echo "$ac_t""yes" 1>&6
5028     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5029   cat >> confdefs.h <<EOF
5030 #define $ac_tr_func 1
5031 EOF
5032  
5033 else
5034   echo "$ac_t""no" 1>&6
5035 fi
5036 done
5037
5038 if test x"$ac_cv_func_yp_get_default_domain" = x"no"; then
5039         echo $ac_n "checking for yp_get_default_domain in -lnsl""... $ac_c" 1>&6
5040 echo "configure:5041: checking for yp_get_default_domain in -lnsl" >&5
5041 ac_lib_var=`echo nsl'_'yp_get_default_domain | sed 'y%./+-%__p_%'`
5042 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5043   echo $ac_n "(cached) $ac_c" 1>&6
5044 else
5045   ac_save_LIBS="$LIBS"
5046 LIBS="-lnsl  $LIBS"
5047 cat > conftest.$ac_ext <<EOF
5048 #line 5049 "configure"
5049 #include "confdefs.h"
5050 /* Override any gcc2 internal prototype to avoid an error.  */
5051 /* We use char because int might match the return type of a gcc2
5052     builtin and then its argument prototype would still apply.  */
5053 char yp_get_default_domain();
5054
5055 int main() {
5056 yp_get_default_domain()
5057 ; return 0; }
5058 EOF
5059 if { (eval echo configure:5060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5060   rm -rf conftest*
5061   eval "ac_cv_lib_$ac_lib_var=yes"
5062 else
5063   echo "configure: failed program was:" >&5
5064   cat conftest.$ac_ext >&5
5065   rm -rf conftest*
5066   eval "ac_cv_lib_$ac_lib_var=no"
5067 fi
5068 rm -f conftest*
5069 LIBS="$ac_save_LIBS"
5070
5071 fi
5072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5073   echo "$ac_t""yes" 1>&6
5074   LIBS="$LIBS -lnsl";
5075         cat >> confdefs.h <<\EOF
5076 #define HAVE_YP_GET_DEFAULT_DOMAIN 1
5077 EOF
5078
5079 else
5080   echo "$ac_t""no" 1>&6
5081 fi
5082  
5083 fi
5084
5085 # Check if we have execl, if not we need to compile smbrun.
5086 for ac_func in execl
5087 do
5088 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5089 echo "configure:5090: checking for $ac_func" >&5
5090 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5091   echo $ac_n "(cached) $ac_c" 1>&6
5092 else
5093   cat > conftest.$ac_ext <<EOF
5094 #line 5095 "configure"
5095 #include "confdefs.h"
5096 /* System header to define __stub macros and hopefully few prototypes,
5097     which can conflict with char $ac_func(); below.  */
5098 #include <assert.h>
5099 /* Override any gcc2 internal prototype to avoid an error.  */
5100 /* We use char because int might match the return type of a gcc2
5101     builtin and then its argument prototype would still apply.  */
5102 char $ac_func();
5103
5104 int main() {
5105
5106 /* The GNU C library defines this for functions which it implements
5107     to always fail with ENOSYS.  Some functions are actually named
5108     something starting with __ and the normal name is an alias.  */
5109 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5110 choke me
5111 #else
5112 $ac_func();
5113 #endif
5114
5115 ; return 0; }
5116 EOF
5117 if { (eval echo configure:5118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5118   rm -rf conftest*
5119   eval "ac_cv_func_$ac_func=yes"
5120 else
5121   echo "configure: failed program was:" >&5
5122   cat conftest.$ac_ext >&5
5123   rm -rf conftest*
5124   eval "ac_cv_func_$ac_func=no"
5125 fi
5126 rm -f conftest*
5127 fi
5128
5129 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5130   echo "$ac_t""yes" 1>&6
5131     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5132   cat >> confdefs.h <<EOF
5133 #define $ac_tr_func 1
5134 EOF
5135  
5136 else
5137   echo "$ac_t""no" 1>&6
5138 fi
5139 done
5140
5141 if test x"$ac_cv_func_execl" = x"no"; then
5142     RUNPROG="bin/smbrun"
5143 else
5144     RUNPROG=""
5145 fi
5146
5147 for ac_func in waitpid getcwd strdup strtoul strerror chown fchown chmod fchmod chroot
5148 do
5149 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5150 echo "configure:5151: checking for $ac_func" >&5
5151 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5152   echo $ac_n "(cached) $ac_c" 1>&6
5153 else
5154   cat > conftest.$ac_ext <<EOF
5155 #line 5156 "configure"
5156 #include "confdefs.h"
5157 /* System header to define __stub macros and hopefully few prototypes,
5158     which can conflict with char $ac_func(); below.  */
5159 #include <assert.h>
5160 /* Override any gcc2 internal prototype to avoid an error.  */
5161 /* We use char because int might match the return type of a gcc2
5162     builtin and then its argument prototype would still apply.  */
5163 char $ac_func();
5164
5165 int main() {
5166
5167 /* The GNU C library defines this for functions which it implements
5168     to always fail with ENOSYS.  Some functions are actually named
5169     something starting with __ and the normal name is an alias.  */
5170 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5171 choke me
5172 #else
5173 $ac_func();
5174 #endif
5175
5176 ; return 0; }
5177 EOF
5178 if { (eval echo configure:5179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5179   rm -rf conftest*
5180   eval "ac_cv_func_$ac_func=yes"
5181 else
5182   echo "configure: failed program was:" >&5
5183   cat conftest.$ac_ext >&5
5184   rm -rf conftest*
5185   eval "ac_cv_func_$ac_func=no"
5186 fi
5187 rm -f conftest*
5188 fi
5189
5190 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5191   echo "$ac_t""yes" 1>&6
5192     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5193   cat >> confdefs.h <<EOF
5194 #define $ac_tr_func 1
5195 EOF
5196  
5197 else
5198   echo "$ac_t""no" 1>&6
5199 fi
5200 done
5201
5202 for ac_func in fstat strchr utime utimes getrlimit fsync bzero memset strlcpy strlcat setpgid
5203 do
5204 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5205 echo "configure:5206: checking for $ac_func" >&5
5206 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5207   echo $ac_n "(cached) $ac_c" 1>&6
5208 else
5209   cat > conftest.$ac_ext <<EOF
5210 #line 5211 "configure"
5211 #include "confdefs.h"
5212 /* System header to define __stub macros and hopefully few prototypes,
5213     which can conflict with char $ac_func(); below.  */
5214 #include <assert.h>
5215 /* Override any gcc2 internal prototype to avoid an error.  */
5216 /* We use char because int might match the return type of a gcc2
5217     builtin and then its argument prototype would still apply.  */
5218 char $ac_func();
5219
5220 int main() {
5221
5222 /* The GNU C library defines this for functions which it implements
5223     to always fail with ENOSYS.  Some functions are actually named
5224     something starting with __ and the normal name is an alias.  */
5225 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5226 choke me
5227 #else
5228 $ac_func();
5229 #endif
5230
5231 ; return 0; }
5232 EOF
5233 if { (eval echo configure:5234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5234   rm -rf conftest*
5235   eval "ac_cv_func_$ac_func=yes"
5236 else
5237   echo "configure: failed program was:" >&5
5238   cat conftest.$ac_ext >&5
5239   rm -rf conftest*
5240   eval "ac_cv_func_$ac_func=no"
5241 fi
5242 rm -f conftest*
5243 fi
5244
5245 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5246   echo "$ac_t""yes" 1>&6
5247     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5248   cat >> confdefs.h <<EOF
5249 #define $ac_tr_func 1
5250 EOF
5251  
5252 else
5253   echo "$ac_t""no" 1>&6
5254 fi
5255 done
5256
5257 for ac_func in memmove vsnprintf snprintf asprintf vasprintf setsid glob strpbrk pipe crypt16 getauthuid
5258 do
5259 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5260 echo "configure:5261: checking for $ac_func" >&5
5261 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5262   echo $ac_n "(cached) $ac_c" 1>&6
5263 else
5264   cat > conftest.$ac_ext <<EOF
5265 #line 5266 "configure"
5266 #include "confdefs.h"
5267 /* System header to define __stub macros and hopefully few prototypes,
5268     which can conflict with char $ac_func(); below.  */
5269 #include <assert.h>
5270 /* Override any gcc2 internal prototype to avoid an error.  */
5271 /* We use char because int might match the return type of a gcc2
5272     builtin and then its argument prototype would still apply.  */
5273 char $ac_func();
5274
5275 int main() {
5276
5277 /* The GNU C library defines this for functions which it implements
5278     to always fail with ENOSYS.  Some functions are actually named
5279     something starting with __ and the normal name is an alias.  */
5280 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5281 choke me
5282 #else
5283 $ac_func();
5284 #endif
5285
5286 ; return 0; }
5287 EOF
5288 if { (eval echo configure:5289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5289   rm -rf conftest*
5290   eval "ac_cv_func_$ac_func=yes"
5291 else
5292   echo "configure: failed program was:" >&5
5293   cat conftest.$ac_ext >&5
5294   rm -rf conftest*
5295   eval "ac_cv_func_$ac_func=no"
5296 fi
5297 rm -f conftest*
5298 fi
5299
5300 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5301   echo "$ac_t""yes" 1>&6
5302     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5303   cat >> confdefs.h <<EOF
5304 #define $ac_tr_func 1
5305 EOF
5306  
5307 else
5308   echo "$ac_t""no" 1>&6
5309 fi
5310 done
5311
5312 for ac_func in strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent
5313 do
5314 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5315 echo "configure:5316: checking for $ac_func" >&5
5316 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5317   echo $ac_n "(cached) $ac_c" 1>&6
5318 else
5319   cat > conftest.$ac_ext <<EOF
5320 #line 5321 "configure"
5321 #include "confdefs.h"
5322 /* System header to define __stub macros and hopefully few prototypes,
5323     which can conflict with char $ac_func(); below.  */
5324 #include <assert.h>
5325 /* Override any gcc2 internal prototype to avoid an error.  */
5326 /* We use char because int might match the return type of a gcc2
5327     builtin and then its argument prototype would still apply.  */
5328 char $ac_func();
5329
5330 int main() {
5331
5332 /* The GNU C library defines this for functions which it implements
5333     to always fail with ENOSYS.  Some functions are actually named
5334     something starting with __ and the normal name is an alias.  */
5335 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5336 choke me
5337 #else
5338 $ac_func();
5339 #endif
5340
5341 ; return 0; }
5342 EOF
5343 if { (eval echo configure:5344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5344   rm -rf conftest*
5345   eval "ac_cv_func_$ac_func=yes"
5346 else
5347   echo "configure: failed program was:" >&5
5348   cat conftest.$ac_ext >&5
5349   rm -rf conftest*
5350   eval "ac_cv_func_$ac_func=no"
5351 fi
5352 rm -f conftest*
5353 fi
5354
5355 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5356   echo "$ac_t""yes" 1>&6
5357     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5358   cat >> confdefs.h <<EOF
5359 #define $ac_tr_func 1
5360 EOF
5361  
5362 else
5363   echo "$ac_t""no" 1>&6
5364 fi
5365 done
5366
5367 for ac_func in initgroups select poll rdchk getgrnam getgrent pathconf
5368 do
5369 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5370 echo "configure:5371: checking for $ac_func" >&5
5371 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5372   echo $ac_n "(cached) $ac_c" 1>&6
5373 else
5374   cat > conftest.$ac_ext <<EOF
5375 #line 5376 "configure"
5376 #include "confdefs.h"
5377 /* System header to define __stub macros and hopefully few prototypes,
5378     which can conflict with char $ac_func(); below.  */
5379 #include <assert.h>
5380 /* Override any gcc2 internal prototype to avoid an error.  */
5381 /* We use char because int might match the return type of a gcc2
5382     builtin and then its argument prototype would still apply.  */
5383 char $ac_func();
5384
5385 int main() {
5386
5387 /* The GNU C library defines this for functions which it implements
5388     to always fail with ENOSYS.  Some functions are actually named
5389     something starting with __ and the normal name is an alias.  */
5390 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5391 choke me
5392 #else
5393 $ac_func();
5394 #endif
5395
5396 ; return 0; }
5397 EOF
5398 if { (eval echo configure:5399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5399   rm -rf conftest*
5400   eval "ac_cv_func_$ac_func=yes"
5401 else
5402   echo "configure: failed program was:" >&5
5403   cat conftest.$ac_ext >&5
5404   rm -rf conftest*
5405   eval "ac_cv_func_$ac_func=no"
5406 fi
5407 rm -f conftest*
5408 fi
5409
5410 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5411   echo "$ac_t""yes" 1>&6
5412     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5413   cat >> confdefs.h <<EOF
5414 #define $ac_tr_func 1
5415 EOF
5416  
5417 else
5418   echo "$ac_t""no" 1>&6
5419 fi
5420 done
5421
5422 for ac_func in setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate stat64 fstat64
5423 do
5424 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5425 echo "configure:5426: checking for $ac_func" >&5
5426 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5427   echo $ac_n "(cached) $ac_c" 1>&6
5428 else
5429   cat > conftest.$ac_ext <<EOF
5430 #line 5431 "configure"
5431 #include "confdefs.h"
5432 /* System header to define __stub macros and hopefully few prototypes,
5433     which can conflict with char $ac_func(); below.  */
5434 #include <assert.h>
5435 /* Override any gcc2 internal prototype to avoid an error.  */
5436 /* We use char because int might match the return type of a gcc2
5437     builtin and then its argument prototype would still apply.  */
5438 char $ac_func();
5439
5440 int main() {
5441
5442 /* The GNU C library defines this for functions which it implements
5443     to always fail with ENOSYS.  Some functions are actually named
5444     something starting with __ and the normal name is an alias.  */
5445 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5446 choke me
5447 #else
5448 $ac_func();
5449 #endif
5450
5451 ; return 0; }
5452 EOF
5453 if { (eval echo configure:5454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5454   rm -rf conftest*
5455   eval "ac_cv_func_$ac_func=yes"
5456 else
5457   echo "configure: failed program was:" >&5
5458   cat conftest.$ac_ext >&5
5459   rm -rf conftest*
5460   eval "ac_cv_func_$ac_func=no"
5461 fi
5462 rm -f conftest*
5463 fi
5464
5465 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5466   echo "$ac_t""yes" 1>&6
5467     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5468   cat >> confdefs.h <<EOF
5469 #define $ac_tr_func 1
5470 EOF
5471  
5472 else
5473   echo "$ac_t""no" 1>&6
5474 fi
5475 done
5476
5477 for ac_func in lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64
5478 do
5479 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5480 echo "configure:5481: checking for $ac_func" >&5
5481 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5482   echo $ac_n "(cached) $ac_c" 1>&6
5483 else
5484   cat > conftest.$ac_ext <<EOF
5485 #line 5486 "configure"
5486 #include "confdefs.h"
5487 /* System header to define __stub macros and hopefully few prototypes,
5488     which can conflict with char $ac_func(); below.  */
5489 #include <assert.h>
5490 /* Override any gcc2 internal prototype to avoid an error.  */
5491 /* We use char because int might match the return type of a gcc2
5492     builtin and then its argument prototype would still apply.  */
5493 char $ac_func();
5494
5495 int main() {
5496
5497 /* The GNU C library defines this for functions which it implements
5498     to always fail with ENOSYS.  Some functions are actually named
5499     something starting with __ and the normal name is an alias.  */
5500 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5501 choke me
5502 #else
5503 $ac_func();
5504 #endif
5505
5506 ; return 0; }
5507 EOF
5508 if { (eval echo configure:5509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5509   rm -rf conftest*
5510   eval "ac_cv_func_$ac_func=yes"
5511 else
5512   echo "configure: failed program was:" >&5
5513   cat conftest.$ac_ext >&5
5514   rm -rf conftest*
5515   eval "ac_cv_func_$ac_func=no"
5516 fi
5517 rm -f conftest*
5518 fi
5519
5520 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5521   echo "$ac_t""yes" 1>&6
5522     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5523   cat >> confdefs.h <<EOF
5524 #define $ac_tr_func 1
5525 EOF
5526  
5527 else
5528   echo "$ac_t""no" 1>&6
5529 fi
5530 done
5531
5532 for ac_func in fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf
5533 do
5534 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5535 echo "configure:5536: checking for $ac_func" >&5
5536 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5537   echo $ac_n "(cached) $ac_c" 1>&6
5538 else
5539   cat > conftest.$ac_ext <<EOF
5540 #line 5541 "configure"
5541 #include "confdefs.h"
5542 /* System header to define __stub macros and hopefully few prototypes,
5543     which can conflict with char $ac_func(); below.  */
5544 #include <assert.h>
5545 /* Override any gcc2 internal prototype to avoid an error.  */
5546 /* We use char because int might match the return type of a gcc2
5547     builtin and then its argument prototype would still apply.  */
5548 char $ac_func();
5549
5550 int main() {
5551
5552 /* The GNU C library defines this for functions which it implements
5553     to always fail with ENOSYS.  Some functions are actually named
5554     something starting with __ and the normal name is an alias.  */
5555 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5556 choke me
5557 #else
5558 $ac_func();
5559 #endif
5560
5561 ; return 0; }
5562 EOF
5563 if { (eval echo configure:5564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5564   rm -rf conftest*
5565   eval "ac_cv_func_$ac_func=yes"
5566 else
5567   echo "configure: failed program was:" >&5
5568   cat conftest.$ac_ext >&5
5569   rm -rf conftest*
5570   eval "ac_cv_func_$ac_func=no"
5571 fi
5572 rm -f conftest*
5573 fi
5574
5575 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5576   echo "$ac_t""yes" 1>&6
5577     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5578   cat >> confdefs.h <<EOF
5579 #define $ac_tr_func 1
5580 EOF
5581  
5582 else
5583   echo "$ac_t""no" 1>&6
5584 fi
5585 done
5586
5587 for ac_func in srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink
5588 do
5589 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5590 echo "configure:5591: checking for $ac_func" >&5
5591 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5592   echo $ac_n "(cached) $ac_c" 1>&6
5593 else
5594   cat > conftest.$ac_ext <<EOF
5595 #line 5596 "configure"
5596 #include "confdefs.h"
5597 /* System header to define __stub macros and hopefully few prototypes,
5598     which can conflict with char $ac_func(); below.  */
5599 #include <assert.h>
5600 /* Override any gcc2 internal prototype to avoid an error.  */
5601 /* We use char because int might match the return type of a gcc2
5602     builtin and then its argument prototype would still apply.  */
5603 char $ac_func();
5604
5605 int main() {
5606
5607 /* The GNU C library defines this for functions which it implements
5608     to always fail with ENOSYS.  Some functions are actually named
5609     something starting with __ and the normal name is an alias.  */
5610 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5611 choke me
5612 #else
5613 $ac_func();
5614 #endif
5615
5616 ; return 0; }
5617 EOF
5618 if { (eval echo configure:5619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5619   rm -rf conftest*
5620   eval "ac_cv_func_$ac_func=yes"
5621 else
5622   echo "configure: failed program was:" >&5
5623   cat conftest.$ac_ext >&5
5624   rm -rf conftest*
5625   eval "ac_cv_func_$ac_func=no"
5626 fi
5627 rm -f conftest*
5628 fi
5629
5630 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5631   echo "$ac_t""yes" 1>&6
5632     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5633   cat >> confdefs.h <<EOF
5634 #define $ac_tr_func 1
5635 EOF
5636  
5637 else
5638   echo "$ac_t""no" 1>&6
5639 fi
5640 done
5641
5642 for ac_func in syslog vsyslog
5643 do
5644 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5645 echo "configure:5646: checking for $ac_func" >&5
5646 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5647   echo $ac_n "(cached) $ac_c" 1>&6
5648 else
5649   cat > conftest.$ac_ext <<EOF
5650 #line 5651 "configure"
5651 #include "confdefs.h"
5652 /* System header to define __stub macros and hopefully few prototypes,
5653     which can conflict with char $ac_func(); below.  */
5654 #include <assert.h>
5655 /* Override any gcc2 internal prototype to avoid an error.  */
5656 /* We use char because int might match the return type of a gcc2
5657     builtin and then its argument prototype would still apply.  */
5658 char $ac_func();
5659
5660 int main() {
5661
5662 /* The GNU C library defines this for functions which it implements
5663     to always fail with ENOSYS.  Some functions are actually named
5664     something starting with __ and the normal name is an alias.  */
5665 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5666 choke me
5667 #else
5668 $ac_func();
5669 #endif
5670
5671 ; return 0; }
5672 EOF
5673 if { (eval echo configure:5674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5674   rm -rf conftest*
5675   eval "ac_cv_func_$ac_func=yes"
5676 else
5677   echo "configure: failed program was:" >&5
5678   cat conftest.$ac_ext >&5
5679   rm -rf conftest*
5680   eval "ac_cv_func_$ac_func=no"
5681 fi
5682 rm -f conftest*
5683 fi
5684
5685 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5686   echo "$ac_t""yes" 1>&6
5687     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5688   cat >> confdefs.h <<EOF
5689 #define $ac_tr_func 1
5690 EOF
5691  
5692 else
5693   echo "$ac_t""no" 1>&6
5694 fi
5695 done
5696
5697 # setbuffer is needed for smbtorture
5698 for ac_func in setbuffer
5699 do
5700 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5701 echo "configure:5702: checking for $ac_func" >&5
5702 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5703   echo $ac_n "(cached) $ac_c" 1>&6
5704 else
5705   cat > conftest.$ac_ext <<EOF
5706 #line 5707 "configure"
5707 #include "confdefs.h"
5708 /* System header to define __stub macros and hopefully few prototypes,
5709     which can conflict with char $ac_func(); below.  */
5710 #include <assert.h>
5711 /* Override any gcc2 internal prototype to avoid an error.  */
5712 /* We use char because int might match the return type of a gcc2
5713     builtin and then its argument prototype would still apply.  */
5714 char $ac_func();
5715
5716 int main() {
5717
5718 /* The GNU C library defines this for functions which it implements
5719     to always fail with ENOSYS.  Some functions are actually named
5720     something starting with __ and the normal name is an alias.  */
5721 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5722 choke me
5723 #else
5724 $ac_func();
5725 #endif
5726
5727 ; return 0; }
5728 EOF
5729 if { (eval echo configure:5730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5730   rm -rf conftest*
5731   eval "ac_cv_func_$ac_func=yes"
5732 else
5733   echo "configure: failed program was:" >&5
5734   cat conftest.$ac_ext >&5
5735   rm -rf conftest*
5736   eval "ac_cv_func_$ac_func=no"
5737 fi
5738 rm -f conftest*
5739 fi
5740
5741 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5742   echo "$ac_t""yes" 1>&6
5743     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5744   cat >> confdefs.h <<EOF
5745 #define $ac_tr_func 1
5746 EOF
5747  
5748 else
5749   echo "$ac_t""no" 1>&6
5750 fi
5751 done
5752
5753
5754 # syscall() is needed for smbwrapper.
5755 for ac_func in syscall
5756 do
5757 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5758 echo "configure:5759: checking for $ac_func" >&5
5759 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5760   echo $ac_n "(cached) $ac_c" 1>&6
5761 else
5762   cat > conftest.$ac_ext <<EOF
5763 #line 5764 "configure"
5764 #include "confdefs.h"
5765 /* System header to define __stub macros and hopefully few prototypes,
5766     which can conflict with char $ac_func(); below.  */
5767 #include <assert.h>
5768 /* Override any gcc2 internal prototype to avoid an error.  */
5769 /* We use char because int might match the return type of a gcc2
5770     builtin and then its argument prototype would still apply.  */
5771 char $ac_func();
5772
5773 int main() {
5774
5775 /* The GNU C library defines this for functions which it implements
5776     to always fail with ENOSYS.  Some functions are actually named
5777     something starting with __ and the normal name is an alias.  */
5778 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5779 choke me
5780 #else
5781 $ac_func();
5782 #endif
5783
5784 ; return 0; }
5785 EOF
5786 if { (eval echo configure:5787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5787   rm -rf conftest*
5788   eval "ac_cv_func_$ac_func=yes"
5789 else
5790   echo "configure: failed program was:" >&5
5791   cat conftest.$ac_ext >&5
5792   rm -rf conftest*
5793   eval "ac_cv_func_$ac_func=no"
5794 fi
5795 rm -f conftest*
5796 fi
5797
5798 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5799   echo "$ac_t""yes" 1>&6
5800     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5801   cat >> confdefs.h <<EOF
5802 #define $ac_tr_func 1
5803 EOF
5804  
5805 else
5806   echo "$ac_t""no" 1>&6
5807 fi
5808 done
5809
5810
5811 for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir
5812 do
5813 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5814 echo "configure:5815: checking for $ac_func" >&5
5815 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5816   echo $ac_n "(cached) $ac_c" 1>&6
5817 else
5818   cat > conftest.$ac_ext <<EOF
5819 #line 5820 "configure"
5820 #include "confdefs.h"
5821 /* System header to define __stub macros and hopefully few prototypes,
5822     which can conflict with char $ac_func(); below.  */
5823 #include <assert.h>
5824 /* Override any gcc2 internal prototype to avoid an error.  */
5825 /* We use char because int might match the return type of a gcc2
5826     builtin and then its argument prototype would still apply.  */
5827 char $ac_func();
5828
5829 int main() {
5830
5831 /* The GNU C library defines this for functions which it implements
5832     to always fail with ENOSYS.  Some functions are actually named
5833     something starting with __ and the normal name is an alias.  */
5834 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5835 choke me
5836 #else
5837 $ac_func();
5838 #endif
5839
5840 ; return 0; }
5841 EOF
5842 if { (eval echo configure:5843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5843   rm -rf conftest*
5844   eval "ac_cv_func_$ac_func=yes"
5845 else
5846   echo "configure: failed program was:" >&5
5847   cat conftest.$ac_ext >&5
5848   rm -rf conftest*
5849   eval "ac_cv_func_$ac_func=no"
5850 fi
5851 rm -f conftest*
5852 fi
5853
5854 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5855   echo "$ac_t""yes" 1>&6
5856     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5857   cat >> confdefs.h <<EOF
5858 #define $ac_tr_func 1
5859 EOF
5860  
5861 else
5862   echo "$ac_t""no" 1>&6
5863 fi
5864 done
5865
5866 for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir
5867 do
5868 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5869 echo "configure:5870: checking for $ac_func" >&5
5870 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5871   echo $ac_n "(cached) $ac_c" 1>&6
5872 else
5873   cat > conftest.$ac_ext <<EOF
5874 #line 5875 "configure"
5875 #include "confdefs.h"
5876 /* System header to define __stub macros and hopefully few prototypes,
5877     which can conflict with char $ac_func(); below.  */
5878 #include <assert.h>
5879 /* Override any gcc2 internal prototype to avoid an error.  */
5880 /* We use char because int might match the return type of a gcc2
5881     builtin and then its argument prototype would still apply.  */
5882 char $ac_func();
5883
5884 int main() {
5885
5886 /* The GNU C library defines this for functions which it implements
5887     to always fail with ENOSYS.  Some functions are actually named
5888     something starting with __ and the normal name is an alias.  */
5889 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5890 choke me
5891 #else
5892 $ac_func();
5893 #endif
5894
5895 ; return 0; }
5896 EOF
5897 if { (eval echo configure:5898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5898   rm -rf conftest*
5899   eval "ac_cv_func_$ac_func=yes"
5900 else
5901   echo "configure: failed program was:" >&5
5902   cat conftest.$ac_ext >&5
5903   rm -rf conftest*
5904   eval "ac_cv_func_$ac_func=no"
5905 fi
5906 rm -f conftest*
5907 fi
5908
5909 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5910   echo "$ac_t""yes" 1>&6
5911     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5912   cat >> confdefs.h <<EOF
5913 #define $ac_tr_func 1
5914 EOF
5915  
5916 else
5917   echo "$ac_t""no" 1>&6
5918 fi
5919 done
5920
5921 for ac_func in __getcwd _getcwd
5922 do
5923 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5924 echo "configure:5925: checking for $ac_func" >&5
5925 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5926   echo $ac_n "(cached) $ac_c" 1>&6
5927 else
5928   cat > conftest.$ac_ext <<EOF
5929 #line 5930 "configure"
5930 #include "confdefs.h"
5931 /* System header to define __stub macros and hopefully few prototypes,
5932     which can conflict with char $ac_func(); below.  */
5933 #include <assert.h>
5934 /* Override any gcc2 internal prototype to avoid an error.  */
5935 /* We use char because int might match the return type of a gcc2
5936     builtin and then its argument prototype would still apply.  */
5937 char $ac_func();
5938
5939 int main() {
5940
5941 /* The GNU C library defines this for functions which it implements
5942     to always fail with ENOSYS.  Some functions are actually named
5943     something starting with __ and the normal name is an alias.  */
5944 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5945 choke me
5946 #else
5947 $ac_func();
5948 #endif
5949
5950 ; return 0; }
5951 EOF
5952 if { (eval echo configure:5953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5953   rm -rf conftest*
5954   eval "ac_cv_func_$ac_func=yes"
5955 else
5956   echo "configure: failed program was:" >&5
5957   cat conftest.$ac_ext >&5
5958   rm -rf conftest*
5959   eval "ac_cv_func_$ac_func=no"
5960 fi
5961 rm -f conftest*
5962 fi
5963
5964 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5965   echo "$ac_t""yes" 1>&6
5966     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5967   cat >> confdefs.h <<EOF
5968 #define $ac_tr_func 1
5969 EOF
5970  
5971 else
5972   echo "$ac_t""no" 1>&6
5973 fi
5974 done
5975
5976 for ac_func in __xstat __fxstat __lxstat
5977 do
5978 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5979 echo "configure:5980: checking for $ac_func" >&5
5980 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5981   echo $ac_n "(cached) $ac_c" 1>&6
5982 else
5983   cat > conftest.$ac_ext <<EOF
5984 #line 5985 "configure"
5985 #include "confdefs.h"
5986 /* System header to define __stub macros and hopefully few prototypes,
5987     which can conflict with char $ac_func(); below.  */
5988 #include <assert.h>
5989 /* Override any gcc2 internal prototype to avoid an error.  */
5990 /* We use char because int might match the return type of a gcc2
5991     builtin and then its argument prototype would still apply.  */
5992 char $ac_func();
5993
5994 int main() {
5995
5996 /* The GNU C library defines this for functions which it implements
5997     to always fail with ENOSYS.  Some functions are actually named
5998     something starting with __ and the normal name is an alias.  */
5999 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6000 choke me
6001 #else
6002 $ac_func();
6003 #endif
6004
6005 ; return 0; }
6006 EOF
6007 if { (eval echo configure:6008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6008   rm -rf conftest*
6009   eval "ac_cv_func_$ac_func=yes"
6010 else
6011   echo "configure: failed program was:" >&5
6012   cat conftest.$ac_ext >&5
6013   rm -rf conftest*
6014   eval "ac_cv_func_$ac_func=no"
6015 fi
6016 rm -f conftest*
6017 fi
6018
6019 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6020   echo "$ac_t""yes" 1>&6
6021     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6022   cat >> confdefs.h <<EOF
6023 #define $ac_tr_func 1
6024 EOF
6025  
6026 else
6027   echo "$ac_t""no" 1>&6
6028 fi
6029 done
6030
6031 for ac_func in _stat _lstat _fstat __stat __lstat __fstat
6032 do
6033 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6034 echo "configure:6035: checking for $ac_func" >&5
6035 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6036   echo $ac_n "(cached) $ac_c" 1>&6
6037 else
6038   cat > conftest.$ac_ext <<EOF
6039 #line 6040 "configure"
6040 #include "confdefs.h"
6041 /* System header to define __stub macros and hopefully few prototypes,
6042     which can conflict with char $ac_func(); below.  */
6043 #include <assert.h>
6044 /* Override any gcc2 internal prototype to avoid an error.  */
6045 /* We use char because int might match the return type of a gcc2
6046     builtin and then its argument prototype would still apply.  */
6047 char $ac_func();
6048
6049 int main() {
6050
6051 /* The GNU C library defines this for functions which it implements
6052     to always fail with ENOSYS.  Some functions are actually named
6053     something starting with __ and the normal name is an alias.  */
6054 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6055 choke me
6056 #else
6057 $ac_func();
6058 #endif
6059
6060 ; return 0; }
6061 EOF
6062 if { (eval echo configure:6063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6063   rm -rf conftest*
6064   eval "ac_cv_func_$ac_func=yes"
6065 else
6066   echo "configure: failed program was:" >&5
6067   cat conftest.$ac_ext >&5
6068   rm -rf conftest*
6069   eval "ac_cv_func_$ac_func=no"
6070 fi
6071 rm -f conftest*
6072 fi
6073
6074 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6075   echo "$ac_t""yes" 1>&6
6076     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6077   cat >> confdefs.h <<EOF
6078 #define $ac_tr_func 1
6079 EOF
6080  
6081 else
6082   echo "$ac_t""no" 1>&6
6083 fi
6084 done
6085
6086 for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir
6087 do
6088 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6089 echo "configure:6090: checking for $ac_func" >&5
6090 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6091   echo $ac_n "(cached) $ac_c" 1>&6
6092 else
6093   cat > conftest.$ac_ext <<EOF
6094 #line 6095 "configure"
6095 #include "confdefs.h"
6096 /* System header to define __stub macros and hopefully few prototypes,
6097     which can conflict with char $ac_func(); below.  */
6098 #include <assert.h>
6099 /* Override any gcc2 internal prototype to avoid an error.  */
6100 /* We use char because int might match the return type of a gcc2
6101     builtin and then its argument prototype would still apply.  */
6102 char $ac_func();
6103
6104 int main() {
6105
6106 /* The GNU C library defines this for functions which it implements
6107     to always fail with ENOSYS.  Some functions are actually named
6108     something starting with __ and the normal name is an alias.  */
6109 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6110 choke me
6111 #else
6112 $ac_func();
6113 #endif
6114
6115 ; return 0; }
6116 EOF
6117 if { (eval echo configure:6118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6118   rm -rf conftest*
6119   eval "ac_cv_func_$ac_func=yes"
6120 else
6121   echo "configure: failed program was:" >&5
6122   cat conftest.$ac_ext >&5
6123   rm -rf conftest*
6124   eval "ac_cv_func_$ac_func=no"
6125 fi
6126 rm -f conftest*
6127 fi
6128
6129 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6130   echo "$ac_t""yes" 1>&6
6131     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6132   cat >> confdefs.h <<EOF
6133 #define $ac_tr_func 1
6134 EOF
6135  
6136 else
6137   echo "$ac_t""no" 1>&6
6138 fi
6139 done
6140
6141 for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl
6142 do
6143 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6144 echo "configure:6145: checking for $ac_func" >&5
6145 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6146   echo $ac_n "(cached) $ac_c" 1>&6
6147 else
6148   cat > conftest.$ac_ext <<EOF
6149 #line 6150 "configure"
6150 #include "confdefs.h"
6151 /* System header to define __stub macros and hopefully few prototypes,
6152     which can conflict with char $ac_func(); below.  */
6153 #include <assert.h>
6154 /* Override any gcc2 internal prototype to avoid an error.  */
6155 /* We use char because int might match the return type of a gcc2
6156     builtin and then its argument prototype would still apply.  */
6157 char $ac_func();
6158
6159 int main() {
6160
6161 /* The GNU C library defines this for functions which it implements
6162     to always fail with ENOSYS.  Some functions are actually named
6163     something starting with __ and the normal name is an alias.  */
6164 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6165 choke me
6166 #else
6167 $ac_func();
6168 #endif
6169
6170 ; return 0; }
6171 EOF
6172 if { (eval echo configure:6173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6173   rm -rf conftest*
6174   eval "ac_cv_func_$ac_func=yes"
6175 else
6176   echo "configure: failed program was:" >&5
6177   cat conftest.$ac_ext >&5
6178   rm -rf conftest*
6179   eval "ac_cv_func_$ac_func=no"
6180 fi
6181 rm -f conftest*
6182 fi
6183
6184 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6185   echo "$ac_t""yes" 1>&6
6186     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6187   cat >> confdefs.h <<EOF
6188 #define $ac_tr_func 1
6189 EOF
6190  
6191 else
6192   echo "$ac_t""no" 1>&6
6193 fi
6194 done
6195
6196 for ac_func in getdents _getdents __getdents _lseek __lseek _read __read
6197 do
6198 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6199 echo "configure:6200: checking for $ac_func" >&5
6200 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6201   echo $ac_n "(cached) $ac_c" 1>&6
6202 else
6203   cat > conftest.$ac_ext <<EOF
6204 #line 6205 "configure"
6205 #include "confdefs.h"
6206 /* System header to define __stub macros and hopefully few prototypes,
6207     which can conflict with char $ac_func(); below.  */
6208 #include <assert.h>
6209 /* Override any gcc2 internal prototype to avoid an error.  */
6210 /* We use char because int might match the return type of a gcc2
6211     builtin and then its argument prototype would still apply.  */
6212 char $ac_func();
6213
6214 int main() {
6215
6216 /* The GNU C library defines this for functions which it implements
6217     to always fail with ENOSYS.  Some functions are actually named
6218     something starting with __ and the normal name is an alias.  */
6219 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6220 choke me
6221 #else
6222 $ac_func();
6223 #endif
6224
6225 ; return 0; }
6226 EOF
6227 if { (eval echo configure:6228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6228   rm -rf conftest*
6229   eval "ac_cv_func_$ac_func=yes"
6230 else
6231   echo "configure: failed program was:" >&5
6232   cat conftest.$ac_ext >&5
6233   rm -rf conftest*
6234   eval "ac_cv_func_$ac_func=no"
6235 fi
6236 rm -f conftest*
6237 fi
6238
6239 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6240   echo "$ac_t""yes" 1>&6
6241     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6242   cat >> confdefs.h <<EOF
6243 #define $ac_tr_func 1
6244 EOF
6245  
6246 else
6247   echo "$ac_t""no" 1>&6
6248 fi
6249 done
6250
6251 for ac_func in _write __write _fork __fork
6252 do
6253 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6254 echo "configure:6255: checking for $ac_func" >&5
6255 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6256   echo $ac_n "(cached) $ac_c" 1>&6
6257 else
6258   cat > conftest.$ac_ext <<EOF
6259 #line 6260 "configure"
6260 #include "confdefs.h"
6261 /* System header to define __stub macros and hopefully few prototypes,
6262     which can conflict with char $ac_func(); below.  */
6263 #include <assert.h>
6264 /* Override any gcc2 internal prototype to avoid an error.  */
6265 /* We use char because int might match the return type of a gcc2
6266     builtin and then its argument prototype would still apply.  */
6267 char $ac_func();
6268
6269 int main() {
6270
6271 /* The GNU C library defines this for functions which it implements
6272     to always fail with ENOSYS.  Some functions are actually named
6273     something starting with __ and the normal name is an alias.  */
6274 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6275 choke me
6276 #else
6277 $ac_func();
6278 #endif
6279
6280 ; return 0; }
6281 EOF
6282 if { (eval echo configure:6283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6283   rm -rf conftest*
6284   eval "ac_cv_func_$ac_func=yes"
6285 else
6286   echo "configure: failed program was:" >&5
6287   cat conftest.$ac_ext >&5
6288   rm -rf conftest*
6289   eval "ac_cv_func_$ac_func=no"
6290 fi
6291 rm -f conftest*
6292 fi
6293
6294 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6295   echo "$ac_t""yes" 1>&6
6296     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6297   cat >> confdefs.h <<EOF
6298 #define $ac_tr_func 1
6299 EOF
6300  
6301 else
6302   echo "$ac_t""no" 1>&6
6303 fi
6304 done
6305
6306 for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64
6307 do
6308 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6309 echo "configure:6310: checking for $ac_func" >&5
6310 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6311   echo $ac_n "(cached) $ac_c" 1>&6
6312 else
6313   cat > conftest.$ac_ext <<EOF
6314 #line 6315 "configure"
6315 #include "confdefs.h"
6316 /* System header to define __stub macros and hopefully few prototypes,
6317     which can conflict with char $ac_func(); below.  */
6318 #include <assert.h>
6319 /* Override any gcc2 internal prototype to avoid an error.  */
6320 /* We use char because int might match the return type of a gcc2
6321     builtin and then its argument prototype would still apply.  */
6322 char $ac_func();
6323
6324 int main() {
6325
6326 /* The GNU C library defines this for functions which it implements
6327     to always fail with ENOSYS.  Some functions are actually named
6328     something starting with __ and the normal name is an alias.  */
6329 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6330 choke me
6331 #else
6332 $ac_func();
6333 #endif
6334
6335 ; return 0; }
6336 EOF
6337 if { (eval echo configure:6338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6338   rm -rf conftest*
6339   eval "ac_cv_func_$ac_func=yes"
6340 else
6341   echo "configure: failed program was:" >&5
6342   cat conftest.$ac_ext >&5
6343   rm -rf conftest*
6344   eval "ac_cv_func_$ac_func=no"
6345 fi
6346 rm -f conftest*
6347 fi
6348
6349 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6350   echo "$ac_t""yes" 1>&6
6351     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6352   cat >> confdefs.h <<EOF
6353 #define $ac_tr_func 1
6354 EOF
6355  
6356 else
6357   echo "$ac_t""no" 1>&6
6358 fi
6359 done
6360
6361 for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64
6362 do
6363 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6364 echo "configure:6365: checking for $ac_func" >&5
6365 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6366   echo $ac_n "(cached) $ac_c" 1>&6
6367 else
6368   cat > conftest.$ac_ext <<EOF
6369 #line 6370 "configure"
6370 #include "confdefs.h"
6371 /* System header to define __stub macros and hopefully few prototypes,
6372     which can conflict with char $ac_func(); below.  */
6373 #include <assert.h>
6374 /* Override any gcc2 internal prototype to avoid an error.  */
6375 /* We use char because int might match the return type of a gcc2
6376     builtin and then its argument prototype would still apply.  */
6377 char $ac_func();
6378
6379 int main() {
6380
6381 /* The GNU C library defines this for functions which it implements
6382     to always fail with ENOSYS.  Some functions are actually named
6383     something starting with __ and the normal name is an alias.  */
6384 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6385 choke me
6386 #else
6387 $ac_func();
6388 #endif
6389
6390 ; return 0; }
6391 EOF
6392 if { (eval echo configure:6393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6393   rm -rf conftest*
6394   eval "ac_cv_func_$ac_func=yes"
6395 else
6396   echo "configure: failed program was:" >&5
6397   cat conftest.$ac_ext >&5
6398   rm -rf conftest*
6399   eval "ac_cv_func_$ac_func=no"
6400 fi
6401 rm -f conftest*
6402 fi
6403
6404 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6405   echo "$ac_t""yes" 1>&6
6406     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6407   cat >> confdefs.h <<EOF
6408 #define $ac_tr_func 1
6409 EOF
6410  
6411 else
6412   echo "$ac_t""no" 1>&6
6413 fi
6414 done
6415
6416 for ac_func in pread _pread __pread pread64 _pread64 __pread64
6417 do
6418 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6419 echo "configure:6420: checking for $ac_func" >&5
6420 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6421   echo $ac_n "(cached) $ac_c" 1>&6
6422 else
6423   cat > conftest.$ac_ext <<EOF
6424 #line 6425 "configure"
6425 #include "confdefs.h"
6426 /* System header to define __stub macros and hopefully few prototypes,
6427     which can conflict with char $ac_func(); below.  */
6428 #include <assert.h>
6429 /* Override any gcc2 internal prototype to avoid an error.  */
6430 /* We use char because int might match the return type of a gcc2
6431     builtin and then its argument prototype would still apply.  */
6432 char $ac_func();
6433
6434 int main() {
6435
6436 /* The GNU C library defines this for functions which it implements
6437     to always fail with ENOSYS.  Some functions are actually named
6438     something starting with __ and the normal name is an alias.  */
6439 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6440 choke me
6441 #else
6442 $ac_func();
6443 #endif
6444
6445 ; return 0; }
6446 EOF
6447 if { (eval echo configure:6448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6448   rm -rf conftest*
6449   eval "ac_cv_func_$ac_func=yes"
6450 else
6451   echo "configure: failed program was:" >&5
6452   cat conftest.$ac_ext >&5
6453   rm -rf conftest*
6454   eval "ac_cv_func_$ac_func=no"
6455 fi
6456 rm -f conftest*
6457 fi
6458
6459 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6460   echo "$ac_t""yes" 1>&6
6461     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6462   cat >> confdefs.h <<EOF
6463 #define $ac_tr_func 1
6464 EOF
6465  
6466 else
6467   echo "$ac_t""no" 1>&6
6468 fi
6469 done
6470
6471 for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64
6472 do
6473 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6474 echo "configure:6475: checking for $ac_func" >&5
6475 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6476   echo $ac_n "(cached) $ac_c" 1>&6
6477 else
6478   cat > conftest.$ac_ext <<EOF
6479 #line 6480 "configure"
6480 #include "confdefs.h"
6481 /* System header to define __stub macros and hopefully few prototypes,
6482     which can conflict with char $ac_func(); below.  */
6483 #include <assert.h>
6484 /* Override any gcc2 internal prototype to avoid an error.  */
6485 /* We use char because int might match the return type of a gcc2
6486     builtin and then its argument prototype would still apply.  */
6487 char $ac_func();
6488
6489 int main() {
6490
6491 /* The GNU C library defines this for functions which it implements
6492     to always fail with ENOSYS.  Some functions are actually named
6493     something starting with __ and the normal name is an alias.  */
6494 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6495 choke me
6496 #else
6497 $ac_func();
6498 #endif
6499
6500 ; return 0; }
6501 EOF
6502 if { (eval echo configure:6503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6503   rm -rf conftest*
6504   eval "ac_cv_func_$ac_func=yes"
6505 else
6506   echo "configure: failed program was:" >&5
6507   cat conftest.$ac_ext >&5
6508   rm -rf conftest*
6509   eval "ac_cv_func_$ac_func=no"
6510 fi
6511 rm -f conftest*
6512 fi
6513
6514 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6515   echo "$ac_t""yes" 1>&6
6516     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6517   cat >> confdefs.h <<EOF
6518 #define $ac_tr_func 1
6519 EOF
6520  
6521 else
6522   echo "$ac_t""no" 1>&6
6523 fi
6524 done
6525
6526 for ac_func in open64 _open64 __open64 creat64
6527 do
6528 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6529 echo "configure:6530: checking for $ac_func" >&5
6530 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6531   echo $ac_n "(cached) $ac_c" 1>&6
6532 else
6533   cat > conftest.$ac_ext <<EOF
6534 #line 6535 "configure"
6535 #include "confdefs.h"
6536 /* System header to define __stub macros and hopefully few prototypes,
6537     which can conflict with char $ac_func(); below.  */
6538 #include <assert.h>
6539 /* Override any gcc2 internal prototype to avoid an error.  */
6540 /* We use char because int might match the return type of a gcc2
6541     builtin and then its argument prototype would still apply.  */
6542 char $ac_func();
6543
6544 int main() {
6545
6546 /* The GNU C library defines this for functions which it implements
6547     to always fail with ENOSYS.  Some functions are actually named
6548     something starting with __ and the normal name is an alias.  */
6549 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6550 choke me
6551 #else
6552 $ac_func();
6553 #endif
6554
6555 ; return 0; }
6556 EOF
6557 if { (eval echo configure:6558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6558   rm -rf conftest*
6559   eval "ac_cv_func_$ac_func=yes"
6560 else
6561   echo "configure: failed program was:" >&5
6562   cat conftest.$ac_ext >&5
6563   rm -rf conftest*
6564   eval "ac_cv_func_$ac_func=no"
6565 fi
6566 rm -f conftest*
6567 fi
6568
6569 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6570   echo "$ac_t""yes" 1>&6
6571     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6572   cat >> confdefs.h <<EOF
6573 #define $ac_tr_func 1
6574 EOF
6575  
6576 else
6577   echo "$ac_t""no" 1>&6
6578 fi
6579 done
6580
6581
6582 #
6583 # stat64 family may need <sys/stat.h> on some systems, notably ReliantUNIX
6584 #
6585
6586 if test x$ac_cv_func_stat64 = xno ; then
6587   echo $ac_n "checking for stat64 in <sys/stat.h>""... $ac_c" 1>&6
6588 echo "configure:6589: checking for stat64 in <sys/stat.h>" >&5
6589   cat > conftest.$ac_ext <<EOF
6590 #line 6591 "configure"
6591 #include "confdefs.h"
6592
6593 #if defined(HAVE_UNISTD_H)
6594 #include <unistd.h>
6595 #endif
6596 #include <sys/stat.h>
6597
6598 int main() {
6599 struct stat64 st64; exit(stat64(".",&st64));
6600 ; return 0; }
6601 EOF
6602 if { (eval echo configure:6603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6603   rm -rf conftest*
6604   ac_cv_func_stat64=yes
6605 else
6606   echo "configure: failed program was:" >&5
6607   cat conftest.$ac_ext >&5
6608 fi
6609 rm -f conftest*
6610   echo "$ac_t""$ac_cv_func_stat64" 1>&6
6611   if test x$ac_cv_func_stat64 = xyes ; then
6612     cat >> confdefs.h <<\EOF
6613 #define HAVE_STAT64 1
6614 EOF
6615
6616   fi
6617 fi
6618
6619 if test x$ac_cv_func_lstat64 = xno ; then
6620   echo $ac_n "checking for lstat64 in <sys/stat.h>""... $ac_c" 1>&6
6621 echo "configure:6622: checking for lstat64 in <sys/stat.h>" >&5
6622   cat > conftest.$ac_ext <<EOF
6623 #line 6624 "configure"
6624 #include "confdefs.h"
6625
6626 #if defined(HAVE_UNISTD_H)
6627 #include <unistd.h>
6628 #endif
6629 #include <sys/stat.h>
6630
6631 int main() {
6632 struct stat64 st64; exit(lstat64(".",&st64));
6633 ; return 0; }
6634 EOF
6635 if { (eval echo configure:6636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6636   rm -rf conftest*
6637   ac_cv_func_lstat64=yes
6638 else
6639   echo "configure: failed program was:" >&5
6640   cat conftest.$ac_ext >&5
6641 fi
6642 rm -f conftest*
6643   echo "$ac_t""$ac_cv_func_lstat64" 1>&6
6644   if test x$ac_cv_func_lstat64 = xyes ; then
6645     cat >> confdefs.h <<\EOF
6646 #define HAVE_LSTAT64 1
6647 EOF
6648
6649   fi
6650 fi
6651
6652 if test x$ac_cv_func_fstat64 = xno ; then
6653   echo $ac_n "checking for fstat64 in <sys/stat.h>""... $ac_c" 1>&6
6654 echo "configure:6655: checking for fstat64 in <sys/stat.h>" >&5
6655   cat > conftest.$ac_ext <<EOF
6656 #line 6657 "configure"
6657 #include "confdefs.h"
6658
6659 #if defined(HAVE_UNISTD_H)
6660 #include <unistd.h>
6661 #endif
6662 #include <sys/stat.h>
6663
6664 int main() {
6665 struct stat64 st64; exit(fstat64(0,&st64));
6666 ; return 0; }
6667 EOF
6668 if { (eval echo configure:6669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6669   rm -rf conftest*
6670   ac_cv_func_fstat64=yes
6671 else
6672   echo "configure: failed program was:" >&5
6673   cat conftest.$ac_ext >&5
6674 fi
6675 rm -f conftest*
6676   echo "$ac_t""$ac_cv_func_fstat64" 1>&6
6677   if test x$ac_cv_func_fstat64 = xyes ; then
6678     cat >> confdefs.h <<\EOF
6679 #define HAVE_FSTAT64 1
6680 EOF
6681
6682   fi
6683 fi
6684
6685 #####################################
6686 # we might need the resolv library on some systems
6687 echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6
6688 echo "configure:6689: checking for dn_expand in -lresolv" >&5
6689 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'`
6690 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6691   echo $ac_n "(cached) $ac_c" 1>&6
6692 else
6693   ac_save_LIBS="$LIBS"
6694 LIBS="-lresolv  $LIBS"
6695 cat > conftest.$ac_ext <<EOF
6696 #line 6697 "configure"
6697 #include "confdefs.h"
6698 /* Override any gcc2 internal prototype to avoid an error.  */
6699 /* We use char because int might match the return type of a gcc2
6700     builtin and then its argument prototype would still apply.  */
6701 char dn_expand();
6702
6703 int main() {
6704 dn_expand()
6705 ; return 0; }
6706 EOF
6707 if { (eval echo configure:6708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6708   rm -rf conftest*
6709   eval "ac_cv_lib_$ac_lib_var=yes"
6710 else
6711   echo "configure: failed program was:" >&5
6712   cat conftest.$ac_ext >&5
6713   rm -rf conftest*
6714   eval "ac_cv_lib_$ac_lib_var=no"
6715 fi
6716 rm -f conftest*
6717 LIBS="$ac_save_LIBS"
6718
6719 fi
6720 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6721   echo "$ac_t""yes" 1>&6
6722     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6723     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6724   cat >> confdefs.h <<EOF
6725 #define $ac_tr_lib 1
6726 EOF
6727
6728   LIBS="-lresolv $LIBS"
6729
6730 else
6731   echo "$ac_t""no" 1>&6
6732 fi
6733
6734
6735 #
6736 # Check for the functions putprpwnam, set_auth_parameters,
6737 # getspnam, bigcrypt and getprpwnam in -lsec and -lsecurity
6738 # Needed for OSF1 and HPUX.
6739 #
6740
6741 case "$LIBS" in
6742   *-lsecurity*) for ac_func in putprpwnam
6743 do
6744 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6745 echo "configure:6746: checking for $ac_func" >&5
6746 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6747   echo $ac_n "(cached) $ac_c" 1>&6
6748 else
6749   cat > conftest.$ac_ext <<EOF
6750 #line 6751 "configure"
6751 #include "confdefs.h"
6752 /* System header to define __stub macros and hopefully few prototypes,
6753     which can conflict with char $ac_func(); below.  */
6754 #include <assert.h>
6755 /* Override any gcc2 internal prototype to avoid an error.  */
6756 /* We use char because int might match the return type of a gcc2
6757     builtin and then its argument prototype would still apply.  */
6758 char $ac_func();
6759
6760 int main() {
6761
6762 /* The GNU C library defines this for functions which it implements
6763     to always fail with ENOSYS.  Some functions are actually named
6764     something starting with __ and the normal name is an alias.  */
6765 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6766 choke me
6767 #else
6768 $ac_func();
6769 #endif
6770
6771 ; return 0; }
6772 EOF
6773 if { (eval echo configure:6774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6774   rm -rf conftest*
6775   eval "ac_cv_func_$ac_func=yes"
6776 else
6777   echo "configure: failed program was:" >&5
6778   cat conftest.$ac_ext >&5
6779   rm -rf conftest*
6780   eval "ac_cv_func_$ac_func=no"
6781 fi
6782 rm -f conftest*
6783 fi
6784
6785 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6786   echo "$ac_t""yes" 1>&6
6787     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6788   cat >> confdefs.h <<EOF
6789 #define $ac_tr_func 1
6790 EOF
6791  
6792 else
6793   echo "$ac_t""no" 1>&6
6794 fi
6795 done
6796  ;;
6797   *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6
6798 echo "configure:6799: checking for putprpwnam in -lsecurity" >&5
6799 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'`
6800 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6801   echo $ac_n "(cached) $ac_c" 1>&6
6802 else
6803   ac_save_LIBS="$LIBS"
6804 LIBS="-lsecurity  $LIBS"
6805 cat > conftest.$ac_ext <<EOF
6806 #line 6807 "configure"
6807 #include "confdefs.h"
6808 /* Override any gcc2 internal prototype to avoid an error.  */
6809 /* We use char because int might match the return type of a gcc2
6810     builtin and then its argument prototype would still apply.  */
6811 char putprpwnam();
6812
6813 int main() {
6814 putprpwnam()
6815 ; return 0; }
6816 EOF
6817 if { (eval echo configure:6818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6818   rm -rf conftest*
6819   eval "ac_cv_lib_$ac_lib_var=yes"
6820 else
6821   echo "configure: failed program was:" >&5
6822   cat conftest.$ac_ext >&5
6823   rm -rf conftest*
6824   eval "ac_cv_lib_$ac_lib_var=no"
6825 fi
6826 rm -f conftest*
6827 LIBS="$ac_save_LIBS"
6828
6829 fi
6830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6831   echo "$ac_t""yes" 1>&6
6832     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6833     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6834   cat >> confdefs.h <<EOF
6835 #define $ac_tr_lib 1
6836 EOF
6837
6838   LIBS="-lsecurity $LIBS"
6839
6840 else
6841   echo "$ac_t""no" 1>&6
6842 fi
6843  
6844      for ac_func in putprpwnam
6845 do
6846 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6847 echo "configure:6848: checking for $ac_func" >&5
6848 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6849   echo $ac_n "(cached) $ac_c" 1>&6
6850 else
6851   cat > conftest.$ac_ext <<EOF
6852 #line 6853 "configure"
6853 #include "confdefs.h"
6854 /* System header to define __stub macros and hopefully few prototypes,
6855     which can conflict with char $ac_func(); below.  */
6856 #include <assert.h>
6857 /* Override any gcc2 internal prototype to avoid an error.  */
6858 /* We use char because int might match the return type of a gcc2
6859     builtin and then its argument prototype would still apply.  */
6860 char $ac_func();
6861
6862 int main() {
6863
6864 /* The GNU C library defines this for functions which it implements
6865     to always fail with ENOSYS.  Some functions are actually named
6866     something starting with __ and the normal name is an alias.  */
6867 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6868 choke me
6869 #else
6870 $ac_func();
6871 #endif
6872
6873 ; return 0; }
6874 EOF
6875 if { (eval echo configure:6876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6876   rm -rf conftest*
6877   eval "ac_cv_func_$ac_func=yes"
6878 else
6879   echo "configure: failed program was:" >&5
6880   cat conftest.$ac_ext >&5
6881   rm -rf conftest*
6882   eval "ac_cv_func_$ac_func=no"
6883 fi
6884 rm -f conftest*
6885 fi
6886
6887 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6888   echo "$ac_t""yes" 1>&6
6889     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6890   cat >> confdefs.h <<EOF
6891 #define $ac_tr_func 1
6892 EOF
6893  
6894 else
6895   echo "$ac_t""no" 1>&6
6896 fi
6897 done
6898
6899   ;;
6900   esac
6901
6902 case "$LIBS" in
6903   *-lsec*) for ac_func in putprpwnam
6904 do
6905 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6906 echo "configure:6907: checking for $ac_func" >&5
6907 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6908   echo $ac_n "(cached) $ac_c" 1>&6
6909 else
6910   cat > conftest.$ac_ext <<EOF
6911 #line 6912 "configure"
6912 #include "confdefs.h"
6913 /* System header to define __stub macros and hopefully few prototypes,
6914     which can conflict with char $ac_func(); below.  */
6915 #include <assert.h>
6916 /* Override any gcc2 internal prototype to avoid an error.  */
6917 /* We use char because int might match the return type of a gcc2
6918     builtin and then its argument prototype would still apply.  */
6919 char $ac_func();
6920
6921 int main() {
6922
6923 /* The GNU C library defines this for functions which it implements
6924     to always fail with ENOSYS.  Some functions are actually named
6925     something starting with __ and the normal name is an alias.  */
6926 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6927 choke me
6928 #else
6929 $ac_func();
6930 #endif
6931
6932 ; return 0; }
6933 EOF
6934 if { (eval echo configure:6935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6935   rm -rf conftest*
6936   eval "ac_cv_func_$ac_func=yes"
6937 else
6938   echo "configure: failed program was:" >&5
6939   cat conftest.$ac_ext >&5
6940   rm -rf conftest*
6941   eval "ac_cv_func_$ac_func=no"
6942 fi
6943 rm -f conftest*
6944 fi
6945
6946 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6947   echo "$ac_t""yes" 1>&6
6948     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6949   cat >> confdefs.h <<EOF
6950 #define $ac_tr_func 1
6951 EOF
6952  
6953 else
6954   echo "$ac_t""no" 1>&6
6955 fi
6956 done
6957  ;;
6958   *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6
6959 echo "configure:6960: checking for putprpwnam in -lsec" >&5
6960 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'`
6961 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6962   echo $ac_n "(cached) $ac_c" 1>&6
6963 else
6964   ac_save_LIBS="$LIBS"
6965 LIBS="-lsec  $LIBS"
6966 cat > conftest.$ac_ext <<EOF
6967 #line 6968 "configure"
6968 #include "confdefs.h"
6969 /* Override any gcc2 internal prototype to avoid an error.  */
6970 /* We use char because int might match the return type of a gcc2
6971     builtin and then its argument prototype would still apply.  */
6972 char putprpwnam();
6973
6974 int main() {
6975 putprpwnam()
6976 ; return 0; }
6977 EOF
6978 if { (eval echo configure:6979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6979   rm -rf conftest*
6980   eval "ac_cv_lib_$ac_lib_var=yes"
6981 else
6982   echo "configure: failed program was:" >&5
6983   cat conftest.$ac_ext >&5
6984   rm -rf conftest*
6985   eval "ac_cv_lib_$ac_lib_var=no"
6986 fi
6987 rm -f conftest*
6988 LIBS="$ac_save_LIBS"
6989
6990 fi
6991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6992   echo "$ac_t""yes" 1>&6
6993     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6994     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6995   cat >> confdefs.h <<EOF
6996 #define $ac_tr_lib 1
6997 EOF
6998
6999   LIBS="-lsec $LIBS"
7000
7001 else
7002   echo "$ac_t""no" 1>&6
7003 fi
7004  
7005      for ac_func in putprpwnam
7006 do
7007 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7008 echo "configure:7009: checking for $ac_func" >&5
7009 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7010   echo $ac_n "(cached) $ac_c" 1>&6
7011 else
7012   cat > conftest.$ac_ext <<EOF
7013 #line 7014 "configure"
7014 #include "confdefs.h"
7015 /* System header to define __stub macros and hopefully few prototypes,
7016     which can conflict with char $ac_func(); below.  */
7017 #include <assert.h>
7018 /* Override any gcc2 internal prototype to avoid an error.  */
7019 /* We use char because int might match the return type of a gcc2
7020     builtin and then its argument prototype would still apply.  */
7021 char $ac_func();
7022
7023 int main() {
7024
7025 /* The GNU C library defines this for functions which it implements
7026     to always fail with ENOSYS.  Some functions are actually named
7027     something starting with __ and the normal name is an alias.  */
7028 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7029 choke me
7030 #else
7031 $ac_func();
7032 #endif
7033
7034 ; return 0; }
7035 EOF
7036 if { (eval echo configure:7037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7037   rm -rf conftest*
7038   eval "ac_cv_func_$ac_func=yes"
7039 else
7040   echo "configure: failed program was:" >&5
7041   cat conftest.$ac_ext >&5
7042   rm -rf conftest*
7043   eval "ac_cv_func_$ac_func=no"
7044 fi
7045 rm -f conftest*
7046 fi
7047
7048 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7049   echo "$ac_t""yes" 1>&6
7050     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7051   cat >> confdefs.h <<EOF
7052 #define $ac_tr_func 1
7053 EOF
7054  
7055 else
7056   echo "$ac_t""no" 1>&6
7057 fi
7058 done
7059
7060   ;;
7061   esac
7062
7063
7064 case "$LIBS" in
7065   *-lsecurity*) for ac_func in set_auth_parameters
7066 do
7067 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7068 echo "configure:7069: checking for $ac_func" >&5
7069 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7070   echo $ac_n "(cached) $ac_c" 1>&6
7071 else
7072   cat > conftest.$ac_ext <<EOF
7073 #line 7074 "configure"
7074 #include "confdefs.h"
7075 /* System header to define __stub macros and hopefully few prototypes,
7076     which can conflict with char $ac_func(); below.  */
7077 #include <assert.h>
7078 /* Override any gcc2 internal prototype to avoid an error.  */
7079 /* We use char because int might match the return type of a gcc2
7080     builtin and then its argument prototype would still apply.  */
7081 char $ac_func();
7082
7083 int main() {
7084
7085 /* The GNU C library defines this for functions which it implements
7086     to always fail with ENOSYS.  Some functions are actually named
7087     something starting with __ and the normal name is an alias.  */
7088 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7089 choke me
7090 #else
7091 $ac_func();
7092 #endif
7093
7094 ; return 0; }
7095 EOF
7096 if { (eval echo configure:7097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7097   rm -rf conftest*
7098   eval "ac_cv_func_$ac_func=yes"
7099 else
7100   echo "configure: failed program was:" >&5
7101   cat conftest.$ac_ext >&5
7102   rm -rf conftest*
7103   eval "ac_cv_func_$ac_func=no"
7104 fi
7105 rm -f conftest*
7106 fi
7107
7108 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7109   echo "$ac_t""yes" 1>&6
7110     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7111   cat >> confdefs.h <<EOF
7112 #define $ac_tr_func 1
7113 EOF
7114  
7115 else
7116   echo "$ac_t""no" 1>&6
7117 fi
7118 done
7119  ;;
7120   *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6
7121 echo "configure:7122: checking for set_auth_parameters in -lsecurity" >&5
7122 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7123 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7124   echo $ac_n "(cached) $ac_c" 1>&6
7125 else
7126   ac_save_LIBS="$LIBS"
7127 LIBS="-lsecurity  $LIBS"
7128 cat > conftest.$ac_ext <<EOF
7129 #line 7130 "configure"
7130 #include "confdefs.h"
7131 /* Override any gcc2 internal prototype to avoid an error.  */
7132 /* We use char because int might match the return type of a gcc2
7133     builtin and then its argument prototype would still apply.  */
7134 char set_auth_parameters();
7135
7136 int main() {
7137 set_auth_parameters()
7138 ; return 0; }
7139 EOF
7140 if { (eval echo configure:7141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7141   rm -rf conftest*
7142   eval "ac_cv_lib_$ac_lib_var=yes"
7143 else
7144   echo "configure: failed program was:" >&5
7145   cat conftest.$ac_ext >&5
7146   rm -rf conftest*
7147   eval "ac_cv_lib_$ac_lib_var=no"
7148 fi
7149 rm -f conftest*
7150 LIBS="$ac_save_LIBS"
7151
7152 fi
7153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7154   echo "$ac_t""yes" 1>&6
7155     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7156     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7157   cat >> confdefs.h <<EOF
7158 #define $ac_tr_lib 1
7159 EOF
7160
7161   LIBS="-lsecurity $LIBS"
7162
7163 else
7164   echo "$ac_t""no" 1>&6
7165 fi
7166  
7167      for ac_func in set_auth_parameters
7168 do
7169 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7170 echo "configure:7171: checking for $ac_func" >&5
7171 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7172   echo $ac_n "(cached) $ac_c" 1>&6
7173 else
7174   cat > conftest.$ac_ext <<EOF
7175 #line 7176 "configure"
7176 #include "confdefs.h"
7177 /* System header to define __stub macros and hopefully few prototypes,
7178     which can conflict with char $ac_func(); below.  */
7179 #include <assert.h>
7180 /* Override any gcc2 internal prototype to avoid an error.  */
7181 /* We use char because int might match the return type of a gcc2
7182     builtin and then its argument prototype would still apply.  */
7183 char $ac_func();
7184
7185 int main() {
7186
7187 /* The GNU C library defines this for functions which it implements
7188     to always fail with ENOSYS.  Some functions are actually named
7189     something starting with __ and the normal name is an alias.  */
7190 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7191 choke me
7192 #else
7193 $ac_func();
7194 #endif
7195
7196 ; return 0; }
7197 EOF
7198 if { (eval echo configure:7199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7199   rm -rf conftest*
7200   eval "ac_cv_func_$ac_func=yes"
7201 else
7202   echo "configure: failed program was:" >&5
7203   cat conftest.$ac_ext >&5
7204   rm -rf conftest*
7205   eval "ac_cv_func_$ac_func=no"
7206 fi
7207 rm -f conftest*
7208 fi
7209
7210 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7211   echo "$ac_t""yes" 1>&6
7212     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7213   cat >> confdefs.h <<EOF
7214 #define $ac_tr_func 1
7215 EOF
7216  
7217 else
7218   echo "$ac_t""no" 1>&6
7219 fi
7220 done
7221
7222   ;;
7223   esac
7224
7225 case "$LIBS" in
7226   *-lsec*) for ac_func in set_auth_parameters
7227 do
7228 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7229 echo "configure:7230: checking for $ac_func" >&5
7230 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7231   echo $ac_n "(cached) $ac_c" 1>&6
7232 else
7233   cat > conftest.$ac_ext <<EOF
7234 #line 7235 "configure"
7235 #include "confdefs.h"
7236 /* System header to define __stub macros and hopefully few prototypes,
7237     which can conflict with char $ac_func(); below.  */
7238 #include <assert.h>
7239 /* Override any gcc2 internal prototype to avoid an error.  */
7240 /* We use char because int might match the return type of a gcc2
7241     builtin and then its argument prototype would still apply.  */
7242 char $ac_func();
7243
7244 int main() {
7245
7246 /* The GNU C library defines this for functions which it implements
7247     to always fail with ENOSYS.  Some functions are actually named
7248     something starting with __ and the normal name is an alias.  */
7249 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7250 choke me
7251 #else
7252 $ac_func();
7253 #endif
7254
7255 ; return 0; }
7256 EOF
7257 if { (eval echo configure:7258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7258   rm -rf conftest*
7259   eval "ac_cv_func_$ac_func=yes"
7260 else
7261   echo "configure: failed program was:" >&5
7262   cat conftest.$ac_ext >&5
7263   rm -rf conftest*
7264   eval "ac_cv_func_$ac_func=no"
7265 fi
7266 rm -f conftest*
7267 fi
7268
7269 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7270   echo "$ac_t""yes" 1>&6
7271     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7272   cat >> confdefs.h <<EOF
7273 #define $ac_tr_func 1
7274 EOF
7275  
7276 else
7277   echo "$ac_t""no" 1>&6
7278 fi
7279 done
7280  ;;
7281   *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6
7282 echo "configure:7283: checking for set_auth_parameters in -lsec" >&5
7283 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'`
7284 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7285   echo $ac_n "(cached) $ac_c" 1>&6
7286 else
7287   ac_save_LIBS="$LIBS"
7288 LIBS="-lsec  $LIBS"
7289 cat > conftest.$ac_ext <<EOF
7290 #line 7291 "configure"
7291 #include "confdefs.h"
7292 /* Override any gcc2 internal prototype to avoid an error.  */
7293 /* We use char because int might match the return type of a gcc2
7294     builtin and then its argument prototype would still apply.  */
7295 char set_auth_parameters();
7296
7297 int main() {
7298 set_auth_parameters()
7299 ; return 0; }
7300 EOF
7301 if { (eval echo configure:7302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7302   rm -rf conftest*
7303   eval "ac_cv_lib_$ac_lib_var=yes"
7304 else
7305   echo "configure: failed program was:" >&5
7306   cat conftest.$ac_ext >&5
7307   rm -rf conftest*
7308   eval "ac_cv_lib_$ac_lib_var=no"
7309 fi
7310 rm -f conftest*
7311 LIBS="$ac_save_LIBS"
7312
7313 fi
7314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7315   echo "$ac_t""yes" 1>&6
7316     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7317     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7318   cat >> confdefs.h <<EOF
7319 #define $ac_tr_lib 1
7320 EOF
7321
7322   LIBS="-lsec $LIBS"
7323
7324 else
7325   echo "$ac_t""no" 1>&6
7326 fi
7327  
7328      for ac_func in set_auth_parameters
7329 do
7330 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7331 echo "configure:7332: checking for $ac_func" >&5
7332 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7333   echo $ac_n "(cached) $ac_c" 1>&6
7334 else
7335   cat > conftest.$ac_ext <<EOF
7336 #line 7337 "configure"
7337 #include "confdefs.h"
7338 /* System header to define __stub macros and hopefully few prototypes,
7339     which can conflict with char $ac_func(); below.  */
7340 #include <assert.h>
7341 /* Override any gcc2 internal prototype to avoid an error.  */
7342 /* We use char because int might match the return type of a gcc2
7343     builtin and then its argument prototype would still apply.  */
7344 char $ac_func();
7345
7346 int main() {
7347
7348 /* The GNU C library defines this for functions which it implements
7349     to always fail with ENOSYS.  Some functions are actually named
7350     something starting with __ and the normal name is an alias.  */
7351 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7352 choke me
7353 #else
7354 $ac_func();
7355 #endif
7356
7357 ; return 0; }
7358 EOF
7359 if { (eval echo configure:7360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7360   rm -rf conftest*
7361   eval "ac_cv_func_$ac_func=yes"
7362 else
7363   echo "configure: failed program was:" >&5
7364   cat conftest.$ac_ext >&5
7365   rm -rf conftest*
7366   eval "ac_cv_func_$ac_func=no"
7367 fi
7368 rm -f conftest*
7369 fi
7370
7371 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7372   echo "$ac_t""yes" 1>&6
7373     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7374   cat >> confdefs.h <<EOF
7375 #define $ac_tr_func 1
7376 EOF
7377  
7378 else
7379   echo "$ac_t""no" 1>&6
7380 fi
7381 done
7382
7383   ;;
7384   esac
7385
7386
7387 # UnixWare 7.x has its getspnam in -lgen
7388 case "$LIBS" in
7389   *-lgen*) for ac_func in getspnam
7390 do
7391 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7392 echo "configure:7393: checking for $ac_func" >&5
7393 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7394   echo $ac_n "(cached) $ac_c" 1>&6
7395 else
7396   cat > conftest.$ac_ext <<EOF
7397 #line 7398 "configure"
7398 #include "confdefs.h"
7399 /* System header to define __stub macros and hopefully few prototypes,
7400     which can conflict with char $ac_func(); below.  */
7401 #include <assert.h>
7402 /* Override any gcc2 internal prototype to avoid an error.  */
7403 /* We use char because int might match the return type of a gcc2
7404     builtin and then its argument prototype would still apply.  */
7405 char $ac_func();
7406
7407 int main() {
7408
7409 /* The GNU C library defines this for functions which it implements
7410     to always fail with ENOSYS.  Some functions are actually named
7411     something starting with __ and the normal name is an alias.  */
7412 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7413 choke me
7414 #else
7415 $ac_func();
7416 #endif
7417
7418 ; return 0; }
7419 EOF
7420 if { (eval echo configure:7421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7421   rm -rf conftest*
7422   eval "ac_cv_func_$ac_func=yes"
7423 else
7424   echo "configure: failed program was:" >&5
7425   cat conftest.$ac_ext >&5
7426   rm -rf conftest*
7427   eval "ac_cv_func_$ac_func=no"
7428 fi
7429 rm -f conftest*
7430 fi
7431
7432 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7433   echo "$ac_t""yes" 1>&6
7434     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7435   cat >> confdefs.h <<EOF
7436 #define $ac_tr_func 1
7437 EOF
7438  
7439 else
7440   echo "$ac_t""no" 1>&6
7441 fi
7442 done
7443  ;;
7444   *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
7445 echo "configure:7446: checking for getspnam in -lgen" >&5
7446 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
7447 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7448   echo $ac_n "(cached) $ac_c" 1>&6
7449 else
7450   ac_save_LIBS="$LIBS"
7451 LIBS="-lgen  $LIBS"
7452 cat > conftest.$ac_ext <<EOF
7453 #line 7454 "configure"
7454 #include "confdefs.h"
7455 /* Override any gcc2 internal prototype to avoid an error.  */
7456 /* We use char because int might match the return type of a gcc2
7457     builtin and then its argument prototype would still apply.  */
7458 char getspnam();
7459
7460 int main() {
7461 getspnam()
7462 ; return 0; }
7463 EOF
7464 if { (eval echo configure:7465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7465   rm -rf conftest*
7466   eval "ac_cv_lib_$ac_lib_var=yes"
7467 else
7468   echo "configure: failed program was:" >&5
7469   cat conftest.$ac_ext >&5
7470   rm -rf conftest*
7471   eval "ac_cv_lib_$ac_lib_var=no"
7472 fi
7473 rm -f conftest*
7474 LIBS="$ac_save_LIBS"
7475
7476 fi
7477 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7478   echo "$ac_t""yes" 1>&6
7479     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7480     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7481   cat >> confdefs.h <<EOF
7482 #define $ac_tr_lib 1
7483 EOF
7484
7485   LIBS="-lgen $LIBS"
7486
7487 else
7488   echo "$ac_t""no" 1>&6
7489 fi
7490  
7491      for ac_func in getspnam
7492 do
7493 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7494 echo "configure:7495: checking for $ac_func" >&5
7495 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7496   echo $ac_n "(cached) $ac_c" 1>&6
7497 else
7498   cat > conftest.$ac_ext <<EOF
7499 #line 7500 "configure"
7500 #include "confdefs.h"
7501 /* System header to define __stub macros and hopefully few prototypes,
7502     which can conflict with char $ac_func(); below.  */
7503 #include <assert.h>
7504 /* Override any gcc2 internal prototype to avoid an error.  */
7505 /* We use char because int might match the return type of a gcc2
7506     builtin and then its argument prototype would still apply.  */
7507 char $ac_func();
7508
7509 int main() {
7510
7511 /* The GNU C library defines this for functions which it implements
7512     to always fail with ENOSYS.  Some functions are actually named
7513     something starting with __ and the normal name is an alias.  */
7514 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7515 choke me
7516 #else
7517 $ac_func();
7518 #endif
7519
7520 ; return 0; }
7521 EOF
7522 if { (eval echo configure:7523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7523   rm -rf conftest*
7524   eval "ac_cv_func_$ac_func=yes"
7525 else
7526   echo "configure: failed program was:" >&5
7527   cat conftest.$ac_ext >&5
7528   rm -rf conftest*
7529   eval "ac_cv_func_$ac_func=no"
7530 fi
7531 rm -f conftest*
7532 fi
7533
7534 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7535   echo "$ac_t""yes" 1>&6
7536     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7537   cat >> confdefs.h <<EOF
7538 #define $ac_tr_func 1
7539 EOF
7540  
7541 else
7542   echo "$ac_t""no" 1>&6
7543 fi
7544 done
7545
7546   ;;
7547   esac
7548
7549
7550 case "$LIBS" in
7551   *-lsecurity*) for ac_func in getspnam
7552 do
7553 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7554 echo "configure:7555: checking for $ac_func" >&5
7555 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7556   echo $ac_n "(cached) $ac_c" 1>&6
7557 else
7558   cat > conftest.$ac_ext <<EOF
7559 #line 7560 "configure"
7560 #include "confdefs.h"
7561 /* System header to define __stub macros and hopefully few prototypes,
7562     which can conflict with char $ac_func(); below.  */
7563 #include <assert.h>
7564 /* Override any gcc2 internal prototype to avoid an error.  */
7565 /* We use char because int might match the return type of a gcc2
7566     builtin and then its argument prototype would still apply.  */
7567 char $ac_func();
7568
7569 int main() {
7570
7571 /* The GNU C library defines this for functions which it implements
7572     to always fail with ENOSYS.  Some functions are actually named
7573     something starting with __ and the normal name is an alias.  */
7574 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7575 choke me
7576 #else
7577 $ac_func();
7578 #endif
7579
7580 ; return 0; }
7581 EOF
7582 if { (eval echo configure:7583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7583   rm -rf conftest*
7584   eval "ac_cv_func_$ac_func=yes"
7585 else
7586   echo "configure: failed program was:" >&5
7587   cat conftest.$ac_ext >&5
7588   rm -rf conftest*
7589   eval "ac_cv_func_$ac_func=no"
7590 fi
7591 rm -f conftest*
7592 fi
7593
7594 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7595   echo "$ac_t""yes" 1>&6
7596     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7597   cat >> confdefs.h <<EOF
7598 #define $ac_tr_func 1
7599 EOF
7600  
7601 else
7602   echo "$ac_t""no" 1>&6
7603 fi
7604 done
7605  ;;
7606   *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6
7607 echo "configure:7608: checking for getspnam in -lsecurity" >&5
7608 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'`
7609 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7610   echo $ac_n "(cached) $ac_c" 1>&6
7611 else
7612   ac_save_LIBS="$LIBS"
7613 LIBS="-lsecurity  $LIBS"
7614 cat > conftest.$ac_ext <<EOF
7615 #line 7616 "configure"
7616 #include "confdefs.h"
7617 /* Override any gcc2 internal prototype to avoid an error.  */
7618 /* We use char because int might match the return type of a gcc2
7619     builtin and then its argument prototype would still apply.  */
7620 char getspnam();
7621
7622 int main() {
7623 getspnam()
7624 ; return 0; }
7625 EOF
7626 if { (eval echo configure:7627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7627   rm -rf conftest*
7628   eval "ac_cv_lib_$ac_lib_var=yes"
7629 else
7630   echo "configure: failed program was:" >&5
7631   cat conftest.$ac_ext >&5
7632   rm -rf conftest*
7633   eval "ac_cv_lib_$ac_lib_var=no"
7634 fi
7635 rm -f conftest*
7636 LIBS="$ac_save_LIBS"
7637
7638 fi
7639 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7640   echo "$ac_t""yes" 1>&6
7641     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7642     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7643   cat >> confdefs.h <<EOF
7644 #define $ac_tr_lib 1
7645 EOF
7646
7647   LIBS="-lsecurity $LIBS"
7648
7649 else
7650   echo "$ac_t""no" 1>&6
7651 fi
7652  
7653      for ac_func in getspnam
7654 do
7655 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7656 echo "configure:7657: checking for $ac_func" >&5
7657 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7658   echo $ac_n "(cached) $ac_c" 1>&6
7659 else
7660   cat > conftest.$ac_ext <<EOF
7661 #line 7662 "configure"
7662 #include "confdefs.h"
7663 /* System header to define __stub macros and hopefully few prototypes,
7664     which can conflict with char $ac_func(); below.  */
7665 #include <assert.h>
7666 /* Override any gcc2 internal prototype to avoid an error.  */
7667 /* We use char because int might match the return type of a gcc2
7668     builtin and then its argument prototype would still apply.  */
7669 char $ac_func();
7670
7671 int main() {
7672
7673 /* The GNU C library defines this for functions which it implements
7674     to always fail with ENOSYS.  Some functions are actually named
7675     something starting with __ and the normal name is an alias.  */
7676 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7677 choke me
7678 #else
7679 $ac_func();
7680 #endif
7681
7682 ; return 0; }
7683 EOF
7684 if { (eval echo configure:7685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7685   rm -rf conftest*
7686   eval "ac_cv_func_$ac_func=yes"
7687 else
7688   echo "configure: failed program was:" >&5
7689   cat conftest.$ac_ext >&5
7690   rm -rf conftest*
7691   eval "ac_cv_func_$ac_func=no"
7692 fi
7693 rm -f conftest*
7694 fi
7695
7696 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7697   echo "$ac_t""yes" 1>&6
7698     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7699   cat >> confdefs.h <<EOF
7700 #define $ac_tr_func 1
7701 EOF
7702  
7703 else
7704   echo "$ac_t""no" 1>&6
7705 fi
7706 done
7707
7708   ;;
7709   esac
7710
7711 case "$LIBS" in
7712   *-lsec*) for ac_func in getspnam
7713 do
7714 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7715 echo "configure:7716: checking for $ac_func" >&5
7716 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7717   echo $ac_n "(cached) $ac_c" 1>&6
7718 else
7719   cat > conftest.$ac_ext <<EOF
7720 #line 7721 "configure"
7721 #include "confdefs.h"
7722 /* System header to define __stub macros and hopefully few prototypes,
7723     which can conflict with char $ac_func(); below.  */
7724 #include <assert.h>
7725 /* Override any gcc2 internal prototype to avoid an error.  */
7726 /* We use char because int might match the return type of a gcc2
7727     builtin and then its argument prototype would still apply.  */
7728 char $ac_func();
7729
7730 int main() {
7731
7732 /* The GNU C library defines this for functions which it implements
7733     to always fail with ENOSYS.  Some functions are actually named
7734     something starting with __ and the normal name is an alias.  */
7735 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7736 choke me
7737 #else
7738 $ac_func();
7739 #endif
7740
7741 ; return 0; }
7742 EOF
7743 if { (eval echo configure:7744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7744   rm -rf conftest*
7745   eval "ac_cv_func_$ac_func=yes"
7746 else
7747   echo "configure: failed program was:" >&5
7748   cat conftest.$ac_ext >&5
7749   rm -rf conftest*
7750   eval "ac_cv_func_$ac_func=no"
7751 fi
7752 rm -f conftest*
7753 fi
7754
7755 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7756   echo "$ac_t""yes" 1>&6
7757     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7758   cat >> confdefs.h <<EOF
7759 #define $ac_tr_func 1
7760 EOF
7761  
7762 else
7763   echo "$ac_t""no" 1>&6
7764 fi
7765 done
7766  ;;
7767   *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6
7768 echo "configure:7769: checking for getspnam in -lsec" >&5
7769 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'`
7770 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7771   echo $ac_n "(cached) $ac_c" 1>&6
7772 else
7773   ac_save_LIBS="$LIBS"
7774 LIBS="-lsec  $LIBS"
7775 cat > conftest.$ac_ext <<EOF
7776 #line 7777 "configure"
7777 #include "confdefs.h"
7778 /* Override any gcc2 internal prototype to avoid an error.  */
7779 /* We use char because int might match the return type of a gcc2
7780     builtin and then its argument prototype would still apply.  */
7781 char getspnam();
7782
7783 int main() {
7784 getspnam()
7785 ; return 0; }
7786 EOF
7787 if { (eval echo configure:7788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7788   rm -rf conftest*
7789   eval "ac_cv_lib_$ac_lib_var=yes"
7790 else
7791   echo "configure: failed program was:" >&5
7792   cat conftest.$ac_ext >&5
7793   rm -rf conftest*
7794   eval "ac_cv_lib_$ac_lib_var=no"
7795 fi
7796 rm -f conftest*
7797 LIBS="$ac_save_LIBS"
7798
7799 fi
7800 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7801   echo "$ac_t""yes" 1>&6
7802     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7803     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7804   cat >> confdefs.h <<EOF
7805 #define $ac_tr_lib 1
7806 EOF
7807
7808   LIBS="-lsec $LIBS"
7809
7810 else
7811   echo "$ac_t""no" 1>&6
7812 fi
7813  
7814      for ac_func in getspnam
7815 do
7816 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7817 echo "configure:7818: checking for $ac_func" >&5
7818 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7819   echo $ac_n "(cached) $ac_c" 1>&6
7820 else
7821   cat > conftest.$ac_ext <<EOF
7822 #line 7823 "configure"
7823 #include "confdefs.h"
7824 /* System header to define __stub macros and hopefully few prototypes,
7825     which can conflict with char $ac_func(); below.  */
7826 #include <assert.h>
7827 /* Override any gcc2 internal prototype to avoid an error.  */
7828 /* We use char because int might match the return type of a gcc2
7829     builtin and then its argument prototype would still apply.  */
7830 char $ac_func();
7831
7832 int main() {
7833
7834 /* The GNU C library defines this for functions which it implements
7835     to always fail with ENOSYS.  Some functions are actually named
7836     something starting with __ and the normal name is an alias.  */
7837 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7838 choke me
7839 #else
7840 $ac_func();
7841 #endif
7842
7843 ; return 0; }
7844 EOF
7845 if { (eval echo configure:7846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7846   rm -rf conftest*
7847   eval "ac_cv_func_$ac_func=yes"
7848 else
7849   echo "configure: failed program was:" >&5
7850   cat conftest.$ac_ext >&5
7851   rm -rf conftest*
7852   eval "ac_cv_func_$ac_func=no"
7853 fi
7854 rm -f conftest*
7855 fi
7856
7857 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7858   echo "$ac_t""yes" 1>&6
7859     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7860   cat >> confdefs.h <<EOF
7861 #define $ac_tr_func 1
7862 EOF
7863  
7864 else
7865   echo "$ac_t""no" 1>&6
7866 fi
7867 done
7868
7869   ;;
7870   esac
7871
7872
7873 case "$LIBS" in
7874   *-lsecurity*) for ac_func in bigcrypt
7875 do
7876 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7877 echo "configure:7878: checking for $ac_func" >&5
7878 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7879   echo $ac_n "(cached) $ac_c" 1>&6
7880 else
7881   cat > conftest.$ac_ext <<EOF
7882 #line 7883 "configure"
7883 #include "confdefs.h"
7884 /* System header to define __stub macros and hopefully few prototypes,
7885     which can conflict with char $ac_func(); below.  */
7886 #include <assert.h>
7887 /* Override any gcc2 internal prototype to avoid an error.  */
7888 /* We use char because int might match the return type of a gcc2
7889     builtin and then its argument prototype would still apply.  */
7890 char $ac_func();
7891
7892 int main() {
7893
7894 /* The GNU C library defines this for functions which it implements
7895     to always fail with ENOSYS.  Some functions are actually named
7896     something starting with __ and the normal name is an alias.  */
7897 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7898 choke me
7899 #else
7900 $ac_func();
7901 #endif
7902
7903 ; return 0; }
7904 EOF
7905 if { (eval echo configure:7906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7906   rm -rf conftest*
7907   eval "ac_cv_func_$ac_func=yes"
7908 else
7909   echo "configure: failed program was:" >&5
7910   cat conftest.$ac_ext >&5
7911   rm -rf conftest*
7912   eval "ac_cv_func_$ac_func=no"
7913 fi
7914 rm -f conftest*
7915 fi
7916
7917 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7918   echo "$ac_t""yes" 1>&6
7919     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7920   cat >> confdefs.h <<EOF
7921 #define $ac_tr_func 1
7922 EOF
7923  
7924 else
7925   echo "$ac_t""no" 1>&6
7926 fi
7927 done
7928  ;;
7929   *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6
7930 echo "configure:7931: checking for bigcrypt in -lsecurity" >&5
7931 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'`
7932 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7933   echo $ac_n "(cached) $ac_c" 1>&6
7934 else
7935   ac_save_LIBS="$LIBS"
7936 LIBS="-lsecurity  $LIBS"
7937 cat > conftest.$ac_ext <<EOF
7938 #line 7939 "configure"
7939 #include "confdefs.h"
7940 /* Override any gcc2 internal prototype to avoid an error.  */
7941 /* We use char because int might match the return type of a gcc2
7942     builtin and then its argument prototype would still apply.  */
7943 char bigcrypt();
7944
7945 int main() {
7946 bigcrypt()
7947 ; return 0; }
7948 EOF
7949 if { (eval echo configure:7950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7950   rm -rf conftest*
7951   eval "ac_cv_lib_$ac_lib_var=yes"
7952 else
7953   echo "configure: failed program was:" >&5
7954   cat conftest.$ac_ext >&5
7955   rm -rf conftest*
7956   eval "ac_cv_lib_$ac_lib_var=no"
7957 fi
7958 rm -f conftest*
7959 LIBS="$ac_save_LIBS"
7960
7961 fi
7962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7963   echo "$ac_t""yes" 1>&6
7964     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7965     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7966   cat >> confdefs.h <<EOF
7967 #define $ac_tr_lib 1
7968 EOF
7969
7970   LIBS="-lsecurity $LIBS"
7971
7972 else
7973   echo "$ac_t""no" 1>&6
7974 fi
7975  
7976      for ac_func in bigcrypt
7977 do
7978 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7979 echo "configure:7980: checking for $ac_func" >&5
7980 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7981   echo $ac_n "(cached) $ac_c" 1>&6
7982 else
7983   cat > conftest.$ac_ext <<EOF
7984 #line 7985 "configure"
7985 #include "confdefs.h"
7986 /* System header to define __stub macros and hopefully few prototypes,
7987     which can conflict with char $ac_func(); below.  */
7988 #include <assert.h>
7989 /* Override any gcc2 internal prototype to avoid an error.  */
7990 /* We use char because int might match the return type of a gcc2
7991     builtin and then its argument prototype would still apply.  */
7992 char $ac_func();
7993
7994 int main() {
7995
7996 /* The GNU C library defines this for functions which it implements
7997     to always fail with ENOSYS.  Some functions are actually named
7998     something starting with __ and the normal name is an alias.  */
7999 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8000 choke me
8001 #else
8002 $ac_func();
8003 #endif
8004
8005 ; return 0; }
8006 EOF
8007 if { (eval echo configure:8008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8008   rm -rf conftest*
8009   eval "ac_cv_func_$ac_func=yes"
8010 else
8011   echo "configure: failed program was:" >&5
8012   cat conftest.$ac_ext >&5
8013   rm -rf conftest*
8014   eval "ac_cv_func_$ac_func=no"
8015 fi
8016 rm -f conftest*
8017 fi
8018
8019 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8020   echo "$ac_t""yes" 1>&6
8021     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8022   cat >> confdefs.h <<EOF
8023 #define $ac_tr_func 1
8024 EOF
8025  
8026 else
8027   echo "$ac_t""no" 1>&6
8028 fi
8029 done
8030
8031   ;;
8032   esac
8033
8034 case "$LIBS" in
8035   *-lsec*) for ac_func in bigcrypt
8036 do
8037 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8038 echo "configure:8039: checking for $ac_func" >&5
8039 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8040   echo $ac_n "(cached) $ac_c" 1>&6
8041 else
8042   cat > conftest.$ac_ext <<EOF
8043 #line 8044 "configure"
8044 #include "confdefs.h"
8045 /* System header to define __stub macros and hopefully few prototypes,
8046     which can conflict with char $ac_func(); below.  */
8047 #include <assert.h>
8048 /* Override any gcc2 internal prototype to avoid an error.  */
8049 /* We use char because int might match the return type of a gcc2
8050     builtin and then its argument prototype would still apply.  */
8051 char $ac_func();
8052
8053 int main() {
8054
8055 /* The GNU C library defines this for functions which it implements
8056     to always fail with ENOSYS.  Some functions are actually named
8057     something starting with __ and the normal name is an alias.  */
8058 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8059 choke me
8060 #else
8061 $ac_func();
8062 #endif
8063
8064 ; return 0; }
8065 EOF
8066 if { (eval echo configure:8067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8067   rm -rf conftest*
8068   eval "ac_cv_func_$ac_func=yes"
8069 else
8070   echo "configure: failed program was:" >&5
8071   cat conftest.$ac_ext >&5
8072   rm -rf conftest*
8073   eval "ac_cv_func_$ac_func=no"
8074 fi
8075 rm -f conftest*
8076 fi
8077
8078 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8079   echo "$ac_t""yes" 1>&6
8080     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8081   cat >> confdefs.h <<EOF
8082 #define $ac_tr_func 1
8083 EOF
8084  
8085 else
8086   echo "$ac_t""no" 1>&6
8087 fi
8088 done
8089  ;;
8090   *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
8091 echo "configure:8092: checking for bigcrypt in -lsec" >&5
8092 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
8093 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8094   echo $ac_n "(cached) $ac_c" 1>&6
8095 else
8096   ac_save_LIBS="$LIBS"
8097 LIBS="-lsec  $LIBS"
8098 cat > conftest.$ac_ext <<EOF
8099 #line 8100 "configure"
8100 #include "confdefs.h"
8101 /* Override any gcc2 internal prototype to avoid an error.  */
8102 /* We use char because int might match the return type of a gcc2
8103     builtin and then its argument prototype would still apply.  */
8104 char bigcrypt();
8105
8106 int main() {
8107 bigcrypt()
8108 ; return 0; }
8109 EOF
8110 if { (eval echo configure:8111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8111   rm -rf conftest*
8112   eval "ac_cv_lib_$ac_lib_var=yes"
8113 else
8114   echo "configure: failed program was:" >&5
8115   cat conftest.$ac_ext >&5
8116   rm -rf conftest*
8117   eval "ac_cv_lib_$ac_lib_var=no"
8118 fi
8119 rm -f conftest*
8120 LIBS="$ac_save_LIBS"
8121
8122 fi
8123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8124   echo "$ac_t""yes" 1>&6
8125     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8126     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8127   cat >> confdefs.h <<EOF
8128 #define $ac_tr_lib 1
8129 EOF
8130
8131   LIBS="-lsec $LIBS"
8132
8133 else
8134   echo "$ac_t""no" 1>&6
8135 fi
8136  
8137      for ac_func in bigcrypt
8138 do
8139 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8140 echo "configure:8141: checking for $ac_func" >&5
8141 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8142   echo $ac_n "(cached) $ac_c" 1>&6
8143 else
8144   cat > conftest.$ac_ext <<EOF
8145 #line 8146 "configure"
8146 #include "confdefs.h"
8147 /* System header to define __stub macros and hopefully few prototypes,
8148     which can conflict with char $ac_func(); below.  */
8149 #include <assert.h>
8150 /* Override any gcc2 internal prototype to avoid an error.  */
8151 /* We use char because int might match the return type of a gcc2
8152     builtin and then its argument prototype would still apply.  */
8153 char $ac_func();
8154
8155 int main() {
8156
8157 /* The GNU C library defines this for functions which it implements
8158     to always fail with ENOSYS.  Some functions are actually named
8159     something starting with __ and the normal name is an alias.  */
8160 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8161 choke me
8162 #else
8163 $ac_func();
8164 #endif
8165
8166 ; return 0; }
8167 EOF
8168 if { (eval echo configure:8169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8169   rm -rf conftest*
8170   eval "ac_cv_func_$ac_func=yes"
8171 else
8172   echo "configure: failed program was:" >&5
8173   cat conftest.$ac_ext >&5
8174   rm -rf conftest*
8175   eval "ac_cv_func_$ac_func=no"
8176 fi
8177 rm -f conftest*
8178 fi
8179
8180 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8181   echo "$ac_t""yes" 1>&6
8182     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8183   cat >> confdefs.h <<EOF
8184 #define $ac_tr_func 1
8185 EOF
8186  
8187 else
8188   echo "$ac_t""no" 1>&6
8189 fi
8190 done
8191
8192   ;;
8193   esac
8194
8195
8196 case "$LIBS" in
8197   *-lsecurity*) for ac_func in getprpwnam
8198 do
8199 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8200 echo "configure:8201: checking for $ac_func" >&5
8201 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8202   echo $ac_n "(cached) $ac_c" 1>&6
8203 else
8204   cat > conftest.$ac_ext <<EOF
8205 #line 8206 "configure"
8206 #include "confdefs.h"
8207 /* System header to define __stub macros and hopefully few prototypes,
8208     which can conflict with char $ac_func(); below.  */
8209 #include <assert.h>
8210 /* Override any gcc2 internal prototype to avoid an error.  */
8211 /* We use char because int might match the return type of a gcc2
8212     builtin and then its argument prototype would still apply.  */
8213 char $ac_func();
8214
8215 int main() {
8216
8217 /* The GNU C library defines this for functions which it implements
8218     to always fail with ENOSYS.  Some functions are actually named
8219     something starting with __ and the normal name is an alias.  */
8220 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8221 choke me
8222 #else
8223 $ac_func();
8224 #endif
8225
8226 ; return 0; }
8227 EOF
8228 if { (eval echo configure:8229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8229   rm -rf conftest*
8230   eval "ac_cv_func_$ac_func=yes"
8231 else
8232   echo "configure: failed program was:" >&5
8233   cat conftest.$ac_ext >&5
8234   rm -rf conftest*
8235   eval "ac_cv_func_$ac_func=no"
8236 fi
8237 rm -f conftest*
8238 fi
8239
8240 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8241   echo "$ac_t""yes" 1>&6
8242     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8243   cat >> confdefs.h <<EOF
8244 #define $ac_tr_func 1
8245 EOF
8246  
8247 else
8248   echo "$ac_t""no" 1>&6
8249 fi
8250 done
8251  ;;
8252   *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
8253 echo "configure:8254: checking for getprpwnam in -lsecurity" >&5
8254 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
8255 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8256   echo $ac_n "(cached) $ac_c" 1>&6
8257 else
8258   ac_save_LIBS="$LIBS"
8259 LIBS="-lsecurity  $LIBS"
8260 cat > conftest.$ac_ext <<EOF
8261 #line 8262 "configure"
8262 #include "confdefs.h"
8263 /* Override any gcc2 internal prototype to avoid an error.  */
8264 /* We use char because int might match the return type of a gcc2
8265     builtin and then its argument prototype would still apply.  */
8266 char getprpwnam();
8267
8268 int main() {
8269 getprpwnam()
8270 ; return 0; }
8271 EOF
8272 if { (eval echo configure:8273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8273   rm -rf conftest*
8274   eval "ac_cv_lib_$ac_lib_var=yes"
8275 else
8276   echo "configure: failed program was:" >&5
8277   cat conftest.$ac_ext >&5
8278   rm -rf conftest*
8279   eval "ac_cv_lib_$ac_lib_var=no"
8280 fi
8281 rm -f conftest*
8282 LIBS="$ac_save_LIBS"
8283
8284 fi
8285 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8286   echo "$ac_t""yes" 1>&6
8287     ac_tr_lib=HAVE_LIB`echo security | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8288     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8289   cat >> confdefs.h <<EOF
8290 #define $ac_tr_lib 1
8291 EOF
8292
8293   LIBS="-lsecurity $LIBS"
8294
8295 else
8296   echo "$ac_t""no" 1>&6
8297 fi
8298  
8299      for ac_func in getprpwnam
8300 do
8301 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8302 echo "configure:8303: checking for $ac_func" >&5
8303 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8304   echo $ac_n "(cached) $ac_c" 1>&6
8305 else
8306   cat > conftest.$ac_ext <<EOF
8307 #line 8308 "configure"
8308 #include "confdefs.h"
8309 /* System header to define __stub macros and hopefully few prototypes,
8310     which can conflict with char $ac_func(); below.  */
8311 #include <assert.h>
8312 /* Override any gcc2 internal prototype to avoid an error.  */
8313 /* We use char because int might match the return type of a gcc2
8314     builtin and then its argument prototype would still apply.  */
8315 char $ac_func();
8316
8317 int main() {
8318
8319 /* The GNU C library defines this for functions which it implements
8320     to always fail with ENOSYS.  Some functions are actually named
8321     something starting with __ and the normal name is an alias.  */
8322 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8323 choke me
8324 #else
8325 $ac_func();
8326 #endif
8327
8328 ; return 0; }
8329 EOF
8330 if { (eval echo configure:8331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8331   rm -rf conftest*
8332   eval "ac_cv_func_$ac_func=yes"
8333 else
8334   echo "configure: failed program was:" >&5
8335   cat conftest.$ac_ext >&5
8336   rm -rf conftest*
8337   eval "ac_cv_func_$ac_func=no"
8338 fi
8339 rm -f conftest*
8340 fi
8341
8342 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8343   echo "$ac_t""yes" 1>&6
8344     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8345   cat >> confdefs.h <<EOF
8346 #define $ac_tr_func 1
8347 EOF
8348  
8349 else
8350   echo "$ac_t""no" 1>&6
8351 fi
8352 done
8353
8354   ;;
8355   esac
8356
8357 case "$LIBS" in
8358   *-lsec*) for ac_func in getprpwnam
8359 do
8360 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8361 echo "configure:8362: checking for $ac_func" >&5
8362 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8363   echo $ac_n "(cached) $ac_c" 1>&6
8364 else
8365   cat > conftest.$ac_ext <<EOF
8366 #line 8367 "configure"
8367 #include "confdefs.h"
8368 /* System header to define __stub macros and hopefully few prototypes,
8369     which can conflict with char $ac_func(); below.  */
8370 #include <assert.h>
8371 /* Override any gcc2 internal prototype to avoid an error.  */
8372 /* We use char because int might match the return type of a gcc2
8373     builtin and then its argument prototype would still apply.  */
8374 char $ac_func();
8375
8376 int main() {
8377
8378 /* The GNU C library defines this for functions which it implements
8379     to always fail with ENOSYS.  Some functions are actually named
8380     something starting with __ and the normal name is an alias.  */
8381 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8382 choke me
8383 #else
8384 $ac_func();
8385 #endif
8386
8387 ; return 0; }
8388 EOF
8389 if { (eval echo configure:8390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8390   rm -rf conftest*
8391   eval "ac_cv_func_$ac_func=yes"
8392 else
8393   echo "configure: failed program was:" >&5
8394   cat conftest.$ac_ext >&5
8395   rm -rf conftest*
8396   eval "ac_cv_func_$ac_func=no"
8397 fi
8398 rm -f conftest*
8399 fi
8400
8401 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8402   echo "$ac_t""yes" 1>&6
8403     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8404   cat >> confdefs.h <<EOF
8405 #define $ac_tr_func 1
8406 EOF
8407  
8408 else
8409   echo "$ac_t""no" 1>&6
8410 fi
8411 done
8412  ;;
8413   *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6
8414 echo "configure:8415: checking for getprpwnam in -lsec" >&5
8415 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'`
8416 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8417   echo $ac_n "(cached) $ac_c" 1>&6
8418 else
8419   ac_save_LIBS="$LIBS"
8420 LIBS="-lsec  $LIBS"
8421 cat > conftest.$ac_ext <<EOF
8422 #line 8423 "configure"
8423 #include "confdefs.h"
8424 /* Override any gcc2 internal prototype to avoid an error.  */
8425 /* We use char because int might match the return type of a gcc2
8426     builtin and then its argument prototype would still apply.  */
8427 char getprpwnam();
8428
8429 int main() {
8430 getprpwnam()
8431 ; return 0; }
8432 EOF
8433 if { (eval echo configure:8434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8434   rm -rf conftest*
8435   eval "ac_cv_lib_$ac_lib_var=yes"
8436 else
8437   echo "configure: failed program was:" >&5
8438   cat conftest.$ac_ext >&5
8439   rm -rf conftest*
8440   eval "ac_cv_lib_$ac_lib_var=no"
8441 fi
8442 rm -f conftest*
8443 LIBS="$ac_save_LIBS"
8444
8445 fi
8446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8447   echo "$ac_t""yes" 1>&6
8448     ac_tr_lib=HAVE_LIB`echo sec | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8449     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8450   cat >> confdefs.h <<EOF
8451 #define $ac_tr_lib 1
8452 EOF
8453
8454   LIBS="-lsec $LIBS"
8455
8456 else
8457   echo "$ac_t""no" 1>&6
8458 fi
8459  
8460      for ac_func in getprpwnam
8461 do
8462 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8463 echo "configure:8464: checking for $ac_func" >&5
8464 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8465   echo $ac_n "(cached) $ac_c" 1>&6
8466 else
8467   cat > conftest.$ac_ext <<EOF
8468 #line 8469 "configure"
8469 #include "confdefs.h"
8470 /* System header to define __stub macros and hopefully few prototypes,
8471     which can conflict with char $ac_func(); below.  */
8472 #include <assert.h>
8473 /* Override any gcc2 internal prototype to avoid an error.  */
8474 /* We use char because int might match the return type of a gcc2
8475     builtin and then its argument prototype would still apply.  */
8476 char $ac_func();
8477
8478 int main() {
8479
8480 /* The GNU C library defines this for functions which it implements
8481     to always fail with ENOSYS.  Some functions are actually named
8482     something starting with __ and the normal name is an alias.  */
8483 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8484 choke me
8485 #else
8486 $ac_func();
8487 #endif
8488
8489 ; return 0; }
8490 EOF
8491 if { (eval echo configure:8492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8492   rm -rf conftest*
8493   eval "ac_cv_func_$ac_func=yes"
8494 else
8495   echo "configure: failed program was:" >&5
8496   cat conftest.$ac_ext >&5
8497   rm -rf conftest*
8498   eval "ac_cv_func_$ac_func=no"
8499 fi
8500 rm -f conftest*
8501 fi
8502
8503 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8504   echo "$ac_t""yes" 1>&6
8505     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8506   cat >> confdefs.h <<EOF
8507 #define $ac_tr_func 1
8508 EOF
8509  
8510 else
8511   echo "$ac_t""no" 1>&6
8512 fi
8513 done
8514
8515   ;;
8516   esac
8517
8518
8519 # this bit needs to be modified for each OS that is suported by
8520 # smbwrapper. You need to specify how to created a shared library and
8521 # how to compile C code to produce PIC object files
8522
8523 # these are the defaults, good for lots of systems
8524 HOST_OS="$host_os"
8525 LDSHFLAGS="-shared"
8526 SHLD="\${CC}"
8527 PICFLAG=""
8528 PICSUFFIX="po"
8529 POBAD_CC="#"
8530 SHLIBEXT="so"
8531 # Assume non-shared by default and override below
8532 BLDSHARED="false"
8533 echo $ac_n "checking ability to build shared libraries""... $ac_c" 1>&6
8534 echo "configure:8535: checking ability to build shared libraries" >&5
8535
8536 # and these are for particular systems
8537 case "$host_os" in
8538                 *linux*)   cat >> confdefs.h <<\EOF
8539 #define LINUX 1
8540 EOF
8541
8542                         BLDSHARED="true"
8543                         LDSHFLAGS="-shared" 
8544                         PICFLAG="-fPIC"
8545                 ;;
8546                 *solaris*) cat >> confdefs.h <<\EOF
8547 #define SUNOS5 1
8548 EOF
8549
8550                         BLDSHARED="true"
8551                         LDSHFLAGS="-h \$@ -G"
8552                         if test "${ac_cv_prog_CC}" = "gcc"; then
8553                                 PICFLAG="-fPIC"
8554                         else
8555                                 PICFLAG="-KPIC"
8556                                 POBAD_CC=""
8557                                 PICSUFFIX="po.o"
8558                         fi
8559                 ;;
8560                 *sunos*) cat >> confdefs.h <<\EOF
8561 #define SUNOS4 1
8562 EOF
8563
8564                         BLDSHARED="true"
8565                         LDSHFLAGS="-Wl,-h,\$@ -G"
8566                         PICFLAG="-KPIC"   # Is this correct for SunOS
8567                 ;;
8568                 *bsd*)  BLDSHARED="true"
8569                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8570                         PICFLAG="-fPIC"
8571                 ;;
8572                 *irix*) cat >> confdefs.h <<\EOF
8573 #define IRIX 1
8574 EOF
8575
8576                         case "$host_os" in
8577                         *irix6*) cat >> confdefs.h <<\EOF
8578 #define IRIX6 1
8579 EOF
8580
8581                         ;;
8582                         esac
8583                         ATTEMPT_WRAP32_BUILD=yes
8584                         BLDSHARED="true"
8585                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8586                         if test "${ac_cv_prog_CC}" = "gcc"; then
8587                                 PICFLAG="-fPIC"
8588                         else 
8589                                 PICFLAG="-KPIC"
8590                         fi
8591                 ;;
8592                 *aix*) cat >> confdefs.h <<\EOF
8593 #define AIX 1
8594 EOF
8595
8596                         BLDSHARED="true"
8597                         LDSHFLAGS="-Wl,-bexpall,-bM:SRE,-bnoentry"
8598                         PICFLAG="-O2 -qmaxmem=6000"
8599                 ;;
8600                 *hpux*) cat >> confdefs.h <<\EOF
8601 #define HPUX 1
8602 EOF
8603
8604                         SHLIBEXT="sl"
8605                         # Use special PIC flags for the native HP-UX compiler.
8606                         if test $ac_cv_prog_cc_Ae = yes; then
8607                                 #BLDSHARED="true"
8608                                 LDSHFLAGS="-b -z +h \$@"
8609                                 PICFLAG="+z"
8610                         fi
8611                 ;;
8612                 *qnx*) cat >> confdefs.h <<\EOF
8613 #define QNX 1
8614 EOF
8615 ;;
8616                 *osf*) cat >> confdefs.h <<\EOF
8617 #define OSF1 1
8618 EOF
8619
8620                         BLDSHARED="true"
8621                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8622                         PICFLAG="-fPIC"
8623                 ;;
8624                 *sco*) cat >> confdefs.h <<\EOF
8625 #define SCO 1
8626 EOF
8627 ;;
8628                 *unixware*) cat >> confdefs.h <<\EOF
8629 #define UNIXWARE 1
8630 EOF
8631
8632                         BLDSHARED="true"
8633                         LDSHFLAGS="-Wl,-soname,\$@ -shared"
8634                         PICFLAG="-KPIC"
8635                 ;;
8636                 *next2*) cat >> confdefs.h <<\EOF
8637 #define NEXT2 1
8638 EOF
8639 ;;
8640                 *dgux*) # Extract the first word of "groff", so it can be a program name with args.
8641 set dummy groff; ac_word=$2
8642 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8643 echo "configure:8644: checking for $ac_word" >&5
8644 if eval "test \"`echo '$''{'ac_cv_prog_ROFF'+set}'`\" = set"; then
8645   echo $ac_n "(cached) $ac_c" 1>&6
8646 else
8647   if test -n "$ROFF"; then
8648   ac_cv_prog_ROFF="$ROFF" # Let the user override the test.
8649 else
8650   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8651   ac_dummy="$PATH"
8652   for ac_dir in $ac_dummy; do
8653     test -z "$ac_dir" && ac_dir=.
8654     if test -f $ac_dir/$ac_word; then
8655       ac_cv_prog_ROFF="groff -etpsR -Tascii -man"
8656       break
8657     fi
8658   done
8659   IFS="$ac_save_ifs"
8660 fi
8661 fi
8662 ROFF="$ac_cv_prog_ROFF"
8663 if test -n "$ROFF"; then
8664   echo "$ac_t""$ROFF" 1>&6
8665 else
8666   echo "$ac_t""no" 1>&6
8667 fi
8668 ;;
8669                 *sysv4*)
8670                         case "$host" in
8671                                 *-univel-*)     if  test "$GCC" != yes ; then
8672                                                                         cat >> confdefs.h <<\EOF
8673 #define HAVE_MEMSET 1
8674 EOF
8675
8676                                                                 fi
8677                                                                 LDSHFLAGS="-G"
8678                                 ;;
8679                                 *mips-sni-sysv4*) cat >> confdefs.h <<\EOF
8680 #define RELIANTUNIX 1
8681 EOF
8682 ;;
8683                         esac
8684                         ;;
8685                 *sysv5*)
8686                         if  test "$GCC" != yes ; then
8687                                 cat >> confdefs.h <<\EOF
8688 #define HAVE_MEMSET 1
8689 EOF
8690
8691                         fi
8692                         LDSHFLAGS="-G"
8693                         ;;
8694 esac
8695 echo "$ac_t""$BLDSHARED" 1>&6
8696 echo $ac_n "checking linker flags for shared libraries""... $ac_c" 1>&6
8697 echo "configure:8698: checking linker flags for shared libraries" >&5
8698 echo "$ac_t""$LDSHFLAGS" 1>&6
8699 echo $ac_n "checking compiler flags for position-independent code""... $ac_c" 1>&6
8700 echo "configure:8701: checking compiler flags for position-independent code" >&5
8701 echo "$ac_t""$PICFLAGS" 1>&6
8702
8703 #######################################################
8704 # test whether building a shared library actually works
8705 if test $BLDSHARED = true; then
8706 echo $ac_n "checking whether building shared libraries actually works""... $ac_c" 1>&6
8707 echo "configure:8708: checking whether building shared libraries actually works" >&5
8708 if eval "test \"`echo '$''{'ac_cv_shlib_works'+set}'`\" = set"; then
8709   echo $ac_n "(cached) $ac_c" 1>&6
8710 else
8711   
8712    ac_cv_shlib_works=no
8713    # try building a trivial shared library
8714    $CC $CPPFLAGS $CFLAGS $PICFLAG -c -o shlib.po ${srcdir-.}/tests/shlib.c &&
8715      $CC $LDSHFLAGS -o shlib.so shlib.po &&
8716      ac_cv_shlib_works=yes
8717    rm -f shlib.so shlib.po
8718
8719 fi
8720
8721 echo "$ac_t""$ac_cv_shlib_works" 1>&6
8722 if test $ac_cv_shlib_works = no; then
8723    BLDSHARED=false
8724 fi
8725 fi
8726
8727
8728 # this updates our target list if we can build shared libs
8729 if test $BLDSHARED = true; then
8730    LIBSMBCLIENT_SHARED=bin/libsmbclient.$SHLIBEXT
8731 else
8732    LIBSMBCLIENT_SHARED=
8733 fi
8734
8735 ################
8736
8737 echo $ac_n "checking for long long""... $ac_c" 1>&6
8738 echo "configure:8739: checking for long long" >&5
8739 if eval "test \"`echo '$''{'samba_cv_have_longlong'+set}'`\" = set"; then
8740   echo $ac_n "(cached) $ac_c" 1>&6
8741 else
8742   
8743 if test "$cross_compiling" = yes; then
8744   samba_cv_have_longlong=cross
8745 else
8746   cat > conftest.$ac_ext <<EOF
8747 #line 8748 "configure"
8748 #include "confdefs.h"
8749 #include <stdio.h>
8750 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }
8751 EOF
8752 if { (eval echo configure:8753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8753 then
8754   samba_cv_have_longlong=yes
8755 else
8756   echo "configure: failed program was:" >&5
8757   cat conftest.$ac_ext >&5
8758   rm -fr conftest*
8759   samba_cv_have_longlong=no
8760 fi
8761 rm -fr conftest*
8762 fi
8763
8764 fi
8765
8766 echo "$ac_t""$samba_cv_have_longlong" 1>&6
8767 if test x"$samba_cv_have_longlong" = x"yes"; then
8768     cat >> confdefs.h <<\EOF
8769 #define HAVE_LONGLONG 1
8770 EOF
8771
8772 fi
8773
8774 #
8775 # Check if the compiler supports the LL prefix on long long integers.
8776 # AIX needs this.
8777
8778 echo $ac_n "checking for LL suffix on long long integers""... $ac_c" 1>&6
8779 echo "configure:8780: checking for LL suffix on long long integers" >&5
8780 if eval "test \"`echo '$''{'samba_cv_compiler_supports_ll'+set}'`\" = set"; then
8781   echo $ac_n "(cached) $ac_c" 1>&6
8782 else
8783   
8784     cat > conftest.$ac_ext <<EOF
8785 #line 8786 "configure"
8786 #include "confdefs.h"
8787 #include <stdio.h>
8788 int main() {
8789 long long i = 0x8000000000LL
8790 ; return 0; }
8791 EOF
8792 if { (eval echo configure:8793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8793   rm -rf conftest*
8794   samba_cv_compiler_supports_ll=yes
8795 else
8796   echo "configure: failed program was:" >&5
8797   cat conftest.$ac_ext >&5
8798   rm -rf conftest*
8799   samba_cv_compiler_supports_ll=no
8800 fi
8801 rm -f conftest*
8802 fi
8803
8804 echo "$ac_t""$samba_cv_compiler_supports_ll" 1>&6
8805 if test x"$samba_cv_compiler_supports_ll" = x"yes"; then
8806    cat >> confdefs.h <<\EOF
8807 #define COMPILER_SUPPORTS_LL 1
8808 EOF
8809
8810 fi
8811
8812   
8813 echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6
8814 echo "configure:8815: checking for 64 bit off_t" >&5
8815 if eval "test \"`echo '$''{'samba_cv_SIZEOF_OFF_T'+set}'`\" = set"; then
8816   echo $ac_n "(cached) $ac_c" 1>&6
8817 else
8818   
8819 if test "$cross_compiling" = yes; then
8820   samba_cv_SIZEOF_OFF_T=cross
8821 else
8822   cat > conftest.$ac_ext <<EOF
8823 #line 8824 "configure"
8824 #include "confdefs.h"
8825 #include <stdio.h>
8826 #include <sys/stat.h>
8827 main() { exit((sizeof(off_t) == 8) ? 0 : 1); }
8828 EOF
8829 if { (eval echo configure:8830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8830 then
8831   samba_cv_SIZEOF_OFF_T=yes
8832 else
8833   echo "configure: failed program was:" >&5
8834   cat conftest.$ac_ext >&5
8835   rm -fr conftest*
8836   samba_cv_SIZEOF_OFF_T=no
8837 fi
8838 rm -fr conftest*
8839 fi
8840
8841 fi
8842
8843 echo "$ac_t""$samba_cv_SIZEOF_OFF_T" 1>&6
8844 if test x"$samba_cv_SIZEOF_OFF_T" = x"yes"; then
8845     cat >> confdefs.h <<\EOF
8846 #define SIZEOF_OFF_T 8
8847 EOF
8848
8849 fi
8850
8851 echo $ac_n "checking for off64_t""... $ac_c" 1>&6
8852 echo "configure:8853: checking for off64_t" >&5
8853 if eval "test \"`echo '$''{'samba_cv_HAVE_OFF64_T'+set}'`\" = set"; then
8854   echo $ac_n "(cached) $ac_c" 1>&6
8855 else
8856   
8857 if test "$cross_compiling" = yes; then
8858   samba_cv_HAVE_OFF64_T=cross
8859 else
8860   cat > conftest.$ac_ext <<EOF
8861 #line 8862 "configure"
8862 #include "confdefs.h"
8863
8864 #if defined(HAVE_UNISTD_H)
8865 #include <unistd.h>
8866 #endif
8867 #include <stdio.h>
8868 #include <sys/stat.h>
8869 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8870 EOF
8871 if { (eval echo configure:8872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8872 then
8873   samba_cv_HAVE_OFF64_T=yes
8874 else
8875   echo "configure: failed program was:" >&5
8876   cat conftest.$ac_ext >&5
8877   rm -fr conftest*
8878   samba_cv_HAVE_OFF64_T=no
8879 fi
8880 rm -fr conftest*
8881 fi
8882
8883 fi
8884
8885 echo "$ac_t""$samba_cv_HAVE_OFF64_T" 1>&6
8886 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
8887     cat >> confdefs.h <<\EOF
8888 #define HAVE_OFF64_T 1
8889 EOF
8890
8891 fi
8892
8893 echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6
8894 echo "configure:8895: checking for 64 bit ino_t" >&5
8895 if eval "test \"`echo '$''{'samba_cv_SIZEOF_INO_T'+set}'`\" = set"; then
8896   echo $ac_n "(cached) $ac_c" 1>&6
8897 else
8898   
8899 if test "$cross_compiling" = yes; then
8900   samba_cv_SIZEOF_INO_T=cross
8901 else
8902   cat > conftest.$ac_ext <<EOF
8903 #line 8904 "configure"
8904 #include "confdefs.h"
8905 #include <stdio.h>
8906 #include <sys/stat.h>
8907 main() { exit((sizeof(ino_t) == 8) ? 0 : 1); }
8908 EOF
8909 if { (eval echo configure:8910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8910 then
8911   samba_cv_SIZEOF_INO_T=yes
8912 else
8913   echo "configure: failed program was:" >&5
8914   cat conftest.$ac_ext >&5
8915   rm -fr conftest*
8916   samba_cv_SIZEOF_INO_T=no
8917 fi
8918 rm -fr conftest*
8919 fi
8920
8921 fi
8922
8923 echo "$ac_t""$samba_cv_SIZEOF_INO_T" 1>&6
8924 if test x"$samba_cv_SIZEOF_INO_T" = x"yes"; then
8925     cat >> confdefs.h <<\EOF
8926 #define SIZEOF_INO_T 8
8927 EOF
8928
8929 fi
8930
8931 echo $ac_n "checking for ino64_t""... $ac_c" 1>&6
8932 echo "configure:8933: checking for ino64_t" >&5
8933 if eval "test \"`echo '$''{'samba_cv_HAVE_INO64_T'+set}'`\" = set"; then
8934   echo $ac_n "(cached) $ac_c" 1>&6
8935 else
8936   
8937 if test "$cross_compiling" = yes; then
8938   samba_cv_HAVE_INO64_T=cross
8939 else
8940   cat > conftest.$ac_ext <<EOF
8941 #line 8942 "configure"
8942 #include "confdefs.h"
8943
8944 #if defined(HAVE_UNISTD_H)
8945 #include <unistd.h>
8946 #endif
8947 #include <stdio.h>
8948 #include <sys/stat.h>
8949 main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }
8950 EOF
8951 if { (eval echo configure:8952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8952 then
8953   samba_cv_HAVE_INO64_T=yes
8954 else
8955   echo "configure: failed program was:" >&5
8956   cat conftest.$ac_ext >&5
8957   rm -fr conftest*
8958   samba_cv_HAVE_INO64_T=no
8959 fi
8960 rm -fr conftest*
8961 fi
8962
8963 fi
8964
8965 echo "$ac_t""$samba_cv_HAVE_INO64_T" 1>&6
8966 if test x"$samba_cv_HAVE_INO64_T" = x"yes"; then
8967     cat >> confdefs.h <<\EOF
8968 #define HAVE_INO64_T 1
8969 EOF
8970
8971 fi
8972
8973 echo $ac_n "checking for struct dirent64""... $ac_c" 1>&6
8974 echo "configure:8975: checking for struct dirent64" >&5
8975 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_DIRENT64'+set}'`\" = set"; then
8976   echo $ac_n "(cached) $ac_c" 1>&6
8977 else
8978   
8979 cat > conftest.$ac_ext <<EOF
8980 #line 8981 "configure"
8981 #include "confdefs.h"
8982
8983 #if defined(HAVE_UNISTD_H)
8984 #include <unistd.h>
8985 #endif
8986 #include <sys/types.h>
8987 #include <dirent.h>
8988 int main() {
8989 struct dirent64 de;
8990 ; return 0; }
8991 EOF
8992 if { (eval echo configure:8993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8993   rm -rf conftest*
8994   samba_cv_HAVE_STRUCT_DIRENT64=yes
8995 else
8996   echo "configure: failed program was:" >&5
8997   cat conftest.$ac_ext >&5
8998   rm -rf conftest*
8999   samba_cv_HAVE_STRUCT_DIRENT64=no
9000 fi
9001 rm -f conftest*
9002 fi
9003
9004 echo "$ac_t""$samba_cv_HAVE_STRUCT_DIRENT64" 1>&6
9005 if test x"$samba_cv_HAVE_STRUCT_DIRENT64" = x"yes"; then
9006     cat >> confdefs.h <<\EOF
9007 #define HAVE_STRUCT_DIRENT64 1
9008 EOF
9009
9010 fi
9011
9012 echo $ac_n "checking for unsigned char""... $ac_c" 1>&6
9013 echo "configure:9014: checking for unsigned char" >&5
9014 if eval "test \"`echo '$''{'samba_cv_HAVE_UNSIGNED_CHAR'+set}'`\" = set"; then
9015   echo $ac_n "(cached) $ac_c" 1>&6
9016 else
9017   
9018 if test "$cross_compiling" = yes; then
9019   samba_cv_HAVE_UNSIGNED_CHAR=cross
9020 else
9021   cat > conftest.$ac_ext <<EOF
9022 #line 9023 "configure"
9023 #include "confdefs.h"
9024 #include <stdio.h>
9025 main() { char c; c=250; exit((c > 0)?0:1); }
9026 EOF
9027 if { (eval echo configure:9028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9028 then
9029   samba_cv_HAVE_UNSIGNED_CHAR=yes
9030 else
9031   echo "configure: failed program was:" >&5
9032   cat conftest.$ac_ext >&5
9033   rm -fr conftest*
9034   samba_cv_HAVE_UNSIGNED_CHAR=no
9035 fi
9036 rm -fr conftest*
9037 fi
9038
9039 fi
9040
9041 echo "$ac_t""$samba_cv_HAVE_UNSIGNED_CHAR" 1>&6
9042 if test x"$samba_cv_HAVE_UNSIGNED_CHAR" = x"yes"; then
9043     cat >> confdefs.h <<\EOF
9044 #define HAVE_UNSIGNED_CHAR 1
9045 EOF
9046
9047 fi
9048
9049 echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6
9050 echo "configure:9051: checking for sin_len in sock" >&5
9051 if eval "test \"`echo '$''{'samba_cv_HAVE_SOCK_SIN_LEN'+set}'`\" = set"; then
9052   echo $ac_n "(cached) $ac_c" 1>&6
9053 else
9054   
9055 cat > conftest.$ac_ext <<EOF
9056 #line 9057 "configure"
9057 #include "confdefs.h"
9058 #include <sys/types.h>
9059 #include <sys/socket.h>
9060 #include <netinet/in.h>
9061 int main() {
9062 struct sockaddr_in sock; sock.sin_len = sizeof(sock);
9063 ; return 0; }
9064 EOF
9065 if { (eval echo configure:9066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9066   rm -rf conftest*
9067   samba_cv_HAVE_SOCK_SIN_LEN=yes
9068 else
9069   echo "configure: failed program was:" >&5
9070   cat conftest.$ac_ext >&5
9071   rm -rf conftest*
9072   samba_cv_HAVE_SOCK_SIN_LEN=no
9073 fi
9074 rm -f conftest*
9075 fi
9076
9077 echo "$ac_t""$samba_cv_HAVE_SOCK_SIN_LEN" 1>&6
9078 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
9079     cat >> confdefs.h <<\EOF
9080 #define HAVE_SOCK_SIN_LEN 1
9081 EOF
9082
9083 fi
9084
9085 echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6
9086 echo "configure:9087: checking whether seekdir returns void" >&5
9087 if eval "test \"`echo '$''{'samba_cv_SEEKDIR_RETURNS_VOID'+set}'`\" = set"; then
9088   echo $ac_n "(cached) $ac_c" 1>&6
9089 else
9090   
9091 cat > conftest.$ac_ext <<EOF
9092 #line 9093 "configure"
9093 #include "confdefs.h"
9094 #include <sys/types.h>
9095 #include <dirent.h>
9096 void seekdir(DIR *d, long loc) { return; }
9097 int main() {
9098 return 0;
9099 ; return 0; }
9100 EOF
9101 if { (eval echo configure:9102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9102   rm -rf conftest*
9103   samba_cv_SEEKDIR_RETURNS_VOID=yes
9104 else
9105   echo "configure: failed program was:" >&5
9106   cat conftest.$ac_ext >&5
9107   rm -rf conftest*
9108   samba_cv_SEEKDIR_RETURNS_VOID=no
9109 fi
9110 rm -f conftest*
9111 fi
9112
9113 echo "$ac_t""$samba_cv_SEEKDIR_RETURNS_VOID" 1>&6
9114 if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
9115     cat >> confdefs.h <<\EOF
9116 #define SEEKDIR_RETURNS_VOID 1
9117 EOF
9118
9119 fi
9120
9121 echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6
9122 echo "configure:9123: checking for __FILE__ macro" >&5
9123 if eval "test \"`echo '$''{'samba_cv_HAVE_FILE_MACRO'+set}'`\" = set"; then
9124   echo $ac_n "(cached) $ac_c" 1>&6
9125 else
9126   
9127 cat > conftest.$ac_ext <<EOF
9128 #line 9129 "configure"
9129 #include "confdefs.h"
9130 #include <stdio.h>
9131 int main() {
9132 printf("%s\n", __FILE__);
9133 ; return 0; }
9134 EOF
9135 if { (eval echo configure:9136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9136   rm -rf conftest*
9137   samba_cv_HAVE_FILE_MACRO=yes
9138 else
9139   echo "configure: failed program was:" >&5
9140   cat conftest.$ac_ext >&5
9141   rm -rf conftest*
9142   samba_cv_HAVE_FILE_MACRO=no
9143 fi
9144 rm -f conftest*
9145 fi
9146
9147 echo "$ac_t""$samba_cv_HAVE_FILE_MACRO" 1>&6
9148 if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
9149     cat >> confdefs.h <<\EOF
9150 #define HAVE_FILE_MACRO 1
9151 EOF
9152
9153 fi
9154
9155 echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6
9156 echo "configure:9157: checking for __FUNCTION__ macro" >&5
9157 if eval "test \"`echo '$''{'samba_cv_HAVE_FUNCTION_MACRO'+set}'`\" = set"; then
9158   echo $ac_n "(cached) $ac_c" 1>&6
9159 else
9160   
9161 cat > conftest.$ac_ext <<EOF
9162 #line 9163 "configure"
9163 #include "confdefs.h"
9164 #include <stdio.h>
9165 int main() {
9166 printf("%s\n", __FUNCTION__);
9167 ; return 0; }
9168 EOF
9169 if { (eval echo configure:9170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9170   rm -rf conftest*
9171   samba_cv_HAVE_FUNCTION_MACRO=yes
9172 else
9173   echo "configure: failed program was:" >&5
9174   cat conftest.$ac_ext >&5
9175   rm -rf conftest*
9176   samba_cv_HAVE_FUNCTION_MACRO=no
9177 fi
9178 rm -f conftest*
9179 fi
9180
9181 echo "$ac_t""$samba_cv_HAVE_FUNCTION_MACRO" 1>&6
9182 if test x"$samba_cv_HAVE_FUNCTION_MACRO" = x"yes"; then
9183     cat >> confdefs.h <<\EOF
9184 #define HAVE_FUNCTION_MACRO 1
9185 EOF
9186
9187 fi
9188
9189 echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6
9190 echo "configure:9191: checking if gettimeofday takes tz argument" >&5
9191 if eval "test \"`echo '$''{'samba_cv_HAVE_GETTIMEOFDAY_TZ'+set}'`\" = set"; then
9192   echo $ac_n "(cached) $ac_c" 1>&6
9193 else
9194   
9195 if test "$cross_compiling" = yes; then
9196   samba_cv_HAVE_GETTIMEOFDAY_TZ=cross
9197 else
9198   cat > conftest.$ac_ext <<EOF
9199 #line 9200 "configure"
9200 #include "confdefs.h"
9201
9202 #include <sys/time.h>
9203 #include <unistd.h>
9204 main() { struct timeval tv; exit(gettimeofday(&tv, NULL));}
9205 EOF
9206 if { (eval echo configure:9207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9207 then
9208   samba_cv_HAVE_GETTIMEOFDAY_TZ=yes
9209 else
9210   echo "configure: failed program was:" >&5
9211   cat conftest.$ac_ext >&5
9212   rm -fr conftest*
9213   samba_cv_HAVE_GETTIMEOFDAY_TZ=no
9214 fi
9215 rm -fr conftest*
9216 fi
9217
9218 fi
9219
9220 echo "$ac_t""$samba_cv_HAVE_GETTIMEOFDAY_TZ" 1>&6
9221 if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
9222     cat >> confdefs.h <<\EOF
9223 #define HAVE_GETTIMEOFDAY_TZ 1
9224 EOF
9225
9226 fi
9227
9228 echo $ac_n "checking for C99 vsnprintf""... $ac_c" 1>&6
9229 echo "configure:9230: checking for C99 vsnprintf" >&5
9230 if eval "test \"`echo '$''{'samba_cv_HAVE_C99_VSNPRINTF'+set}'`\" = set"; then
9231   echo $ac_n "(cached) $ac_c" 1>&6
9232 else
9233   
9234 if test "$cross_compiling" = yes; then
9235   samba_cv_HAVE_C99_VSNPRINTF=cross
9236 else
9237   cat > conftest.$ac_ext <<EOF
9238 #line 9239 "configure"
9239 #include "confdefs.h"
9240
9241 #include <sys/types.h>
9242 #include <stdarg.h>
9243 void foo(const char *format, ...) { 
9244        va_list ap;
9245        int len;
9246        char buf[5];
9247
9248        va_start(ap, format);
9249        len = vsnprintf(0, 0, format, ap);
9250        va_end(ap);
9251        if (len != 5) exit(1);
9252
9253        if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
9254
9255        exit(0);
9256 }
9257 main() { foo("hello"); }
9258
9259 EOF
9260 if { (eval echo configure:9261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9261 then
9262   samba_cv_HAVE_C99_VSNPRINTF=yes
9263 else
9264   echo "configure: failed program was:" >&5
9265   cat conftest.$ac_ext >&5
9266   rm -fr conftest*
9267   samba_cv_HAVE_C99_VSNPRINTF=no
9268 fi
9269 rm -fr conftest*
9270 fi
9271
9272 fi
9273
9274 echo "$ac_t""$samba_cv_HAVE_C99_VSNPRINTF" 1>&6
9275 if test x"$samba_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
9276     cat >> confdefs.h <<\EOF
9277 #define HAVE_C99_VSNPRINTF 1
9278 EOF
9279
9280 fi
9281
9282 echo $ac_n "checking for broken readdir""... $ac_c" 1>&6
9283 echo "configure:9284: checking for broken readdir" >&5
9284 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_READDIR'+set}'`\" = set"; then
9285   echo $ac_n "(cached) $ac_c" 1>&6
9286 else
9287   
9288 if test "$cross_compiling" = yes; then
9289   samba_cv_HAVE_BROKEN_READDIR=cross
9290 else
9291   cat > conftest.$ac_ext <<EOF
9292 #line 9293 "configure"
9293 #include "confdefs.h"
9294 #include <sys/types.h>
9295 #include <dirent.h>
9296 main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d);
9297 if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 &&
9298 di->d_name[0] == 0) exit(0); exit(1);} 
9299 EOF
9300 if { (eval echo configure:9301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9301 then
9302   samba_cv_HAVE_BROKEN_READDIR=yes
9303 else
9304   echo "configure: failed program was:" >&5
9305   cat conftest.$ac_ext >&5
9306   rm -fr conftest*
9307   samba_cv_HAVE_BROKEN_READDIR=no
9308 fi
9309 rm -fr conftest*
9310 fi
9311
9312 fi
9313
9314 echo "$ac_t""$samba_cv_HAVE_BROKEN_READDIR" 1>&6
9315 if test x"$samba_cv_HAVE_BROKEN_READDIR" = x"yes"; then
9316     cat >> confdefs.h <<\EOF
9317 #define HAVE_BROKEN_READDIR 1
9318 EOF
9319
9320 fi
9321
9322 echo $ac_n "checking for utimbuf""... $ac_c" 1>&6
9323 echo "configure:9324: checking for utimbuf" >&5
9324 if eval "test \"`echo '$''{'samba_cv_HAVE_UTIMBUF'+set}'`\" = set"; then
9325   echo $ac_n "(cached) $ac_c" 1>&6
9326 else
9327   
9328 cat > conftest.$ac_ext <<EOF
9329 #line 9330 "configure"
9330 #include "confdefs.h"
9331 #include <sys/types.h>
9332 #include <utime.h>
9333 int main() {
9334 struct utimbuf tbuf;  tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf));
9335 ; return 0; }
9336 EOF
9337 if { (eval echo configure:9338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9338   rm -rf conftest*
9339   samba_cv_HAVE_UTIMBUF=yes
9340 else
9341   echo "configure: failed program was:" >&5
9342   cat conftest.$ac_ext >&5
9343   rm -rf conftest*
9344   samba_cv_HAVE_UTIMBUF=no
9345 fi
9346 rm -f conftest*
9347 fi
9348
9349 echo "$ac_t""$samba_cv_HAVE_UTIMBUF" 1>&6
9350 if test x"$samba_cv_HAVE_UTIMBUF" = x"yes"; then
9351     cat >> confdefs.h <<\EOF
9352 #define HAVE_UTIMBUF 1
9353 EOF
9354
9355 fi
9356
9357
9358 for ac_func in pututline pututxline updwtmp updwtmpx getutmpx
9359 do
9360 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9361 echo "configure:9362: checking for $ac_func" >&5
9362 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
9363   echo $ac_n "(cached) $ac_c" 1>&6
9364 else
9365   cat > conftest.$ac_ext <<EOF
9366 #line 9367 "configure"
9367 #include "confdefs.h"
9368 /* System header to define __stub macros and hopefully few prototypes,
9369     which can conflict with char $ac_func(); below.  */
9370 #include <assert.h>
9371 /* Override any gcc2 internal prototype to avoid an error.  */
9372 /* We use char because int might match the return type of a gcc2
9373     builtin and then its argument prototype would still apply.  */
9374 char $ac_func();
9375
9376 int main() {
9377
9378 /* The GNU C library defines this for functions which it implements
9379     to always fail with ENOSYS.  Some functions are actually named
9380     something starting with __ and the normal name is an alias.  */
9381 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9382 choke me
9383 #else
9384 $ac_func();
9385 #endif
9386
9387 ; return 0; }
9388 EOF
9389 if { (eval echo configure:9390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9390   rm -rf conftest*
9391   eval "ac_cv_func_$ac_func=yes"
9392 else
9393   echo "configure: failed program was:" >&5
9394   cat conftest.$ac_ext >&5
9395   rm -rf conftest*
9396   eval "ac_cv_func_$ac_func=no"
9397 fi
9398 rm -f conftest*
9399 fi
9400
9401 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9402   echo "$ac_t""yes" 1>&6
9403     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9404   cat >> confdefs.h <<EOF
9405 #define $ac_tr_func 1
9406 EOF
9407  
9408 else
9409   echo "$ac_t""no" 1>&6
9410 fi
9411 done
9412
9413
9414 echo $ac_n "checking for ut_name in utmp""... $ac_c" 1>&6
9415 echo "configure:9416: checking for ut_name in utmp" >&5
9416 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_NAME'+set}'`\" = set"; then
9417   echo $ac_n "(cached) $ac_c" 1>&6
9418 else
9419   
9420 cat > conftest.$ac_ext <<EOF
9421 #line 9422 "configure"
9422 #include "confdefs.h"
9423 #include <sys/types.h>
9424 #include <utmp.h>
9425 int main() {
9426 struct utmp ut;  ut.ut_name[0] = 'a';
9427 ; return 0; }
9428 EOF
9429 if { (eval echo configure:9430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9430   rm -rf conftest*
9431   samba_cv_HAVE_UT_UT_NAME=yes
9432 else
9433   echo "configure: failed program was:" >&5
9434   cat conftest.$ac_ext >&5
9435   rm -rf conftest*
9436   samba_cv_HAVE_UT_UT_NAME=no
9437 fi
9438 rm -f conftest*
9439 fi
9440
9441 echo "$ac_t""$samba_cv_HAVE_UT_UT_NAME" 1>&6
9442 if test x"$samba_cv_HAVE_UT_UT_NAME" = x"yes"; then
9443     cat >> confdefs.h <<\EOF
9444 #define HAVE_UT_UT_NAME 1
9445 EOF
9446
9447 fi 
9448
9449 echo $ac_n "checking for ut_user in utmp""... $ac_c" 1>&6
9450 echo "configure:9451: checking for ut_user in utmp" >&5
9451 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_USER'+set}'`\" = set"; then
9452   echo $ac_n "(cached) $ac_c" 1>&6
9453 else
9454   
9455 cat > conftest.$ac_ext <<EOF
9456 #line 9457 "configure"
9457 #include "confdefs.h"
9458 #include <sys/types.h>
9459 #include <utmp.h>
9460 int main() {
9461 struct utmp ut;  ut.ut_user[0] = 'a';
9462 ; return 0; }
9463 EOF
9464 if { (eval echo configure:9465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9465   rm -rf conftest*
9466   samba_cv_HAVE_UT_UT_USER=yes
9467 else
9468   echo "configure: failed program was:" >&5
9469   cat conftest.$ac_ext >&5
9470   rm -rf conftest*
9471   samba_cv_HAVE_UT_UT_USER=no
9472 fi
9473 rm -f conftest*
9474 fi
9475
9476 echo "$ac_t""$samba_cv_HAVE_UT_UT_USER" 1>&6
9477 if test x"$samba_cv_HAVE_UT_UT_USER" = x"yes"; then
9478     cat >> confdefs.h <<\EOF
9479 #define HAVE_UT_UT_USER 1
9480 EOF
9481
9482 fi 
9483
9484 echo $ac_n "checking for ut_id in utmp""... $ac_c" 1>&6
9485 echo "configure:9486: checking for ut_id in utmp" >&5
9486 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ID'+set}'`\" = set"; then
9487   echo $ac_n "(cached) $ac_c" 1>&6
9488 else
9489   
9490 cat > conftest.$ac_ext <<EOF
9491 #line 9492 "configure"
9492 #include "confdefs.h"
9493 #include <sys/types.h>
9494 #include <utmp.h>
9495 int main() {
9496 struct utmp ut;  ut.ut_id[0] = 'a';
9497 ; return 0; }
9498 EOF
9499 if { (eval echo configure:9500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9500   rm -rf conftest*
9501   samba_cv_HAVE_UT_UT_ID=yes
9502 else
9503   echo "configure: failed program was:" >&5
9504   cat conftest.$ac_ext >&5
9505   rm -rf conftest*
9506   samba_cv_HAVE_UT_UT_ID=no
9507 fi
9508 rm -f conftest*
9509 fi
9510
9511 echo "$ac_t""$samba_cv_HAVE_UT_UT_ID" 1>&6
9512 if test x"$samba_cv_HAVE_UT_UT_ID" = x"yes"; then
9513     cat >> confdefs.h <<\EOF
9514 #define HAVE_UT_UT_ID 1
9515 EOF
9516
9517 fi 
9518
9519 echo $ac_n "checking for ut_host in utmp""... $ac_c" 1>&6
9520 echo "configure:9521: checking for ut_host in utmp" >&5
9521 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_HOST'+set}'`\" = set"; then
9522   echo $ac_n "(cached) $ac_c" 1>&6
9523 else
9524   
9525 cat > conftest.$ac_ext <<EOF
9526 #line 9527 "configure"
9527 #include "confdefs.h"
9528 #include <sys/types.h>
9529 #include <utmp.h>
9530 int main() {
9531 struct utmp ut;  ut.ut_host[0] = 'a';
9532 ; return 0; }
9533 EOF
9534 if { (eval echo configure:9535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9535   rm -rf conftest*
9536   samba_cv_HAVE_UT_UT_HOST=yes
9537 else
9538   echo "configure: failed program was:" >&5
9539   cat conftest.$ac_ext >&5
9540   rm -rf conftest*
9541   samba_cv_HAVE_UT_UT_HOST=no
9542 fi
9543 rm -f conftest*
9544 fi
9545
9546 echo "$ac_t""$samba_cv_HAVE_UT_UT_HOST" 1>&6
9547 if test x"$samba_cv_HAVE_UT_UT_HOST" = x"yes"; then
9548     cat >> confdefs.h <<\EOF
9549 #define HAVE_UT_UT_HOST 1
9550 EOF
9551
9552 fi 
9553
9554 echo $ac_n "checking for ut_time in utmp""... $ac_c" 1>&6
9555 echo "configure:9556: checking for ut_time in utmp" >&5
9556 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TIME'+set}'`\" = set"; then
9557   echo $ac_n "(cached) $ac_c" 1>&6
9558 else
9559   
9560 cat > conftest.$ac_ext <<EOF
9561 #line 9562 "configure"
9562 #include "confdefs.h"
9563 #include <sys/types.h>
9564 #include <utmp.h>
9565 int main() {
9566 struct utmp ut;  time_t t; ut.ut_time = t;
9567 ; return 0; }
9568 EOF
9569 if { (eval echo configure:9570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9570   rm -rf conftest*
9571   samba_cv_HAVE_UT_UT_TIME=yes
9572 else
9573   echo "configure: failed program was:" >&5
9574   cat conftest.$ac_ext >&5
9575   rm -rf conftest*
9576   samba_cv_HAVE_UT_UT_TIME=no
9577 fi
9578 rm -f conftest*
9579 fi
9580
9581 echo "$ac_t""$samba_cv_HAVE_UT_UT_TIME" 1>&6
9582 if test x"$samba_cv_HAVE_UT_UT_TIME" = x"yes"; then
9583     cat >> confdefs.h <<\EOF
9584 #define HAVE_UT_UT_TIME 1
9585 EOF
9586
9587 fi 
9588
9589 echo $ac_n "checking for ut_tv in utmp""... $ac_c" 1>&6
9590 echo "configure:9591: checking for ut_tv in utmp" >&5
9591 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TV'+set}'`\" = set"; then
9592   echo $ac_n "(cached) $ac_c" 1>&6
9593 else
9594   
9595 cat > conftest.$ac_ext <<EOF
9596 #line 9597 "configure"
9597 #include "confdefs.h"
9598 #include <sys/types.h>
9599 #include <utmp.h>
9600 int main() {
9601 struct utmp ut;  struct timeval tv; ut.ut_tv = tv;
9602 ; return 0; }
9603 EOF
9604 if { (eval echo configure:9605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9605   rm -rf conftest*
9606   samba_cv_HAVE_UT_UT_TV=yes
9607 else
9608   echo "configure: failed program was:" >&5
9609   cat conftest.$ac_ext >&5
9610   rm -rf conftest*
9611   samba_cv_HAVE_UT_UT_TV=no
9612 fi
9613 rm -f conftest*
9614 fi
9615
9616 echo "$ac_t""$samba_cv_HAVE_UT_UT_TV" 1>&6
9617 if test x"$samba_cv_HAVE_UT_UT_TV" = x"yes"; then
9618     cat >> confdefs.h <<\EOF
9619 #define HAVE_UT_UT_TV 1
9620 EOF
9621
9622 fi 
9623
9624 echo $ac_n "checking for ut_type in utmp""... $ac_c" 1>&6
9625 echo "configure:9626: checking for ut_type in utmp" >&5
9626 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_TYPE'+set}'`\" = set"; then
9627   echo $ac_n "(cached) $ac_c" 1>&6
9628 else
9629   
9630 cat > conftest.$ac_ext <<EOF
9631 #line 9632 "configure"
9632 #include "confdefs.h"
9633 #include <sys/types.h>
9634 #include <utmp.h>
9635 int main() {
9636 struct utmp ut;  ut.ut_type = 0;
9637 ; return 0; }
9638 EOF
9639 if { (eval echo configure:9640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9640   rm -rf conftest*
9641   samba_cv_HAVE_UT_UT_TYPE=yes
9642 else
9643   echo "configure: failed program was:" >&5
9644   cat conftest.$ac_ext >&5
9645   rm -rf conftest*
9646   samba_cv_HAVE_UT_UT_TYPE=no
9647 fi
9648 rm -f conftest*
9649 fi
9650
9651 echo "$ac_t""$samba_cv_HAVE_UT_UT_TYPE" 1>&6
9652 if test x"$samba_cv_HAVE_UT_UT_TYPE" = x"yes"; then
9653     cat >> confdefs.h <<\EOF
9654 #define HAVE_UT_UT_TYPE 1
9655 EOF
9656
9657 fi 
9658
9659 echo $ac_n "checking for ut_pid in utmp""... $ac_c" 1>&6
9660 echo "configure:9661: checking for ut_pid in utmp" >&5
9661 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_PID'+set}'`\" = set"; then
9662   echo $ac_n "(cached) $ac_c" 1>&6
9663 else
9664   
9665 cat > conftest.$ac_ext <<EOF
9666 #line 9667 "configure"
9667 #include "confdefs.h"
9668 #include <sys/types.h>
9669 #include <utmp.h>
9670 int main() {
9671 struct utmp ut;  ut.ut_pid = 0;
9672 ; return 0; }
9673 EOF
9674 if { (eval echo configure:9675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9675   rm -rf conftest*
9676   samba_cv_HAVE_UT_UT_PID=yes
9677 else
9678   echo "configure: failed program was:" >&5
9679   cat conftest.$ac_ext >&5
9680   rm -rf conftest*
9681   samba_cv_HAVE_UT_UT_PID=no
9682 fi
9683 rm -f conftest*
9684 fi
9685
9686 echo "$ac_t""$samba_cv_HAVE_UT_UT_PID" 1>&6
9687 if test x"$samba_cv_HAVE_UT_UT_PID" = x"yes"; then
9688     cat >> confdefs.h <<\EOF
9689 #define HAVE_UT_UT_PID 1
9690 EOF
9691
9692 fi 
9693
9694 echo $ac_n "checking for ut_exit in utmp""... $ac_c" 1>&6
9695 echo "configure:9696: checking for ut_exit in utmp" >&5
9696 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_EXIT'+set}'`\" = set"; then
9697   echo $ac_n "(cached) $ac_c" 1>&6
9698 else
9699   
9700 cat > conftest.$ac_ext <<EOF
9701 #line 9702 "configure"
9702 #include "confdefs.h"
9703 #include <sys/types.h>
9704 #include <utmp.h>
9705 int main() {
9706 struct utmp ut;  ut.ut_exit.e_exit = 0;
9707 ; return 0; }
9708 EOF
9709 if { (eval echo configure:9710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9710   rm -rf conftest*
9711   samba_cv_HAVE_UT_UT_EXIT=yes
9712 else
9713   echo "configure: failed program was:" >&5
9714   cat conftest.$ac_ext >&5
9715   rm -rf conftest*
9716   samba_cv_HAVE_UT_UT_EXIT=no
9717 fi
9718 rm -f conftest*
9719 fi
9720
9721 echo "$ac_t""$samba_cv_HAVE_UT_UT_EXIT" 1>&6
9722 if test x"$samba_cv_HAVE_UT_UT_EXIT" = x"yes"; then
9723     cat >> confdefs.h <<\EOF
9724 #define HAVE_UT_UT_EXIT 1
9725 EOF
9726
9727 fi 
9728
9729 echo $ac_n "checking for ut_addr in utmp""... $ac_c" 1>&6
9730 echo "configure:9731: checking for ut_addr in utmp" >&5
9731 if eval "test \"`echo '$''{'samba_cv_HAVE_UT_UT_ADDR'+set}'`\" = set"; then
9732   echo $ac_n "(cached) $ac_c" 1>&6
9733 else
9734   
9735 cat > conftest.$ac_ext <<EOF
9736 #line 9737 "configure"
9737 #include "confdefs.h"
9738 #include <sys/types.h>
9739 #include <utmp.h>
9740 int main() {
9741 struct utmp ut;  ut.ut_addr = 0;
9742 ; return 0; }
9743 EOF
9744 if { (eval echo configure:9745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9745   rm -rf conftest*
9746   samba_cv_HAVE_UT_UT_ADDR=yes
9747 else
9748   echo "configure: failed program was:" >&5
9749   cat conftest.$ac_ext >&5
9750   rm -rf conftest*
9751   samba_cv_HAVE_UT_UT_ADDR=no
9752 fi
9753 rm -f conftest*
9754 fi
9755
9756 echo "$ac_t""$samba_cv_HAVE_UT_UT_ADDR" 1>&6
9757 if test x"$samba_cv_HAVE_UT_UT_ADDR" = x"yes"; then
9758     cat >> confdefs.h <<\EOF
9759 #define HAVE_UT_UT_ADDR 1
9760 EOF
9761
9762 fi 
9763
9764 if test x$ac_cv_func_pututline = xyes ; then
9765   echo $ac_n "checking whether pututline returns pointer""... $ac_c" 1>&6
9766 echo "configure:9767: checking whether pututline returns pointer" >&5
9767 if eval "test \"`echo '$''{'samba_cv_PUTUTLINE_RETURNS_UTMP'+set}'`\" = set"; then
9768   echo $ac_n "(cached) $ac_c" 1>&6
9769 else
9770   
9771   cat > conftest.$ac_ext <<EOF
9772 #line 9773 "configure"
9773 #include "confdefs.h"
9774 #include <sys/types.h>
9775 #include <utmp.h>
9776 int main() {
9777 struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);
9778 ; return 0; }
9779 EOF
9780 if { (eval echo configure:9781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9781   rm -rf conftest*
9782   samba_cv_PUTUTLINE_RETURNS_UTMP=yes
9783 else
9784   echo "configure: failed program was:" >&5
9785   cat conftest.$ac_ext >&5
9786   rm -rf conftest*
9787   samba_cv_PUTUTLINE_RETURNS_UTMP=no
9788 fi
9789 rm -f conftest*
9790 fi
9791
9792 echo "$ac_t""$samba_cv_PUTUTLINE_RETURNS_UTMP" 1>&6
9793   if test x"$samba_cv_PUTUTLINE_RETURNS_UTMP" = x"yes"; then
9794       cat >> confdefs.h <<\EOF
9795 #define PUTUTLINE_RETURNS_UTMP 1
9796 EOF
9797
9798   fi
9799 fi
9800
9801 echo $ac_n "checking for ut_syslen in utmpx""... $ac_c" 1>&6
9802 echo "configure:9803: checking for ut_syslen in utmpx" >&5
9803 if eval "test \"`echo '$''{'samba_cv_HAVE_UX_UT_SYSLEN'+set}'`\" = set"; then
9804   echo $ac_n "(cached) $ac_c" 1>&6
9805 else
9806   
9807 cat > conftest.$ac_ext <<EOF
9808 #line 9809 "configure"
9809 #include "confdefs.h"
9810 #include <sys/types.h>
9811 #include <utmpx.h>
9812 int main() {
9813 struct utmpx ux;  ux.ut_syslen = 0;
9814 ; return 0; }
9815 EOF
9816 if { (eval echo configure:9817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9817   rm -rf conftest*
9818   samba_cv_HAVE_UX_UT_SYSLEN=yes
9819 else
9820   echo "configure: failed program was:" >&5
9821   cat conftest.$ac_ext >&5
9822   rm -rf conftest*
9823   samba_cv_HAVE_UX_UT_SYSLEN=no
9824 fi
9825 rm -f conftest*
9826 fi
9827
9828 echo "$ac_t""$samba_cv_HAVE_UX_UT_SYSLEN" 1>&6
9829 if test x"$samba_cv_HAVE_UX_UT_SYSLEN" = x"yes"; then
9830     cat >> confdefs.h <<\EOF
9831 #define HAVE_UX_UT_SYSLEN 1
9832 EOF
9833
9834 fi 
9835
9836
9837 #################################################
9838 # check for libiconv support
9839 echo $ac_n "checking whether to use libiconv""... $ac_c" 1>&6
9840 echo "configure:9841: checking whether to use libiconv" >&5
9841 # Check whether --with-libiconv or --without-libiconv was given.
9842 if test "${with_libiconv+set}" = set; then
9843   withval="$with_libiconv"
9844    case "$withval" in
9845   no)
9846     echo "$ac_t""no" 1>&6
9847     ;;
9848   *)
9849     echo "$ac_t""yes" 1>&6
9850     CFLAGS="$CFLAGS -I$withval/include"
9851     LDFLAGS="$LDFLAGS -L$withval/lib"
9852     echo $ac_n "checking for iconv_open in -liconv""... $ac_c" 1>&6
9853 echo "configure:9854: checking for iconv_open in -liconv" >&5
9854 ac_lib_var=`echo iconv'_'iconv_open | sed 'y%./+-%__p_%'`
9855 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
9856   echo $ac_n "(cached) $ac_c" 1>&6
9857 else
9858   ac_save_LIBS="$LIBS"
9859 LIBS="-liconv  $LIBS"
9860 cat > conftest.$ac_ext <<EOF
9861 #line 9862 "configure"
9862 #include "confdefs.h"
9863 /* Override any gcc2 internal prototype to avoid an error.  */
9864 /* We use char because int might match the return type of a gcc2
9865     builtin and then its argument prototype would still apply.  */
9866 char iconv_open();
9867
9868 int main() {
9869 iconv_open()
9870 ; return 0; }
9871 EOF
9872 if { (eval echo configure:9873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9873   rm -rf conftest*
9874   eval "ac_cv_lib_$ac_lib_var=yes"
9875 else
9876   echo "configure: failed program was:" >&5
9877   cat conftest.$ac_ext >&5
9878   rm -rf conftest*
9879   eval "ac_cv_lib_$ac_lib_var=no"
9880 fi
9881 rm -f conftest*
9882 LIBS="$ac_save_LIBS"
9883
9884 fi
9885 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9886   echo "$ac_t""yes" 1>&6
9887     ac_tr_lib=HAVE_LIB`echo iconv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9888     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9889   cat >> confdefs.h <<EOF
9890 #define $ac_tr_lib 1
9891 EOF
9892
9893   LIBS="-liconv $LIBS"
9894
9895 else
9896   echo "$ac_t""no" 1>&6
9897 fi
9898
9899     cat >> confdefs.h <<EOF
9900 #define WITH_LIBICONV "${withval}"
9901 EOF
9902
9903     ;;
9904   esac 
9905 else
9906   echo "$ac_t""no" 1>&6
9907
9908 fi
9909
9910
9911
9912 ############
9913 # check for iconv in libc
9914 echo $ac_n "checking for working iconv""... $ac_c" 1>&6
9915 echo "configure:9916: checking for working iconv" >&5
9916 if eval "test \"`echo '$''{'samba_cv_HAVE_NATIVE_ICONV'+set}'`\" = set"; then
9917   echo $ac_n "(cached) $ac_c" 1>&6
9918 else
9919   
9920 if test "$cross_compiling" = yes; then
9921   samba_cv_HAVE_NATIVE_ICONV=cross
9922 else
9923   cat > conftest.$ac_ext <<EOF
9924 #line 9925 "configure"
9925 #include "confdefs.h"
9926
9927 #include <iconv.h>
9928 main() {
9929        iconv_t cd = iconv_open("ASCII", "UCS-2LE");
9930        if (cd == 0 || cd == (iconv_t)-1) return -1;
9931        return 0;
9932 }
9933
9934 EOF
9935 if { (eval echo configure:9936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9936 then
9937   samba_cv_HAVE_NATIVE_ICONV=yes
9938 else
9939   echo "configure: failed program was:" >&5
9940   cat conftest.$ac_ext >&5
9941   rm -fr conftest*
9942   samba_cv_HAVE_NATIVE_ICONV=no
9943 fi
9944 rm -fr conftest*
9945 fi
9946
9947 fi
9948
9949 echo "$ac_t""$samba_cv_HAVE_NATIVE_ICONV" 1>&6
9950 if test x"$samba_cv_HAVE_NATIVE_ICONV" = x"yes"; then
9951     cat >> confdefs.h <<\EOF
9952 #define HAVE_NATIVE_ICONV 1
9953 EOF
9954
9955 fi
9956
9957
9958 echo $ac_n "checking for Linux kernel oplocks""... $ac_c" 1>&6
9959 echo "configure:9960: checking for Linux kernel oplocks" >&5
9960 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_LINUX'+set}'`\" = set"; then
9961   echo $ac_n "(cached) $ac_c" 1>&6
9962 else
9963   
9964 if test "$cross_compiling" = yes; then
9965   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=cross
9966 else
9967   cat > conftest.$ac_ext <<EOF
9968 #line 9969 "configure"
9969 #include "confdefs.h"
9970
9971 #include <sys/types.h>
9972 #include <fcntl.h>
9973 #ifndef F_GETLEASE
9974 #define F_GETLEASE      1025
9975 #endif
9976 main() {
9977        int fd = open("/dev/null", O_RDONLY);
9978        return fcntl(fd, F_GETLEASE, 0) == -1;
9979 }
9980
9981 EOF
9982 if { (eval echo configure:9983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9983 then
9984   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes
9985 else
9986   echo "configure: failed program was:" >&5
9987   cat conftest.$ac_ext >&5
9988   rm -fr conftest*
9989   samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no
9990 fi
9991 rm -fr conftest*
9992 fi
9993
9994 fi
9995
9996 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" 1>&6
9997 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_LINUX" = x"yes"; then
9998     cat >> confdefs.h <<\EOF
9999 #define HAVE_KERNEL_OPLOCKS_LINUX 1
10000 EOF
10001
10002 fi
10003
10004 echo $ac_n "checking for kernel change notify support""... $ac_c" 1>&6
10005 echo "configure:10006: checking for kernel change notify support" >&5
10006 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_CHANGE_NOTIFY'+set}'`\" = set"; then
10007   echo $ac_n "(cached) $ac_c" 1>&6
10008 else
10009   
10010 if test "$cross_compiling" = yes; then
10011   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=cross
10012 else
10013   cat > conftest.$ac_ext <<EOF
10014 #line 10015 "configure"
10015 #include "confdefs.h"
10016
10017 #include <sys/types.h>
10018 #include <fcntl.h>
10019 #include <signal.h>
10020 #ifndef F_NOTIFY
10021 #define F_NOTIFY 1026
10022 #endif
10023 main() {
10024         exit(fcntl(open("/tmp", O_RDONLY), F_NOTIFY, 0) == -1 ?  1 : 0);
10025 }
10026
10027 EOF
10028 if { (eval echo configure:10029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10029 then
10030   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=yes
10031 else
10032   echo "configure: failed program was:" >&5
10033   cat conftest.$ac_ext >&5
10034   rm -fr conftest*
10035   samba_cv_HAVE_KERNEL_CHANGE_NOTIFY=no
10036 fi
10037 rm -fr conftest*
10038 fi
10039
10040 fi
10041
10042 echo "$ac_t""$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" 1>&6
10043 if test x"$samba_cv_HAVE_KERNEL_CHANGE_NOTIFY" = x"yes"; then
10044     cat >> confdefs.h <<\EOF
10045 #define HAVE_KERNEL_CHANGE_NOTIFY 1
10046 EOF
10047
10048 fi
10049
10050 echo $ac_n "checking for kernel share modes""... $ac_c" 1>&6
10051 echo "configure:10052: checking for kernel share modes" >&5
10052 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_SHARE_MODES'+set}'`\" = set"; then
10053   echo $ac_n "(cached) $ac_c" 1>&6
10054 else
10055   
10056 if test "$cross_compiling" = yes; then
10057   samba_cv_HAVE_KERNEL_SHARE_MODES=cross
10058 else
10059   cat > conftest.$ac_ext <<EOF
10060 #line 10061 "configure"
10061 #include "confdefs.h"
10062
10063 #include <sys/types.h>
10064 #include <fcntl.h>
10065 #include <signal.h>
10066 #include <sys/file.h>
10067 #ifndef LOCK_MAND
10068 #define LOCK_MAND       32
10069 #define LOCK_READ       64
10070 #endif
10071 main() {
10072         exit(flock(open("/dev/null", O_RDWR), LOCK_MAND|LOCK_READ) != 0);
10073 }
10074
10075 EOF
10076 if { (eval echo configure:10077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10077 then
10078   samba_cv_HAVE_KERNEL_SHARE_MODES=yes
10079 else
10080   echo "configure: failed program was:" >&5
10081   cat conftest.$ac_ext >&5
10082   rm -fr conftest*
10083   samba_cv_HAVE_KERNEL_SHARE_MODES=no
10084 fi
10085 rm -fr conftest*
10086 fi
10087
10088 fi
10089
10090 echo "$ac_t""$samba_cv_HAVE_KERNEL_SHARE_MODES" 1>&6
10091 if test x"$samba_cv_HAVE_KERNEL_SHARE_MODES" = x"yes"; then
10092     cat >> confdefs.h <<\EOF
10093 #define HAVE_KERNEL_SHARE_MODES 1
10094 EOF
10095
10096 fi
10097
10098
10099
10100
10101 echo $ac_n "checking for IRIX kernel oplock type definitions""... $ac_c" 1>&6
10102 echo "configure:10103: checking for IRIX kernel oplock type definitions" >&5
10103 if eval "test \"`echo '$''{'samba_cv_HAVE_KERNEL_OPLOCKS_IRIX'+set}'`\" = set"; then
10104   echo $ac_n "(cached) $ac_c" 1>&6
10105 else
10106   
10107 cat > conftest.$ac_ext <<EOF
10108 #line 10109 "configure"
10109 #include "confdefs.h"
10110 #include <sys/types.h>
10111 #include <fcntl.h>
10112 int main() {
10113 oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1;
10114 ; return 0; }
10115 EOF
10116 if { (eval echo configure:10117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10117   rm -rf conftest*
10118   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=yes
10119 else
10120   echo "configure: failed program was:" >&5
10121   cat conftest.$ac_ext >&5
10122   rm -rf conftest*
10123   samba_cv_HAVE_KERNEL_OPLOCKS_IRIX=no
10124 fi
10125 rm -f conftest*
10126 fi
10127
10128 echo "$ac_t""$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" 1>&6
10129 if test x"$samba_cv_HAVE_KERNEL_OPLOCKS_IRIX" = x"yes"; then
10130     cat >> confdefs.h <<\EOF
10131 #define HAVE_KERNEL_OPLOCKS_IRIX 1
10132 EOF
10133
10134 fi
10135
10136 echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6
10137 echo "configure:10138: checking for irix specific capabilities" >&5
10138 if eval "test \"`echo '$''{'samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES'+set}'`\" = set"; then
10139   echo $ac_n "(cached) $ac_c" 1>&6
10140 else
10141   
10142 if test "$cross_compiling" = yes; then
10143   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross
10144 else
10145   cat > conftest.$ac_ext <<EOF
10146 #line 10147 "configure"
10147 #include "confdefs.h"
10148 #include <sys/types.h>
10149 #include <sys/capability.h>
10150 main() {
10151  cap_t cap;
10152  if ((cap = cap_get_proc()) == NULL)
10153    exit(1);
10154  cap->cap_effective |= CAP_NETWORK_MGT;
10155  cap->cap_inheritable |= CAP_NETWORK_MGT;
10156  cap_set_proc(cap);
10157  exit(0);
10158 }
10159
10160 EOF
10161 if { (eval echo configure:10162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10162 then
10163   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes
10164 else
10165   echo "configure: failed program was:" >&5
10166   cat conftest.$ac_ext >&5
10167   rm -fr conftest*
10168   samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=no
10169 fi
10170 rm -fr conftest*
10171 fi
10172
10173 fi
10174
10175 echo "$ac_t""$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" 1>&6
10176 if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
10177     cat >> confdefs.h <<\EOF
10178 #define HAVE_IRIX_SPECIFIC_CAPABILITIES 1
10179 EOF
10180
10181 fi
10182
10183 #
10184 # Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
10185 # This is *really* broken but some systems (DEC OSF1) do this.... JRA.
10186 #
10187
10188 echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10189 echo "configure:10190: checking for int16 typedef included by rpc/rpc.h" >&5
10190 if eval "test \"`echo '$''{'samba_cv_HAVE_INT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10191   echo $ac_n "(cached) $ac_c" 1>&6
10192 else
10193   
10194 cat > conftest.$ac_ext <<EOF
10195 #line 10196 "configure"
10196 #include "confdefs.h"
10197 #include <sys/types.h>
10198 #if defined(HAVE_RPC_RPC_H)
10199 #include <rpc/rpc.h>
10200 #endif
10201 int main() {
10202 int16 testvar;
10203 ; return 0; }
10204 EOF
10205 if { (eval echo configure:10206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10206   rm -rf conftest*
10207   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes
10208 else
10209   echo "configure: failed program was:" >&5
10210   cat conftest.$ac_ext >&5
10211   rm -rf conftest*
10212   samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no
10213 fi
10214 rm -f conftest*
10215 fi
10216
10217 echo "$ac_t""$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" 1>&6
10218 if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
10219     cat >> confdefs.h <<\EOF
10220 #define HAVE_INT16_FROM_RPC_RPC_H 1
10221 EOF
10222
10223 fi
10224
10225 echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10226 echo "configure:10227: checking for uint16 typedef included by rpc/rpc.h" >&5
10227 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT16_FROM_RPC_RPC_H'+set}'`\" = set"; then
10228   echo $ac_n "(cached) $ac_c" 1>&6
10229 else
10230   
10231 cat > conftest.$ac_ext <<EOF
10232 #line 10233 "configure"
10233 #include "confdefs.h"
10234 #include <sys/types.h>
10235 #if defined(HAVE_RPC_RPC_H)
10236 #include <rpc/rpc.h>
10237 #endif
10238 int main() {
10239 uint16 testvar;
10240 ; return 0; }
10241 EOF
10242 if { (eval echo configure:10243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10243   rm -rf conftest*
10244   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes
10245 else
10246   echo "configure: failed program was:" >&5
10247   cat conftest.$ac_ext >&5
10248   rm -rf conftest*
10249   samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no
10250 fi
10251 rm -f conftest*
10252 fi
10253
10254 echo "$ac_t""$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" 1>&6
10255 if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
10256     cat >> confdefs.h <<\EOF
10257 #define HAVE_UINT16_FROM_RPC_RPC_H 1
10258 EOF
10259
10260 fi
10261
10262 echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10263 echo "configure:10264: checking for int32 typedef included by rpc/rpc.h" >&5
10264 if eval "test \"`echo '$''{'samba_cv_HAVE_INT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10265   echo $ac_n "(cached) $ac_c" 1>&6
10266 else
10267   
10268 cat > conftest.$ac_ext <<EOF
10269 #line 10270 "configure"
10270 #include "confdefs.h"
10271 #include <sys/types.h>
10272 #if defined(HAVE_RPC_RPC_H)
10273 #include <rpc/rpc.h>
10274 #endif
10275 int main() {
10276 int32 testvar;
10277 ; return 0; }
10278 EOF
10279 if { (eval echo configure:10280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10280   rm -rf conftest*
10281   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes
10282 else
10283   echo "configure: failed program was:" >&5
10284   cat conftest.$ac_ext >&5
10285   rm -rf conftest*
10286   samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no
10287 fi
10288 rm -f conftest*
10289 fi
10290
10291 echo "$ac_t""$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" 1>&6
10292 if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
10293     cat >> confdefs.h <<\EOF
10294 #define HAVE_INT32_FROM_RPC_RPC_H 1
10295 EOF
10296
10297 fi
10298
10299 echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6
10300 echo "configure:10301: checking for uint32 typedef included by rpc/rpc.h" >&5
10301 if eval "test \"`echo '$''{'samba_cv_HAVE_UINT32_FROM_RPC_RPC_H'+set}'`\" = set"; then
10302   echo $ac_n "(cached) $ac_c" 1>&6
10303 else
10304   
10305 cat > conftest.$ac_ext <<EOF
10306 #line 10307 "configure"
10307 #include "confdefs.h"
10308 #include <sys/types.h>
10309 #if defined(HAVE_RPC_RPC_H)
10310 #include <rpc/rpc.h>
10311 #endif
10312 int main() {
10313 uint32 testvar;
10314 ; return 0; }
10315 EOF
10316 if { (eval echo configure:10317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10317   rm -rf conftest*
10318   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes
10319 else
10320   echo "configure: failed program was:" >&5
10321   cat conftest.$ac_ext >&5
10322   rm -rf conftest*
10323   samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no
10324 fi
10325 rm -f conftest*
10326 fi
10327
10328 echo "$ac_t""$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" 1>&6
10329 if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
10330     cat >> confdefs.h <<\EOF
10331 #define HAVE_UINT32_FROM_RPC_RPC_H 1
10332 EOF
10333
10334 fi
10335
10336
10337 echo $ac_n "checking for conflicting AUTH_ERROR define in rpc/rpc.h""... $ac_c" 1>&6
10338 echo "configure:10339: checking for conflicting AUTH_ERROR define in rpc/rpc.h" >&5
10339 if eval "test \"`echo '$''{'samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT'+set}'`\" = set"; then
10340   echo $ac_n "(cached) $ac_c" 1>&6
10341 else
10342   
10343 cat > conftest.$ac_ext <<EOF
10344 #line 10345 "configure"
10345 #include "confdefs.h"
10346 #include <sys/types.h>
10347 #ifdef HAVE_SYS_SECURITY_H
10348 #include <sys/security.h>
10349 #include <prot.h>
10350 #endif  /* HAVE_SYS_SECURITY_H */
10351 #if defined(HAVE_RPC_RPC_H)
10352 #include <rpc/rpc.h>
10353 #endif
10354 int main() {
10355 int testvar;
10356 ; return 0; }
10357 EOF
10358 if { (eval echo configure:10359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10359   rm -rf conftest*
10360   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no
10361 else
10362   echo "configure: failed program was:" >&5
10363   cat conftest.$ac_ext >&5
10364   rm -rf conftest*
10365   samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes
10366 fi
10367 rm -f conftest*
10368 fi
10369
10370 echo "$ac_t""$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" 1>&6
10371 if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
10372     cat >> confdefs.h <<\EOF
10373 #define HAVE_RPC_AUTH_ERROR_CONFLICT 1
10374 EOF
10375
10376 fi
10377
10378 echo $ac_n "checking for test routines""... $ac_c" 1>&6
10379 echo "configure:10380: checking for test routines" >&5
10380 if test "$cross_compiling" = yes; then
10381   echo "configure: warning: cannot run when cross-compiling" 1>&2
10382 else
10383   cat > conftest.$ac_ext <<EOF
10384 #line 10385 "configure"
10385 #include "confdefs.h"
10386 #include "${srcdir-.}/tests/trivial.c"
10387 EOF
10388 if { (eval echo configure:10389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10389 then
10390   echo "$ac_t""yes" 1>&6
10391 else
10392   echo "configure: failed program was:" >&5
10393   cat conftest.$ac_ext >&5
10394   rm -fr conftest*
10395   { echo "configure: error: cant find test code. Aborting config" 1>&2; exit 1; }
10396 fi
10397 rm -fr conftest*
10398 fi
10399
10400
10401 echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6
10402 echo "configure:10403: checking for ftruncate extend" >&5
10403 if eval "test \"`echo '$''{'samba_cv_HAVE_FTRUNCATE_EXTEND'+set}'`\" = set"; then
10404   echo $ac_n "(cached) $ac_c" 1>&6
10405 else
10406   
10407 if test "$cross_compiling" = yes; then
10408   samba_cv_HAVE_FTRUNCATE_EXTEND=cross
10409 else
10410   cat > conftest.$ac_ext <<EOF
10411 #line 10412 "configure"
10412 #include "confdefs.h"
10413 #include "${srcdir-.}/tests/ftruncate.c"
10414 EOF
10415 if { (eval echo configure:10416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10416 then
10417   samba_cv_HAVE_FTRUNCATE_EXTEND=yes
10418 else
10419   echo "configure: failed program was:" >&5
10420   cat conftest.$ac_ext >&5
10421   rm -fr conftest*
10422   samba_cv_HAVE_FTRUNCATE_EXTEND=no
10423 fi
10424 rm -fr conftest*
10425 fi
10426
10427 fi
10428
10429 echo "$ac_t""$samba_cv_HAVE_FTRUNCATE_EXTEND" 1>&6
10430 if test x"$samba_cv_HAVE_FTRUNCATE_EXTEND" = x"yes"; then
10431     cat >> confdefs.h <<\EOF
10432 #define HAVE_FTRUNCATE_EXTEND 1
10433 EOF
10434
10435 fi
10436
10437 echo $ac_n "checking for AF_LOCAL socket support""... $ac_c" 1>&6
10438 echo "configure:10439: checking for AF_LOCAL socket support" >&5
10439 if eval "test \"`echo '$''{'samba_cv_HAVE_WORKING_AF_LOCAL'+set}'`\" = set"; then
10440   echo $ac_n "(cached) $ac_c" 1>&6
10441 else
10442   
10443 if test "$cross_compiling" = yes; then
10444   samba_cv_HAVE_WORKING_AF_LOCAL=cross
10445 else
10446   cat > conftest.$ac_ext <<EOF
10447 #line 10448 "configure"
10448 #include "confdefs.h"
10449 #include "${srcdir-.}/tests/unixsock.c"
10450 EOF
10451 if { (eval echo configure:10452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10452 then
10453   samba_cv_HAVE_WORKING_AF_LOCAL=yes
10454 else
10455   echo "configure: failed program was:" >&5
10456   cat conftest.$ac_ext >&5
10457   rm -fr conftest*
10458   samba_cv_HAVE_WORKING_AF_LOCAL=no
10459 fi
10460 rm -fr conftest*
10461 fi
10462
10463 fi
10464
10465 echo "$ac_t""$samba_cv_HAVE_WORKING_AF_LOCAL" 1>&6
10466 if test x"$samba_cv_HAVE_WORKING_AF_LOCAL" != xno
10467 then
10468     cat >> confdefs.h <<\EOF
10469 #define HAVE_WORKING_AF_LOCAL 1
10470 EOF
10471
10472 fi
10473
10474 echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6
10475 echo "configure:10476: checking for broken getgroups" >&5
10476 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_GETGROUPS'+set}'`\" = set"; then
10477   echo $ac_n "(cached) $ac_c" 1>&6
10478 else
10479   
10480 if test "$cross_compiling" = yes; then
10481   samba_cv_HAVE_BROKEN_GETGROUPS=cross
10482 else
10483   cat > conftest.$ac_ext <<EOF
10484 #line 10485 "configure"
10485 #include "confdefs.h"
10486 #include "${srcdir-.}/tests/getgroups.c"
10487 EOF
10488 if { (eval echo configure:10489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10489 then
10490   samba_cv_HAVE_BROKEN_GETGROUPS=yes
10491 else
10492   echo "configure: failed program was:" >&5
10493   cat conftest.$ac_ext >&5
10494   rm -fr conftest*
10495   samba_cv_HAVE_BROKEN_GETGROUPS=no
10496 fi
10497 rm -fr conftest*
10498 fi
10499
10500 fi
10501
10502 echo "$ac_t""$samba_cv_HAVE_BROKEN_GETGROUPS" 1>&6
10503 if test x"$samba_cv_HAVE_BROKEN_GETGROUPS" = x"yes"; then
10504     cat >> confdefs.h <<\EOF
10505 #define HAVE_BROKEN_GETGROUPS 1
10506 EOF
10507
10508 fi
10509
10510 echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6
10511 echo "configure:10512: checking whether getpass should be replaced" >&5
10512 if eval "test \"`echo '$''{'samba_cv_REPLACE_GETPASS'+set}'`\" = set"; then
10513   echo $ac_n "(cached) $ac_c" 1>&6
10514 else
10515   
10516 SAVE_CPPFLAGS="$CPPFLAGS"
10517 CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/smbwrapper"
10518 cat > conftest.$ac_ext <<EOF
10519 #line 10520 "configure"
10520 #include "confdefs.h"
10521
10522 #define REPLACE_GETPASS 1
10523 #define NO_CONFIG_H 1
10524 #define main dont_declare_main
10525 #include "${srcdir-.}/lib/getsmbpass.c"
10526 #undef main
10527
10528 int main() {
10529
10530 ; return 0; }
10531 EOF
10532 if { (eval echo configure:10533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10533   rm -rf conftest*
10534   samba_cv_REPLACE_GETPASS=yes
10535 else
10536   echo "configure: failed program was:" >&5
10537   cat conftest.$ac_ext >&5
10538   rm -rf conftest*
10539   samba_cv_REPLACE_GETPASS=no
10540 fi
10541 rm -f conftest*
10542 CPPFLAGS="$SAVE_CPPFLAGS"
10543
10544 fi
10545
10546 echo "$ac_t""$samba_cv_REPLACE_GETPASS" 1>&6
10547 if test x"$samba_cv_REPLACE_GETPASS" = x"yes"; then
10548         cat >> confdefs.h <<\EOF
10549 #define REPLACE_GETPASS 1
10550 EOF
10551
10552 fi
10553
10554 echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6
10555 echo "configure:10556: checking for broken inet_ntoa" >&5
10556 if eval "test \"`echo '$''{'samba_cv_REPLACE_INET_NTOA'+set}'`\" = set"; then
10557   echo $ac_n "(cached) $ac_c" 1>&6
10558 else
10559   
10560 if test "$cross_compiling" = yes; then
10561   samba_cv_REPLACE_INET_NTOA=cross
10562 else
10563   cat > conftest.$ac_ext <<EOF
10564 #line 10565 "configure"
10565 #include "confdefs.h"
10566
10567 #include <stdio.h>
10568 #include <sys/types.h>
10569 #include <netinet/in.h>
10570 #ifdef HAVE_ARPA_INET_H
10571 #include <arpa/inet.h>
10572 #endif
10573 main() { struct in_addr ip; ip.s_addr = 0x12345678;
10574 if (strcmp(inet_ntoa(ip),"18.52.86.120") &&
10575     strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } 
10576 exit(1);}
10577 EOF
10578 if { (eval echo configure:10579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10579 then
10580   samba_cv_REPLACE_INET_NTOA=yes
10581 else
10582   echo "configure: failed program was:" >&5
10583   cat conftest.$ac_ext >&5
10584   rm -fr conftest*
10585   samba_cv_REPLACE_INET_NTOA=no
10586 fi
10587 rm -fr conftest*
10588 fi
10589
10590 fi
10591
10592 echo "$ac_t""$samba_cv_REPLACE_INET_NTOA" 1>&6
10593 if test x"$samba_cv_REPLACE_INET_NTOA" = x"yes"; then
10594     cat >> confdefs.h <<\EOF
10595 #define REPLACE_INET_NTOA 1
10596 EOF
10597
10598 fi
10599
10600 echo $ac_n "checking for secure mkstemp""... $ac_c" 1>&6
10601 echo "configure:10602: checking for secure mkstemp" >&5
10602 if eval "test \"`echo '$''{'samba_cv_HAVE_SECURE_MKSTEMP'+set}'`\" = set"; then
10603   echo $ac_n "(cached) $ac_c" 1>&6
10604 else
10605   
10606 if test "$cross_compiling" = yes; then
10607   samba_cv_HAVE_SECURE_MKSTEMP=cross
10608 else
10609   cat > conftest.$ac_ext <<EOF
10610 #line 10611 "configure"
10611 #include "confdefs.h"
10612 #include <stdlib.h>
10613 #include <sys/types.h>
10614 #include <sys/stat.h>
10615 #include <unistd.h>
10616 main() { 
10617   struct stat st;
10618   char tpl[20]="/tmp/test.XXXXXX"; 
10619   int fd = mkstemp(tpl); 
10620   if (fd == -1) exit(1);
10621   unlink(tpl);
10622   if (fstat(fd, &st) != 0) exit(1);
10623   if ((st.st_mode & 0777) != 0600) exit(1);
10624   exit(0);
10625 }
10626 EOF
10627 if { (eval echo configure:10628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10628 then
10629   samba_cv_HAVE_SECURE_MKSTEMP=yes
10630 else
10631   echo "configure: failed program was:" >&5
10632   cat conftest.$ac_ext >&5
10633   rm -fr conftest*
10634   samba_cv_HAVE_SECURE_MKSTEMP=no
10635 fi
10636 rm -fr conftest*
10637 fi
10638
10639 fi
10640
10641 echo "$ac_t""$samba_cv_HAVE_SECURE_MKSTEMP" 1>&6
10642 if test x"$samba_cv_HAVE_SECURE_MKSTEMP" = x"yes"; then
10643     cat >> confdefs.h <<\EOF
10644 #define HAVE_SECURE_MKSTEMP 1
10645 EOF
10646
10647 fi
10648
10649 echo $ac_n "checking for sysconf(_SC_NGROUPS_MAX)""... $ac_c" 1>&6
10650 echo "configure:10651: checking for sysconf(_SC_NGROUPS_MAX)" >&5
10651 if eval "test \"`echo '$''{'samba_cv_SYSCONF_SC_NGROUPS_MAX'+set}'`\" = set"; then
10652   echo $ac_n "(cached) $ac_c" 1>&6
10653 else
10654   
10655 if test "$cross_compiling" = yes; then
10656   samba_cv_SYSCONF_SC_NGROUPS_MAX=cross
10657 else
10658   cat > conftest.$ac_ext <<EOF
10659 #line 10660 "configure"
10660 #include "confdefs.h"
10661 #include <unistd.h>
10662 main() { exit(sysconf(_SC_NGROUPS_MAX) == -1 ? 1 : 0); }
10663 EOF
10664 if { (eval echo configure:10665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10665 then
10666   samba_cv_SYSCONF_SC_NGROUPS_MAX=yes
10667 else
10668   echo "configure: failed program was:" >&5
10669   cat conftest.$ac_ext >&5
10670   rm -fr conftest*
10671   samba_cv_SYSCONF_SC_NGROUPS_MAX=no
10672 fi
10673 rm -fr conftest*
10674 fi
10675
10676 fi
10677
10678 echo "$ac_t""$samba_cv_SYSCONF_SC_NGROUPS_MAX" 1>&6
10679 if test x"$samba_cv_SYSCONF_SC_NGROUPS_MAX" = x"yes"; then
10680     cat >> confdefs.h <<\EOF
10681 #define SYSCONF_SC_NGROUPS_MAX 1
10682 EOF
10683
10684 fi
10685
10686 echo $ac_n "checking for root""... $ac_c" 1>&6
10687 echo "configure:10688: checking for root" >&5
10688 if eval "test \"`echo '$''{'samba_cv_HAVE_ROOT'+set}'`\" = set"; then
10689   echo $ac_n "(cached) $ac_c" 1>&6
10690 else
10691   
10692 if test "$cross_compiling" = yes; then
10693   samba_cv_HAVE_ROOT=cross
10694 else
10695   cat > conftest.$ac_ext <<EOF
10696 #line 10697 "configure"
10697 #include "confdefs.h"
10698 main() { exit(getuid() != 0); }
10699 EOF
10700 if { (eval echo configure:10701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10701 then
10702   samba_cv_HAVE_ROOT=yes
10703 else
10704   echo "configure: failed program was:" >&5
10705   cat conftest.$ac_ext >&5
10706   rm -fr conftest*
10707   samba_cv_HAVE_ROOT=no
10708 fi
10709 rm -fr conftest*
10710 fi
10711
10712 fi
10713
10714 echo "$ac_t""$samba_cv_HAVE_ROOT" 1>&6
10715 if test x"$samba_cv_HAVE_ROOT" = x"yes"; then
10716     cat >> confdefs.h <<\EOF
10717 #define HAVE_ROOT 1
10718 EOF
10719
10720 else
10721     echo "configure: warning: running as non-root will disable some tests" 1>&2
10722 fi
10723
10724 ##################
10725 # look for a method of finding the list of network interfaces
10726 iface=no;
10727 echo $ac_n "checking for iface AIX""... $ac_c" 1>&6
10728 echo "configure:10729: checking for iface AIX" >&5
10729 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_AIX'+set}'`\" = set"; then
10730   echo $ac_n "(cached) $ac_c" 1>&6
10731 else
10732   
10733 if test "$cross_compiling" = yes; then
10734   samba_cv_HAVE_IFACE_AIX=cross
10735 else
10736   cat > conftest.$ac_ext <<EOF
10737 #line 10738 "configure"
10738 #include "confdefs.h"
10739
10740 #define HAVE_IFACE_AIX 1
10741 #define AUTOCONF_TEST 1
10742 #include "confdefs.h"
10743 #include "${srcdir-.}/lib/interfaces.c"
10744 EOF
10745 if { (eval echo configure:10746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10746 then
10747   samba_cv_HAVE_IFACE_AIX=yes
10748 else
10749   echo "configure: failed program was:" >&5
10750   cat conftest.$ac_ext >&5
10751   rm -fr conftest*
10752   samba_cv_HAVE_IFACE_AIX=no
10753 fi
10754 rm -fr conftest*
10755 fi
10756
10757 fi
10758
10759 echo "$ac_t""$samba_cv_HAVE_IFACE_AIX" 1>&6
10760 if test x"$samba_cv_HAVE_IFACE_AIX" = x"yes"; then
10761     iface=yes;cat >> confdefs.h <<\EOF
10762 #define HAVE_IFACE_AIX 1
10763 EOF
10764
10765 fi
10766
10767 if test $iface = no; then
10768 echo $ac_n "checking for iface ifconf""... $ac_c" 1>&6
10769 echo "configure:10770: checking for iface ifconf" >&5
10770 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFCONF'+set}'`\" = set"; then
10771   echo $ac_n "(cached) $ac_c" 1>&6
10772 else
10773   
10774 if test "$cross_compiling" = yes; then
10775   samba_cv_HAVE_IFACE_IFCONF=cross
10776 else
10777   cat > conftest.$ac_ext <<EOF
10778 #line 10779 "configure"
10779 #include "confdefs.h"
10780
10781 #define HAVE_IFACE_IFCONF 1
10782 #define AUTOCONF_TEST 1
10783 #include "confdefs.h"
10784 #include "${srcdir-.}/lib/interfaces.c"
10785 EOF
10786 if { (eval echo configure:10787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10787 then
10788   samba_cv_HAVE_IFACE_IFCONF=yes
10789 else
10790   echo "configure: failed program was:" >&5
10791   cat conftest.$ac_ext >&5
10792   rm -fr conftest*
10793   samba_cv_HAVE_IFACE_IFCONF=no
10794 fi
10795 rm -fr conftest*
10796 fi
10797
10798 fi
10799
10800 echo "$ac_t""$samba_cv_HAVE_IFACE_IFCONF" 1>&6
10801 if test x"$samba_cv_HAVE_IFACE_IFCONF" = x"yes"; then
10802     iface=yes;cat >> confdefs.h <<\EOF
10803 #define HAVE_IFACE_IFCONF 1
10804 EOF
10805
10806 fi
10807 fi
10808
10809 if test $iface = no; then
10810 echo $ac_n "checking for iface ifreq""... $ac_c" 1>&6
10811 echo "configure:10812: checking for iface ifreq" >&5
10812 if eval "test \"`echo '$''{'samba_cv_HAVE_IFACE_IFREQ'+set}'`\" = set"; then
10813   echo $ac_n "(cached) $ac_c" 1>&6
10814 else
10815   
10816 if test "$cross_compiling" = yes; then
10817   samba_cv_HAVE_IFACE_IFREQ=cross
10818 else
10819   cat > conftest.$ac_ext <<EOF
10820 #line 10821 "configure"
10821 #include "confdefs.h"
10822
10823 #define HAVE_IFACE_IFREQ 1
10824 #define AUTOCONF_TEST 1
10825 #include "confdefs.h"
10826 #include "${srcdir-.}/lib/interfaces.c"
10827 EOF
10828 if { (eval echo configure:10829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10829 then
10830   samba_cv_HAVE_IFACE_IFREQ=yes
10831 else
10832   echo "configure: failed program was:" >&5
10833   cat conftest.$ac_ext >&5
10834   rm -fr conftest*
10835   samba_cv_HAVE_IFACE_IFREQ=no
10836 fi
10837 rm -fr conftest*
10838 fi
10839
10840 fi
10841
10842 echo "$ac_t""$samba_cv_HAVE_IFACE_IFREQ" 1>&6
10843 if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
10844     iface=yes;cat >> confdefs.h <<\EOF
10845 #define HAVE_IFACE_IFREQ 1
10846 EOF
10847
10848 fi
10849 fi
10850
10851
10852 ################################################
10853 # look for a method of setting the effective uid
10854 seteuid=no;
10855 if test $seteuid = no; then
10856 echo $ac_n "checking for setresuid""... $ac_c" 1>&6
10857 echo "configure:10858: checking for setresuid" >&5
10858 if eval "test \"`echo '$''{'samba_cv_USE_SETRESUID'+set}'`\" = set"; then
10859   echo $ac_n "(cached) $ac_c" 1>&6
10860 else
10861   
10862 if test "$cross_compiling" = yes; then
10863   samba_cv_USE_SETRESUID=cross
10864 else
10865   cat > conftest.$ac_ext <<EOF
10866 #line 10867 "configure"
10867 #include "confdefs.h"
10868
10869 #define AUTOCONF_TEST 1
10870 #define USE_SETRESUID 1
10871 #include "confdefs.h"
10872 #include "${srcdir-.}/lib/util_sec.c"
10873 EOF
10874 if { (eval echo configure:10875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10875 then
10876   samba_cv_USE_SETRESUID=yes
10877 else
10878   echo "configure: failed program was:" >&5
10879   cat conftest.$ac_ext >&5
10880   rm -fr conftest*
10881   samba_cv_USE_SETRESUID=no
10882 fi
10883 rm -fr conftest*
10884 fi
10885
10886 fi
10887
10888 echo "$ac_t""$samba_cv_USE_SETRESUID" 1>&6
10889 if test x"$samba_cv_USE_SETRESUID" = x"yes"; then
10890     seteuid=yes;cat >> confdefs.h <<\EOF
10891 #define USE_SETRESUID 1
10892 EOF
10893
10894 fi
10895 fi
10896
10897
10898 if test $seteuid = no; then
10899 echo $ac_n "checking for setreuid""... $ac_c" 1>&6
10900 echo "configure:10901: checking for setreuid" >&5
10901 if eval "test \"`echo '$''{'samba_cv_USE_SETREUID'+set}'`\" = set"; then
10902   echo $ac_n "(cached) $ac_c" 1>&6
10903 else
10904   
10905 if test "$cross_compiling" = yes; then
10906   samba_cv_USE_SETREUID=cross
10907 else
10908   cat > conftest.$ac_ext <<EOF
10909 #line 10910 "configure"
10910 #include "confdefs.h"
10911
10912 #define AUTOCONF_TEST 1
10913 #define USE_SETREUID 1
10914 #include "confdefs.h"
10915 #include "${srcdir-.}/lib/util_sec.c"
10916 EOF
10917 if { (eval echo configure:10918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10918 then
10919   samba_cv_USE_SETREUID=yes
10920 else
10921   echo "configure: failed program was:" >&5
10922   cat conftest.$ac_ext >&5
10923   rm -fr conftest*
10924   samba_cv_USE_SETREUID=no
10925 fi
10926 rm -fr conftest*
10927 fi
10928
10929 fi
10930
10931 echo "$ac_t""$samba_cv_USE_SETREUID" 1>&6
10932 if test x"$samba_cv_USE_SETREUID" = x"yes"; then
10933     seteuid=yes;cat >> confdefs.h <<\EOF
10934 #define USE_SETREUID 1
10935 EOF
10936
10937 fi
10938 fi
10939
10940 if test $seteuid = no; then
10941 echo $ac_n "checking for seteuid""... $ac_c" 1>&6
10942 echo "configure:10943: checking for seteuid" >&5
10943 if eval "test \"`echo '$''{'samba_cv_USE_SETEUID'+set}'`\" = set"; then
10944   echo $ac_n "(cached) $ac_c" 1>&6
10945 else
10946   
10947 if test "$cross_compiling" = yes; then
10948   samba_cv_USE_SETEUID=cross
10949 else
10950   cat > conftest.$ac_ext <<EOF
10951 #line 10952 "configure"
10952 #include "confdefs.h"
10953
10954 #define AUTOCONF_TEST 1
10955 #define USE_SETEUID 1
10956 #include "confdefs.h"
10957 #include "${srcdir-.}/lib/util_sec.c"
10958 EOF
10959 if { (eval echo configure:10960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
10960 then
10961   samba_cv_USE_SETEUID=yes
10962 else
10963   echo "configure: failed program was:" >&5
10964   cat conftest.$ac_ext >&5
10965   rm -fr conftest*
10966   samba_cv_USE_SETEUID=no
10967 fi
10968 rm -fr conftest*
10969 fi
10970
10971 fi
10972
10973 echo "$ac_t""$samba_cv_USE_SETEUID" 1>&6
10974 if test x"$samba_cv_USE_SETEUID" = x"yes"; then
10975     seteuid=yes;cat >> confdefs.h <<\EOF
10976 #define USE_SETEUID 1
10977 EOF
10978
10979 fi
10980 fi
10981
10982 if test $seteuid = no; then
10983 echo $ac_n "checking for setuidx""... $ac_c" 1>&6
10984 echo "configure:10985: checking for setuidx" >&5
10985 if eval "test \"`echo '$''{'samba_cv_USE_SETUIDX'+set}'`\" = set"; then
10986   echo $ac_n "(cached) $ac_c" 1>&6
10987 else
10988   
10989 if test "$cross_compiling" = yes; then
10990   samba_cv_USE_SETUIDX=cross
10991 else
10992   cat > conftest.$ac_ext <<EOF
10993 #line 10994 "configure"
10994 #include "confdefs.h"
10995
10996 #define AUTOCONF_TEST 1
10997 #define USE_SETUIDX 1
10998 #include "confdefs.h"
10999 #include "${srcdir-.}/lib/util_sec.c"
11000 EOF
11001 if { (eval echo configure:11002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11002 then
11003   samba_cv_USE_SETUIDX=yes
11004 else
11005   echo "configure: failed program was:" >&5
11006   cat conftest.$ac_ext >&5
11007   rm -fr conftest*
11008   samba_cv_USE_SETUIDX=no
11009 fi
11010 rm -fr conftest*
11011 fi
11012
11013 fi
11014
11015 echo "$ac_t""$samba_cv_USE_SETUIDX" 1>&6
11016 if test x"$samba_cv_USE_SETUIDX" = x"yes"; then
11017     seteuid=yes;cat >> confdefs.h <<\EOF
11018 #define USE_SETUIDX 1
11019 EOF
11020
11021 fi
11022 fi
11023
11024
11025 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11026 echo "configure:11027: checking for working mmap" >&5
11027 if eval "test \"`echo '$''{'samba_cv_HAVE_MMAP'+set}'`\" = set"; then
11028   echo $ac_n "(cached) $ac_c" 1>&6
11029 else
11030   
11031 if test "$cross_compiling" = yes; then
11032   samba_cv_HAVE_MMAP=cross
11033 else
11034   cat > conftest.$ac_ext <<EOF
11035 #line 11036 "configure"
11036 #include "confdefs.h"
11037 #include "${srcdir-.}/tests/shared_mmap.c"
11038 EOF
11039 if { (eval echo configure:11040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11040 then
11041   samba_cv_HAVE_MMAP=yes
11042 else
11043   echo "configure: failed program was:" >&5
11044   cat conftest.$ac_ext >&5
11045   rm -fr conftest*
11046   samba_cv_HAVE_MMAP=no
11047 fi
11048 rm -fr conftest*
11049 fi
11050
11051 fi
11052
11053 echo "$ac_t""$samba_cv_HAVE_MMAP" 1>&6
11054 if test x"$samba_cv_HAVE_MMAP" = x"yes"; then
11055     cat >> confdefs.h <<\EOF
11056 #define HAVE_MMAP 1
11057 EOF
11058
11059 fi
11060
11061 echo $ac_n "checking for ftruncate needs root""... $ac_c" 1>&6
11062 echo "configure:11063: checking for ftruncate needs root" >&5
11063 if eval "test \"`echo '$''{'samba_cv_FTRUNCATE_NEEDS_ROOT'+set}'`\" = set"; then
11064   echo $ac_n "(cached) $ac_c" 1>&6
11065 else
11066   
11067 if test "$cross_compiling" = yes; then
11068   samba_cv_FTRUNCATE_NEEDS_ROOT=cross
11069 else
11070   cat > conftest.$ac_ext <<EOF
11071 #line 11072 "configure"
11072 #include "confdefs.h"
11073 #include "${srcdir-.}/tests/ftruncroot.c"
11074 EOF
11075 if { (eval echo configure:11076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11076 then
11077   samba_cv_FTRUNCATE_NEEDS_ROOT=yes
11078 else
11079   echo "configure: failed program was:" >&5
11080   cat conftest.$ac_ext >&5
11081   rm -fr conftest*
11082   samba_cv_FTRUNCATE_NEEDS_ROOT=no
11083 fi
11084 rm -fr conftest*
11085 fi
11086
11087 fi
11088
11089 echo "$ac_t""$samba_cv_FTRUNCATE_NEEDS_ROOT" 1>&6
11090 if test x"$samba_cv_FTRUNCATE_NEEDS_ROOT" = x"yes"; then
11091     cat >> confdefs.h <<\EOF
11092 #define FTRUNCATE_NEEDS_ROOT 1
11093 EOF
11094
11095 fi
11096
11097 echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6
11098 echo "configure:11099: checking for fcntl locking" >&5
11099 if eval "test \"`echo '$''{'samba_cv_HAVE_FCNTL_LOCK'+set}'`\" = set"; then
11100   echo $ac_n "(cached) $ac_c" 1>&6
11101 else
11102   
11103 if test "$cross_compiling" = yes; then
11104   samba_cv_HAVE_FCNTL_LOCK=cross
11105 else
11106   cat > conftest.$ac_ext <<EOF
11107 #line 11108 "configure"
11108 #include "confdefs.h"
11109 #include "${srcdir-.}/tests/fcntl_lock.c"
11110 EOF
11111 if { (eval echo configure:11112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11112 then
11113   samba_cv_HAVE_FCNTL_LOCK=yes
11114 else
11115   echo "configure: failed program was:" >&5
11116   cat conftest.$ac_ext >&5
11117   rm -fr conftest*
11118   samba_cv_HAVE_FCNTL_LOCK=no
11119 fi
11120 rm -fr conftest*
11121 fi
11122
11123 fi
11124
11125 echo "$ac_t""$samba_cv_HAVE_FCNTL_LOCK" 1>&6
11126 if test x"$samba_cv_HAVE_FCNTL_LOCK" = x"yes"; then
11127     cat >> confdefs.h <<\EOF
11128 #define HAVE_FCNTL_LOCK 1
11129 EOF
11130
11131 fi
11132
11133 echo $ac_n "checking for broken (glibc2.1/x86) 64 bit fcntl locking""... $ac_c" 1>&6
11134 echo "configure:11135: checking for broken (glibc2.1/x86) 64 bit fcntl locking" >&5
11135 if eval "test \"`echo '$''{'samba_cv_HAVE_BROKEN_FCNTL64_LOCKS'+set}'`\" = set"; then
11136   echo $ac_n "(cached) $ac_c" 1>&6
11137 else
11138   
11139 if test "$cross_compiling" = yes; then
11140   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=cross
11141 else
11142   cat > conftest.$ac_ext <<EOF
11143 #line 11144 "configure"
11144 #include "confdefs.h"
11145 #include "${srcdir-.}/tests/fcntl_lock64.c"
11146 EOF
11147 if { (eval echo configure:11148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11148 then
11149   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=yes
11150 else
11151   echo "configure: failed program was:" >&5
11152   cat conftest.$ac_ext >&5
11153   rm -fr conftest*
11154   samba_cv_HAVE_BROKEN_FCNTL64_LOCKS=no
11155 fi
11156 rm -fr conftest*
11157 fi
11158
11159 fi
11160
11161 echo "$ac_t""$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" 1>&6
11162 if test x"$samba_cv_HAVE_BROKEN_FCNTL64_LOCKS" = x"yes"; then
11163     cat >> confdefs.h <<\EOF
11164 #define HAVE_BROKEN_FCNTL64_LOCKS 1
11165 EOF
11166
11167
11168 else
11169
11170
11171   echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6
11172 echo "configure:11173: checking for 64 bit fcntl locking" >&5
11173 if eval "test \"`echo '$''{'samba_cv_HAVE_STRUCT_FLOCK64'+set}'`\" = set"; then
11174   echo $ac_n "(cached) $ac_c" 1>&6
11175 else
11176   
11177   if test "$cross_compiling" = yes; then
11178   samba_cv_HAVE_STRUCT_FLOCK64=cross
11179 else
11180   cat > conftest.$ac_ext <<EOF
11181 #line 11182 "configure"
11182 #include "confdefs.h"
11183
11184 #if defined(HAVE_UNISTD_H)
11185 #include <unistd.h>
11186 #endif
11187 #include <stdio.h>
11188 #include <stdlib.h>
11189
11190 #ifdef HAVE_FCNTL_H
11191 #include <fcntl.h>
11192 #endif
11193
11194 #ifdef HAVE_SYS_FCNTL_H
11195 #include <sys/fcntl.h>
11196 #endif
11197 main() { struct flock64 fl64;
11198 #if defined(F_SETLKW64) && defined(F_SETLK64) && defined(F_GETLK64)
11199 exit(0);
11200 #else
11201 exit(1);
11202 #endif
11203 }
11204 EOF
11205 if { (eval echo configure:11206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11206 then
11207   samba_cv_HAVE_STRUCT_FLOCK64=yes
11208 else
11209   echo "configure: failed program was:" >&5
11210   cat conftest.$ac_ext >&5
11211   rm -fr conftest*
11212   samba_cv_HAVE_STRUCT_FLOCK64=no
11213 fi
11214 rm -fr conftest*
11215 fi
11216
11217 fi
11218
11219 echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6
11220
11221   if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then
11222       cat >> confdefs.h <<\EOF
11223 #define HAVE_STRUCT_FLOCK64 1
11224 EOF
11225
11226   fi
11227 fi
11228
11229
11230 case "$host_os" in
11231 *linux*)
11232 echo $ac_n "checking for broken RedHat 7.2 system header files""... $ac_c" 1>&6
11233 echo "configure:11234: checking for broken RedHat 7.2 system header files" >&5
11234 if eval "test \"`echo '$''{'samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS'+set}'`\" = set"; then
11235   echo $ac_n "(cached) $ac_c" 1>&6
11236 else
11237   
11238 cat > conftest.$ac_ext <<EOF
11239 #line 11240 "configure"
11240 #include "confdefs.h"
11241
11242 #ifdef HAVE_SYS_VFS_H
11243 #include <sys/vfs.h>
11244 #endif
11245 #ifdef HAVE_SYS_CAPABILITY_H
11246 #include <sys/capability.h>
11247 #endif
11248
11249 int main() {
11250 int i;
11251 ; return 0; }
11252 EOF
11253 if { (eval echo configure:11254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11254   rm -rf conftest*
11255   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no
11256 else
11257   echo "configure: failed program was:" >&5
11258   cat conftest.$ac_ext >&5
11259   rm -rf conftest*
11260   samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes
11261 fi
11262 rm -f conftest*
11263 fi
11264
11265 echo "$ac_t""$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" 1>&6
11266 if test x"$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS" = x"yes"; then
11267    cat >> confdefs.h <<\EOF
11268 #define BROKEN_REDHAT_7_SYSTEM_HEADERS 1
11269 EOF
11270
11271 fi
11272 ;;
11273 esac
11274
11275 echo $ac_n "checking for broken nisplus include files""... $ac_c" 1>&6
11276 echo "configure:11277: checking for broken nisplus include files" >&5
11277 if eval "test \"`echo '$''{'samba_cv_BROKEN_NISPLUS_INCLUDE_FILES'+set}'`\" = set"; then
11278   echo $ac_n "(cached) $ac_c" 1>&6
11279 else
11280   
11281 cat > conftest.$ac_ext <<EOF
11282 #line 11283 "configure"
11283 #include "confdefs.h"
11284 #include <sys/acl.h>
11285 #if defined(HAVE_RPCSVC_NIS_H)
11286 #include <rpcsvc/nis.h>
11287 #endif
11288 int main() {
11289 int i;
11290 ; return 0; }
11291 EOF
11292 if { (eval echo configure:11293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11293   rm -rf conftest*
11294   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=no
11295 else
11296   echo "configure: failed program was:" >&5
11297   cat conftest.$ac_ext >&5
11298   rm -rf conftest*
11299   samba_cv_BROKEN_NISPLUS_INCLUDE_FILES=yes
11300 fi
11301 rm -f conftest*
11302 fi
11303
11304 echo "$ac_t""$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" 1>&6
11305 if test x"$samba_cv_BROKEN_NISPLUS_INCLUDE_FILES" = x"yes"; then
11306     cat >> confdefs.h <<\EOF
11307 #define BROKEN_NISPLUS_INCLUDE_FILES 1
11308 EOF
11309
11310 fi
11311
11312
11313 #################################################
11314 # check for smbwrapper support
11315 echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6
11316 echo "configure:11317: checking whether to use smbwrapper" >&5
11317 # Check whether --with-smbwrapper or --without-smbwrapper was given.
11318 if test "${with_smbwrapper+set}" = set; then
11319   withval="$with_smbwrapper"
11320    case "$withval" in
11321   yes)
11322     echo "$ac_t""yes" 1>&6
11323     cat >> confdefs.h <<\EOF
11324 #define WITH_SMBWRAPPER 1
11325 EOF
11326
11327         WRAP="bin/smbsh bin/smbwrapper.$SHLIBEXT"
11328
11329         if test x$ATTEMPT_WRAP32_BUILD = x; then
11330                 WRAP32=""
11331         else
11332                         WRAP32=bin/smbwrapper.32.$SHLIBEXT
11333         fi
11334
11335 # Conditions under which smbwrapper should not be built.
11336
11337         if test x$PICFLAG = x; then
11338            echo No support for PIC code - disabling smbwrapper and smbsh
11339            WRAP=""
11340            WRAP32=""
11341         elif test x$ac_cv_func_syscall = xno; then
11342            echo "$ac_t""No syscall() -- disabling smbwrapper and smbsh" 1>&6
11343            WRAP=""
11344            WRAP32=""
11345         fi
11346     ;;
11347   *)
11348     echo "$ac_t""no" 1>&6
11349     ;;
11350   esac 
11351 else
11352   echo "$ac_t""no" 1>&6
11353
11354 fi
11355
11356
11357 #################################################
11358 # check for AFS clear-text auth support
11359 echo $ac_n "checking whether to use AFS clear-text auth""... $ac_c" 1>&6
11360 echo "configure:11361: checking whether to use AFS clear-text auth" >&5
11361 # Check whether --with-afs or --without-afs was given.
11362 if test "${with_afs+set}" = set; then
11363   withval="$with_afs"
11364    case "$withval" in
11365   yes)
11366     echo "$ac_t""yes" 1>&6
11367     cat >> confdefs.h <<\EOF
11368 #define WITH_AFS 1
11369 EOF
11370
11371     ;;
11372   *)
11373     echo "$ac_t""no" 1>&6
11374     ;;
11375   esac 
11376 else
11377   echo "$ac_t""no" 1>&6
11378
11379 fi
11380
11381
11382
11383 #################################################
11384 # check for the DFS clear-text auth system
11385 echo $ac_n "checking whether to use DFS clear-text auth""... $ac_c" 1>&6
11386 echo "configure:11387: checking whether to use DFS clear-text auth" >&5
11387 # Check whether --with-dfs or --without-dfs was given.
11388 if test "${with_dfs+set}" = set; then
11389   withval="$with_dfs"
11390    case "$withval" in
11391   yes)
11392     echo "$ac_t""yes" 1>&6
11393     cat >> confdefs.h <<\EOF
11394 #define WITH_DFS 1
11395 EOF
11396
11397     ;;
11398   *)
11399     echo "$ac_t""no" 1>&6
11400     ;;
11401   esac 
11402 else
11403   echo "$ac_t""no" 1>&6
11404
11405 fi
11406
11407
11408
11409 #################################################
11410 # see if this box has the RedHat location for kerberos
11411 echo $ac_n "checking for /usr/kerberos""... $ac_c" 1>&6
11412 echo "configure:11413: checking for /usr/kerberos" >&5
11413 if test -d /usr/kerberos; then
11414     LDFLAGS="$LDFLAGS -L/usr/kerberos/lib"
11415     CFLAGS="$CFLAGS -I/usr/kerberos/include"
11416     CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include"
11417     echo "$ac_t""yes" 1>&6
11418 else
11419     echo "$ac_t""no" 1>&6
11420 fi
11421
11422 #################################################
11423 # check for location of Kerberos 5 install
11424 echo $ac_n "checking for kerberos 5 install path""... $ac_c" 1>&6
11425 echo "configure:11426: checking for kerberos 5 install path" >&5
11426 # Check whether --with-krb5 or --without-krb5 was given.
11427 if test "${with_krb5+set}" = set; then
11428   withval="$with_krb5"
11429    case "$withval" in
11430   no)
11431     echo "$ac_t""no" 1>&6
11432     ;;
11433   *)
11434     echo "$ac_t""yes" 1>&6
11435     LIBS="$LIBS -lkrb5"
11436     CFLAGS="$CFLAGS -I$withval/include"
11437     CPPFLAGS="$CPPFLAGS -I$withval/include"
11438     LDFLAGS="$LDFLAGS -L$withval/lib"
11439     ;;
11440   esac 
11441 else
11442   echo "$ac_t""no" 1>&6
11443
11444 fi
11445
11446
11447 # now check for krb5.h. Some systems have the libraries without the headers!
11448 # note that this check is done here to allow for different kerberos
11449 # include paths
11450 for ac_hdr in krb5.h
11451 do
11452 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11453 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11454 echo "configure:11455: checking for $ac_hdr" >&5
11455 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11456   echo $ac_n "(cached) $ac_c" 1>&6
11457 else
11458   cat > conftest.$ac_ext <<EOF
11459 #line 11460 "configure"
11460 #include "confdefs.h"
11461 #include <$ac_hdr>
11462 EOF
11463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11464 { (eval echo configure:11465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11466 if test -z "$ac_err"; then
11467   rm -rf conftest*
11468   eval "ac_cv_header_$ac_safe=yes"
11469 else
11470   echo "$ac_err" >&5
11471   echo "configure: failed program was:" >&5
11472   cat conftest.$ac_ext >&5
11473   rm -rf conftest*
11474   eval "ac_cv_header_$ac_safe=no"
11475 fi
11476 rm -f conftest*
11477 fi
11478 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11479   echo "$ac_t""yes" 1>&6
11480     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11481   cat >> confdefs.h <<EOF
11482 #define $ac_tr_hdr 1
11483 EOF
11484  
11485 else
11486   echo "$ac_t""no" 1>&6
11487 fi
11488 done
11489
11490
11491 # now check for gssapi headers.  This is also done here to allow for
11492 # different kerberos include paths
11493 for ac_hdr in gssapi/gssapi_generic.h gssapi/gssapi.h
11494 do
11495 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11496 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11497 echo "configure:11498: checking for $ac_hdr" >&5
11498 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
11499   echo $ac_n "(cached) $ac_c" 1>&6
11500 else
11501   cat > conftest.$ac_ext <<EOF
11502 #line 11503 "configure"
11503 #include "confdefs.h"
11504 #include <$ac_hdr>
11505 EOF
11506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11507 { (eval echo configure:11508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11509 if test -z "$ac_err"; then
11510   rm -rf conftest*
11511   eval "ac_cv_header_$ac_safe=yes"
11512 else
11513   echo "$ac_err" >&5
11514   echo "configure: failed program was:" >&5
11515   cat conftest.$ac_ext >&5
11516   rm -rf conftest*
11517   eval "ac_cv_header_$ac_safe=no"
11518 fi
11519 rm -f conftest*
11520 fi
11521 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11522   echo "$ac_t""yes" 1>&6
11523     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11524   cat >> confdefs.h <<EOF
11525 #define $ac_tr_hdr 1
11526 EOF
11527  
11528 else
11529   echo "$ac_t""no" 1>&6
11530 fi
11531 done
11532
11533
11534 ##################################################################
11535 # we might need the k5crypto and com_err libraries on some systems
11536 echo $ac_n "checking for _et_list in -lcom_err""... $ac_c" 1>&6
11537 echo "configure:11538: checking for _et_list in -lcom_err" >&5
11538 ac_lib_var=`echo com_err'_'_et_list | sed 'y%./+-%__p_%'`
11539 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11540   echo $ac_n "(cached) $ac_c" 1>&6
11541 else
11542   ac_save_LIBS="$LIBS"
11543 LIBS="-lcom_err  $LIBS"
11544 cat > conftest.$ac_ext <<EOF
11545 #line 11546 "configure"
11546 #include "confdefs.h"
11547 /* Override any gcc2 internal prototype to avoid an error.  */
11548 /* We use char because int might match the return type of a gcc2
11549     builtin and then its argument prototype would still apply.  */
11550 char _et_list();
11551
11552 int main() {
11553 _et_list()
11554 ; return 0; }
11555 EOF
11556 if { (eval echo configure:11557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11557   rm -rf conftest*
11558   eval "ac_cv_lib_$ac_lib_var=yes"
11559 else
11560   echo "configure: failed program was:" >&5
11561   cat conftest.$ac_ext >&5
11562   rm -rf conftest*
11563   eval "ac_cv_lib_$ac_lib_var=no"
11564 fi
11565 rm -f conftest*
11566 LIBS="$ac_save_LIBS"
11567
11568 fi
11569 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11570   echo "$ac_t""yes" 1>&6
11571   LIBS="$LIBS -lcom_err"
11572 else
11573   echo "$ac_t""no" 1>&6
11574 fi
11575
11576 echo $ac_n "checking for krb5_encrypt_data in -lk5crypto""... $ac_c" 1>&6
11577 echo "configure:11578: checking for krb5_encrypt_data in -lk5crypto" >&5
11578 ac_lib_var=`echo k5crypto'_'krb5_encrypt_data | sed 'y%./+-%__p_%'`
11579 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11580   echo $ac_n "(cached) $ac_c" 1>&6
11581 else
11582   ac_save_LIBS="$LIBS"
11583 LIBS="-lk5crypto  $LIBS"
11584 cat > conftest.$ac_ext <<EOF
11585 #line 11586 "configure"
11586 #include "confdefs.h"
11587 /* Override any gcc2 internal prototype to avoid an error.  */
11588 /* We use char because int might match the return type of a gcc2
11589     builtin and then its argument prototype would still apply.  */
11590 char krb5_encrypt_data();
11591
11592 int main() {
11593 krb5_encrypt_data()
11594 ; return 0; }
11595 EOF
11596 if { (eval echo configure:11597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11597   rm -rf conftest*
11598   eval "ac_cv_lib_$ac_lib_var=yes"
11599 else
11600   echo "configure: failed program was:" >&5
11601   cat conftest.$ac_ext >&5
11602   rm -rf conftest*
11603   eval "ac_cv_lib_$ac_lib_var=no"
11604 fi
11605 rm -f conftest*
11606 LIBS="$ac_save_LIBS"
11607
11608 fi
11609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11610   echo "$ac_t""yes" 1>&6
11611   LIBS="$LIBS -lk5crypto"
11612 else
11613   echo "$ac_t""no" 1>&6
11614 fi
11615
11616 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
11617 echo "configure:11618: checking for gss_display_status in -lgssapi_krb5" >&5
11618 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
11619 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11620   echo $ac_n "(cached) $ac_c" 1>&6
11621 else
11622   ac_save_LIBS="$LIBS"
11623 LIBS="-lgssapi_krb5  $LIBS"
11624 cat > conftest.$ac_ext <<EOF
11625 #line 11626 "configure"
11626 #include "confdefs.h"
11627 /* Override any gcc2 internal prototype to avoid an error.  */
11628 /* We use char because int might match the return type of a gcc2
11629     builtin and then its argument prototype would still apply.  */
11630 char gss_display_status();
11631
11632 int main() {
11633 gss_display_status()
11634 ; return 0; }
11635 EOF
11636 if { (eval echo configure:11637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11637   rm -rf conftest*
11638   eval "ac_cv_lib_$ac_lib_var=yes"
11639 else
11640   echo "configure: failed program was:" >&5
11641   cat conftest.$ac_ext >&5
11642   rm -rf conftest*
11643   eval "ac_cv_lib_$ac_lib_var=no"
11644 fi
11645 rm -f conftest*
11646 LIBS="$ac_save_LIBS"
11647
11648 fi
11649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11650   echo "$ac_t""yes" 1>&6
11651   LIBS="$LIBS -lgssapi_krb5"
11652 else
11653   echo "$ac_t""no" 1>&6
11654 fi
11655
11656
11657
11658 ########################################################
11659 # now see if we can find the krb5 libs in standard paths
11660 # or as specified above
11661 echo $ac_n "checking for krb5_mk_req_extended in -lkrb5""... $ac_c" 1>&6
11662 echo "configure:11663: checking for krb5_mk_req_extended in -lkrb5" >&5
11663 ac_lib_var=`echo krb5'_'krb5_mk_req_extended | sed 'y%./+-%__p_%'`
11664 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11665   echo $ac_n "(cached) $ac_c" 1>&6
11666 else
11667   ac_save_LIBS="$LIBS"
11668 LIBS="-lkrb5  $LIBS"
11669 cat > conftest.$ac_ext <<EOF
11670 #line 11671 "configure"
11671 #include "confdefs.h"
11672 /* Override any gcc2 internal prototype to avoid an error.  */
11673 /* We use char because int might match the return type of a gcc2
11674     builtin and then its argument prototype would still apply.  */
11675 char krb5_mk_req_extended();
11676
11677 int main() {
11678 krb5_mk_req_extended()
11679 ; return 0; }
11680 EOF
11681 if { (eval echo configure:11682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11682   rm -rf conftest*
11683   eval "ac_cv_lib_$ac_lib_var=yes"
11684 else
11685   echo "configure: failed program was:" >&5
11686   cat conftest.$ac_ext >&5
11687   rm -rf conftest*
11688   eval "ac_cv_lib_$ac_lib_var=no"
11689 fi
11690 rm -f conftest*
11691 LIBS="$ac_save_LIBS"
11692
11693 fi
11694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11695   echo "$ac_t""yes" 1>&6
11696   LIBS="$LIBS -lkrb5";
11697         cat >> confdefs.h <<\EOF
11698 #define HAVE_KRB5 1
11699 EOF
11700
11701 else
11702   echo "$ac_t""no" 1>&6
11703 fi
11704
11705
11706 ########################################################
11707 # now see if we can find the gssapi libs in standard paths
11708 echo $ac_n "checking for gss_display_status in -lgssapi_krb5""... $ac_c" 1>&6
11709 echo "configure:11710: checking for gss_display_status in -lgssapi_krb5" >&5
11710 ac_lib_var=`echo gssapi_krb5'_'gss_display_status | sed 'y%./+-%__p_%'`
11711 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11712   echo $ac_n "(cached) $ac_c" 1>&6
11713 else
11714   ac_save_LIBS="$LIBS"
11715 LIBS="-lgssapi_krb5  $LIBS"
11716 cat > conftest.$ac_ext <<EOF
11717 #line 11718 "configure"
11718 #include "confdefs.h"
11719 /* Override any gcc2 internal prototype to avoid an error.  */
11720 /* We use char because int might match the return type of a gcc2
11721     builtin and then its argument prototype would still apply.  */
11722 char gss_display_status();
11723
11724 int main() {
11725 gss_display_status()
11726 ; return 0; }
11727 EOF
11728 if { (eval echo configure:11729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11729   rm -rf conftest*
11730   eval "ac_cv_lib_$ac_lib_var=yes"
11731 else
11732   echo "configure: failed program was:" >&5
11733   cat conftest.$ac_ext >&5
11734   rm -rf conftest*
11735   eval "ac_cv_lib_$ac_lib_var=no"
11736 fi
11737 rm -f conftest*
11738 LIBS="$ac_save_LIBS"
11739
11740 fi
11741 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11742   echo "$ac_t""yes" 1>&6
11743   cat >> confdefs.h <<\EOF
11744 #define HAVE_GSSAPI 1
11745 EOF
11746
11747 else
11748   echo "$ac_t""no" 1>&6
11749 fi
11750
11751
11752
11753 ##################################################################
11754 # we might need the lber lib on some systems. To avoid link errors
11755 # this test must be before the libldap test
11756 echo $ac_n "checking for ber_scanf in -llber""... $ac_c" 1>&6
11757 echo "configure:11758: checking for ber_scanf in -llber" >&5
11758 ac_lib_var=`echo lber'_'ber_scanf | sed 'y%./+-%__p_%'`
11759 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11760   echo $ac_n "(cached) $ac_c" 1>&6
11761 else
11762   ac_save_LIBS="$LIBS"
11763 LIBS="-llber  $LIBS"
11764 cat > conftest.$ac_ext <<EOF
11765 #line 11766 "configure"
11766 #include "confdefs.h"
11767 /* Override any gcc2 internal prototype to avoid an error.  */
11768 /* We use char because int might match the return type of a gcc2
11769     builtin and then its argument prototype would still apply.  */
11770 char ber_scanf();
11771
11772 int main() {
11773 ber_scanf()
11774 ; return 0; }
11775 EOF
11776 if { (eval echo configure:11777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11777   rm -rf conftest*
11778   eval "ac_cv_lib_$ac_lib_var=yes"
11779 else
11780   echo "configure: failed program was:" >&5
11781   cat conftest.$ac_ext >&5
11782   rm -rf conftest*
11783   eval "ac_cv_lib_$ac_lib_var=no"
11784 fi
11785 rm -f conftest*
11786 LIBS="$ac_save_LIBS"
11787
11788 fi
11789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11790   echo "$ac_t""yes" 1>&6
11791   LIBS="$LIBS -llber"
11792 else
11793   echo "$ac_t""no" 1>&6
11794 fi
11795
11796
11797 ########################################################
11798 # now see if we can find the ldap libs in standard paths
11799 if test x$have_ldap != xyes; then
11800 echo $ac_n "checking for ldap_domain2hostlist in -lldap""... $ac_c" 1>&6
11801 echo "configure:11802: checking for ldap_domain2hostlist in -lldap" >&5
11802 ac_lib_var=`echo ldap'_'ldap_domain2hostlist | sed 'y%./+-%__p_%'`
11803 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11804   echo $ac_n "(cached) $ac_c" 1>&6
11805 else
11806   ac_save_LIBS="$LIBS"
11807 LIBS="-lldap  $LIBS"
11808 cat > conftest.$ac_ext <<EOF
11809 #line 11810 "configure"
11810 #include "confdefs.h"
11811 /* Override any gcc2 internal prototype to avoid an error.  */
11812 /* We use char because int might match the return type of a gcc2
11813     builtin and then its argument prototype would still apply.  */
11814 char ldap_domain2hostlist();
11815
11816 int main() {
11817 ldap_domain2hostlist()
11818 ; return 0; }
11819 EOF
11820 if { (eval echo configure:11821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11821   rm -rf conftest*
11822   eval "ac_cv_lib_$ac_lib_var=yes"
11823 else
11824   echo "configure: failed program was:" >&5
11825   cat conftest.$ac_ext >&5
11826   rm -rf conftest*
11827   eval "ac_cv_lib_$ac_lib_var=no"
11828 fi
11829 rm -f conftest*
11830 LIBS="$ac_save_LIBS"
11831
11832 fi
11833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11834   echo "$ac_t""yes" 1>&6
11835   LIBS="$LIBS -lldap";
11836         cat >> confdefs.h <<\EOF
11837 #define HAVE_LDAP 1
11838 EOF
11839
11840 else
11841   echo "$ac_t""no" 1>&6
11842 fi
11843
11844 fi
11845
11846 #################################################
11847 # check for automount support
11848 echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6
11849 echo "configure:11850: checking whether to use AUTOMOUNT" >&5
11850 # Check whether --with-automount or --without-automount was given.
11851 if test "${with_automount+set}" = set; then
11852   withval="$with_automount"
11853    case "$withval" in
11854   yes)
11855     echo "$ac_t""yes" 1>&6
11856     cat >> confdefs.h <<\EOF
11857 #define WITH_AUTOMOUNT 1
11858 EOF
11859
11860     ;;
11861   *)
11862     echo "$ac_t""no" 1>&6
11863     ;;
11864   esac 
11865 else
11866   echo "$ac_t""no" 1>&6
11867
11868 fi
11869
11870
11871 #################################################
11872 # check for smbmount support
11873 echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6
11874 echo "configure:11875: checking whether to use SMBMOUNT" >&5
11875 # Check whether --with-smbmount or --without-smbmount was given.
11876 if test "${with_smbmount+set}" = set; then
11877   withval="$with_smbmount"
11878    case "$withval" in
11879   yes)
11880         case "$host_os" in
11881         *linux*)
11882                 echo "$ac_t""yes" 1>&6
11883                 cat >> confdefs.h <<\EOF
11884 #define WITH_SMBMOUNT 1
11885 EOF
11886
11887                 MPROGS="bin/smbmount bin/smbmnt bin/smbumount"
11888                 ;;
11889         *)
11890                 { echo "configure: error: not on a linux system!" 1>&2; exit 1; }
11891                 ;;
11892         esac
11893     ;;
11894   *)
11895     echo "$ac_t""no" 1>&6
11896     MPROGS=
11897     ;;
11898   esac 
11899 else
11900   echo "$ac_t""no" 1>&6
11901   MPROGS=
11902
11903 fi
11904
11905
11906
11907 #################################################
11908 # check for a PAM clear-text auth, accounts, password and session support
11909 with_pam_for_crypt=no
11910 echo $ac_n "checking whether to use PAM""... $ac_c" 1>&6
11911 echo "configure:11912: checking whether to use PAM" >&5
11912 # Check whether --with-pam or --without-pam was given.
11913 if test "${with_pam+set}" = set; then
11914   withval="$with_pam"
11915    case "$withval" in
11916   yes)
11917     echo "$ac_t""yes" 1>&6
11918     cat >> confdefs.h <<\EOF
11919 #define WITH_PAM 1
11920 EOF
11921
11922     LIBS="$LIBS -lpam"
11923     with_pam_for_crypt=yes
11924     ;;
11925   *)
11926     echo "$ac_t""no" 1>&6
11927     ;;
11928   esac 
11929 else
11930   echo "$ac_t""no" 1>&6
11931
11932 fi
11933
11934
11935 # we can't build a pam module if we don't have pam.
11936 echo $ac_n "checking for pam_get_data in -lpam""... $ac_c" 1>&6
11937 echo "configure:11938: checking for pam_get_data in -lpam" >&5
11938 ac_lib_var=`echo pam'_'pam_get_data | sed 'y%./+-%__p_%'`
11939 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
11940   echo $ac_n "(cached) $ac_c" 1>&6
11941 else
11942   ac_save_LIBS="$LIBS"
11943 LIBS="-lpam  $LIBS"
11944 cat > conftest.$ac_ext <<EOF
11945 #line 11946 "configure"
11946 #include "confdefs.h"
11947 /* Override any gcc2 internal prototype to avoid an error.  */
11948 /* We use char because int might match the return type of a gcc2
11949     builtin and then its argument prototype would still apply.  */
11950 char pam_get_data();
11951
11952 int main() {
11953 pam_get_data()
11954 ; return 0; }
11955 EOF
11956 if { (eval echo configure:11957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11957   rm -rf conftest*
11958   eval "ac_cv_lib_$ac_lib_var=yes"
11959 else
11960   echo "configure: failed program was:" >&5
11961   cat conftest.$ac_ext >&5
11962   rm -rf conftest*
11963   eval "ac_cv_lib_$ac_lib_var=no"
11964 fi
11965 rm -f conftest*
11966 LIBS="$ac_save_LIBS"
11967
11968 fi
11969 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11970   echo "$ac_t""yes" 1>&6
11971   cat >> confdefs.h <<\EOF
11972 #define HAVE_LIBPAM 1
11973 EOF
11974
11975 else
11976   echo "$ac_t""no" 1>&6
11977 fi
11978
11979
11980 #################################################
11981 # check for pam_smbpass support
11982 echo $ac_n "checking whether to use pam_smbpass""... $ac_c" 1>&6
11983 echo "configure:11984: checking whether to use pam_smbpass" >&5
11984 # Check whether --with-pam_smbpass or --without-pam_smbpass was given.
11985 if test "${with_pam_smbpass+set}" = set; then
11986   withval="$with_pam_smbpass"
11987    case "$withval" in
11988   yes)
11989     echo "$ac_t""yes" 1>&6
11990
11991 # Conditions under which pam_smbpass should not be built.
11992
11993        if test x$PICFLAG = x; then
11994           echo "$ac_t""No support for PIC code - disabling pam_smbpass" 1>&6
11995           PAM_MOD=""
11996        elif test x$ac_cv_lib_pam_pam_get_data = xno; then
11997           echo "$ac_t""No libpam found -- disabling pam_smbpass" 1>&6
11998           PAM_MOD=""
11999        else
12000           PAM_MOD="bin/pam_smbpass.so"
12001        fi
12002     ;;
12003   *)
12004     echo "$ac_t""no" 1>&6
12005     ;;
12006   esac 
12007 else
12008   echo "$ac_t""no" 1>&6
12009
12010 fi
12011
12012
12013
12014 ###############################################
12015 # test for where we get crypt() from, but only
12016 # if not using PAM
12017 if test $with_pam_for_crypt = no; then
12018 for ac_func in crypt
12019 do
12020 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12021 echo "configure:12022: checking for $ac_func" >&5
12022 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
12023   echo $ac_n "(cached) $ac_c" 1>&6
12024 else
12025   cat > conftest.$ac_ext <<EOF
12026 #line 12027 "configure"
12027 #include "confdefs.h"
12028 /* System header to define __stub macros and hopefully few prototypes,
12029     which can conflict with char $ac_func(); below.  */
12030 #include <assert.h>
12031 /* Override any gcc2 internal prototype to avoid an error.  */
12032 /* We use char because int might match the return type of a gcc2
12033     builtin and then its argument prototype would still apply.  */
12034 char $ac_func();
12035
12036 int main() {
12037
12038 /* The GNU C library defines this for functions which it implements
12039     to always fail with ENOSYS.  Some functions are actually named
12040     something starting with __ and the normal name is an alias.  */
12041 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12042 choke me
12043 #else
12044 $ac_func();
12045 #endif
12046
12047 ; return 0; }
12048 EOF
12049 if { (eval echo configure:12050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12050   rm -rf conftest*
12051   eval "ac_cv_func_$ac_func=yes"
12052 else
12053   echo "configure: failed program was:" >&5
12054   cat conftest.$ac_ext >&5
12055   rm -rf conftest*
12056   eval "ac_cv_func_$ac_func=no"
12057 fi
12058 rm -f conftest*
12059 fi
12060
12061 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12062   echo "$ac_t""yes" 1>&6
12063     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12064   cat >> confdefs.h <<EOF
12065 #define $ac_tr_func 1
12066 EOF
12067  
12068 else
12069   echo "$ac_t""no" 1>&6
12070 fi
12071 done
12072
12073 if test x"$ac_cv_func_crypt" = x"no"; then
12074     echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
12075 echo "configure:12076: checking for crypt in -lcrypt" >&5
12076 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
12077 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
12078   echo $ac_n "(cached) $ac_c" 1>&6
12079 else
12080   ac_save_LIBS="$LIBS"
12081 LIBS="-lcrypt  $LIBS"
12082 cat > conftest.$ac_ext <<EOF
12083 #line 12084 "configure"
12084 #include "confdefs.h"
12085 /* Override any gcc2 internal prototype to avoid an error.  */
12086 /* We use char because int might match the return type of a gcc2
12087     builtin and then its argument prototype would still apply.  */
12088 char crypt();
12089
12090 int main() {
12091 crypt()
12092 ; return 0; }
12093 EOF
12094 if { (eval echo configure:12095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12095   rm -rf conftest*
12096   eval "ac_cv_lib_$ac_lib_var=yes"
12097 else
12098   echo "configure: failed program was:" >&5
12099   cat conftest.$ac_ext >&5
12100   rm -rf conftest*
12101   eval "ac_cv_lib_$ac_lib_var=no"
12102 fi
12103 rm -f conftest*
12104 LIBS="$ac_save_LIBS"
12105
12106 fi
12107 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
12108   echo "$ac_t""yes" 1>&6
12109   LIBS="$LIBS -lcrypt";
12110         cat >> confdefs.h <<\EOF
12111 #define HAVE_CRYPT 1
12112 EOF
12113
12114 else
12115   echo "$ac_t""no" 1>&6
12116 fi
12117
12118 fi
12119 fi
12120
12121 ##
12122 ## moved after the check for -lcrypt in order to
12123 ## ensure that the necessary libraries are included
12124 ## check checking for truncated salt.  Wrapped by the
12125 ## $with_pam_for_crypt variable as above   --jerry
12126 ##
12127 if test $with_pam_for_crypt = no; then
12128 echo $ac_n "checking for a crypt that needs truncated salt""... $ac_c" 1>&6
12129 echo "configure:12130: checking for a crypt that needs truncated salt" >&5
12130 if eval "test \"`echo '$''{'samba_cv_HAVE_TRUNCATED_SALT'+set}'`\" = set"; then
12131   echo $ac_n "(cached) $ac_c" 1>&6
12132 else
12133   
12134 if test "$cross_compiling" = yes; then
12135   samba_cv_HAVE_TRUNCATED_SALT=cross
12136 else
12137   cat > conftest.$ac_ext <<EOF
12138 #line 12139 "configure"
12139 #include "confdefs.h"
12140 #include "${srcdir-.}/tests/crypttest.c"
12141 EOF
12142 if { (eval echo configure:12143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12143 then
12144   samba_cv_HAVE_TRUNCATED_SALT=no
12145 else
12146   echo "configure: failed program was:" >&5
12147   cat conftest.$ac_ext >&5
12148   rm -fr conftest*
12149   samba_cv_HAVE_TRUNCATED_SALT=yes
12150 fi
12151 rm -fr conftest*
12152 fi
12153
12154 fi
12155
12156 echo "$ac_t""$samba_cv_HAVE_TRUNCATED_SALT" 1>&6
12157 if test x"$samba_cv_HAVE_TRUNCATED_SALT" = x"yes"; then
12158         cat >> confdefs.h <<\EOF
12159 #define HAVE_TRUNCATED_SALT 1
12160 EOF
12161
12162 fi
12163 fi
12164
12165
12166
12167 ########################################################################################
12168 ##
12169 ## TESTS FOR SAM BACKENDS.  KEEP THESE GROUPED TOGETHER
12170 ##
12171 ########################################################################################
12172
12173 ## set the with_smbpasswd_sam as the default
12174 with_smbpasswd_sam=yes
12175
12176
12177 #################################################
12178 # check for a TDB password database
12179 echo $ac_n "checking whether to use TDB SAM database""... $ac_c" 1>&6
12180 echo "configure:12181: checking whether to use TDB SAM database" >&5
12181 # Check whether --with-tdbsam or --without-tdbsam was given.
12182 if test "${with_tdbsam+set}" = set; then
12183   withval="$with_tdbsam"
12184    case "$withval" in
12185   yes)
12186     echo "$ac_t""yes" 1>&6
12187     cat >> confdefs.h <<\EOF
12188 #define WITH_TDB_SAM 1
12189 EOF
12190
12191     with_smbpasswd_sam=no
12192     ;;
12193   *)
12194     echo "$ac_t""no" 1>&6
12195     ;;
12196   esac 
12197 else
12198   echo "$ac_t""no" 1>&6
12199
12200 fi
12201
12202
12203 #################################################
12204 # check for a LDAP password database
12205 echo $ac_n "checking whether to use LDAP SAM database""... $ac_c" 1>&6
12206 echo "configure:12207: checking whether to use LDAP SAM database" >&5
12207 # Check whether --with-ldapsam or --without-ldapsam was given.
12208 if test "${with_ldapsam+set}" = set; then
12209   withval="$with_ldapsam"
12210    case "$withval" in
12211   yes)
12212     echo "$ac_t""yes" 1>&6
12213     cat >> confdefs.h <<\EOF
12214 #define WITH_LDAP_SAM 1
12215 EOF
12216
12217     LIBS="-lldap -llber $LIBS"
12218     with_smbpasswd_sam=no
12219     ;;
12220   *)
12221     echo "$ac_t""no" 1>&6
12222     ;;
12223   esac 
12224 else
12225   echo "$ac_t""no" 1>&6
12226
12227 fi
12228
12229
12230 #################################################
12231 # check for a NISPLUS password database
12232 echo $ac_n "checking whether to use NISPLUS SAM database""... $ac_c" 1>&6
12233 echo "configure:12234: checking whether to use NISPLUS SAM database" >&5
12234 # Check whether --with-nisplussam or --without-nisplussam was given.
12235 if test "${with_nisplussam+set}" = set; then
12236   withval="$with_nisplussam"
12237    case "$withval" in
12238   yes)
12239     echo "$ac_t""yes" 1>&6
12240     cat >> confdefs.h <<\EOF
12241 #define WITH_NISPLUS_SAM 1
12242 EOF
12243
12244     with_smbpasswd_sam=no
12245     ;;
12246   *)
12247     echo "$ac_t""no" 1>&6
12248     ;;
12249   esac 
12250 else
12251   echo "$ac_t""no" 1>&6
12252
12253 fi
12254
12255
12256 ################################################
12257 # This test should come last because the
12258 # smbpasswd SAM is only used if another format
12259 # has not been defined
12260 echo $ac_n "checking whether to use traditional smbpasswd file""... $ac_c" 1>&6
12261 echo "configure:12262: checking whether to use traditional smbpasswd file" >&5
12262 if test $with_smbpasswd_sam = yes; then
12263         echo "$ac_t""yes" 1>&6
12264         cat >> confdefs.h <<\EOF
12265 #define WITH_SMBPASSWD_SAM 1
12266 EOF
12267
12268 else
12269         echo "$ac_t""no" 1>&6
12270 fi
12271
12272 ########################################################################################
12273 ##
12274 ## END OF TESTS FOR SAM BACKENDS.  
12275 ##
12276 ########################################################################################
12277
12278 #################################################
12279 # check for a NISPLUS_HOME support 
12280 echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6
12281 echo "configure:12282: checking whether to use NISPLUS_HOME" >&5
12282 # Check whether --with-nisplus-home or --without-nisplus-home was given.
12283 if test "${with_nisplus_home+set}" = set; then
12284   withval="$with_nisplus_home"
12285    case "$withval" in
12286   yes)
12287     echo "$ac_t""yes" 1>&6
12288     cat >> confdefs.h <<\EOF
12289 #define WITH_NISPLUS_HOME 1
12290 EOF
12291
12292     ;;
12293   *)
12294     echo "$ac_t""no" 1>&6
12295     ;;
12296   esac 
12297 else
12298   echo "$ac_t""no" 1>&6
12299
12300 fi
12301
12302
12303 #################################################
12304 # check for the secure socket layer
12305 echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6
12306 echo "configure:12307: checking whether to use SSL" >&5
12307 # Check whether --with-ssl or --without-ssl was given.
12308 if test "${with_ssl+set}" = set; then
12309   withval="$with_ssl"
12310    case "$withval" in
12311   yes)
12312     echo "$ac_t""yes" 1>&6
12313     cat >> confdefs.h <<\EOF
12314 #define WITH_SSL 1
12315 EOF
12316
12317     withval="/usr/local/ssl"     # default
12318
12319     if test "${with_sslinc+set}" = set; then
12320
12321         withval="$with_sslinc"
12322         case "$withval" in
12323         yes|no)
12324           echo "configure: warning: --with-sslinc called without argument - will use default" 1>&w
12325           CFLAGS="-I/usr/local/ssl/include $CFLAGS"
12326         ;;
12327         * )
12328           CFLAGS="-I${withval} $CFLAGS"
12329         ;;
12330         esac
12331
12332     else
12333
12334         CFLAGS="-I/usr/local/ssl/include $CFLAGS"   
12335
12336     fi
12337
12338     if test "${with_ssllib+set}" = set; then
12339
12340         withval="$with_ssllib"
12341         case "$withval" in
12342         yes|no)
12343           echo "configure: warning: --with-ssllib called without argument - will use default" 1>&w
12344           LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12345         ;;
12346         * )
12347           LDFLAGS="-L${withval}/lib $LDFLAGS"
12348         ;;
12349         esac
12350
12351     else
12352
12353         LDFLAGS="-L/usr/local/ssl/lib $LDFLAGS"
12354
12355     fi
12356
12357     LIBS="-lssl -lcrypto $LIBS"
12358
12359 #    if test ! -d ${withval}; then
12360 #      echo "configure: error: called with --with-ssl, but ssl base directory ${withval} does not exist or is not a directory. Aborting config" 1>&2
12361 #      exit 1
12362 #    fi 
12363
12364     CFLAGS="-DHAVE_CRYPT_DECL $CFLAGS"  # Damn, SSLeay defines its own
12365
12366     ;;
12367   *)
12368     echo "$ac_t""no" 1>&6
12369     ;;
12370   esac 
12371 else
12372   echo "$ac_t""no" 1>&6
12373
12374 fi
12375
12376
12377 #################################################
12378 # check for syslog logging
12379 echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6
12380 echo "configure:12381: checking whether to use syslog logging" >&5
12381 # Check whether --with-syslog or --without-syslog was given.
12382 if test "${with_syslog+set}" = set; then
12383   withval="$with_syslog"
12384    case "$withval" in
12385   yes)
12386     echo "$ac_t""yes" 1>&6
12387     cat >> confdefs.h <<\EOF
12388 #define WITH_SYSLOG 1
12389 EOF
12390
12391     ;;
12392   *)
12393     echo "$ac_t""no" 1>&6
12394     ;;
12395   esac 
12396 else
12397   echo "$ac_t""no" 1>&6
12398
12399 fi
12400
12401
12402 #################################################
12403 # check for a shared memory profiling support
12404 echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6
12405 echo "configure:12406: checking whether to use profiling" >&5
12406 # Check whether --with-profiling-data or --without-profiling-data was given.
12407 if test "${with_profiling_data+set}" = set; then
12408   withval="$with_profiling_data"
12409    case "$withval" in
12410   yes)
12411     echo "$ac_t""yes" 1>&6
12412     cat >> confdefs.h <<\EOF
12413 #define WITH_PROFILE 1
12414 EOF
12415
12416     ;;
12417   *)
12418     echo "$ac_t""no" 1>&6
12419     ;;
12420   esac 
12421 else
12422   echo "$ac_t""no" 1>&6
12423
12424 fi
12425
12426
12427
12428 #################################################
12429 # check for experimental disk-quotas support
12430 QUOTAOBJS=smbd/noquotas.o
12431
12432 echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6
12433 echo "configure:12434: checking whether to support disk-quotas" >&5
12434 # Check whether --with-quotas or --without-quotas was given.
12435 if test "${with_quotas+set}" = set; then
12436   withval="$with_quotas"
12437    case "$withval" in
12438   yes)
12439     echo "$ac_t""yes" 1>&6
12440     case "$host_os" in
12441       *linux*)
12442         # Check for kernel 2.4.x quota braindamage...
12443         echo $ac_n "checking for linux 2.4.x quota braindamage..""... $ac_c" 1>&6
12444 echo "configure:12445: checking for linux 2.4.x quota braindamage.." >&5
12445 if eval "test \"`echo '$''{'samba_cv_linux_2_4_quota_braindamage'+set}'`\" = set"; then
12446   echo $ac_n "(cached) $ac_c" 1>&6
12447 else
12448   
12449         cat > conftest.$ac_ext <<EOF
12450 #line 12451 "configure"
12451 #include "confdefs.h"
12452 #include <stdio.h>
12453 #include <sys/types.h>
12454 #include <asm/types.h>
12455 #include <linux/quota.h>
12456 #include <mntent.h>
12457 #include <linux/unistd.h>
12458 int main() {
12459 struct mem_dqblk D;
12460 ; return 0; }
12461 EOF
12462 if { (eval echo configure:12463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12463   rm -rf conftest*
12464   samba_cv_linux_2_4_quota_braindamage=yes
12465 else
12466   echo "configure: failed program was:" >&5
12467   cat conftest.$ac_ext >&5
12468   rm -rf conftest*
12469   samba_cv_linux_2_4_quota_braindamage=no
12470 fi
12471 rm -f conftest*
12472 fi
12473
12474 echo "$ac_t""$samba_cv_linux_2_4_quota_braindamage" 1>&6
12475 if test x"$samba_cv_linux_2_4_quota_braindamage" = x"yes"; then
12476         cat >> confdefs.h <<\EOF
12477 #define LINUX_QUOTAS_2 1
12478 EOF
12479
12480 else
12481         cat >> confdefs.h <<\EOF
12482 #define LINUX_QUOTAS_1 1
12483 EOF
12484
12485 fi
12486         ;;
12487       *)
12488         ;;
12489     esac
12490     QUOTAOBJS=smbd/quotas.o
12491     cat >> confdefs.h <<\EOF
12492 #define WITH_QUOTAS 1
12493 EOF
12494
12495     ;;
12496   *)
12497     echo "$ac_t""no" 1>&6
12498     ;;
12499   esac 
12500 else
12501   echo "$ac_t""no" 1>&6
12502
12503 fi
12504
12505
12506
12507 #################################################
12508 # check for experimental utmp accounting
12509
12510 echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6
12511 echo "configure:12512: checking whether to support utmp accounting" >&5
12512 # Check whether --with-utmp or --without-utmp was given.
12513 if test "${with_utmp+set}" = set; then
12514   withval="$with_utmp"
12515    case "$withval" in
12516   yes)
12517     echo "$ac_t""yes" 1>&6
12518     cat >> confdefs.h <<\EOF
12519 #define WITH_UTMP 1
12520 EOF
12521
12522     ;;
12523   *)
12524     echo "$ac_t""no" 1>&6
12525     ;;
12526   esac 
12527 else
12528   echo "$ac_t""no" 1>&6
12529
12530 fi
12531
12532
12533 #################################################
12534 # set private directory location
12535 # Check whether --with-privatedir or --without-privatedir was given.
12536 if test "${with_privatedir+set}" = set; then
12537   withval="$with_privatedir"
12538    case "$withval" in
12539   yes|no)
12540   #
12541   # Just in case anybody calls it without argument
12542   #
12543     echo "configure: warning: --with-privatedir called without argument - will use default" 1>&2
12544     privatedir='${prefix}/private'
12545   ;;
12546   * )
12547     privatedir="$withval"
12548     ;;
12549   esac
12550   
12551 else
12552   privatedir='${prefix}/private'
12553    
12554
12555 fi
12556
12557
12558 #################################################
12559 # set lock directory location
12560 # Check whether --with-lockdir or --without-lockdir was given.
12561 if test "${with_lockdir+set}" = set; then
12562   withval="$with_lockdir"
12563    case "$withval" in
12564   yes|no)
12565   #
12566   # Just in case anybody calls it without argument
12567   #
12568     echo "configure: warning: --with-lockdir called without argument - will use default" 1>&2
12569     lockdir='$(VARDIR)/locks'
12570   ;;
12571   * )
12572     lockdir="$withval"
12573     ;;
12574   esac
12575   
12576 else
12577   lockdir='$(VARDIR)/locks'
12578    
12579
12580 fi
12581
12582
12583 #################################################
12584 # set SWAT directory location
12585 # Check whether --with-swatdir or --without-swatdir was given.
12586 if test "${with_swatdir+set}" = set; then
12587   withval="$with_swatdir"
12588    case "$withval" in
12589   yes|no)
12590   #
12591   # Just in case anybody does it
12592   #
12593     echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2
12594     swatdir='${prefix}/swat'
12595   ;;
12596   * )
12597     swatdir="$withval"
12598     ;;
12599   esac
12600   
12601 else
12602   swatdir='${prefix}/swat'
12603    
12604
12605 fi
12606
12607
12608 #################################################
12609 # choose native language(s) of man pages
12610 echo $ac_n "checking chosen man pages' language(s)""... $ac_c" 1>&6
12611 echo "configure:12612: checking chosen man pages' language(s)" >&5
12612 # Check whether --with-manpages-langs or --without-manpages-langs was given.
12613 if test "${with_manpages_langs+set}" = set; then
12614   withval="$with_manpages_langs"
12615    case "$withval" in
12616   yes|no)
12617     echo "configure: warning: --with-manpages-langs called without argument - will use default" 1>&2
12618     manlangs="en"
12619   ;;
12620   *)
12621     manlangs="$withval"
12622   ;;
12623   esac
12624
12625   echo "$ac_t""$manlangs" 1>&6
12626   manlangs=`echo $manlangs | sed "s/,/ /"`   # replacing commas with spaces to produce a list
12627   
12628 else
12629   manlangs="en"
12630   echo "$ac_t""$manlangs" 1>&6
12631   
12632
12633 fi
12634
12635
12636 #################################################
12637 # these tests are taken from the GNU fileutils package
12638 echo "checking how to get filesystem space usage" 1>&6
12639 echo "configure:12640: checking how to get filesystem space usage" >&5
12640 space=no
12641
12642 # Test for statvfs64.
12643 if test $space = no; then
12644   # SVR4
12645   echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6
12646 echo "configure:12647: checking statvfs64 function (SVR4)" >&5
12647 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs64'+set}'`\" = set"; then
12648   echo $ac_n "(cached) $ac_c" 1>&6
12649 else
12650   if test "$cross_compiling" = yes; then
12651   fu_cv_sys_stat_statvfs64=cross
12652 else
12653   cat > conftest.$ac_ext <<EOF
12654 #line 12655 "configure"
12655 #include "confdefs.h"
12656
12657 #if defined(HAVE_UNISTD_H)
12658 #include <unistd.h>
12659 #endif
12660 #include <sys/types.h>
12661 #include <sys/statvfs.h>
12662   main ()
12663   {
12664     struct statvfs64 fsd;
12665     exit (statvfs64 (".", &fsd));
12666   }
12667 EOF
12668 if { (eval echo configure:12669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12669 then
12670   fu_cv_sys_stat_statvfs64=yes
12671 else
12672   echo "configure: failed program was:" >&5
12673   cat conftest.$ac_ext >&5
12674   rm -fr conftest*
12675   fu_cv_sys_stat_statvfs64=no
12676 fi
12677 rm -fr conftest*
12678 fi
12679
12680 fi
12681
12682 echo "$ac_t""$fu_cv_sys_stat_statvfs64" 1>&6
12683   if test $fu_cv_sys_stat_statvfs64 = yes; then
12684     space=yes
12685     cat >> confdefs.h <<\EOF
12686 #define STAT_STATVFS64 1
12687 EOF
12688
12689   fi
12690 fi
12691
12692 # Perform only the link test since it seems there are no variants of the
12693 # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
12694 # because that got a false positive on SCO OSR5.  Adding the declaration
12695 # of a `struct statvfs' causes this test to fail (as it should) on such
12696 # systems.  That system is reported to work fine with STAT_STATFS4 which
12697 # is what it gets when this test fails.
12698 if test $space = no; then
12699   # SVR4
12700   echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6
12701 echo "configure:12702: checking statvfs function (SVR4)" >&5
12702 if eval "test \"`echo '$''{'fu_cv_sys_stat_statvfs'+set}'`\" = set"; then
12703   echo $ac_n "(cached) $ac_c" 1>&6
12704 else
12705   cat > conftest.$ac_ext <<EOF
12706 #line 12707 "configure"
12707 #include "confdefs.h"
12708 #include <sys/types.h>
12709 #include <sys/statvfs.h>
12710 int main() {
12711 struct statvfs fsd; statvfs (0, &fsd);
12712 ; return 0; }
12713 EOF
12714 if { (eval echo configure:12715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12715   rm -rf conftest*
12716   fu_cv_sys_stat_statvfs=yes
12717 else
12718   echo "configure: failed program was:" >&5
12719   cat conftest.$ac_ext >&5
12720   rm -rf conftest*
12721   fu_cv_sys_stat_statvfs=no
12722 fi
12723 rm -f conftest*
12724 fi
12725
12726 echo "$ac_t""$fu_cv_sys_stat_statvfs" 1>&6
12727   if test $fu_cv_sys_stat_statvfs = yes; then
12728     space=yes
12729     cat >> confdefs.h <<\EOF
12730 #define STAT_STATVFS 1
12731 EOF
12732
12733   fi
12734 fi
12735
12736 if test $space = no; then
12737   # DEC Alpha running OSF/1
12738   echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6
12739 echo "configure:12740: checking for 3-argument statfs function (DEC OSF/1)" >&5
12740   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs3_osf1'+set}'`\" = set"; then
12741   echo $ac_n "(cached) $ac_c" 1>&6
12742 else
12743   if test "$cross_compiling" = yes; then
12744   fu_cv_sys_stat_statfs3_osf1=no
12745 else
12746   cat > conftest.$ac_ext <<EOF
12747 #line 12748 "configure"
12748 #include "confdefs.h"
12749
12750 #include <sys/param.h>
12751 #include <sys/types.h>
12752 #include <sys/mount.h>
12753   main ()
12754   {
12755     struct statfs fsd;
12756     fsd.f_fsize = 0;
12757     exit (statfs (".", &fsd, sizeof (struct statfs)));
12758   }
12759 EOF
12760 if { (eval echo configure:12761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12761 then
12762   fu_cv_sys_stat_statfs3_osf1=yes
12763 else
12764   echo "configure: failed program was:" >&5
12765   cat conftest.$ac_ext >&5
12766   rm -fr conftest*
12767   fu_cv_sys_stat_statfs3_osf1=no
12768 fi
12769 rm -fr conftest*
12770 fi
12771
12772 fi
12773
12774   echo "$ac_t""$fu_cv_sys_stat_statfs3_osf1" 1>&6
12775   if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
12776     space=yes
12777     cat >> confdefs.h <<\EOF
12778 #define STAT_STATFS3_OSF1 1
12779 EOF
12780
12781   fi
12782 fi
12783
12784 if test $space = no; then
12785 # AIX
12786   echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6
12787 echo "configure:12788: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5
12788   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_bsize'+set}'`\" = set"; then
12789   echo $ac_n "(cached) $ac_c" 1>&6
12790 else
12791   if test "$cross_compiling" = yes; then
12792   fu_cv_sys_stat_statfs2_bsize=no
12793 else
12794   cat > conftest.$ac_ext <<EOF
12795 #line 12796 "configure"
12796 #include "confdefs.h"
12797
12798 #ifdef HAVE_SYS_PARAM_H
12799 #include <sys/param.h>
12800 #endif
12801 #ifdef HAVE_SYS_MOUNT_H
12802 #include <sys/mount.h>
12803 #endif
12804 #ifdef HAVE_SYS_VFS_H
12805 #include <sys/vfs.h>
12806 #endif
12807   main ()
12808   {
12809   struct statfs fsd;
12810   fsd.f_bsize = 0;
12811   exit (statfs (".", &fsd));
12812   }
12813 EOF
12814 if { (eval echo configure:12815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12815 then
12816   fu_cv_sys_stat_statfs2_bsize=yes
12817 else
12818   echo "configure: failed program was:" >&5
12819   cat conftest.$ac_ext >&5
12820   rm -fr conftest*
12821   fu_cv_sys_stat_statfs2_bsize=no
12822 fi
12823 rm -fr conftest*
12824 fi
12825
12826 fi
12827
12828   echo "$ac_t""$fu_cv_sys_stat_statfs2_bsize" 1>&6
12829   if test $fu_cv_sys_stat_statfs2_bsize = yes; then
12830     space=yes
12831     cat >> confdefs.h <<\EOF
12832 #define STAT_STATFS2_BSIZE 1
12833 EOF
12834
12835   fi
12836 fi
12837
12838 if test $space = no; then
12839 # SVR3
12840   echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6
12841 echo "configure:12842: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5
12842   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs4'+set}'`\" = set"; then
12843   echo $ac_n "(cached) $ac_c" 1>&6
12844 else
12845   if test "$cross_compiling" = yes; then
12846   fu_cv_sys_stat_statfs4=no
12847 else
12848   cat > conftest.$ac_ext <<EOF
12849 #line 12850 "configure"
12850 #include "confdefs.h"
12851 #include <sys/types.h>
12852 #include <sys/statfs.h>
12853   main ()
12854   {
12855   struct statfs fsd;
12856   exit (statfs (".", &fsd, sizeof fsd, 0));
12857   }
12858 EOF
12859 if { (eval echo configure:12860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12860 then
12861   fu_cv_sys_stat_statfs4=yes
12862 else
12863   echo "configure: failed program was:" >&5
12864   cat conftest.$ac_ext >&5
12865   rm -fr conftest*
12866   fu_cv_sys_stat_statfs4=no
12867 fi
12868 rm -fr conftest*
12869 fi
12870
12871 fi
12872
12873   echo "$ac_t""$fu_cv_sys_stat_statfs4" 1>&6
12874   if test $fu_cv_sys_stat_statfs4 = yes; then
12875     space=yes
12876     cat >> confdefs.h <<\EOF
12877 #define STAT_STATFS4 1
12878 EOF
12879
12880   fi
12881 fi
12882
12883 if test $space = no; then
12884 # 4.4BSD and NetBSD
12885   echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6
12886 echo "configure:12887: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5
12887   if eval "test \"`echo '$''{'fu_cv_sys_stat_statfs2_fsize'+set}'`\" = set"; then
12888   echo $ac_n "(cached) $ac_c" 1>&6
12889 else
12890   if test "$cross_compiling" = yes; then
12891   fu_cv_sys_stat_statfs2_fsize=no
12892 else
12893   cat > conftest.$ac_ext <<EOF
12894 #line 12895 "configure"
12895 #include "confdefs.h"
12896 #include <sys/types.h>
12897 #ifdef HAVE_SYS_PARAM_H
12898 #include <sys/param.h>
12899 #endif
12900 #ifdef HAVE_SYS_MOUNT_H
12901 #include <sys/mount.h>
12902 #endif
12903   main ()
12904   {
12905   struct statfs fsd;
12906   fsd.f_fsize = 0;
12907   exit (statfs (".", &fsd));
12908   }
12909 EOF
12910 if { (eval echo configure:12911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12911 then
12912   fu_cv_sys_stat_statfs2_fsize=yes
12913 else
12914   echo "configure: failed program was:" >&5
12915   cat conftest.$ac_ext >&5
12916   rm -fr conftest*
12917   fu_cv_sys_stat_statfs2_fsize=no
12918 fi
12919 rm -fr conftest*
12920 fi
12921
12922 fi
12923
12924   echo "$ac_t""$fu_cv_sys_stat_statfs2_fsize" 1>&6
12925   if test $fu_cv_sys_stat_statfs2_fsize = yes; then
12926     space=yes
12927     cat >> confdefs.h <<\EOF
12928 #define STAT_STATFS2_FSIZE 1
12929 EOF
12930
12931   fi
12932 fi
12933
12934 if test $space = no; then
12935   # Ultrix
12936   echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6
12937 echo "configure:12938: checking for two-argument statfs with struct fs_data (Ultrix)" >&5
12938   if eval "test \"`echo '$''{'fu_cv_sys_stat_fs_data'+set}'`\" = set"; then
12939   echo $ac_n "(cached) $ac_c" 1>&6
12940 else
12941   if test "$cross_compiling" = yes; then
12942   fu_cv_sys_stat_fs_data=no
12943 else
12944   cat > conftest.$ac_ext <<EOF
12945 #line 12946 "configure"
12946 #include "confdefs.h"
12947 #include <sys/types.h>
12948 #ifdef HAVE_SYS_PARAM_H
12949 #include <sys/param.h>
12950 #endif
12951 #ifdef HAVE_SYS_MOUNT_H
12952 #include <sys/mount.h>
12953 #endif
12954 #ifdef HAVE_SYS_FS_TYPES_H
12955 #include <sys/fs_types.h>
12956 #endif
12957   main ()
12958   {
12959   struct fs_data fsd;
12960   /* Ultrix's statfs returns 1 for success,
12961      0 for not mounted, -1 for failure.  */
12962   exit (statfs (".", &fsd) != 1);
12963   }
12964 EOF
12965 if { (eval echo configure:12966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12966 then
12967   fu_cv_sys_stat_fs_data=yes
12968 else
12969   echo "configure: failed program was:" >&5
12970   cat conftest.$ac_ext >&5
12971   rm -fr conftest*
12972   fu_cv_sys_stat_fs_data=no
12973 fi
12974 rm -fr conftest*
12975 fi
12976
12977 fi
12978
12979   echo "$ac_t""$fu_cv_sys_stat_fs_data" 1>&6
12980   if test $fu_cv_sys_stat_fs_data = yes; then
12981     space=yes
12982     cat >> confdefs.h <<\EOF
12983 #define STAT_STATFS2_FS_DATA 1
12984 EOF
12985
12986   fi
12987 fi
12988
12989 #
12990 # As a gating factor for large file support, in order to
12991 # use <4GB files we must have the following minimal support
12992 # available.
12993 # long long, and a 64 bit off_t or off64_t.
12994 # If we don't have all of these then disable large
12995 # file support.
12996 #
12997 echo $ac_n "checking if large file support can be enabled""... $ac_c" 1>&6
12998 echo "configure:12999: checking if large file support can be enabled" >&5
12999 cat > conftest.$ac_ext <<EOF
13000 #line 13001 "configure"
13001 #include "confdefs.h"
13002
13003 #if defined(HAVE_LONGLONG) && (defined(HAVE_OFF64_T) || (defined(SIZEOF_OFF_T) && (SIZEOF_OFF_T == 8)))
13004 #include <sys/types.h>
13005 #else
13006 __COMPILE_ERROR_
13007 #endif
13008
13009 int main() {
13010 int i
13011 ; return 0; }
13012 EOF
13013 if { (eval echo configure:13014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13014   rm -rf conftest*
13015   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=yes
13016 else
13017   echo "configure: failed program was:" >&5
13018   cat conftest.$ac_ext >&5
13019   rm -rf conftest*
13020   samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT=no
13021 fi
13022 rm -f conftest*
13023 if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
13024     cat >> confdefs.h <<\EOF
13025 #define HAVE_EXPLICIT_LARGEFILE_SUPPORT 1
13026 EOF
13027
13028 fi
13029 echo "$ac_t""$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" 1>&6
13030
13031 # Check whether --with-spinlocks or --without-spinlocks was given.
13032 if test "${with_spinlocks+set}" = set; then
13033   withval="$with_spinlocks"
13034   :
13035 fi
13036
13037 if test "x$with_spinlocks" = "xyes"; then
13038     cat >> confdefs.h <<\EOF
13039 #define USE_SPINLOCKS 1
13040 EOF
13041
13042
13043     case "$host_cpu" in
13044         sparc)
13045             cat >> confdefs.h <<\EOF
13046 #define SPARC_SPINLOCKS 1
13047 EOF
13048
13049             ;;
13050
13051         i386|i486|i586|i686)
13052             cat >> confdefs.h <<\EOF
13053 #define INTEL_SPINLOCKS 1
13054 EOF
13055
13056             ;;
13057
13058         mips)
13059             cat >> confdefs.h <<\EOF
13060 #define MIPS_SPINLOCKS 1
13061 EOF
13062
13063             ;;
13064
13065         powerpc)
13066             cat >> confdefs.h <<\EOF
13067 #define POWERPC_SPINLOCKS 1
13068 EOF
13069
13070             ;;
13071     esac
13072 fi
13073
13074 #################################################
13075 # check for ACL support
13076
13077 echo $ac_n "checking whether to support ACLs""... $ac_c" 1>&6
13078 echo "configure:13079: checking whether to support ACLs" >&5
13079 # Check whether --with-acl-support or --without-acl-support was given.
13080 if test "${with_acl_support+set}" = set; then
13081   withval="$with_acl_support"
13082    case "$withval" in
13083   yes)
13084
13085         case "$host_os" in
13086         *sysv5*)
13087                 echo "$ac_t""Using UnixWare ACLs" 1>&6
13088                 cat >> confdefs.h <<\EOF
13089 #define HAVE_UNIXWARE_ACLS 1
13090 EOF
13091
13092                 ;;
13093         *solaris*)
13094                 echo "$ac_t""Using solaris ACLs" 1>&6
13095                 cat >> confdefs.h <<\EOF
13096 #define HAVE_SOLARIS_ACLS 1
13097 EOF
13098
13099                 ;;
13100         *hpux*)
13101                 echo "$ac_t""Using HPUX ACLs" 1>&6
13102                 cat >> confdefs.h <<\EOF
13103 #define HAVE_HPUX_ACLS 1
13104 EOF
13105
13106                 ;;
13107         *irix*)
13108                 echo "$ac_t""Using IRIX ACLs" 1>&6
13109                 cat >> confdefs.h <<\EOF
13110 #define HAVE_IRIX_ACLS 1
13111 EOF
13112
13113                 ;;
13114         *aix*)
13115                 echo "$ac_t""Using AIX ACLs" 1>&6
13116                 cat >> confdefs.h <<\EOF
13117 #define HAVE_AIX_ACLS 1
13118 EOF
13119
13120                 ;;
13121         *osf*)
13122                 echo "$ac_t""Using Tru64 ACLs" 1>&6
13123                 cat >> confdefs.h <<\EOF
13124 #define HAVE_TRU64_ACLS 1
13125 EOF
13126
13127                 LIBS="$LIBS -lpacl"
13128                 ;;
13129         *)
13130                 echo $ac_n "checking for acl_get_file in -lacl""... $ac_c" 1>&6
13131 echo "configure:13132: checking for acl_get_file in -lacl" >&5
13132 ac_lib_var=`echo acl'_'acl_get_file | sed 'y%./+-%__p_%'`
13133 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13134   echo $ac_n "(cached) $ac_c" 1>&6
13135 else
13136   ac_save_LIBS="$LIBS"
13137 LIBS="-lacl  $LIBS"
13138 cat > conftest.$ac_ext <<EOF
13139 #line 13140 "configure"
13140 #include "confdefs.h"
13141 /* Override any gcc2 internal prototype to avoid an error.  */
13142 /* We use char because int might match the return type of a gcc2
13143     builtin and then its argument prototype would still apply.  */
13144 char acl_get_file();
13145
13146 int main() {
13147 acl_get_file()
13148 ; return 0; }
13149 EOF
13150 if { (eval echo configure:13151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13151   rm -rf conftest*
13152   eval "ac_cv_lib_$ac_lib_var=yes"
13153 else
13154   echo "configure: failed program was:" >&5
13155   cat conftest.$ac_ext >&5
13156   rm -rf conftest*
13157   eval "ac_cv_lib_$ac_lib_var=no"
13158 fi
13159 rm -f conftest*
13160 LIBS="$ac_save_LIBS"
13161
13162 fi
13163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13164   echo "$ac_t""yes" 1>&6
13165     ac_tr_lib=HAVE_LIB`echo acl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13166     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13167   cat >> confdefs.h <<EOF
13168 #define $ac_tr_lib 1
13169 EOF
13170
13171   LIBS="-lacl $LIBS"
13172
13173 else
13174   echo "$ac_t""no" 1>&6
13175 fi
13176
13177                 echo $ac_n "checking for ACL support""... $ac_c" 1>&6
13178 echo "configure:13179: checking for ACL support" >&5
13179 if eval "test \"`echo '$''{'samba_cv_HAVE_POSIX_ACLS'+set}'`\" = set"; then
13180   echo $ac_n "(cached) $ac_c" 1>&6
13181 else
13182   
13183                 cat > conftest.$ac_ext <<EOF
13184 #line 13185 "configure"
13185 #include "confdefs.h"
13186 #include <sys/types.h>
13187 #include <sys/acl.h>
13188 int main() {
13189  acl_t acl; int entry_id; acl_entry_t *entry_p; return acl_get_entry( acl, entry_id, entry_p);
13190 ; return 0; }
13191 EOF
13192 if { (eval echo configure:13193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13193   rm -rf conftest*
13194   samba_cv_HAVE_POSIX_ACLS=yes
13195 else
13196   echo "configure: failed program was:" >&5
13197   cat conftest.$ac_ext >&5
13198   rm -rf conftest*
13199   samba_cv_HAVE_POSIX_ACLS=no
13200 fi
13201 rm -f conftest*
13202 fi
13203
13204 echo "$ac_t""$samba_cv_HAVE_POSIX_ACLS" 1>&6
13205                         if test x"$samba_cv_HAVE_POSIX_ACLS" = x"yes"; then
13206                                 echo "$ac_t""Using posix ACLs" 1>&6
13207                                 cat >> confdefs.h <<\EOF
13208 #define HAVE_POSIX_ACLS 1
13209 EOF
13210
13211                                 echo $ac_n "checking for acl_get_perm_np""... $ac_c" 1>&6
13212 echo "configure:13213: checking for acl_get_perm_np" >&5
13213 if eval "test \"`echo '$''{'samba_cv_HAVE_ACL_GET_PERM_NP'+set}'`\" = set"; then
13214   echo $ac_n "(cached) $ac_c" 1>&6
13215 else
13216   
13217                                 cat > conftest.$ac_ext <<EOF
13218 #line 13219 "configure"
13219 #include "confdefs.h"
13220 #include <sys/types.h>
13221 #include <sys/acl.h>
13222 int main() {
13223  acl_permset_t permset_d; acl_perm_t perm; return acl_get_perm_np( permset_d, perm);
13224 ; return 0; }
13225 EOF
13226 if { (eval echo configure:13227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13227   rm -rf conftest*
13228   samba_cv_HAVE_ACL_GET_PERM_NP=yes
13229 else
13230   echo "configure: failed program was:" >&5
13231   cat conftest.$ac_ext >&5
13232   rm -rf conftest*
13233   samba_cv_HAVE_ACL_GET_PERM_NP=no
13234 fi
13235 rm -f conftest*
13236 fi
13237
13238 echo "$ac_t""$samba_cv_HAVE_ACL_GET_PERM_NP" 1>&6
13239                                 if test x"$samba_cv_HAVE_ACL_GET_PERM_NP" = x"yes"; then
13240                                         cat >> confdefs.h <<\EOF
13241 #define HAVE_ACL_GET_PERM_NP 1
13242 EOF
13243
13244                                 fi
13245                         fi
13246             ;;
13247         esac
13248         ;;
13249   *)
13250     echo "$ac_t""no" 1>&6
13251     cat >> confdefs.h <<\EOF
13252 #define HAVE_NO_ACLS 1
13253 EOF
13254
13255     ;;
13256   esac 
13257 else
13258   cat >> confdefs.h <<\EOF
13259 #define HAVE_NO_ACLS 1
13260 EOF
13261
13262   echo "$ac_t""no" 1>&6
13263
13264 fi
13265
13266
13267 #################################################
13268 # Check whether winbind is supported on this platform.  If so we need to
13269 # build and install client programs (WINBIND_TARGETS), sbin programs
13270 # (WINBIND_STARGETS) and shared libraries (WINBIND_LTARGETS).
13271
13272 echo $ac_n "checking whether to build winbind""... $ac_c" 1>&6
13273 echo "configure:13274: checking whether to build winbind" >&5
13274
13275 # Initially, the value of $host_os decides whether winbind is supported
13276
13277 case "$host_os" in 
13278         *linux*|*solaris*|*irix*)
13279                 HAVE_WINBIND=yes
13280                 ;;
13281         *)
13282                 HAVE_WINBIND=no
13283                 winbind_no_reason=", unsupported on $host_os"
13284                 ;;
13285 esac
13286
13287 # Check the setting of --with-winbindd
13288
13289 # Check whether --with-winbind or --without-winbind was given.
13290 if test "${with_winbind+set}" = set; then
13291   withval="$with_winbind"
13292    
13293   case "$withval" in
13294         yes)
13295                 HAVE_WINBIND=yes
13296                 ;;
13297         no)
13298                 HAVE_WINBIND=no
13299                 winbind_reason=""
13300                 ;;
13301   esac 
13302 fi
13303
13304
13305 # We need unix domain sockets for winbind
13306
13307 if test x"$HAVE_WINBIND" = x"yes"; then
13308         if test x"$samba_cv_unixsocket" = x"no"; then
13309                 winbind_no_reason=", no unix domain socket support on $host_os"
13310                 HAVE_WINBIND=no
13311         fi
13312 fi
13313
13314 # Display test results
13315
13316 if test x"$HAVE_WINBIND" = x"yes"; then
13317
13318         echo "$ac_t""yes" 1>&6
13319
13320         WINBIND_TARGETS="bin/wbinfo"
13321         WINBIND_STARGETS="bin/winbindd"
13322         WINBIND_LTARGETS="nsswitch/libnss_winbind.so"
13323         case "$with_pam" in
13324                 yes)
13325                         WINBIND_PAM_TARGETS="nsswitch/pam_winbind.so"
13326                 ;;
13327         esac
13328 else
13329         echo "$ac_t""no$winbind_no_reason" 1>&6
13330
13331         WINBIND_TARGETS=""
13332         WINBIND_STARGETS=""
13333         WINBIND_LTARGETS=""
13334         WINBIND_PAM_PROGS=""
13335 fi
13336
13337 # Substitution time!
13338
13339
13340
13341
13342
13343
13344 #################################################
13345 # Check to see if we should use the included popt 
13346
13347 # Check whether --with-included-popt or --without-included-popt was given.
13348 if test "${with_included_popt+set}" = set; then
13349   withval="$with_included_popt"
13350    
13351   case "$withval" in
13352         yes)
13353                 INCLUDED_POPT=yes
13354                 ;;
13355         no)
13356                 INCLUDED_POPT=no
13357                 ;;
13358   esac 
13359 fi
13360
13361 if test x"$INCLUDED_POPT" != x"yes"; then
13362     echo $ac_n "checking for poptGetContext in -lpopt""... $ac_c" 1>&6
13363 echo "configure:13364: checking for poptGetContext in -lpopt" >&5
13364 ac_lib_var=`echo popt'_'poptGetContext | sed 'y%./+-%__p_%'`
13365 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
13366   echo $ac_n "(cached) $ac_c" 1>&6
13367 else
13368   ac_save_LIBS="$LIBS"
13369 LIBS="-lpopt  $LIBS"
13370 cat > conftest.$ac_ext <<EOF
13371 #line 13372 "configure"
13372 #include "confdefs.h"
13373 /* Override any gcc2 internal prototype to avoid an error.  */
13374 /* We use char because int might match the return type of a gcc2
13375     builtin and then its argument prototype would still apply.  */
13376 char poptGetContext();
13377
13378 int main() {
13379 poptGetContext()
13380 ; return 0; }
13381 EOF
13382 if { (eval echo configure:13383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13383   rm -rf conftest*
13384   eval "ac_cv_lib_$ac_lib_var=yes"
13385 else
13386   echo "configure: failed program was:" >&5
13387   cat conftest.$ac_ext >&5
13388   rm -rf conftest*
13389   eval "ac_cv_lib_$ac_lib_var=no"
13390 fi
13391 rm -f conftest*
13392 LIBS="$ac_save_LIBS"
13393
13394 fi
13395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
13396   echo "$ac_t""yes" 1>&6
13397   INCLUDED_POPT=no
13398 else
13399   echo "$ac_t""no" 1>&6
13400 INCLUDED_POPT=yes
13401 fi
13402
13403 fi
13404
13405 echo $ac_n "checking whether to use included popt""... $ac_c" 1>&6
13406 echo "configure:13407: checking whether to use included popt" >&5
13407 if test x"$INCLUDED_POPT" = x"yes"; then
13408     echo "$ac_t""$srcdir/popt" 1>&6
13409     BUILD_POPT='$(POPT_OBJS)'
13410     FLAGS1="-I$srcdir/popt"
13411 else
13412     echo "$ac_t""no" 1>&6
13413     LIBS="$LIBS -lpopt"
13414 fi
13415
13416
13417
13418 #################################################
13419 # final configure stuff
13420
13421 echo "checking configure summary"
13422 if test "$cross_compiling" = yes; then
13423   :
13424 else
13425   cat > conftest.$ac_ext <<EOF
13426 #line 13427 "configure"
13427 #include "confdefs.h"
13428 #include "${srcdir-.}/tests/summary.c"
13429 EOF
13430 if { (eval echo configure:13431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13431 then
13432   echo "configure OK";
13433 else
13434   echo "configure: failed program was:" >&5
13435   cat conftest.$ac_ext >&5
13436   rm -fr conftest*
13437   { echo "configure: error: summary failure. Aborting config" 1>&2; exit 1; }
13438 fi
13439 rm -fr conftest*
13440 fi
13441
13442
13443 builddir=`pwd`
13444
13445
13446 trap '' 1 2 15
13447 cat > confcache <<\EOF
13448 # This file is a shell script that caches the results of configure
13449 # tests run on this system so they can be shared between configure
13450 # scripts and configure runs.  It is not useful on other systems.
13451 # If it contains results you don't want to keep, you may remove or edit it.
13452 #
13453 # By default, configure uses ./config.cache as the cache file,
13454 # creating it if it does not exist already.  You can give configure
13455 # the --cache-file=FILE option to use a different cache file; that is
13456 # what configure does when it calls configure scripts in
13457 # subdirectories, so they share the cache.
13458 # Giving --cache-file=/dev/null disables caching, for debugging configure.
13459 # config.status only pays attention to the cache file if you give it the
13460 # --recheck option to rerun configure.
13461 #
13462 EOF
13463 # The following way of writing the cache mishandles newlines in values,
13464 # but we know of no workaround that is simple, portable, and efficient.
13465 # So, don't put newlines in cache variables' values.
13466 # Ultrix sh set writes to stderr and can't be redirected directly,
13467 # and sets the high bit in the cache file unless we assign to the vars.
13468 (set) 2>&1 |
13469   case `(ac_space=' '; set | grep ac_space) 2>&1` in
13470   *ac_space=\ *)
13471     # `set' does not quote correctly, so add quotes (double-quote substitution
13472     # turns \\\\ into \\, and sed turns \\ into \).
13473     sed -n \
13474       -e "s/'/'\\\\''/g" \
13475       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
13476     ;;
13477   *)
13478     # `set' quotes correctly as required by POSIX, so do not add quotes.
13479     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
13480     ;;
13481   esac >> confcache
13482 if cmp -s $cache_file confcache; then
13483   :
13484 else
13485   if test -w $cache_file; then
13486     echo "updating cache $cache_file"
13487     cat confcache > $cache_file
13488   else
13489     echo "not updating unwritable cache $cache_file"
13490   fi
13491 fi
13492 rm -f confcache
13493
13494 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13495
13496 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13497 # Let make expand exec_prefix.
13498 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13499
13500 # Any assignment to VPATH causes Sun make to only execute
13501 # the first set of double-colon rules, so remove it if not needed.
13502 # If there is a colon in the path, we need to keep it.
13503 if test "x$srcdir" = x.; then
13504   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13505 fi
13506
13507 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13508
13509 DEFS=-DHAVE_CONFIG_H
13510
13511 # Without the "./", some shells look in PATH for config.status.
13512 : ${CONFIG_STATUS=./config.status}
13513
13514 echo creating $CONFIG_STATUS
13515 rm -f $CONFIG_STATUS
13516 cat > $CONFIG_STATUS <<EOF
13517 #! /bin/sh
13518 # Generated automatically by configure.
13519 # Run this file to recreate the current configuration.
13520 # This directory was configured as follows,
13521 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13522 #
13523 # $0 $ac_configure_args
13524 #
13525 # Compiler output produced by configure, useful for debugging
13526 # configure, is in ./config.log if it exists.
13527
13528 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13529 for ac_option
13530 do
13531   case "\$ac_option" in
13532   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13533     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13534     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13535   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13536     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13537     exit 0 ;;
13538   -help | --help | --hel | --he | --h)
13539     echo "\$ac_cs_usage"; exit 0 ;;
13540   *) echo "\$ac_cs_usage"; exit 1 ;;
13541   esac
13542 done
13543
13544 ac_given_srcdir=$srcdir
13545 ac_given_INSTALL="$INSTALL"
13546
13547 trap 'rm -fr `echo "include/stamp-h Makefile include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13548 EOF
13549 cat >> $CONFIG_STATUS <<EOF
13550
13551 # Protect against being on the right side of a sed subst in config.status.
13552 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13553  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13554 $ac_vpsub
13555 $extrasub
13556 s%@SHELL@%$SHELL%g
13557 s%@CFLAGS@%$CFLAGS%g
13558 s%@CPPFLAGS@%$CPPFLAGS%g
13559 s%@CXXFLAGS@%$CXXFLAGS%g
13560 s%@FFLAGS@%$FFLAGS%g
13561 s%@DEFS@%$DEFS%g
13562 s%@LDFLAGS@%$LDFLAGS%g
13563 s%@LIBS@%$LIBS%g
13564 s%@exec_prefix@%$exec_prefix%g
13565 s%@prefix@%$prefix%g
13566 s%@program_transform_name@%$program_transform_name%g
13567 s%@bindir@%$bindir%g
13568 s%@sbindir@%$sbindir%g
13569 s%@libexecdir@%$libexecdir%g
13570 s%@datadir@%$datadir%g
13571 s%@sysconfdir@%$sysconfdir%g
13572 s%@sharedstatedir@%$sharedstatedir%g
13573 s%@localstatedir@%$localstatedir%g
13574 s%@libdir@%$libdir%g
13575 s%@includedir@%$includedir%g
13576 s%@oldincludedir@%$oldincludedir%g
13577 s%@infodir@%$infodir%g
13578 s%@mandir@%$mandir%g
13579 s%@RUNPROG@%$RUNPROG%g
13580 s%@MPROGS@%$MPROGS%g
13581 s%@LDSHFLAGS@%$LDSHFLAGS%g
13582 s%@SHLD@%$SHLD%g
13583 s%@HOST_OS@%$HOST_OS%g
13584 s%@PAM_MOD@%$PAM_MOD%g
13585 s%@WRAP@%$WRAP%g
13586 s%@WRAP32@%$WRAP32%g
13587 s%@PICFLAG@%$PICFLAG%g
13588 s%@PICSUFFIX@%$PICSUFFIX%g
13589 s%@POBAD_CC@%$POBAD_CC%g
13590 s%@SHLIBEXT@%$SHLIBEXT%g
13591 s%@LIBSMBCLIENT_SHARED@%$LIBSMBCLIENT_SHARED%g
13592 s%@CC@%$CC%g
13593 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13594 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13595 s%@INSTALL_DATA@%$INSTALL_DATA%g
13596 s%@AWK@%$AWK%g
13597 s%@BROKEN_CC@%$BROKEN_CC%g
13598 s%@host@%$host%g
13599 s%@host_alias@%$host_alias%g
13600 s%@host_cpu@%$host_cpu%g
13601 s%@host_vendor@%$host_vendor%g
13602 s%@host_os@%$host_os%g
13603 s%@target@%$target%g
13604 s%@target_alias@%$target_alias%g
13605 s%@target_cpu@%$target_cpu%g
13606 s%@target_vendor@%$target_vendor%g
13607 s%@target_os@%$target_os%g
13608 s%@build@%$build%g
13609 s%@build_alias@%$build_alias%g
13610 s%@build_cpu@%$build_cpu%g
13611 s%@build_vendor@%$build_vendor%g
13612 s%@build_os@%$build_os%g
13613 s%@CPP@%$CPP%g
13614 s%@LIBOBJS@%$LIBOBJS%g
13615 s%@TERMLIBS@%$TERMLIBS%g
13616 s%@TERMLDFLAGS@%$TERMLDFLAGS%g
13617 s%@ROFF@%$ROFF%g
13618 s%@QUOTAOBJS@%$QUOTAOBJS%g
13619 s%@privatedir@%$privatedir%g
13620 s%@lockdir@%$lockdir%g
13621 s%@swatdir@%$swatdir%g
13622 s%@manlangs@%$manlangs%g
13623 s%@WINBIND_TARGETS@%$WINBIND_TARGETS%g
13624 s%@WINBIND_STARGETS@%$WINBIND_STARGETS%g
13625 s%@WINBIND_LTARGETS@%$WINBIND_LTARGETS%g
13626 s%@WINBIND_PAM_TARGETS@%$WINBIND_PAM_TARGETS%g
13627 s%@BUILD_POPT@%$BUILD_POPT%g
13628 s%@FLAGS1@%$FLAGS1%g
13629 s%@builddir@%$builddir%g
13630
13631 CEOF
13632 EOF
13633
13634 cat >> $CONFIG_STATUS <<\EOF
13635
13636 # Split the substitutions into bite-sized pieces for seds with
13637 # small command number limits, like on Digital OSF/1 and HP-UX.
13638 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13639 ac_file=1 # Number of current file.
13640 ac_beg=1 # First line for current file.
13641 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13642 ac_more_lines=:
13643 ac_sed_cmds=""
13644 while $ac_more_lines; do
13645   if test $ac_beg -gt 1; then
13646     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13647   else
13648     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13649   fi
13650   if test ! -s conftest.s$ac_file; then
13651     ac_more_lines=false
13652     rm -f conftest.s$ac_file
13653   else
13654     if test -z "$ac_sed_cmds"; then
13655       ac_sed_cmds="sed -f conftest.s$ac_file"
13656     else
13657       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13658     fi
13659     ac_file=`expr $ac_file + 1`
13660     ac_beg=$ac_end
13661     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13662   fi
13663 done
13664 if test -z "$ac_sed_cmds"; then
13665   ac_sed_cmds=cat
13666 fi
13667 EOF
13668
13669 cat >> $CONFIG_STATUS <<EOF
13670
13671 CONFIG_FILES=\${CONFIG_FILES-"include/stamp-h Makefile"}
13672 EOF
13673 cat >> $CONFIG_STATUS <<\EOF
13674 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13675   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13676   case "$ac_file" in
13677   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13678        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13679   *) ac_file_in="${ac_file}.in" ;;
13680   esac
13681
13682   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13683
13684   # Remove last slash and all that follows it.  Not all systems have dirname.
13685   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13686   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13687     # The file is in a subdirectory.
13688     test ! -d "$ac_dir" && mkdir "$ac_dir"
13689     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13690     # A "../" for each directory in $ac_dir_suffix.
13691     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13692   else
13693     ac_dir_suffix= ac_dots=
13694   fi
13695
13696   case "$ac_given_srcdir" in
13697   .)  srcdir=.
13698       if test -z "$ac_dots"; then top_srcdir=.
13699       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13700   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13701   *) # Relative path.
13702     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13703     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13704   esac
13705
13706   case "$ac_given_INSTALL" in
13707   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13708   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13709   esac
13710
13711   echo creating "$ac_file"
13712   rm -f "$ac_file"
13713   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13714   case "$ac_file" in
13715   *Makefile*) ac_comsub="1i\\
13716 # $configure_input" ;;
13717   *) ac_comsub= ;;
13718   esac
13719
13720   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13721   sed -e "$ac_comsub
13722 s%@configure_input@%$configure_input%g
13723 s%@srcdir@%$srcdir%g
13724 s%@top_srcdir@%$top_srcdir%g
13725 s%@INSTALL@%$INSTALL%g
13726 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13727 fi; done
13728 rm -f conftest.s*
13729
13730 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13731 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13732 #
13733 # ac_d sets the value in "#define NAME VALUE" lines.
13734 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13735 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13736 ac_dC='\3'
13737 ac_dD='%g'
13738 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13739 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13740 ac_uB='\([      ]\)%\1#\2define\3'
13741 ac_uC=' '
13742 ac_uD='\4%g'
13743 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13744 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13745 ac_eB='$%\1#\2define\3'
13746 ac_eC=' '
13747 ac_eD='%g'
13748
13749 if test "${CONFIG_HEADERS+set}" != set; then
13750 EOF
13751 cat >> $CONFIG_STATUS <<EOF
13752   CONFIG_HEADERS="include/config.h"
13753 EOF
13754 cat >> $CONFIG_STATUS <<\EOF
13755 fi
13756 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13757   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13758   case "$ac_file" in
13759   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13760        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13761   *) ac_file_in="${ac_file}.in" ;;
13762   esac
13763
13764   echo creating $ac_file
13765
13766   rm -f conftest.frag conftest.in conftest.out
13767   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13768   cat $ac_file_inputs > conftest.in
13769
13770 EOF
13771
13772 # Transform confdefs.h into a sed script conftest.vals that substitutes
13773 # the proper values into config.h.in to produce config.h.  And first:
13774 # Protect against being on the right side of a sed subst in config.status.
13775 # Protect against being in an unquoted here document in config.status.
13776 rm -f conftest.vals
13777 cat > conftest.hdr <<\EOF
13778 s/[\\&%]/\\&/g
13779 s%[\\$`]%\\&%g
13780 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13781 s%ac_d%ac_u%gp
13782 s%ac_u%ac_e%gp
13783 EOF
13784 sed -n -f conftest.hdr confdefs.h > conftest.vals
13785 rm -f conftest.hdr
13786
13787 # This sed command replaces #undef with comments.  This is necessary, for
13788 # example, in the case of _POSIX_SOURCE, which is predefined and required
13789 # on some systems where configure will not decide to define it.
13790 cat >> conftest.vals <<\EOF
13791 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13792 EOF
13793
13794 # Break up conftest.vals because some shells have a limit on
13795 # the size of here documents, and old seds have small limits too.
13796
13797 rm -f conftest.tail
13798 while :
13799 do
13800   ac_lines=`grep -c . conftest.vals`
13801   # grep -c gives empty output for an empty file on some AIX systems.
13802   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13803   # Write a limited-size here document to conftest.frag.
13804   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13805   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13806   echo 'CEOF
13807   sed -f conftest.frag conftest.in > conftest.out
13808   rm -f conftest.in
13809   mv conftest.out conftest.in
13810 ' >> $CONFIG_STATUS
13811   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13812   rm -f conftest.vals
13813   mv conftest.tail conftest.vals
13814 done
13815 rm -f conftest.vals
13816
13817 cat >> $CONFIG_STATUS <<\EOF
13818   rm -f conftest.frag conftest.h
13819   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13820   cat conftest.in >> conftest.h
13821   rm -f conftest.in
13822   if cmp -s $ac_file conftest.h 2>/dev/null; then
13823     echo "$ac_file is unchanged"
13824     rm -f conftest.h
13825   else
13826     # Remove last slash and all that follows it.  Not all systems have dirname.
13827       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13828       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13829       # The file is in a subdirectory.
13830       test ! -d "$ac_dir" && mkdir "$ac_dir"
13831     fi
13832     rm -f $ac_file
13833     mv conftest.h $ac_file
13834   fi
13835 fi; done
13836
13837 EOF
13838 cat >> $CONFIG_STATUS <<EOF
13839
13840 EOF
13841 cat >> $CONFIG_STATUS <<\EOF
13842
13843 exit 0
13844 EOF
13845 chmod +x $CONFIG_STATUS
13846 rm -fr confdefs* $ac_clean_files
13847 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
13848
13849
13850 #################################################
13851 # Print very concise instructions on building/use
13852 if test "x$enable_dmalloc" = xyes
13853 then
13854         echo "$ac_t""Note: The dmalloc debug library will be included." 1>&6
13855         echo "$ac_t""      Use the \"dmalloc\" command to turn it on." 1>&6
13856 fi