import from HEAD:
[freeradius.git] / src / modules / rlm_ldap / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.10.2.4 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by GNU Autoconf 2.59.
5 #
6 # Copyright (C) 2003 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9 ## --------------------- ##
10 ## M4sh Initialization.  ##
11 ## --------------------- ##
12
13 # Be Bourne compatible
14 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15   emulate sh
16   NULLCMD=:
17   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18   # is contrary to our usage.  Disable this feature.
19   alias -g '${1+"$@"}'='"$@"'
20 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21   set -o posix
22 fi
23 DUALCASE=1; export DUALCASE # for MKS sh
24
25 # Support unset when possible.
26 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27   as_unset=unset
28 else
29   as_unset=false
30 fi
31
32
33 # Work around bugs in pre-3.0 UWIN ksh.
34 $as_unset ENV MAIL MAILPATH
35 PS1='$ '
36 PS2='> '
37 PS4='+ '
38
39 # NLS nuisances.
40 for as_var in \
41   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
42   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
43   LC_TELEPHONE LC_TIME
44 do
45   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
46     eval $as_var=C; export $as_var
47   else
48     $as_unset $as_var
49   fi
50 done
51
52 # Required to use basename.
53 if expr a : '\(a\)' >/dev/null 2>&1; then
54   as_expr=expr
55 else
56   as_expr=false
57 fi
58
59 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
60   as_basename=basename
61 else
62   as_basename=false
63 fi
64
65
66 # Name of the executable.
67 as_me=`$as_basename "$0" ||
68 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
69          X"$0" : 'X\(//\)$' \| \
70          X"$0" : 'X\(/\)$' \| \
71          .     : '\(.\)' 2>/dev/null ||
72 echo X/"$0" |
73     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
74           /^X\/\(\/\/\)$/{ s//\1/; q; }
75           /^X\/\(\/\).*/{ s//\1/; q; }
76           s/.*/./; q'`
77
78
79 # PATH needs CR, and LINENO needs CR and PATH.
80 # Avoid depending upon Character Ranges.
81 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
82 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
83 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
84 as_cr_digits='0123456789'
85 as_cr_alnum=$as_cr_Letters$as_cr_digits
86
87 # The user is always right.
88 if test "${PATH_SEPARATOR+set}" != set; then
89   echo "#! /bin/sh" >conf$$.sh
90   echo  "exit 0"   >>conf$$.sh
91   chmod +x conf$$.sh
92   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
93     PATH_SEPARATOR=';'
94   else
95     PATH_SEPARATOR=:
96   fi
97   rm -f conf$$.sh
98 fi
99
100
101   as_lineno_1=$LINENO
102   as_lineno_2=$LINENO
103   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
104   test "x$as_lineno_1" != "x$as_lineno_2" &&
105   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
106   # Find who we are.  Look in the path if we contain no path at all
107   # relative or not.
108   case $0 in
109     *[\\/]* ) as_myself=$0 ;;
110     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
111 for as_dir in $PATH
112 do
113   IFS=$as_save_IFS
114   test -z "$as_dir" && as_dir=.
115   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
116 done
117
118        ;;
119   esac
120   # We did not find ourselves, most probably we were run as `sh COMMAND'
121   # in which case we are not to be found in the path.
122   if test "x$as_myself" = x; then
123     as_myself=$0
124   fi
125   if test ! -f "$as_myself"; then
126     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
127    { (exit 1); exit 1; }; }
128   fi
129   case $CONFIG_SHELL in
130   '')
131     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
132 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
133 do
134   IFS=$as_save_IFS
135   test -z "$as_dir" && as_dir=.
136   for as_base in sh bash ksh sh5; do
137          case $as_dir in
138          /*)
139            if ("$as_dir/$as_base" -c '
140   as_lineno_1=$LINENO
141   as_lineno_2=$LINENO
142   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
143   test "x$as_lineno_1" != "x$as_lineno_2" &&
144   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
145              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
146              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
147              CONFIG_SHELL=$as_dir/$as_base
148              export CONFIG_SHELL
149              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
150            fi;;
151          esac
152        done
153 done
154 ;;
155   esac
156
157   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
158   # uniformly replaced by the line number.  The first 'sed' inserts a
159   # line-number line before each line; the second 'sed' does the real
160   # work.  The second script uses 'N' to pair each line-number line
161   # with the numbered line, and appends trailing '-' during
162   # substitution so that $LINENO is not a special case at line end.
163   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
164   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
165   sed '=' <$as_myself |
166     sed '
167       N
168       s,$,-,
169       : loop
170       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
171       t loop
172       s,-$,,
173       s,^['$as_cr_digits']*\n,,
174     ' >$as_me.lineno &&
175   chmod +x $as_me.lineno ||
176     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
177    { (exit 1); exit 1; }; }
178
179   # Don't try to exec as it changes $[0], causing all sort of problems
180   # (the dirname of $[0] is not the place where we might find the
181   # original and so on.  Autoconf is especially sensible to this).
182   . ./$as_me.lineno
183   # Exit status is that of the last command.
184   exit
185 }
186
187
188 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
189   *c*,-n*) ECHO_N= ECHO_C='
190 ' ECHO_T='      ' ;;
191   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
192   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
193 esac
194
195 if expr a : '\(a\)' >/dev/null 2>&1; then
196   as_expr=expr
197 else
198   as_expr=false
199 fi
200
201 rm -f conf$$ conf$$.exe conf$$.file
202 echo >conf$$.file
203 if ln -s conf$$.file conf$$ 2>/dev/null; then
204   # We could just check for DJGPP; but this test a) works b) is more generic
205   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
206   if test -f conf$$.exe; then
207     # Don't use ln at all; we don't have any links
208     as_ln_s='cp -p'
209   else
210     as_ln_s='ln -s'
211   fi
212 elif ln conf$$.file conf$$ 2>/dev/null; then
213   as_ln_s=ln
214 else
215   as_ln_s='cp -p'
216 fi
217 rm -f conf$$ conf$$.exe conf$$.file
218
219 if mkdir -p . 2>/dev/null; then
220   as_mkdir_p=:
221 else
222   test -d ./-p && rmdir ./-p
223   as_mkdir_p=false
224 fi
225
226 as_executable_p="test -f"
227
228 # Sed expression to map a string onto a valid CPP name.
229 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
230
231 # Sed expression to map a string onto a valid variable name.
232 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
233
234
235 # IFS
236 # We need space, tab and new line, in precisely that order.
237 as_nl='
238 '
239 IFS="   $as_nl"
240
241 # CDPATH.
242 $as_unset CDPATH
243
244
245 # Name of the host.
246 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
247 # so uname gets run too.
248 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
249
250 exec 6>&1
251
252 #
253 # Initializations.
254 #
255 ac_default_prefix=/usr/local
256 ac_config_libobj_dir=.
257 cross_compiling=no
258 subdirs=
259 MFLAGS=
260 MAKEFLAGS=
261 SHELL=${CONFIG_SHELL-/bin/sh}
262
263 # Maximum number of lines to put in a shell here document.
264 # This variable seems obsolete.  It should probably be removed, and
265 # only ac_max_sed_lines should be used.
266 : ${ac_max_here_lines=38}
267
268 # Identity of this package.
269 PACKAGE_NAME=
270 PACKAGE_TARNAME=
271 PACKAGE_VERSION=
272 PACKAGE_STRING=
273 PACKAGE_BUGREPORT=
274
275 ac_unique_file="rlm_ldap.c"
276 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT edir ldap_ldflags ldap_cflags targetname LIBOBJS LTLIBOBJS'
277 ac_subst_files=''
278
279 # Initialize some variables set by options.
280 ac_init_help=
281 ac_init_version=false
282 # The variables have the same names as the options, with
283 # dashes changed to underlines.
284 cache_file=/dev/null
285 exec_prefix=NONE
286 no_create=
287 no_recursion=
288 prefix=NONE
289 program_prefix=NONE
290 program_suffix=NONE
291 program_transform_name=s,x,x,
292 silent=
293 site=
294 srcdir=
295 verbose=
296 x_includes=NONE
297 x_libraries=NONE
298
299 # Installation directory options.
300 # These are left unexpanded so users can "make install exec_prefix=/foo"
301 # and all the variables that are supposed to be based on exec_prefix
302 # by default will actually change.
303 # Use braces instead of parens because sh, perl, etc. also accept them.
304 bindir='${exec_prefix}/bin'
305 sbindir='${exec_prefix}/sbin'
306 libexecdir='${exec_prefix}/libexec'
307 datadir='${prefix}/share'
308 sysconfdir='${prefix}/etc'
309 sharedstatedir='${prefix}/com'
310 localstatedir='${prefix}/var'
311 libdir='${exec_prefix}/lib'
312 includedir='${prefix}/include'
313 oldincludedir='/usr/include'
314 infodir='${prefix}/info'
315 mandir='${prefix}/man'
316
317 ac_prev=
318 for ac_option
319 do
320   # If the previous option needs an argument, assign it.
321   if test -n "$ac_prev"; then
322     eval "$ac_prev=\$ac_option"
323     ac_prev=
324     continue
325   fi
326
327   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
328
329   # Accept the important Cygnus configure options, so we can diagnose typos.
330
331   case $ac_option in
332
333   -bindir | --bindir | --bindi | --bind | --bin | --bi)
334     ac_prev=bindir ;;
335   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
336     bindir=$ac_optarg ;;
337
338   -build | --build | --buil | --bui | --bu)
339     ac_prev=build_alias ;;
340   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
341     build_alias=$ac_optarg ;;
342
343   -cache-file | --cache-file | --cache-fil | --cache-fi \
344   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
345     ac_prev=cache_file ;;
346   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
347   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
348     cache_file=$ac_optarg ;;
349
350   --config-cache | -C)
351     cache_file=config.cache ;;
352
353   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
354     ac_prev=datadir ;;
355   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
356   | --da=*)
357     datadir=$ac_optarg ;;
358
359   -disable-* | --disable-*)
360     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
361     # Reject names that are not valid shell variable names.
362     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
363       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
364    { (exit 1); exit 1; }; }
365     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
366     eval "enable_$ac_feature=no" ;;
367
368   -enable-* | --enable-*)
369     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
370     # Reject names that are not valid shell variable names.
371     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
372       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
373    { (exit 1); exit 1; }; }
374     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
375     case $ac_option in
376       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
377       *) ac_optarg=yes ;;
378     esac
379     eval "enable_$ac_feature='$ac_optarg'" ;;
380
381   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
382   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
383   | --exec | --exe | --ex)
384     ac_prev=exec_prefix ;;
385   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
386   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
387   | --exec=* | --exe=* | --ex=*)
388     exec_prefix=$ac_optarg ;;
389
390   -gas | --gas | --ga | --g)
391     # Obsolete; use --with-gas.
392     with_gas=yes ;;
393
394   -help | --help | --hel | --he | -h)
395     ac_init_help=long ;;
396   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
397     ac_init_help=recursive ;;
398   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
399     ac_init_help=short ;;
400
401   -host | --host | --hos | --ho)
402     ac_prev=host_alias ;;
403   -host=* | --host=* | --hos=* | --ho=*)
404     host_alias=$ac_optarg ;;
405
406   -includedir | --includedir | --includedi | --included | --include \
407   | --includ | --inclu | --incl | --inc)
408     ac_prev=includedir ;;
409   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
410   | --includ=* | --inclu=* | --incl=* | --inc=*)
411     includedir=$ac_optarg ;;
412
413   -infodir | --infodir | --infodi | --infod | --info | --inf)
414     ac_prev=infodir ;;
415   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
416     infodir=$ac_optarg ;;
417
418   -libdir | --libdir | --libdi | --libd)
419     ac_prev=libdir ;;
420   -libdir=* | --libdir=* | --libdi=* | --libd=*)
421     libdir=$ac_optarg ;;
422
423   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
424   | --libexe | --libex | --libe)
425     ac_prev=libexecdir ;;
426   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
427   | --libexe=* | --libex=* | --libe=*)
428     libexecdir=$ac_optarg ;;
429
430   -localstatedir | --localstatedir | --localstatedi | --localstated \
431   | --localstate | --localstat | --localsta | --localst \
432   | --locals | --local | --loca | --loc | --lo)
433     ac_prev=localstatedir ;;
434   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
435   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
436   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
437     localstatedir=$ac_optarg ;;
438
439   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
440     ac_prev=mandir ;;
441   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
442     mandir=$ac_optarg ;;
443
444   -nfp | --nfp | --nf)
445     # Obsolete; use --without-fp.
446     with_fp=no ;;
447
448   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
449   | --no-cr | --no-c | -n)
450     no_create=yes ;;
451
452   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
453   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
454     no_recursion=yes ;;
455
456   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
457   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
458   | --oldin | --oldi | --old | --ol | --o)
459     ac_prev=oldincludedir ;;
460   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
461   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
462   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
463     oldincludedir=$ac_optarg ;;
464
465   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
466     ac_prev=prefix ;;
467   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
468     prefix=$ac_optarg ;;
469
470   -program-prefix | --program-prefix | --program-prefi | --program-pref \
471   | --program-pre | --program-pr | --program-p)
472     ac_prev=program_prefix ;;
473   -program-prefix=* | --program-prefix=* | --program-prefi=* \
474   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
475     program_prefix=$ac_optarg ;;
476
477   -program-suffix | --program-suffix | --program-suffi | --program-suff \
478   | --program-suf | --program-su | --program-s)
479     ac_prev=program_suffix ;;
480   -program-suffix=* | --program-suffix=* | --program-suffi=* \
481   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
482     program_suffix=$ac_optarg ;;
483
484   -program-transform-name | --program-transform-name \
485   | --program-transform-nam | --program-transform-na \
486   | --program-transform-n | --program-transform- \
487   | --program-transform | --program-transfor \
488   | --program-transfo | --program-transf \
489   | --program-trans | --program-tran \
490   | --progr-tra | --program-tr | --program-t)
491     ac_prev=program_transform_name ;;
492   -program-transform-name=* | --program-transform-name=* \
493   | --program-transform-nam=* | --program-transform-na=* \
494   | --program-transform-n=* | --program-transform-=* \
495   | --program-transform=* | --program-transfor=* \
496   | --program-transfo=* | --program-transf=* \
497   | --program-trans=* | --program-tran=* \
498   | --progr-tra=* | --program-tr=* | --program-t=*)
499     program_transform_name=$ac_optarg ;;
500
501   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
502   | -silent | --silent | --silen | --sile | --sil)
503     silent=yes ;;
504
505   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
506     ac_prev=sbindir ;;
507   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
508   | --sbi=* | --sb=*)
509     sbindir=$ac_optarg ;;
510
511   -sharedstatedir | --sharedstatedir | --sharedstatedi \
512   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
513   | --sharedst | --shareds | --shared | --share | --shar \
514   | --sha | --sh)
515     ac_prev=sharedstatedir ;;
516   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
517   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
518   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
519   | --sha=* | --sh=*)
520     sharedstatedir=$ac_optarg ;;
521
522   -site | --site | --sit)
523     ac_prev=site ;;
524   -site=* | --site=* | --sit=*)
525     site=$ac_optarg ;;
526
527   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
528     ac_prev=srcdir ;;
529   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
530     srcdir=$ac_optarg ;;
531
532   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
533   | --syscon | --sysco | --sysc | --sys | --sy)
534     ac_prev=sysconfdir ;;
535   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
536   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
537     sysconfdir=$ac_optarg ;;
538
539   -target | --target | --targe | --targ | --tar | --ta | --t)
540     ac_prev=target_alias ;;
541   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
542     target_alias=$ac_optarg ;;
543
544   -v | -verbose | --verbose | --verbos | --verbo | --verb)
545     verbose=yes ;;
546
547   -version | --version | --versio | --versi | --vers | -V)
548     ac_init_version=: ;;
549
550   -with-* | --with-*)
551     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
552     # Reject names that are not valid shell variable names.
553     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
554       { echo "$as_me: error: invalid package name: $ac_package" >&2
555    { (exit 1); exit 1; }; }
556     ac_package=`echo $ac_package| sed 's/-/_/g'`
557     case $ac_option in
558       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
559       *) ac_optarg=yes ;;
560     esac
561     eval "with_$ac_package='$ac_optarg'" ;;
562
563   -without-* | --without-*)
564     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
565     # Reject names that are not valid shell variable names.
566     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
567       { echo "$as_me: error: invalid package name: $ac_package" >&2
568    { (exit 1); exit 1; }; }
569     ac_package=`echo $ac_package | sed 's/-/_/g'`
570     eval "with_$ac_package=no" ;;
571
572   --x)
573     # Obsolete; use --with-x.
574     with_x=yes ;;
575
576   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
577   | --x-incl | --x-inc | --x-in | --x-i)
578     ac_prev=x_includes ;;
579   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
580   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
581     x_includes=$ac_optarg ;;
582
583   -x-libraries | --x-libraries | --x-librarie | --x-librari \
584   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
585     ac_prev=x_libraries ;;
586   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
587   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
588     x_libraries=$ac_optarg ;;
589
590   -*) { echo "$as_me: error: unrecognized option: $ac_option
591 Try \`$0 --help' for more information." >&2
592    { (exit 1); exit 1; }; }
593     ;;
594
595   *=*)
596     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
597     # Reject names that are not valid shell variable names.
598     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
599       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
600    { (exit 1); exit 1; }; }
601     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
602     eval "$ac_envvar='$ac_optarg'"
603     export $ac_envvar ;;
604
605   *)
606     # FIXME: should be removed in autoconf 3.0.
607     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
608     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
609       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
610     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
611     ;;
612
613   esac
614 done
615
616 if test -n "$ac_prev"; then
617   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
618   { echo "$as_me: error: missing argument to $ac_option" >&2
619    { (exit 1); exit 1; }; }
620 fi
621
622 # Be sure to have absolute paths.
623 for ac_var in exec_prefix prefix
624 do
625   eval ac_val=$`echo $ac_var`
626   case $ac_val in
627     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
628     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
629    { (exit 1); exit 1; }; };;
630   esac
631 done
632
633 # Be sure to have absolute paths.
634 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
635               localstatedir libdir includedir oldincludedir infodir mandir
636 do
637   eval ac_val=$`echo $ac_var`
638   case $ac_val in
639     [\\/$]* | ?:[\\/]* ) ;;
640     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
641    { (exit 1); exit 1; }; };;
642   esac
643 done
644
645 # There might be people who depend on the old broken behavior: `$host'
646 # used to hold the argument of --host etc.
647 # FIXME: To remove some day.
648 build=$build_alias
649 host=$host_alias
650 target=$target_alias
651
652 # FIXME: To remove some day.
653 if test "x$host_alias" != x; then
654   if test "x$build_alias" = x; then
655     cross_compiling=maybe
656     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
657     If a cross compiler is detected then cross compile mode will be used." >&2
658   elif test "x$build_alias" != "x$host_alias"; then
659     cross_compiling=yes
660   fi
661 fi
662
663 ac_tool_prefix=
664 test -n "$host_alias" && ac_tool_prefix=$host_alias-
665
666 test "$silent" = yes && exec 6>/dev/null
667
668
669 # Find the source files, if location was not specified.
670 if test -z "$srcdir"; then
671   ac_srcdir_defaulted=yes
672   # Try the directory containing this script, then its parent.
673   ac_confdir=`(dirname "$0") 2>/dev/null ||
674 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
675          X"$0" : 'X\(//\)[^/]' \| \
676          X"$0" : 'X\(//\)$' \| \
677          X"$0" : 'X\(/\)' \| \
678          .     : '\(.\)' 2>/dev/null ||
679 echo X"$0" |
680     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
681           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
682           /^X\(\/\/\)$/{ s//\1/; q; }
683           /^X\(\/\).*/{ s//\1/; q; }
684           s/.*/./; q'`
685   srcdir=$ac_confdir
686   if test ! -r $srcdir/$ac_unique_file; then
687     srcdir=..
688   fi
689 else
690   ac_srcdir_defaulted=no
691 fi
692 if test ! -r $srcdir/$ac_unique_file; then
693   if test "$ac_srcdir_defaulted" = yes; then
694     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
695    { (exit 1); exit 1; }; }
696   else
697     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
698    { (exit 1); exit 1; }; }
699   fi
700 fi
701 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
702   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
703    { (exit 1); exit 1; }; }
704 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
705 ac_env_build_alias_set=${build_alias+set}
706 ac_env_build_alias_value=$build_alias
707 ac_cv_env_build_alias_set=${build_alias+set}
708 ac_cv_env_build_alias_value=$build_alias
709 ac_env_host_alias_set=${host_alias+set}
710 ac_env_host_alias_value=$host_alias
711 ac_cv_env_host_alias_set=${host_alias+set}
712 ac_cv_env_host_alias_value=$host_alias
713 ac_env_target_alias_set=${target_alias+set}
714 ac_env_target_alias_value=$target_alias
715 ac_cv_env_target_alias_set=${target_alias+set}
716 ac_cv_env_target_alias_value=$target_alias
717 ac_env_CC_set=${CC+set}
718 ac_env_CC_value=$CC
719 ac_cv_env_CC_set=${CC+set}
720 ac_cv_env_CC_value=$CC
721 ac_env_CFLAGS_set=${CFLAGS+set}
722 ac_env_CFLAGS_value=$CFLAGS
723 ac_cv_env_CFLAGS_set=${CFLAGS+set}
724 ac_cv_env_CFLAGS_value=$CFLAGS
725 ac_env_LDFLAGS_set=${LDFLAGS+set}
726 ac_env_LDFLAGS_value=$LDFLAGS
727 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
728 ac_cv_env_LDFLAGS_value=$LDFLAGS
729 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
730 ac_env_CPPFLAGS_value=$CPPFLAGS
731 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
732 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
733
734 #
735 # Report the --help message.
736 #
737 if test "$ac_init_help" = "long"; then
738   # Omit some internal or obsolete options to make the list less imposing.
739   # This message is too long to be a string in the A/UX 3.1 sh.
740   cat <<_ACEOF
741 \`configure' configures this package to adapt to many kinds of systems.
742
743 Usage: $0 [OPTION]... [VAR=VALUE]...
744
745 To assign environment variables (e.g., CC, CFLAGS...), specify them as
746 VAR=VALUE.  See below for descriptions of some of the useful variables.
747
748 Defaults for the options are specified in brackets.
749
750 Configuration:
751   -h, --help              display this help and exit
752       --help=short        display options specific to this package
753       --help=recursive    display the short help of all the included packages
754   -V, --version           display version information and exit
755   -q, --quiet, --silent   do not print \`checking...' messages
756       --cache-file=FILE   cache test results in FILE [disabled]
757   -C, --config-cache      alias for \`--cache-file=config.cache'
758   -n, --no-create         do not create output files
759       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
760
761 _ACEOF
762
763   cat <<_ACEOF
764 Installation directories:
765   --prefix=PREFIX         install architecture-independent files in PREFIX
766                           [$ac_default_prefix]
767   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
768                           [PREFIX]
769
770 By default, \`make install' will install all the files in
771 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
772 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
773 for instance \`--prefix=\$HOME'.
774
775 For better control, use the options below.
776
777 Fine tuning of the installation directories:
778   --bindir=DIR           user executables [EPREFIX/bin]
779   --sbindir=DIR          system admin executables [EPREFIX/sbin]
780   --libexecdir=DIR       program executables [EPREFIX/libexec]
781   --datadir=DIR          read-only architecture-independent data [PREFIX/share]
782   --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
783   --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
784   --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
785   --libdir=DIR           object code libraries [EPREFIX/lib]
786   --includedir=DIR       C header files [PREFIX/include]
787   --oldincludedir=DIR    C header files for non-gcc [/usr/include]
788   --infodir=DIR          info documentation [PREFIX/info]
789   --mandir=DIR           man documentation [PREFIX/man]
790 _ACEOF
791
792   cat <<\_ACEOF
793 _ACEOF
794 fi
795
796 if test -n "$ac_init_help"; then
797
798   cat <<\_ACEOF
799
800 Optional Features:
801   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
802   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
803   --enable-shared[=PKGS]
804                           build shared libraries [default=yes]
805
806 Optional Packages:
807   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
808   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
809   --with-rlm-ldap-lib-dir=DIR       directory for LDAP library files
810   --with-rlm-ldap-include-dir=DIR   directory for LDAP include files
811   --with-threads          use threads, if available. (default=yes)
812   --with-edir             enable Novell eDirectory integration.  (default=no)
813
814 Some influential environment variables:
815   CC          C compiler command
816   CFLAGS      C compiler flags
817   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
818               nonstandard directory <lib dir>
819   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
820               headers in a nonstandard directory <include dir>
821
822 Use these variables to override the choices made by `configure' or to help
823 it to find libraries and programs with nonstandard names/locations.
824
825 _ACEOF
826 fi
827
828 if test "$ac_init_help" = "recursive"; then
829   # If there are subdirs, report their specific --help.
830   ac_popdir=`pwd`
831   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
832     test -d $ac_dir || continue
833     ac_builddir=.
834
835 if test "$ac_dir" != .; then
836   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
837   # A "../" for each directory in $ac_dir_suffix.
838   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
839 else
840   ac_dir_suffix= ac_top_builddir=
841 fi
842
843 case $srcdir in
844   .)  # No --srcdir option.  We are building in place.
845     ac_srcdir=.
846     if test -z "$ac_top_builddir"; then
847        ac_top_srcdir=.
848     else
849        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
850     fi ;;
851   [\\/]* | ?:[\\/]* )  # Absolute path.
852     ac_srcdir=$srcdir$ac_dir_suffix;
853     ac_top_srcdir=$srcdir ;;
854   *) # Relative path.
855     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
856     ac_top_srcdir=$ac_top_builddir$srcdir ;;
857 esac
858
859 # Do not use `cd foo && pwd` to compute absolute paths, because
860 # the directories may not exist.
861 case `pwd` in
862 .) ac_abs_builddir="$ac_dir";;
863 *)
864   case "$ac_dir" in
865   .) ac_abs_builddir=`pwd`;;
866   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
867   *) ac_abs_builddir=`pwd`/"$ac_dir";;
868   esac;;
869 esac
870 case $ac_abs_builddir in
871 .) ac_abs_top_builddir=${ac_top_builddir}.;;
872 *)
873   case ${ac_top_builddir}. in
874   .) ac_abs_top_builddir=$ac_abs_builddir;;
875   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
876   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
877   esac;;
878 esac
879 case $ac_abs_builddir in
880 .) ac_abs_srcdir=$ac_srcdir;;
881 *)
882   case $ac_srcdir in
883   .) ac_abs_srcdir=$ac_abs_builddir;;
884   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
885   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
886   esac;;
887 esac
888 case $ac_abs_builddir in
889 .) ac_abs_top_srcdir=$ac_top_srcdir;;
890 *)
891   case $ac_top_srcdir in
892   .) ac_abs_top_srcdir=$ac_abs_builddir;;
893   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
894   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
895   esac;;
896 esac
897
898     cd $ac_dir
899     # Check for guested configure; otherwise get Cygnus style configure.
900     if test -f $ac_srcdir/configure.gnu; then
901       echo
902       $SHELL $ac_srcdir/configure.gnu  --help=recursive
903     elif test -f $ac_srcdir/configure; then
904       echo
905       $SHELL $ac_srcdir/configure  --help=recursive
906     elif test -f $ac_srcdir/configure.ac ||
907            test -f $ac_srcdir/configure.in; then
908       echo
909       $ac_configure --help
910     else
911       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
912     fi
913     cd $ac_popdir
914   done
915 fi
916
917 test -n "$ac_init_help" && exit 0
918 if $ac_init_version; then
919   cat <<\_ACEOF
920
921 Copyright (C) 2003 Free Software Foundation, Inc.
922 This configure script is free software; the Free Software Foundation
923 gives unlimited permission to copy, distribute and modify it.
924 _ACEOF
925   exit 0
926 fi
927 exec 5>config.log
928 cat >&5 <<_ACEOF
929 This file contains any messages produced by compilers while
930 running configure, to aid debugging if configure makes a mistake.
931
932 It was created by $as_me, which was
933 generated by GNU Autoconf 2.59.  Invocation command line was
934
935   $ $0 $@
936
937 _ACEOF
938 {
939 cat <<_ASUNAME
940 ## --------- ##
941 ## Platform. ##
942 ## --------- ##
943
944 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
945 uname -m = `(uname -m) 2>/dev/null || echo unknown`
946 uname -r = `(uname -r) 2>/dev/null || echo unknown`
947 uname -s = `(uname -s) 2>/dev/null || echo unknown`
948 uname -v = `(uname -v) 2>/dev/null || echo unknown`
949
950 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
951 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
952
953 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
954 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
955 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
956 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
957 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
958 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
959 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
960
961 _ASUNAME
962
963 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
964 for as_dir in $PATH
965 do
966   IFS=$as_save_IFS
967   test -z "$as_dir" && as_dir=.
968   echo "PATH: $as_dir"
969 done
970
971 } >&5
972
973 cat >&5 <<_ACEOF
974
975
976 ## ----------- ##
977 ## Core tests. ##
978 ## ----------- ##
979
980 _ACEOF
981
982
983 # Keep a trace of the command line.
984 # Strip out --no-create and --no-recursion so they do not pile up.
985 # Strip out --silent because we don't want to record it for future runs.
986 # Also quote any args containing shell meta-characters.
987 # Make two passes to allow for proper duplicate-argument suppression.
988 ac_configure_args=
989 ac_configure_args0=
990 ac_configure_args1=
991 ac_sep=
992 ac_must_keep_next=false
993 for ac_pass in 1 2
994 do
995   for ac_arg
996   do
997     case $ac_arg in
998     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
999     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1000     | -silent | --silent | --silen | --sile | --sil)
1001       continue ;;
1002     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1003       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1004     esac
1005     case $ac_pass in
1006     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1007     2)
1008       ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1009       if test $ac_must_keep_next = true; then
1010         ac_must_keep_next=false # Got value, back to normal.
1011       else
1012         case $ac_arg in
1013           *=* | --config-cache | -C | -disable-* | --disable-* \
1014           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1015           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1016           | -with-* | --with-* | -without-* | --without-* | --x)
1017             case "$ac_configure_args0 " in
1018               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1019             esac
1020             ;;
1021           -* ) ac_must_keep_next=true ;;
1022         esac
1023       fi
1024       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1025       # Get rid of the leading space.
1026       ac_sep=" "
1027       ;;
1028     esac
1029   done
1030 done
1031 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1032 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1033
1034 # When interrupted or exit'd, cleanup temporary files, and complete
1035 # config.log.  We remove comments because anyway the quotes in there
1036 # would cause problems or look ugly.
1037 # WARNING: Be sure not to use single quotes in there, as some shells,
1038 # such as our DU 5.0 friend, will then `close' the trap.
1039 trap 'exit_status=$?
1040   # Save into config.log some information that might help in debugging.
1041   {
1042     echo
1043
1044     cat <<\_ASBOX
1045 ## ---------------- ##
1046 ## Cache variables. ##
1047 ## ---------------- ##
1048 _ASBOX
1049     echo
1050     # The following way of writing the cache mishandles newlines in values,
1051 {
1052   (set) 2>&1 |
1053     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1054     *ac_space=\ *)
1055       sed -n \
1056         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1057           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1058       ;;
1059     *)
1060       sed -n \
1061         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1062       ;;
1063     esac;
1064 }
1065     echo
1066
1067     cat <<\_ASBOX
1068 ## ----------------- ##
1069 ## Output variables. ##
1070 ## ----------------- ##
1071 _ASBOX
1072     echo
1073     for ac_var in $ac_subst_vars
1074     do
1075       eval ac_val=$`echo $ac_var`
1076       echo "$ac_var='"'"'$ac_val'"'"'"
1077     done | sort
1078     echo
1079
1080     if test -n "$ac_subst_files"; then
1081       cat <<\_ASBOX
1082 ## ------------- ##
1083 ## Output files. ##
1084 ## ------------- ##
1085 _ASBOX
1086       echo
1087       for ac_var in $ac_subst_files
1088       do
1089         eval ac_val=$`echo $ac_var`
1090         echo "$ac_var='"'"'$ac_val'"'"'"
1091       done | sort
1092       echo
1093     fi
1094
1095     if test -s confdefs.h; then
1096       cat <<\_ASBOX
1097 ## ----------- ##
1098 ## confdefs.h. ##
1099 ## ----------- ##
1100 _ASBOX
1101       echo
1102       sed "/^$/d" confdefs.h | sort
1103       echo
1104     fi
1105     test "$ac_signal" != 0 &&
1106       echo "$as_me: caught signal $ac_signal"
1107     echo "$as_me: exit $exit_status"
1108   } >&5
1109   rm -f core *.core &&
1110   rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1111     exit $exit_status
1112      ' 0
1113 for ac_signal in 1 2 13 15; do
1114   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1115 done
1116 ac_signal=0
1117
1118 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1119 rm -rf conftest* confdefs.h
1120 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1121 echo >confdefs.h
1122
1123 # Predefined preprocessor variables.
1124
1125 cat >>confdefs.h <<_ACEOF
1126 #define PACKAGE_NAME "$PACKAGE_NAME"
1127 _ACEOF
1128
1129
1130 cat >>confdefs.h <<_ACEOF
1131 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1132 _ACEOF
1133
1134
1135 cat >>confdefs.h <<_ACEOF
1136 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1137 _ACEOF
1138
1139
1140 cat >>confdefs.h <<_ACEOF
1141 #define PACKAGE_STRING "$PACKAGE_STRING"
1142 _ACEOF
1143
1144
1145 cat >>confdefs.h <<_ACEOF
1146 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1147 _ACEOF
1148
1149
1150 # Let the site file select an alternate cache file if it wants to.
1151 # Prefer explicitly selected file to automatically selected ones.
1152 if test -z "$CONFIG_SITE"; then
1153   if test "x$prefix" != xNONE; then
1154     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1155   else
1156     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1157   fi
1158 fi
1159 for ac_site_file in $CONFIG_SITE; do
1160   if test -r "$ac_site_file"; then
1161     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1162 echo "$as_me: loading site script $ac_site_file" >&6;}
1163     sed 's/^/| /' "$ac_site_file" >&5
1164     . "$ac_site_file"
1165   fi
1166 done
1167
1168 if test -r "$cache_file"; then
1169   # Some versions of bash will fail to source /dev/null (special
1170   # files actually), so we avoid doing that.
1171   if test -f "$cache_file"; then
1172     { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1173 echo "$as_me: loading cache $cache_file" >&6;}
1174     case $cache_file in
1175       [\\/]* | ?:[\\/]* ) . $cache_file;;
1176       *)                      . ./$cache_file;;
1177     esac
1178   fi
1179 else
1180   { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1181 echo "$as_me: creating cache $cache_file" >&6;}
1182   >$cache_file
1183 fi
1184
1185 # Check that the precious variables saved in the cache have kept the same
1186 # value.
1187 ac_cache_corrupted=false
1188 for ac_var in `(set) 2>&1 |
1189                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1190   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1191   eval ac_new_set=\$ac_env_${ac_var}_set
1192   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1193   eval ac_new_val="\$ac_env_${ac_var}_value"
1194   case $ac_old_set,$ac_new_set in
1195     set,)
1196       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1197 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1198       ac_cache_corrupted=: ;;
1199     ,set)
1200       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1201 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1202       ac_cache_corrupted=: ;;
1203     ,);;
1204     *)
1205       if test "x$ac_old_val" != "x$ac_new_val"; then
1206         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1207 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1208         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
1209 echo "$as_me:   former value:  $ac_old_val" >&2;}
1210         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
1211 echo "$as_me:   current value: $ac_new_val" >&2;}
1212         ac_cache_corrupted=:
1213       fi;;
1214   esac
1215   # Pass precious variables to config.status.
1216   if test "$ac_new_set" = set; then
1217     case $ac_new_val in
1218     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1219       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1220     *) ac_arg=$ac_var=$ac_new_val ;;
1221     esac
1222     case " $ac_configure_args " in
1223       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
1224       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1225     esac
1226   fi
1227 done
1228 if $ac_cache_corrupted; then
1229   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1230 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1231   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1232 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1233    { (exit 1); exit 1; }; }
1234 fi
1235
1236 ac_ext=c
1237 ac_cpp='$CPP $CPPFLAGS'
1238 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1239 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1240 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263 fail=
1264 SMART_LIBS=
1265 SMART_CLFAGS=
1266 if test x$with_rlm_ldap != xno; then
1267
1268                                 ac_ext=c
1269 ac_cpp='$CPP $CPPFLAGS'
1270 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1271 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1272 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1273 if test -n "$ac_tool_prefix"; then
1274   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1275 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1276 echo "$as_me:$LINENO: checking for $ac_word" >&5
1277 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1278 if test "${ac_cv_prog_CC+set}" = set; then
1279   echo $ECHO_N "(cached) $ECHO_C" >&6
1280 else
1281   if test -n "$CC"; then
1282   ac_cv_prog_CC="$CC" # Let the user override the test.
1283 else
1284 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1285 for as_dir in $PATH
1286 do
1287   IFS=$as_save_IFS
1288   test -z "$as_dir" && as_dir=.
1289   for ac_exec_ext in '' $ac_executable_extensions; do
1290   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1291     ac_cv_prog_CC="${ac_tool_prefix}gcc"
1292     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1293     break 2
1294   fi
1295 done
1296 done
1297
1298 fi
1299 fi
1300 CC=$ac_cv_prog_CC
1301 if test -n "$CC"; then
1302   echo "$as_me:$LINENO: result: $CC" >&5
1303 echo "${ECHO_T}$CC" >&6
1304 else
1305   echo "$as_me:$LINENO: result: no" >&5
1306 echo "${ECHO_T}no" >&6
1307 fi
1308
1309 fi
1310 if test -z "$ac_cv_prog_CC"; then
1311   ac_ct_CC=$CC
1312   # Extract the first word of "gcc", so it can be a program name with args.
1313 set dummy gcc; ac_word=$2
1314 echo "$as_me:$LINENO: checking for $ac_word" >&5
1315 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1316 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1317   echo $ECHO_N "(cached) $ECHO_C" >&6
1318 else
1319   if test -n "$ac_ct_CC"; then
1320   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1321 else
1322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1323 for as_dir in $PATH
1324 do
1325   IFS=$as_save_IFS
1326   test -z "$as_dir" && as_dir=.
1327   for ac_exec_ext in '' $ac_executable_extensions; do
1328   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1329     ac_cv_prog_ac_ct_CC="gcc"
1330     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1331     break 2
1332   fi
1333 done
1334 done
1335
1336 fi
1337 fi
1338 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1339 if test -n "$ac_ct_CC"; then
1340   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1341 echo "${ECHO_T}$ac_ct_CC" >&6
1342 else
1343   echo "$as_me:$LINENO: result: no" >&5
1344 echo "${ECHO_T}no" >&6
1345 fi
1346
1347   CC=$ac_ct_CC
1348 else
1349   CC="$ac_cv_prog_CC"
1350 fi
1351
1352 if test -z "$CC"; then
1353   if test -n "$ac_tool_prefix"; then
1354   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1355 set dummy ${ac_tool_prefix}cc; ac_word=$2
1356 echo "$as_me:$LINENO: checking for $ac_word" >&5
1357 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1358 if test "${ac_cv_prog_CC+set}" = set; then
1359   echo $ECHO_N "(cached) $ECHO_C" >&6
1360 else
1361   if test -n "$CC"; then
1362   ac_cv_prog_CC="$CC" # Let the user override the test.
1363 else
1364 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1365 for as_dir in $PATH
1366 do
1367   IFS=$as_save_IFS
1368   test -z "$as_dir" && as_dir=.
1369   for ac_exec_ext in '' $ac_executable_extensions; do
1370   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1371     ac_cv_prog_CC="${ac_tool_prefix}cc"
1372     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1373     break 2
1374   fi
1375 done
1376 done
1377
1378 fi
1379 fi
1380 CC=$ac_cv_prog_CC
1381 if test -n "$CC"; then
1382   echo "$as_me:$LINENO: result: $CC" >&5
1383 echo "${ECHO_T}$CC" >&6
1384 else
1385   echo "$as_me:$LINENO: result: no" >&5
1386 echo "${ECHO_T}no" >&6
1387 fi
1388
1389 fi
1390 if test -z "$ac_cv_prog_CC"; then
1391   ac_ct_CC=$CC
1392   # Extract the first word of "cc", so it can be a program name with args.
1393 set dummy cc; ac_word=$2
1394 echo "$as_me:$LINENO: checking for $ac_word" >&5
1395 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1396 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1397   echo $ECHO_N "(cached) $ECHO_C" >&6
1398 else
1399   if test -n "$ac_ct_CC"; then
1400   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1401 else
1402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1403 for as_dir in $PATH
1404 do
1405   IFS=$as_save_IFS
1406   test -z "$as_dir" && as_dir=.
1407   for ac_exec_ext in '' $ac_executable_extensions; do
1408   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1409     ac_cv_prog_ac_ct_CC="cc"
1410     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1411     break 2
1412   fi
1413 done
1414 done
1415
1416 fi
1417 fi
1418 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1419 if test -n "$ac_ct_CC"; then
1420   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1421 echo "${ECHO_T}$ac_ct_CC" >&6
1422 else
1423   echo "$as_me:$LINENO: result: no" >&5
1424 echo "${ECHO_T}no" >&6
1425 fi
1426
1427   CC=$ac_ct_CC
1428 else
1429   CC="$ac_cv_prog_CC"
1430 fi
1431
1432 fi
1433 if test -z "$CC"; then
1434   # Extract the first word of "cc", so it can be a program name with args.
1435 set dummy cc; ac_word=$2
1436 echo "$as_me:$LINENO: checking for $ac_word" >&5
1437 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1438 if test "${ac_cv_prog_CC+set}" = set; then
1439   echo $ECHO_N "(cached) $ECHO_C" >&6
1440 else
1441   if test -n "$CC"; then
1442   ac_cv_prog_CC="$CC" # Let the user override the test.
1443 else
1444   ac_prog_rejected=no
1445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1446 for as_dir in $PATH
1447 do
1448   IFS=$as_save_IFS
1449   test -z "$as_dir" && as_dir=.
1450   for ac_exec_ext in '' $ac_executable_extensions; do
1451   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1452     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1453        ac_prog_rejected=yes
1454        continue
1455      fi
1456     ac_cv_prog_CC="cc"
1457     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1458     break 2
1459   fi
1460 done
1461 done
1462
1463 if test $ac_prog_rejected = yes; then
1464   # We found a bogon in the path, so make sure we never use it.
1465   set dummy $ac_cv_prog_CC
1466   shift
1467   if test $# != 0; then
1468     # We chose a different compiler from the bogus one.
1469     # However, it has the same basename, so the bogon will be chosen
1470     # first if we set CC to just the basename; use the full file name.
1471     shift
1472     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
1473   fi
1474 fi
1475 fi
1476 fi
1477 CC=$ac_cv_prog_CC
1478 if test -n "$CC"; then
1479   echo "$as_me:$LINENO: result: $CC" >&5
1480 echo "${ECHO_T}$CC" >&6
1481 else
1482   echo "$as_me:$LINENO: result: no" >&5
1483 echo "${ECHO_T}no" >&6
1484 fi
1485
1486 fi
1487 if test -z "$CC"; then
1488   if test -n "$ac_tool_prefix"; then
1489   for ac_prog in cl
1490   do
1491     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1492 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1493 echo "$as_me:$LINENO: checking for $ac_word" >&5
1494 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1495 if test "${ac_cv_prog_CC+set}" = set; then
1496   echo $ECHO_N "(cached) $ECHO_C" >&6
1497 else
1498   if test -n "$CC"; then
1499   ac_cv_prog_CC="$CC" # Let the user override the test.
1500 else
1501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1502 for as_dir in $PATH
1503 do
1504   IFS=$as_save_IFS
1505   test -z "$as_dir" && as_dir=.
1506   for ac_exec_ext in '' $ac_executable_extensions; do
1507   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1508     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1509     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1510     break 2
1511   fi
1512 done
1513 done
1514
1515 fi
1516 fi
1517 CC=$ac_cv_prog_CC
1518 if test -n "$CC"; then
1519   echo "$as_me:$LINENO: result: $CC" >&5
1520 echo "${ECHO_T}$CC" >&6
1521 else
1522   echo "$as_me:$LINENO: result: no" >&5
1523 echo "${ECHO_T}no" >&6
1524 fi
1525
1526     test -n "$CC" && break
1527   done
1528 fi
1529 if test -z "$CC"; then
1530   ac_ct_CC=$CC
1531   for ac_prog in cl
1532 do
1533   # Extract the first word of "$ac_prog", so it can be a program name with args.
1534 set dummy $ac_prog; ac_word=$2
1535 echo "$as_me:$LINENO: checking for $ac_word" >&5
1536 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1537 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1538   echo $ECHO_N "(cached) $ECHO_C" >&6
1539 else
1540   if test -n "$ac_ct_CC"; then
1541   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1542 else
1543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1544 for as_dir in $PATH
1545 do
1546   IFS=$as_save_IFS
1547   test -z "$as_dir" && as_dir=.
1548   for ac_exec_ext in '' $ac_executable_extensions; do
1549   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1550     ac_cv_prog_ac_ct_CC="$ac_prog"
1551     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1552     break 2
1553   fi
1554 done
1555 done
1556
1557 fi
1558 fi
1559 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1560 if test -n "$ac_ct_CC"; then
1561   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1562 echo "${ECHO_T}$ac_ct_CC" >&6
1563 else
1564   echo "$as_me:$LINENO: result: no" >&5
1565 echo "${ECHO_T}no" >&6
1566 fi
1567
1568   test -n "$ac_ct_CC" && break
1569 done
1570
1571   CC=$ac_ct_CC
1572 fi
1573
1574 fi
1575
1576
1577 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
1578 See \`config.log' for more details." >&5
1579 echo "$as_me: error: no acceptable C compiler found in \$PATH
1580 See \`config.log' for more details." >&2;}
1581    { (exit 1); exit 1; }; }
1582
1583 # Provide some information about the compiler.
1584 echo "$as_me:$LINENO:" \
1585      "checking for C compiler version" >&5
1586 ac_compiler=`set X $ac_compile; echo $2`
1587 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
1588   (eval $ac_compiler --version </dev/null >&5) 2>&5
1589   ac_status=$?
1590   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1591   (exit $ac_status); }
1592 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
1593   (eval $ac_compiler -v </dev/null >&5) 2>&5
1594   ac_status=$?
1595   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1596   (exit $ac_status); }
1597 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
1598   (eval $ac_compiler -V </dev/null >&5) 2>&5
1599   ac_status=$?
1600   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1601   (exit $ac_status); }
1602
1603 cat >conftest.$ac_ext <<_ACEOF
1604 /* confdefs.h.  */
1605 _ACEOF
1606 cat confdefs.h >>conftest.$ac_ext
1607 cat >>conftest.$ac_ext <<_ACEOF
1608 /* end confdefs.h.  */
1609
1610 int
1611 main ()
1612 {
1613
1614   ;
1615   return 0;
1616 }
1617 _ACEOF
1618 ac_clean_files_save=$ac_clean_files
1619 ac_clean_files="$ac_clean_files a.out a.exe b.out"
1620 # Try to create an executable without -o first, disregard a.out.
1621 # It will help us diagnose broken compilers, and finding out an intuition
1622 # of exeext.
1623 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
1624 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
1625 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1626 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1627   (eval $ac_link_default) 2>&5
1628   ac_status=$?
1629   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1630   (exit $ac_status); }; then
1631   # Find the output, starting from the most likely.  This scheme is
1632 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1633 # resort.
1634
1635 # Be careful to initialize this variable, since it used to be cached.
1636 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1637 ac_cv_exeext=
1638 # b.out is created by i960 compilers.
1639 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1640 do
1641   test -f "$ac_file" || continue
1642   case $ac_file in
1643     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
1644         ;;
1645     conftest.$ac_ext )
1646         # This is the source file.
1647         ;;
1648     [ab].out )
1649         # We found the default executable, but exeext='' is most
1650         # certainly right.
1651         break;;
1652     *.* )
1653         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1654         # FIXME: I believe we export ac_cv_exeext for Libtool,
1655         # but it would be cool to find out if it's true.  Does anybody
1656         # maintain Libtool? --akim.
1657         export ac_cv_exeext
1658         break;;
1659     * )
1660         break;;
1661   esac
1662 done
1663 else
1664   echo "$as_me: failed program was:" >&5
1665 sed 's/^/| /' conftest.$ac_ext >&5
1666
1667 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
1668 See \`config.log' for more details." >&5
1669 echo "$as_me: error: C compiler cannot create executables
1670 See \`config.log' for more details." >&2;}
1671    { (exit 77); exit 77; }; }
1672 fi
1673
1674 ac_exeext=$ac_cv_exeext
1675 echo "$as_me:$LINENO: result: $ac_file" >&5
1676 echo "${ECHO_T}$ac_file" >&6
1677
1678 # Check the compiler produces executables we can run.  If not, either
1679 # the compiler is broken, or we cross compile.
1680 echo "$as_me:$LINENO: checking whether the C compiler works" >&5
1681 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1682 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1683 # If not cross compiling, check that we can run a simple program.
1684 if test "$cross_compiling" != yes; then
1685   if { ac_try='./$ac_file'
1686   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1687   (eval $ac_try) 2>&5
1688   ac_status=$?
1689   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1690   (exit $ac_status); }; }; then
1691     cross_compiling=no
1692   else
1693     if test "$cross_compiling" = maybe; then
1694         cross_compiling=yes
1695     else
1696         { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
1697 If you meant to cross compile, use \`--host'.
1698 See \`config.log' for more details." >&5
1699 echo "$as_me: error: cannot run C compiled programs.
1700 If you meant to cross compile, use \`--host'.
1701 See \`config.log' for more details." >&2;}
1702    { (exit 1); exit 1; }; }
1703     fi
1704   fi
1705 fi
1706 echo "$as_me:$LINENO: result: yes" >&5
1707 echo "${ECHO_T}yes" >&6
1708
1709 rm -f a.out a.exe conftest$ac_cv_exeext b.out
1710 ac_clean_files=$ac_clean_files_save
1711 # Check the compiler produces executables we can run.  If not, either
1712 # the compiler is broken, or we cross compile.
1713 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1714 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1715 echo "$as_me:$LINENO: result: $cross_compiling" >&5
1716 echo "${ECHO_T}$cross_compiling" >&6
1717
1718 echo "$as_me:$LINENO: checking for suffix of executables" >&5
1719 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1720 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1721   (eval $ac_link) 2>&5
1722   ac_status=$?
1723   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1724   (exit $ac_status); }; then
1725   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1726 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1727 # work properly (i.e., refer to `conftest.exe'), while it won't with
1728 # `rm'.
1729 for ac_file in conftest.exe conftest conftest.*; do
1730   test -f "$ac_file" || continue
1731   case $ac_file in
1732     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
1733     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1734           export ac_cv_exeext
1735           break;;
1736     * ) break;;
1737   esac
1738 done
1739 else
1740   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1741 See \`config.log' for more details." >&5
1742 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1743 See \`config.log' for more details." >&2;}
1744    { (exit 1); exit 1; }; }
1745 fi
1746
1747 rm -f conftest$ac_cv_exeext
1748 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1749 echo "${ECHO_T}$ac_cv_exeext" >&6
1750
1751 rm -f conftest.$ac_ext
1752 EXEEXT=$ac_cv_exeext
1753 ac_exeext=$EXEEXT
1754 echo "$as_me:$LINENO: checking for suffix of object files" >&5
1755 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
1756 if test "${ac_cv_objext+set}" = set; then
1757   echo $ECHO_N "(cached) $ECHO_C" >&6
1758 else
1759   cat >conftest.$ac_ext <<_ACEOF
1760 /* confdefs.h.  */
1761 _ACEOF
1762 cat confdefs.h >>conftest.$ac_ext
1763 cat >>conftest.$ac_ext <<_ACEOF
1764 /* end confdefs.h.  */
1765
1766 int
1767 main ()
1768 {
1769
1770   ;
1771   return 0;
1772 }
1773 _ACEOF
1774 rm -f conftest.o conftest.obj
1775 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1776   (eval $ac_compile) 2>&5
1777   ac_status=$?
1778   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1779   (exit $ac_status); }; then
1780   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1781   case $ac_file in
1782     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
1783     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1784        break;;
1785   esac
1786 done
1787 else
1788   echo "$as_me: failed program was:" >&5
1789 sed 's/^/| /' conftest.$ac_ext >&5
1790
1791 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
1792 See \`config.log' for more details." >&5
1793 echo "$as_me: error: cannot compute suffix of object files: cannot compile
1794 See \`config.log' for more details." >&2;}
1795    { (exit 1); exit 1; }; }
1796 fi
1797
1798 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1799 fi
1800 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
1801 echo "${ECHO_T}$ac_cv_objext" >&6
1802 OBJEXT=$ac_cv_objext
1803 ac_objext=$OBJEXT
1804 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
1805 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1806 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1807   echo $ECHO_N "(cached) $ECHO_C" >&6
1808 else
1809   cat >conftest.$ac_ext <<_ACEOF
1810 /* confdefs.h.  */
1811 _ACEOF
1812 cat confdefs.h >>conftest.$ac_ext
1813 cat >>conftest.$ac_ext <<_ACEOF
1814 /* end confdefs.h.  */
1815
1816 int
1817 main ()
1818 {
1819 #ifndef __GNUC__
1820        choke me
1821 #endif
1822
1823   ;
1824   return 0;
1825 }
1826 _ACEOF
1827 rm -f conftest.$ac_objext
1828 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1829   (eval $ac_compile) 2>conftest.er1
1830   ac_status=$?
1831   grep -v '^ *+' conftest.er1 >conftest.err
1832   rm -f conftest.er1
1833   cat conftest.err >&5
1834   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1835   (exit $ac_status); } &&
1836          { ac_try='test -z "$ac_c_werror_flag"
1837                          || test ! -s conftest.err'
1838   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1839   (eval $ac_try) 2>&5
1840   ac_status=$?
1841   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1842   (exit $ac_status); }; } &&
1843          { ac_try='test -s conftest.$ac_objext'
1844   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1845   (eval $ac_try) 2>&5
1846   ac_status=$?
1847   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1848   (exit $ac_status); }; }; then
1849   ac_compiler_gnu=yes
1850 else
1851   echo "$as_me: failed program was:" >&5
1852 sed 's/^/| /' conftest.$ac_ext >&5
1853
1854 ac_compiler_gnu=no
1855 fi
1856 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1857 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1858
1859 fi
1860 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
1861 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1862 GCC=`test $ac_compiler_gnu = yes && echo yes`
1863 ac_test_CFLAGS=${CFLAGS+set}
1864 ac_save_CFLAGS=$CFLAGS
1865 CFLAGS="-g"
1866 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
1867 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1868 if test "${ac_cv_prog_cc_g+set}" = set; then
1869   echo $ECHO_N "(cached) $ECHO_C" >&6
1870 else
1871   cat >conftest.$ac_ext <<_ACEOF
1872 /* confdefs.h.  */
1873 _ACEOF
1874 cat confdefs.h >>conftest.$ac_ext
1875 cat >>conftest.$ac_ext <<_ACEOF
1876 /* end confdefs.h.  */
1877
1878 int
1879 main ()
1880 {
1881
1882   ;
1883   return 0;
1884 }
1885 _ACEOF
1886 rm -f conftest.$ac_objext
1887 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
1888   (eval $ac_compile) 2>conftest.er1
1889   ac_status=$?
1890   grep -v '^ *+' conftest.er1 >conftest.err
1891   rm -f conftest.er1
1892   cat conftest.err >&5
1893   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1894   (exit $ac_status); } &&
1895          { ac_try='test -z "$ac_c_werror_flag"
1896                          || test ! -s conftest.err'
1897   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1898   (eval $ac_try) 2>&5
1899   ac_status=$?
1900   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1901   (exit $ac_status); }; } &&
1902          { ac_try='test -s conftest.$ac_objext'
1903   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1904   (eval $ac_try) 2>&5
1905   ac_status=$?
1906   echo "$as_me:$LINENO: \$? = $ac_status" >&5
1907   (exit $ac_status); }; }; then
1908   ac_cv_prog_cc_g=yes
1909 else
1910   echo "$as_me: failed program was:" >&5
1911 sed 's/^/| /' conftest.$ac_ext >&5
1912
1913 ac_cv_prog_cc_g=no
1914 fi
1915 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
1916 fi
1917 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
1918 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1919 if test "$ac_test_CFLAGS" = set; then
1920   CFLAGS=$ac_save_CFLAGS
1921 elif test $ac_cv_prog_cc_g = yes; then
1922   if test "$GCC" = yes; then
1923     CFLAGS="-g -O2"
1924   else
1925     CFLAGS="-g"
1926   fi
1927 else
1928   if test "$GCC" = yes; then
1929     CFLAGS="-O2"
1930   else
1931     CFLAGS=
1932   fi
1933 fi
1934 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
1935 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1936 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1937   echo $ECHO_N "(cached) $ECHO_C" >&6
1938 else
1939   ac_cv_prog_cc_stdc=no
1940 ac_save_CC=$CC
1941 cat >conftest.$ac_ext <<_ACEOF
1942 /* confdefs.h.  */
1943 _ACEOF
1944 cat confdefs.h >>conftest.$ac_ext
1945 cat >>conftest.$ac_ext <<_ACEOF
1946 /* end confdefs.h.  */
1947 #include <stdarg.h>
1948 #include <stdio.h>
1949 #include <sys/types.h>
1950 #include <sys/stat.h>
1951 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1952 struct buf { int x; };
1953 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1954 static char *e (p, i)
1955      char **p;
1956      int i;
1957 {
1958   return p[i];
1959 }
1960 static char *f (char * (*g) (char **, int), char **p, ...)
1961 {
1962   char *s;
1963   va_list v;
1964   va_start (v,p);
1965   s = g (p, va_arg (v,int));
1966   va_end (v);
1967   return s;
1968 }
1969
1970 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
1971    function prototypes and stuff, but not '\xHH' hex character constants.
1972    These don't provoke an error unfortunately, instead are silently treated
1973    as 'x'.  The following induces an error, until -std1 is added to get
1974    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
1975    array size at least.  It's necessary to write '\x00'==0 to get something
1976    that's true only with -std1.  */
1977 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
1978
1979 int test (int i, double x);
1980 struct s1 {int (*f) (int a);};
1981 struct s2 {int (*f) (double a);};
1982 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1983 int argc;
1984 char **argv;
1985 int
1986 main ()
1987 {
1988 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1989   ;
1990   return 0;
1991 }
1992 _ACEOF
1993 # Don't try gcc -ansi; that turns off useful extensions and
1994 # breaks some systems' header files.
1995 # AIX                   -qlanglvl=ansi
1996 # Ultrix and OSF/1      -std1
1997 # HP-UX 10.20 and later -Ae
1998 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1999 # SVR4                  -Xc -D__EXTENSIONS__
2000 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2001 do
2002   CC="$ac_save_CC $ac_arg"
2003   rm -f conftest.$ac_objext
2004 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2005   (eval $ac_compile) 2>conftest.er1
2006   ac_status=$?
2007   grep -v '^ *+' conftest.er1 >conftest.err
2008   rm -f conftest.er1
2009   cat conftest.err >&5
2010   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2011   (exit $ac_status); } &&
2012          { ac_try='test -z "$ac_c_werror_flag"
2013                          || test ! -s conftest.err'
2014   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2015   (eval $ac_try) 2>&5
2016   ac_status=$?
2017   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2018   (exit $ac_status); }; } &&
2019          { ac_try='test -s conftest.$ac_objext'
2020   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2021   (eval $ac_try) 2>&5
2022   ac_status=$?
2023   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2024   (exit $ac_status); }; }; then
2025   ac_cv_prog_cc_stdc=$ac_arg
2026 break
2027 else
2028   echo "$as_me: failed program was:" >&5
2029 sed 's/^/| /' conftest.$ac_ext >&5
2030
2031 fi
2032 rm -f conftest.err conftest.$ac_objext
2033 done
2034 rm -f conftest.$ac_ext conftest.$ac_objext
2035 CC=$ac_save_CC
2036
2037 fi
2038
2039 case "x$ac_cv_prog_cc_stdc" in
2040   x|xno)
2041     echo "$as_me:$LINENO: result: none needed" >&5
2042 echo "${ECHO_T}none needed" >&6 ;;
2043   *)
2044     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2045 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2046     CC="$CC $ac_cv_prog_cc_stdc" ;;
2047 esac
2048
2049 # Some people use a C++ compiler to compile C.  Since we use `exit',
2050 # in C++ we need to declare it.  In case someone uses the same compiler
2051 # for both compiling C and C++ we need to have the C++ compiler decide
2052 # the declaration of exit, since it's the most demanding environment.
2053 cat >conftest.$ac_ext <<_ACEOF
2054 #ifndef __cplusplus
2055   choke me
2056 #endif
2057 _ACEOF
2058 rm -f conftest.$ac_objext
2059 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2060   (eval $ac_compile) 2>conftest.er1
2061   ac_status=$?
2062   grep -v '^ *+' conftest.er1 >conftest.err
2063   rm -f conftest.er1
2064   cat conftest.err >&5
2065   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2066   (exit $ac_status); } &&
2067          { ac_try='test -z "$ac_c_werror_flag"
2068                          || test ! -s conftest.err'
2069   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2070   (eval $ac_try) 2>&5
2071   ac_status=$?
2072   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2073   (exit $ac_status); }; } &&
2074          { ac_try='test -s conftest.$ac_objext'
2075   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2076   (eval $ac_try) 2>&5
2077   ac_status=$?
2078   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2079   (exit $ac_status); }; }; then
2080   for ac_declaration in \
2081    '' \
2082    'extern "C" void std::exit (int) throw (); using std::exit;' \
2083    'extern "C" void std::exit (int); using std::exit;' \
2084    'extern "C" void exit (int) throw ();' \
2085    'extern "C" void exit (int);' \
2086    'void exit (int);'
2087 do
2088   cat >conftest.$ac_ext <<_ACEOF
2089 /* confdefs.h.  */
2090 _ACEOF
2091 cat confdefs.h >>conftest.$ac_ext
2092 cat >>conftest.$ac_ext <<_ACEOF
2093 /* end confdefs.h.  */
2094 $ac_declaration
2095 #include <stdlib.h>
2096 int
2097 main ()
2098 {
2099 exit (42);
2100   ;
2101   return 0;
2102 }
2103 _ACEOF
2104 rm -f conftest.$ac_objext
2105 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2106   (eval $ac_compile) 2>conftest.er1
2107   ac_status=$?
2108   grep -v '^ *+' conftest.er1 >conftest.err
2109   rm -f conftest.er1
2110   cat conftest.err >&5
2111   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2112   (exit $ac_status); } &&
2113          { ac_try='test -z "$ac_c_werror_flag"
2114                          || test ! -s conftest.err'
2115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2116   (eval $ac_try) 2>&5
2117   ac_status=$?
2118   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2119   (exit $ac_status); }; } &&
2120          { ac_try='test -s conftest.$ac_objext'
2121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2122   (eval $ac_try) 2>&5
2123   ac_status=$?
2124   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2125   (exit $ac_status); }; }; then
2126   :
2127 else
2128   echo "$as_me: failed program was:" >&5
2129 sed 's/^/| /' conftest.$ac_ext >&5
2130
2131 continue
2132 fi
2133 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2134   cat >conftest.$ac_ext <<_ACEOF
2135 /* confdefs.h.  */
2136 _ACEOF
2137 cat confdefs.h >>conftest.$ac_ext
2138 cat >>conftest.$ac_ext <<_ACEOF
2139 /* end confdefs.h.  */
2140 $ac_declaration
2141 int
2142 main ()
2143 {
2144 exit (42);
2145   ;
2146   return 0;
2147 }
2148 _ACEOF
2149 rm -f conftest.$ac_objext
2150 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2151   (eval $ac_compile) 2>conftest.er1
2152   ac_status=$?
2153   grep -v '^ *+' conftest.er1 >conftest.err
2154   rm -f conftest.er1
2155   cat conftest.err >&5
2156   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2157   (exit $ac_status); } &&
2158          { ac_try='test -z "$ac_c_werror_flag"
2159                          || test ! -s conftest.err'
2160   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2161   (eval $ac_try) 2>&5
2162   ac_status=$?
2163   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2164   (exit $ac_status); }; } &&
2165          { ac_try='test -s conftest.$ac_objext'
2166   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2167   (eval $ac_try) 2>&5
2168   ac_status=$?
2169   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2170   (exit $ac_status); }; }; then
2171   break
2172 else
2173   echo "$as_me: failed program was:" >&5
2174 sed 's/^/| /' conftest.$ac_ext >&5
2175
2176 fi
2177 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2178 done
2179 rm -f conftest*
2180 if test -n "$ac_declaration"; then
2181   echo '#ifdef __cplusplus' >>confdefs.h
2182   echo $ac_declaration      >>confdefs.h
2183   echo '#endif'             >>confdefs.h
2184 fi
2185
2186 else
2187   echo "$as_me: failed program was:" >&5
2188 sed 's/^/| /' conftest.$ac_ext >&5
2189
2190 fi
2191 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2192 ac_ext=c
2193 ac_cpp='$CPP $CPPFLAGS'
2194 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2195 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2196 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2197
2198
2199
2200                 rlm_ldap_lib_dir=
2201
2202 # Check whether --with-rlm-ldap-lib-dir or --without-rlm-ldap-lib-dir was given.
2203 if test "${with_rlm_ldap_lib_dir+set}" = set; then
2204   withval="$with_rlm_ldap_lib_dir"
2205    case "$withval" in
2206             no)
2207                 { { echo "$as_me:$LINENO: error: Need rlm-ldap-lib-dir" >&5
2208 echo "$as_me: error: Need rlm-ldap-lib-dir" >&2;}
2209    { (exit 1); exit 1; }; }
2210                 ;;
2211             yes)
2212                 ;;
2213             *)
2214                 rlm_ldap_lib_dir="$withval"
2215                 ;;
2216           esac
2217
2218 fi;
2219
2220                 rlm_ldap_include_dir=
2221
2222 # Check whether --with-rlm-ldap-include-dir or --without-rlm-ldap-include-dir was given.
2223 if test "${with_rlm_ldap_include_dir+set}" = set; then
2224   withval="$with_rlm_ldap_include_dir"
2225    case "$withval" in
2226             no)
2227                 { { echo "$as_me:$LINENO: error: Need rlm-ldap-include-dir" >&5
2228 echo "$as_me: error: Need rlm-ldap-include-dir" >&2;}
2229    { (exit 1); exit 1; }; }
2230                 ;;
2231             yes)
2232                 ;;
2233             *)
2234                 rlm_ldap_include_dir="$withval"
2235                 ;;
2236           esac
2237
2238 fi;
2239
2240                 # Check whether --enable-shared or --disable-shared was given.
2241 if test "${enable_shared+set}" = set; then
2242   enableval="$enable_shared"
2243   p=${PACKAGE-default}
2244     case $enableval in
2245     yes) enable_shared=yes ;;
2246     no) enable_shared=no ;;
2247     *)
2248       enable_shared=no
2249       # Look at the argument we got.  We use all the common list separators.
2250       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2251       for pkg in $enableval; do
2252         IFS="$lt_save_ifs"
2253         if test "X$pkg" = "X$p"; then
2254           enable_shared=yes
2255         fi
2256       done
2257       IFS="$lt_save_ifs"
2258       ;;
2259     esac
2260 else
2261   enable_shared=yes
2262 fi;
2263
2264
2265                                 if test "x$enable_shared" = "xno"; then
2266                 { echo "$as_me:$LINENO: WARNING: Static linking with libldap will probably result in unresolved symbols." >&5
2267 echo "$as_me: WARNING: Static linking with libldap will probably result in unresolved symbols." >&2;}
2268         fi
2269
2270                 rlm_ldap_with_threads=yes
2271
2272 # Check whether --with-threads or --without-threads was given.
2273 if test "${with_threads+set}" = set; then
2274   withval="$with_threads"
2275    case "$withval" in
2276             no)
2277                 rlm_ldap_with_threads=no
2278                 ;;
2279             *)
2280                 ;;
2281             esac
2282 fi;
2283
2284
2285                         if test "x$rlm_ldap_with_threads" = "xyes"; then
2286             echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
2287 echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
2288 if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
2289   echo $ECHO_N "(cached) $ECHO_C" >&6
2290 else
2291   ac_check_lib_save_LIBS=$LIBS
2292 LIBS="-lpthread  $LIBS"
2293 cat >conftest.$ac_ext <<_ACEOF
2294 /* confdefs.h.  */
2295 _ACEOF
2296 cat confdefs.h >>conftest.$ac_ext
2297 cat >>conftest.$ac_ext <<_ACEOF
2298 /* end confdefs.h.  */
2299
2300 /* Override any gcc2 internal prototype to avoid an error.  */
2301 #ifdef __cplusplus
2302 extern "C"
2303 #endif
2304 /* We use char because int might match the return type of a gcc2
2305    builtin and then its argument prototype would still apply.  */
2306 char pthread_create ();
2307 int
2308 main ()
2309 {
2310 pthread_create ();
2311   ;
2312   return 0;
2313 }
2314 _ACEOF
2315 rm -f conftest.$ac_objext conftest$ac_exeext
2316 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2317   (eval $ac_link) 2>conftest.er1
2318   ac_status=$?
2319   grep -v '^ *+' conftest.er1 >conftest.err
2320   rm -f conftest.er1
2321   cat conftest.err >&5
2322   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2323   (exit $ac_status); } &&
2324          { ac_try='test -z "$ac_c_werror_flag"
2325                          || test ! -s conftest.err'
2326   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2327   (eval $ac_try) 2>&5
2328   ac_status=$?
2329   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2330   (exit $ac_status); }; } &&
2331          { ac_try='test -s conftest$ac_exeext'
2332   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2333   (eval $ac_try) 2>&5
2334   ac_status=$?
2335   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2336   (exit $ac_status); }; }; then
2337   ac_cv_lib_pthread_pthread_create=yes
2338 else
2339   echo "$as_me: failed program was:" >&5
2340 sed 's/^/| /' conftest.$ac_ext >&5
2341
2342 ac_cv_lib_pthread_pthread_create=no
2343 fi
2344 rm -f conftest.err conftest.$ac_objext \
2345       conftest$ac_exeext conftest.$ac_ext
2346 LIBS=$ac_check_lib_save_LIBS
2347 fi
2348 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
2349 echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6
2350 if test $ac_cv_lib_pthread_pthread_create = yes; then
2351    LIBS="-lpthread $LIBS"
2352 else
2353   echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
2354 echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
2355 if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
2356   echo $ECHO_N "(cached) $ECHO_C" >&6
2357 else
2358   ac_check_lib_save_LIBS=$LIBS
2359 LIBS="-lc_r  $LIBS"
2360
2361 cat >conftest.$ac_ext <<_ACEOF
2362 /* confdefs.h.  */
2363 _ACEOF
2364 cat confdefs.h >>conftest.$ac_ext
2365 cat >>conftest.$ac_ext <<_ACEOF
2366 /* end confdefs.h.  */
2367
2368 /* Override any gcc2 internal prototype to avoid an error.  */
2369 #ifdef __cplusplus
2370 extern "C"
2371 #endif
2372 /* We use char because int might match the return type of a gcc2
2373    builtin and then its argument prototype would still apply.  */
2374 char pthread_create ();
2375 int
2376 main ()
2377 {
2378 pthread_create ();
2379   ;
2380   return 0;
2381 }
2382 _ACEOF
2383 rm -f conftest.$ac_objext conftest$ac_exeext
2384 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2385   (eval $ac_link) 2>conftest.er1
2386   ac_status=$?
2387   grep -v '^ *+' conftest.er1 >conftest.err
2388   rm -f conftest.er1
2389   cat conftest.err >&5
2390   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2391   (exit $ac_status); } &&
2392          { ac_try='test -z "$ac_c_werror_flag"
2393                          || test ! -s conftest.err'
2394   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2395   (eval $ac_try) 2>&5
2396   ac_status=$?
2397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2398   (exit $ac_status); }; } &&
2399          { ac_try='test -s conftest$ac_exeext'
2400   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2401   (eval $ac_try) 2>&5
2402   ac_status=$?
2403   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2404   (exit $ac_status); }; }; then
2405   ac_cv_lib_c_r_pthread_create=yes
2406 else
2407   echo "$as_me: failed program was:" >&5
2408 sed 's/^/| /' conftest.$ac_ext >&5
2409
2410 ac_cv_lib_c_r_pthread_create=no
2411 fi
2412 rm -f conftest.err conftest.$ac_objext \
2413       conftest$ac_exeext conftest.$ac_ext
2414 LIBS=$ac_check_lib_save_LIBS
2415 fi
2416 echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
2417 echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
2418 if test $ac_cv_lib_c_r_pthread_create = yes; then
2419    LIBS="-lc_r $LIBS"
2420 else
2421    rlm_ldap_with_threads="no"
2422
2423 fi
2424
2425
2426 fi
2427
2428         fi
2429
2430                                 smart_try_dir=$rlm_ldap_lib_dir
2431         if test "x$rlm_ldap_with_threads" = "xyes"; then
2432
2433
2434 sm_lib_safe=`echo "ldap_r" | sed 'y%./+-%__p_%'`
2435 sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'`
2436 echo "$as_me:$LINENO: checking for ldap_init in -lldap_r" >&5
2437 echo $ECHO_N "checking for ldap_init in -lldap_r... $ECHO_C" >&6
2438
2439 old_LIBS="$LIBS"
2440 smart_lib=
2441 smart_lib_dir=
2442
2443 if test "x$smart_try_dir" != "x"; then
2444   for try in $smart_try_dir; do
2445     LIBS="-L$try -lldap_r $old_LIBS"
2446     cat >conftest.$ac_ext <<_ACEOF
2447 /* confdefs.h.  */
2448 _ACEOF
2449 cat confdefs.h >>conftest.$ac_ext
2450 cat >>conftest.$ac_ext <<_ACEOF
2451 /* end confdefs.h.  */
2452 extern char ldap_init();
2453 int
2454 main ()
2455 {
2456  ldap_init()
2457   ;
2458   return 0;
2459 }
2460 _ACEOF
2461 rm -f conftest.$ac_objext conftest$ac_exeext
2462 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2463   (eval $ac_link) 2>conftest.er1
2464   ac_status=$?
2465   grep -v '^ *+' conftest.er1 >conftest.err
2466   rm -f conftest.er1
2467   cat conftest.err >&5
2468   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2469   (exit $ac_status); } &&
2470          { ac_try='test -z "$ac_c_werror_flag"
2471                          || test ! -s conftest.err'
2472   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2473   (eval $ac_try) 2>&5
2474   ac_status=$?
2475   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2476   (exit $ac_status); }; } &&
2477          { ac_try='test -s conftest$ac_exeext'
2478   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2479   (eval $ac_try) 2>&5
2480   ac_status=$?
2481   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2482   (exit $ac_status); }; }; then
2483   smart_lib="-L$try -lldap_r"
2484 else
2485   echo "$as_me: failed program was:" >&5
2486 sed 's/^/| /' conftest.$ac_ext >&5
2487
2488 fi
2489 rm -f conftest.err conftest.$ac_objext \
2490       conftest$ac_exeext conftest.$ac_ext
2491     if test "x$smart_lib" != "x"; then
2492       break;
2493     fi
2494   done
2495   LIBS="$old_LIBS"
2496 fi
2497
2498 if test "x$smart_lib" = "x"; then
2499   LIBS="-lldap_r $old_LIBS"
2500   cat >conftest.$ac_ext <<_ACEOF
2501 /* confdefs.h.  */
2502 _ACEOF
2503 cat confdefs.h >>conftest.$ac_ext
2504 cat >>conftest.$ac_ext <<_ACEOF
2505 /* end confdefs.h.  */
2506 extern char ldap_init();
2507 int
2508 main ()
2509 {
2510  ldap_init()
2511   ;
2512   return 0;
2513 }
2514 _ACEOF
2515 rm -f conftest.$ac_objext conftest$ac_exeext
2516 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2517   (eval $ac_link) 2>conftest.er1
2518   ac_status=$?
2519   grep -v '^ *+' conftest.er1 >conftest.err
2520   rm -f conftest.er1
2521   cat conftest.err >&5
2522   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2523   (exit $ac_status); } &&
2524          { ac_try='test -z "$ac_c_werror_flag"
2525                          || test ! -s conftest.err'
2526   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2527   (eval $ac_try) 2>&5
2528   ac_status=$?
2529   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2530   (exit $ac_status); }; } &&
2531          { ac_try='test -s conftest$ac_exeext'
2532   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2533   (eval $ac_try) 2>&5
2534   ac_status=$?
2535   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2536   (exit $ac_status); }; }; then
2537   smart_lib="-lldap_r"
2538 else
2539   echo "$as_me: failed program was:" >&5
2540 sed 's/^/| /' conftest.$ac_ext >&5
2541
2542 fi
2543 rm -f conftest.err conftest.$ac_objext \
2544       conftest$ac_exeext conftest.$ac_ext
2545   LIBS="$old_LIBS"
2546 fi
2547
2548 if test "x$smart_lib" = "x"; then
2549
2550
2551 if test "x$LOCATE" != "x"; then
2552         DIRS=
2553   file=libldap_r${libltdl_cv_shlibext}
2554
2555   for x in `${LOCATE} $file 2>/dev/null`; do
2556                                         base=`echo $x | sed "s%/${file}%%"`
2557     if test "x$x" = "x$base"; then
2558       continue;
2559     fi
2560
2561     dir=`${DIRNAME} $x 2>/dev/null`
2562                 exclude=`echo ${dir} | ${GREP} /home`
2563     if test "x$exclude" != "x"; then
2564       continue
2565     fi
2566
2567                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
2568     if test "x$already" = "x"; then
2569       DIRS="$DIRS $dir"
2570     fi
2571   done
2572 fi
2573
2574 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
2575
2576
2577
2578 if test "x$LOCATE" != "x"; then
2579         DIRS=
2580   file=libldap_r.a
2581
2582   for x in `${LOCATE} $file 2>/dev/null`; do
2583                                         base=`echo $x | sed "s%/${file}%%"`
2584     if test "x$x" = "x$base"; then
2585       continue;
2586     fi
2587
2588     dir=`${DIRNAME} $x 2>/dev/null`
2589                 exclude=`echo ${dir} | ${GREP} /home`
2590     if test "x$exclude" != "x"; then
2591       continue
2592     fi
2593
2594                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
2595     if test "x$already" = "x"; then
2596       DIRS="$DIRS $dir"
2597     fi
2598   done
2599 fi
2600
2601 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
2602
2603
2604   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
2605     LIBS="-L$try -lldap_r $old_LIBS"
2606     cat >conftest.$ac_ext <<_ACEOF
2607 /* confdefs.h.  */
2608 _ACEOF
2609 cat confdefs.h >>conftest.$ac_ext
2610 cat >>conftest.$ac_ext <<_ACEOF
2611 /* end confdefs.h.  */
2612 extern char ldap_init();
2613 int
2614 main ()
2615 {
2616  ldap_init()
2617   ;
2618   return 0;
2619 }
2620 _ACEOF
2621 rm -f conftest.$ac_objext conftest$ac_exeext
2622 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2623   (eval $ac_link) 2>conftest.er1
2624   ac_status=$?
2625   grep -v '^ *+' conftest.er1 >conftest.err
2626   rm -f conftest.er1
2627   cat conftest.err >&5
2628   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2629   (exit $ac_status); } &&
2630          { ac_try='test -z "$ac_c_werror_flag"
2631                          || test ! -s conftest.err'
2632   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2633   (eval $ac_try) 2>&5
2634   ac_status=$?
2635   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2636   (exit $ac_status); }; } &&
2637          { ac_try='test -s conftest$ac_exeext'
2638   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2639   (eval $ac_try) 2>&5
2640   ac_status=$?
2641   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2642   (exit $ac_status); }; }; then
2643   smart_lib="-L$try -lldap_r"
2644 else
2645   echo "$as_me: failed program was:" >&5
2646 sed 's/^/| /' conftest.$ac_ext >&5
2647
2648 fi
2649 rm -f conftest.err conftest.$ac_objext \
2650       conftest$ac_exeext conftest.$ac_ext
2651     if test "x$smart_lib" != "x"; then
2652       break;
2653     fi
2654   done
2655   LIBS="$old_LIBS"
2656 fi
2657
2658 if test "x$smart_lib" != "x"; then
2659   echo "$as_me:$LINENO: result: yes" >&5
2660 echo "${ECHO_T}yes" >&6
2661   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
2662   LIBS="$smart_lib $old_LIBS"
2663   SMART_LIBS="$smart_lib $SMART_LIBS"
2664 else
2665   echo "$as_me:$LINENO: result: no" >&5
2666 echo "${ECHO_T}no" >&6
2667 fi
2668
2669             if test "x$ac_cv_lib_ldap_r_ldap_init" != "xyes"; then
2670                 fail="$fail libldap_r"
2671             fi
2672         else
2673
2674
2675 sm_lib_safe=`echo "ldap" | sed 'y%./+-%__p_%'`
2676 sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'`
2677 echo "$as_me:$LINENO: checking for ldap_init in -lldap" >&5
2678 echo $ECHO_N "checking for ldap_init in -lldap... $ECHO_C" >&6
2679
2680 old_LIBS="$LIBS"
2681 smart_lib=
2682 smart_lib_dir=
2683
2684 if test "x$smart_try_dir" != "x"; then
2685   for try in $smart_try_dir; do
2686     LIBS="-L$try -lldap $old_LIBS"
2687     cat >conftest.$ac_ext <<_ACEOF
2688 /* confdefs.h.  */
2689 _ACEOF
2690 cat confdefs.h >>conftest.$ac_ext
2691 cat >>conftest.$ac_ext <<_ACEOF
2692 /* end confdefs.h.  */
2693 extern char ldap_init();
2694 int
2695 main ()
2696 {
2697  ldap_init()
2698   ;
2699   return 0;
2700 }
2701 _ACEOF
2702 rm -f conftest.$ac_objext conftest$ac_exeext
2703 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2704   (eval $ac_link) 2>conftest.er1
2705   ac_status=$?
2706   grep -v '^ *+' conftest.er1 >conftest.err
2707   rm -f conftest.er1
2708   cat conftest.err >&5
2709   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2710   (exit $ac_status); } &&
2711          { ac_try='test -z "$ac_c_werror_flag"
2712                          || test ! -s conftest.err'
2713   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2714   (eval $ac_try) 2>&5
2715   ac_status=$?
2716   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2717   (exit $ac_status); }; } &&
2718          { ac_try='test -s conftest$ac_exeext'
2719   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2720   (eval $ac_try) 2>&5
2721   ac_status=$?
2722   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2723   (exit $ac_status); }; }; then
2724   smart_lib="-L$try -lldap"
2725 else
2726   echo "$as_me: failed program was:" >&5
2727 sed 's/^/| /' conftest.$ac_ext >&5
2728
2729 fi
2730 rm -f conftest.err conftest.$ac_objext \
2731       conftest$ac_exeext conftest.$ac_ext
2732     if test "x$smart_lib" != "x"; then
2733       break;
2734     fi
2735   done
2736   LIBS="$old_LIBS"
2737 fi
2738
2739 if test "x$smart_lib" = "x"; then
2740   LIBS="-lldap $old_LIBS"
2741   cat >conftest.$ac_ext <<_ACEOF
2742 /* confdefs.h.  */
2743 _ACEOF
2744 cat confdefs.h >>conftest.$ac_ext
2745 cat >>conftest.$ac_ext <<_ACEOF
2746 /* end confdefs.h.  */
2747 extern char ldap_init();
2748 int
2749 main ()
2750 {
2751  ldap_init()
2752   ;
2753   return 0;
2754 }
2755 _ACEOF
2756 rm -f conftest.$ac_objext conftest$ac_exeext
2757 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2758   (eval $ac_link) 2>conftest.er1
2759   ac_status=$?
2760   grep -v '^ *+' conftest.er1 >conftest.err
2761   rm -f conftest.er1
2762   cat conftest.err >&5
2763   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2764   (exit $ac_status); } &&
2765          { ac_try='test -z "$ac_c_werror_flag"
2766                          || test ! -s conftest.err'
2767   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2768   (eval $ac_try) 2>&5
2769   ac_status=$?
2770   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2771   (exit $ac_status); }; } &&
2772          { ac_try='test -s conftest$ac_exeext'
2773   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2774   (eval $ac_try) 2>&5
2775   ac_status=$?
2776   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2777   (exit $ac_status); }; }; then
2778   smart_lib="-lldap"
2779 else
2780   echo "$as_me: failed program was:" >&5
2781 sed 's/^/| /' conftest.$ac_ext >&5
2782
2783 fi
2784 rm -f conftest.err conftest.$ac_objext \
2785       conftest$ac_exeext conftest.$ac_ext
2786   LIBS="$old_LIBS"
2787 fi
2788
2789 if test "x$smart_lib" = "x"; then
2790
2791
2792 if test "x$LOCATE" != "x"; then
2793         DIRS=
2794   file=libldap${libltdl_cv_shlibext}
2795
2796   for x in `${LOCATE} $file 2>/dev/null`; do
2797                                         base=`echo $x | sed "s%/${file}%%"`
2798     if test "x$x" = "x$base"; then
2799       continue;
2800     fi
2801
2802     dir=`${DIRNAME} $x 2>/dev/null`
2803                 exclude=`echo ${dir} | ${GREP} /home`
2804     if test "x$exclude" != "x"; then
2805       continue
2806     fi
2807
2808                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
2809     if test "x$already" = "x"; then
2810       DIRS="$DIRS $dir"
2811     fi
2812   done
2813 fi
2814
2815 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
2816
2817
2818
2819 if test "x$LOCATE" != "x"; then
2820         DIRS=
2821   file=libldap.a
2822
2823   for x in `${LOCATE} $file 2>/dev/null`; do
2824                                         base=`echo $x | sed "s%/${file}%%"`
2825     if test "x$x" = "x$base"; then
2826       continue;
2827     fi
2828
2829     dir=`${DIRNAME} $x 2>/dev/null`
2830                 exclude=`echo ${dir} | ${GREP} /home`
2831     if test "x$exclude" != "x"; then
2832       continue
2833     fi
2834
2835                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
2836     if test "x$already" = "x"; then
2837       DIRS="$DIRS $dir"
2838     fi
2839   done
2840 fi
2841
2842 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
2843
2844
2845   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
2846     LIBS="-L$try -lldap $old_LIBS"
2847     cat >conftest.$ac_ext <<_ACEOF
2848 /* confdefs.h.  */
2849 _ACEOF
2850 cat confdefs.h >>conftest.$ac_ext
2851 cat >>conftest.$ac_ext <<_ACEOF
2852 /* end confdefs.h.  */
2853 extern char ldap_init();
2854 int
2855 main ()
2856 {
2857  ldap_init()
2858   ;
2859   return 0;
2860 }
2861 _ACEOF
2862 rm -f conftest.$ac_objext conftest$ac_exeext
2863 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2864   (eval $ac_link) 2>conftest.er1
2865   ac_status=$?
2866   grep -v '^ *+' conftest.er1 >conftest.err
2867   rm -f conftest.er1
2868   cat conftest.err >&5
2869   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2870   (exit $ac_status); } &&
2871          { ac_try='test -z "$ac_c_werror_flag"
2872                          || test ! -s conftest.err'
2873   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2874   (eval $ac_try) 2>&5
2875   ac_status=$?
2876   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2877   (exit $ac_status); }; } &&
2878          { ac_try='test -s conftest$ac_exeext'
2879   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2880   (eval $ac_try) 2>&5
2881   ac_status=$?
2882   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2883   (exit $ac_status); }; }; then
2884   smart_lib="-L$try -lldap"
2885 else
2886   echo "$as_me: failed program was:" >&5
2887 sed 's/^/| /' conftest.$ac_ext >&5
2888
2889 fi
2890 rm -f conftest.err conftest.$ac_objext \
2891       conftest$ac_exeext conftest.$ac_ext
2892     if test "x$smart_lib" != "x"; then
2893       break;
2894     fi
2895   done
2896   LIBS="$old_LIBS"
2897 fi
2898
2899 if test "x$smart_lib" != "x"; then
2900   echo "$as_me:$LINENO: result: yes" >&5
2901 echo "${ECHO_T}yes" >&6
2902   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
2903   LIBS="$smart_lib $old_LIBS"
2904   SMART_LIBS="$smart_lib $SMART_LIBS"
2905 else
2906   echo "$as_me:$LINENO: result: no" >&5
2907 echo "${ECHO_T}no" >&6
2908 fi
2909
2910             if test "x$ac_cv_lib_ldap_ldap_init" != "xyes"; then
2911                 fail="$fail libldap"
2912             fi
2913         fi
2914
2915
2916         smart_try_dir=$rlm_ldap_include_dir
2917
2918
2919 ac_safe=`echo "ldap.h" | sed 'y%./+-%__pm%'`
2920 echo "$as_me:$LINENO: checking for ldap.h" >&5
2921 echo $ECHO_N "checking for ldap.h... $ECHO_C" >&6
2922
2923 old_CFLAGS="$CFLAGS"
2924 smart_include=
2925 smart_include_dir=
2926
2927 if test "x$smart_try_dir" != "x"; then
2928   for try in $smart_try_dir; do
2929     CFLAGS="$old_CFLAGS -I$try"
2930     cat >conftest.$ac_ext <<_ACEOF
2931 /* confdefs.h.  */
2932 _ACEOF
2933 cat confdefs.h >>conftest.$ac_ext
2934 cat >>conftest.$ac_ext <<_ACEOF
2935 /* end confdefs.h.  */
2936
2937                     #include <ldap.h>
2938 int
2939 main ()
2940 {
2941  int a = 1;
2942   ;
2943   return 0;
2944 }
2945 _ACEOF
2946 rm -f conftest.$ac_objext
2947 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2948   (eval $ac_compile) 2>conftest.er1
2949   ac_status=$?
2950   grep -v '^ *+' conftest.er1 >conftest.err
2951   rm -f conftest.er1
2952   cat conftest.err >&5
2953   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2954   (exit $ac_status); } &&
2955          { ac_try='test -z "$ac_c_werror_flag"
2956                          || test ! -s conftest.err'
2957   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2958   (eval $ac_try) 2>&5
2959   ac_status=$?
2960   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2961   (exit $ac_status); }; } &&
2962          { ac_try='test -s conftest.$ac_objext'
2963   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2964   (eval $ac_try) 2>&5
2965   ac_status=$?
2966   echo "$as_me:$LINENO: \$? = $ac_status" >&5
2967   (exit $ac_status); }; }; then
2968   smart_include="-I$try"
2969 else
2970   echo "$as_me: failed program was:" >&5
2971 sed 's/^/| /' conftest.$ac_ext >&5
2972
2973 smart_include=
2974 fi
2975 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2976     if test "x$smart_include" != "x"; then
2977       break;
2978     fi
2979   done
2980   CFLAGS="$old_CFLAGS"
2981 fi
2982
2983 if test "x$smart_include" = "x"; then
2984   cat >conftest.$ac_ext <<_ACEOF
2985 /* confdefs.h.  */
2986 _ACEOF
2987 cat confdefs.h >>conftest.$ac_ext
2988 cat >>conftest.$ac_ext <<_ACEOF
2989 /* end confdefs.h.  */
2990
2991                   #include <ldap.h>
2992 int
2993 main ()
2994 {
2995  int a = 1;
2996   ;
2997   return 0;
2998 }
2999 _ACEOF
3000 rm -f conftest.$ac_objext
3001 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3002   (eval $ac_compile) 2>conftest.er1
3003   ac_status=$?
3004   grep -v '^ *+' conftest.er1 >conftest.err
3005   rm -f conftest.er1
3006   cat conftest.err >&5
3007   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3008   (exit $ac_status); } &&
3009          { ac_try='test -z "$ac_c_werror_flag"
3010                          || test ! -s conftest.err'
3011   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3012   (eval $ac_try) 2>&5
3013   ac_status=$?
3014   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3015   (exit $ac_status); }; } &&
3016          { ac_try='test -s conftest.$ac_objext'
3017   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3018   (eval $ac_try) 2>&5
3019   ac_status=$?
3020   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3021   (exit $ac_status); }; }; then
3022   smart_include=" "
3023 else
3024   echo "$as_me: failed program was:" >&5
3025 sed 's/^/| /' conftest.$ac_ext >&5
3026
3027 smart_include=
3028 fi
3029 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3030 fi
3031
3032 if test "x$smart_include" = "x"; then
3033
3034
3035 if test "x$LOCATE" != "x"; then
3036         DIRS=
3037   file=ldap.h
3038
3039   for x in `${LOCATE} $file 2>/dev/null`; do
3040                                         base=`echo $x | sed "s%/${file}%%"`
3041     if test "x$x" = "x$base"; then
3042       continue;
3043     fi
3044
3045     dir=`${DIRNAME} $x 2>/dev/null`
3046                 exclude=`echo ${dir} | ${GREP} /home`
3047     if test "x$exclude" != "x"; then
3048       continue
3049     fi
3050
3051                     already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
3052     if test "x$already" = "x"; then
3053       DIRS="$DIRS $dir"
3054     fi
3055   done
3056 fi
3057
3058 eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
3059
3060
3061   for try in $smart_include_dir /usr/local/include /opt/include; do
3062     CFLAGS="$old_CFLAGS -I$try"
3063     cat >conftest.$ac_ext <<_ACEOF
3064 /* confdefs.h.  */
3065 _ACEOF
3066 cat confdefs.h >>conftest.$ac_ext
3067 cat >>conftest.$ac_ext <<_ACEOF
3068 /* end confdefs.h.  */
3069
3070                     #include <ldap.h>
3071 int
3072 main ()
3073 {
3074  int a = 1;
3075   ;
3076   return 0;
3077 }
3078 _ACEOF
3079 rm -f conftest.$ac_objext
3080 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3081   (eval $ac_compile) 2>conftest.er1
3082   ac_status=$?
3083   grep -v '^ *+' conftest.er1 >conftest.err
3084   rm -f conftest.er1
3085   cat conftest.err >&5
3086   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3087   (exit $ac_status); } &&
3088          { ac_try='test -z "$ac_c_werror_flag"
3089                          || test ! -s conftest.err'
3090   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3091   (eval $ac_try) 2>&5
3092   ac_status=$?
3093   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3094   (exit $ac_status); }; } &&
3095          { ac_try='test -s conftest.$ac_objext'
3096   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3097   (eval $ac_try) 2>&5
3098   ac_status=$?
3099   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3100   (exit $ac_status); }; }; then
3101   smart_include="-I$try"
3102 else
3103   echo "$as_me: failed program was:" >&5
3104 sed 's/^/| /' conftest.$ac_ext >&5
3105
3106 smart_include=
3107 fi
3108 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3109     if test "x$smart_include" != "x"; then
3110       break;
3111     fi
3112   done
3113   CFLAGS="$old_CFLAGS"
3114 fi
3115
3116 if test "x$smart_include" != "x"; then
3117   echo "$as_me:$LINENO: result: yes" >&5
3118 echo "${ECHO_T}yes" >&6
3119   eval "ac_cv_header_$ac_safe=yes"
3120   CFLAGS="$old_CFLAGS $smart_include"
3121   SMART_CFLAGS="$SMART_CFLAGS $smart_include"
3122 else
3123   echo "$as_me:$LINENO: result: no" >&5
3124 echo "${ECHO_T}no" >&6
3125 fi
3126
3127         if test "$ac_cv_header_ldap_h" != "yes"; then
3128           fail="$fail ldap.h"
3129         fi
3130
3131
3132         if test "x$fail" = "x"; then
3133             echo "$as_me:$LINENO: checking for ldap_start_tls_s" >&5
3134 echo $ECHO_N "checking for ldap_start_tls_s... $ECHO_C" >&6
3135 if test "${ac_cv_func_ldap_start_tls_s+set}" = set; then
3136   echo $ECHO_N "(cached) $ECHO_C" >&6
3137 else
3138   cat >conftest.$ac_ext <<_ACEOF
3139 /* confdefs.h.  */
3140 _ACEOF
3141 cat confdefs.h >>conftest.$ac_ext
3142 cat >>conftest.$ac_ext <<_ACEOF
3143 /* end confdefs.h.  */
3144 /* Define ldap_start_tls_s to an innocuous variant, in case <limits.h> declares ldap_start_tls_s.
3145    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3146 #define ldap_start_tls_s innocuous_ldap_start_tls_s
3147
3148 /* System header to define __stub macros and hopefully few prototypes,
3149     which can conflict with char ldap_start_tls_s (); below.
3150     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3151     <limits.h> exists even on freestanding compilers.  */
3152
3153 #ifdef __STDC__
3154 # include <limits.h>
3155 #else
3156 # include <assert.h>
3157 #endif
3158
3159 #undef ldap_start_tls_s
3160
3161 /* Override any gcc2 internal prototype to avoid an error.  */
3162 #ifdef __cplusplus
3163 extern "C"
3164 {
3165 #endif
3166 /* We use char because int might match the return type of a gcc2
3167    builtin and then its argument prototype would still apply.  */
3168 char ldap_start_tls_s ();
3169 /* The GNU C library defines this for functions which it implements
3170     to always fail with ENOSYS.  Some functions are actually named
3171     something starting with __ and the normal name is an alias.  */
3172 #if defined (__stub_ldap_start_tls_s) || defined (__stub___ldap_start_tls_s)
3173 choke me
3174 #else
3175 char (*f) () = ldap_start_tls_s;
3176 #endif
3177 #ifdef __cplusplus
3178 }
3179 #endif
3180
3181 int
3182 main ()
3183 {
3184 return f != ldap_start_tls_s;
3185   ;
3186   return 0;
3187 }
3188 _ACEOF
3189 rm -f conftest.$ac_objext conftest$ac_exeext
3190 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3191   (eval $ac_link) 2>conftest.er1
3192   ac_status=$?
3193   grep -v '^ *+' conftest.er1 >conftest.err
3194   rm -f conftest.er1
3195   cat conftest.err >&5
3196   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3197   (exit $ac_status); } &&
3198          { ac_try='test -z "$ac_c_werror_flag"
3199                          || test ! -s conftest.err'
3200   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3201   (eval $ac_try) 2>&5
3202   ac_status=$?
3203   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3204   (exit $ac_status); }; } &&
3205          { ac_try='test -s conftest$ac_exeext'
3206   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3207   (eval $ac_try) 2>&5
3208   ac_status=$?
3209   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3210   (exit $ac_status); }; }; then
3211   ac_cv_func_ldap_start_tls_s=yes
3212 else
3213   echo "$as_me: failed program was:" >&5
3214 sed 's/^/| /' conftest.$ac_ext >&5
3215
3216 ac_cv_func_ldap_start_tls_s=no
3217 fi
3218 rm -f conftest.err conftest.$ac_objext \
3219       conftest$ac_exeext conftest.$ac_ext
3220 fi
3221 echo "$as_me:$LINENO: result: $ac_cv_func_ldap_start_tls_s" >&5
3222 echo "${ECHO_T}$ac_cv_func_ldap_start_tls_s" >&6
3223 if test $ac_cv_func_ldap_start_tls_s = yes; then
3224    SMART_CFLAGS="$SMART_CFLAGS -DHAVE_LDAP_START_TLS"
3225 fi
3226
3227             echo "$as_me:$LINENO: checking for ldap_initialize" >&5
3228 echo $ECHO_N "checking for ldap_initialize... $ECHO_C" >&6
3229 if test "${ac_cv_func_ldap_initialize+set}" = set; then
3230   echo $ECHO_N "(cached) $ECHO_C" >&6
3231 else
3232   cat >conftest.$ac_ext <<_ACEOF
3233 /* confdefs.h.  */
3234 _ACEOF
3235 cat confdefs.h >>conftest.$ac_ext
3236 cat >>conftest.$ac_ext <<_ACEOF
3237 /* end confdefs.h.  */
3238 /* Define ldap_initialize to an innocuous variant, in case <limits.h> declares ldap_initialize.
3239    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3240 #define ldap_initialize innocuous_ldap_initialize
3241
3242 /* System header to define __stub macros and hopefully few prototypes,
3243     which can conflict with char ldap_initialize (); below.
3244     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3245     <limits.h> exists even on freestanding compilers.  */
3246
3247 #ifdef __STDC__
3248 # include <limits.h>
3249 #else
3250 # include <assert.h>
3251 #endif
3252
3253 #undef ldap_initialize
3254
3255 /* Override any gcc2 internal prototype to avoid an error.  */
3256 #ifdef __cplusplus
3257 extern "C"
3258 {
3259 #endif
3260 /* We use char because int might match the return type of a gcc2
3261    builtin and then its argument prototype would still apply.  */
3262 char ldap_initialize ();
3263 /* The GNU C library defines this for functions which it implements
3264     to always fail with ENOSYS.  Some functions are actually named
3265     something starting with __ and the normal name is an alias.  */
3266 #if defined (__stub_ldap_initialize) || defined (__stub___ldap_initialize)
3267 choke me
3268 #else
3269 char (*f) () = ldap_initialize;
3270 #endif
3271 #ifdef __cplusplus
3272 }
3273 #endif
3274
3275 int
3276 main ()
3277 {
3278 return f != ldap_initialize;
3279   ;
3280   return 0;
3281 }
3282 _ACEOF
3283 rm -f conftest.$ac_objext conftest$ac_exeext
3284 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3285   (eval $ac_link) 2>conftest.er1
3286   ac_status=$?
3287   grep -v '^ *+' conftest.er1 >conftest.err
3288   rm -f conftest.er1
3289   cat conftest.err >&5
3290   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3291   (exit $ac_status); } &&
3292          { ac_try='test -z "$ac_c_werror_flag"
3293                          || test ! -s conftest.err'
3294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3295   (eval $ac_try) 2>&5
3296   ac_status=$?
3297   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3298   (exit $ac_status); }; } &&
3299          { ac_try='test -s conftest$ac_exeext'
3300   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3301   (eval $ac_try) 2>&5
3302   ac_status=$?
3303   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3304   (exit $ac_status); }; }; then
3305   ac_cv_func_ldap_initialize=yes
3306 else
3307   echo "$as_me: failed program was:" >&5
3308 sed 's/^/| /' conftest.$ac_ext >&5
3309
3310 ac_cv_func_ldap_initialize=no
3311 fi
3312 rm -f conftest.err conftest.$ac_objext \
3313       conftest$ac_exeext conftest.$ac_ext
3314 fi
3315 echo "$as_me:$LINENO: result: $ac_cv_func_ldap_initialize" >&5
3316 echo "${ECHO_T}$ac_cv_func_ldap_initialize" >&6
3317 if test $ac_cv_func_ldap_initialize = yes; then
3318    SMART_CFLAGS="$SMART_CFLAGS -DHAVE_LDAP_INITIALIZE"
3319 fi
3320
3321             echo "$as_me:$LINENO: checking for ldap_int_tls_config" >&5
3322 echo $ECHO_N "checking for ldap_int_tls_config... $ECHO_C" >&6
3323 if test "${ac_cv_func_ldap_int_tls_config+set}" = set; then
3324   echo $ECHO_N "(cached) $ECHO_C" >&6
3325 else
3326   cat >conftest.$ac_ext <<_ACEOF
3327 /* confdefs.h.  */
3328 _ACEOF
3329 cat confdefs.h >>conftest.$ac_ext
3330 cat >>conftest.$ac_ext <<_ACEOF
3331 /* end confdefs.h.  */
3332 /* Define ldap_int_tls_config to an innocuous variant, in case <limits.h> declares ldap_int_tls_config.
3333    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3334 #define ldap_int_tls_config innocuous_ldap_int_tls_config
3335
3336 /* System header to define __stub macros and hopefully few prototypes,
3337     which can conflict with char ldap_int_tls_config (); below.
3338     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3339     <limits.h> exists even on freestanding compilers.  */
3340
3341 #ifdef __STDC__
3342 # include <limits.h>
3343 #else
3344 # include <assert.h>
3345 #endif
3346
3347 #undef ldap_int_tls_config
3348
3349 /* Override any gcc2 internal prototype to avoid an error.  */
3350 #ifdef __cplusplus
3351 extern "C"
3352 {
3353 #endif
3354 /* We use char because int might match the return type of a gcc2
3355    builtin and then its argument prototype would still apply.  */
3356 char ldap_int_tls_config ();
3357 /* The GNU C library defines this for functions which it implements
3358     to always fail with ENOSYS.  Some functions are actually named
3359     something starting with __ and the normal name is an alias.  */
3360 #if defined (__stub_ldap_int_tls_config) || defined (__stub___ldap_int_tls_config)
3361 choke me
3362 #else
3363 char (*f) () = ldap_int_tls_config;
3364 #endif
3365 #ifdef __cplusplus
3366 }
3367 #endif
3368
3369 int
3370 main ()
3371 {
3372 return f != ldap_int_tls_config;
3373   ;
3374   return 0;
3375 }
3376 _ACEOF
3377 rm -f conftest.$ac_objext conftest$ac_exeext
3378 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3379   (eval $ac_link) 2>conftest.er1
3380   ac_status=$?
3381   grep -v '^ *+' conftest.er1 >conftest.err
3382   rm -f conftest.er1
3383   cat conftest.err >&5
3384   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3385   (exit $ac_status); } &&
3386          { ac_try='test -z "$ac_c_werror_flag"
3387                          || test ! -s conftest.err'
3388   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3389   (eval $ac_try) 2>&5
3390   ac_status=$?
3391   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3392   (exit $ac_status); }; } &&
3393          { ac_try='test -s conftest$ac_exeext'
3394   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3395   (eval $ac_try) 2>&5
3396   ac_status=$?
3397   echo "$as_me:$LINENO: \$? = $ac_status" >&5
3398   (exit $ac_status); }; }; then
3399   ac_cv_func_ldap_int_tls_config=yes
3400 else
3401   echo "$as_me: failed program was:" >&5
3402 sed 's/^/| /' conftest.$ac_ext >&5
3403
3404 ac_cv_func_ldap_int_tls_config=no
3405 fi
3406 rm -f conftest.err conftest.$ac_objext \
3407       conftest$ac_exeext conftest.$ac_ext
3408 fi
3409 echo "$as_me:$LINENO: result: $ac_cv_func_ldap_int_tls_config" >&5
3410 echo "${ECHO_T}$ac_cv_func_ldap_int_tls_config" >&6
3411 if test $ac_cv_func_ldap_int_tls_config = yes; then
3412    SMART_CFLAGS="$SMART_CFLAGS -DHAVE_LDAP_INT_TLS_CONFIG"
3413 fi
3414
3415         fi
3416
3417         targetname=rlm_ldap
3418 else
3419         targetname=
3420         echo \*\*\* module rlm_ldap is disabled.
3421 fi
3422
3423 if test x"$fail" != x""; then
3424         if test x"${enable_strict_dependencies}" = x"yes"; then
3425                 { { echo "$as_me:$LINENO: error: set --without-rlm_ldap to disable it explicitly." >&5
3426 echo "$as_me: error: set --without-rlm_ldap to disable it explicitly." >&2;}
3427    { (exit 1); exit 1; }; }
3428         else
3429                 { echo "$as_me:$LINENO: WARNING: silently not building rlm_ldap." >&5
3430 echo "$as_me: WARNING: silently not building rlm_ldap." >&2;}
3431                 { echo "$as_me:$LINENO: WARNING: FAILURE: rlm_ldap requires: $fail." >&5
3432 echo "$as_me: WARNING: FAILURE: rlm_ldap requires: $fail." >&2;}
3433                 if test x"$headersuggestion" != x; then
3434                         { echo "$as_me:$LINENO: WARNING: $headersuggestion" >&5
3435 echo "$as_me: WARNING: $headersuggestion" >&2;}
3436                 fi
3437                 if test x"$libsuggestion" != x; then
3438                         { echo "$as_me:$LINENO: WARNING: $libsuggestion" >&5
3439 echo "$as_me: WARNING: $libsuggestion" >&2;}
3440                 fi
3441                 targetname=""
3442         fi
3443 fi
3444
3445 WITH_EDIRECTORY=no
3446
3447 # Check whether --with-edir or --without-edir was given.
3448 if test "${with_edir+set}" = set; then
3449   withval="$with_edir"
3450    case "$withval" in
3451     yes)
3452         SMART_CFLAGS="$SMART_CFLAGS -DNOVELL_UNIVERSAL_PASSWORD -DNOVELL"
3453         edir="edir_ldapext.c"
3454         ;;
3455     *)
3456         ;;
3457   esac
3458
3459 fi;
3460
3461 ldap_ldflags=$SMART_LIBS
3462 ldap_cflags=$SMART_CFLAGS
3463
3464
3465
3466
3467           ac_config_files="$ac_config_files Makefile"
3468 cat >confcache <<\_ACEOF
3469 # This file is a shell script that caches the results of configure
3470 # tests run on this system so they can be shared between configure
3471 # scripts and configure runs, see configure's option --config-cache.
3472 # It is not useful on other systems.  If it contains results you don't
3473 # want to keep, you may remove or edit it.
3474 #
3475 # config.status only pays attention to the cache file if you give it
3476 # the --recheck option to rerun configure.
3477 #
3478 # `ac_cv_env_foo' variables (set or unset) will be overridden when
3479 # loading this file, other *unset* `ac_cv_foo' will be assigned the
3480 # following values.
3481
3482 _ACEOF
3483
3484 # The following way of writing the cache mishandles newlines in values,
3485 # but we know of no workaround that is simple, portable, and efficient.
3486 # So, don't put newlines in cache variables' values.
3487 # Ultrix sh set writes to stderr and can't be redirected directly,
3488 # and sets the high bit in the cache file unless we assign to the vars.
3489 {
3490   (set) 2>&1 |
3491     case `(ac_space=' '; set | grep ac_space) 2>&1` in
3492     *ac_space=\ *)
3493       # `set' does not quote correctly, so add quotes (double-quote
3494       # substitution turns \\\\ into \\, and sed turns \\ into \).
3495       sed -n \
3496         "s/'/'\\\\''/g;
3497           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
3498       ;;
3499     *)
3500       # `set' quotes correctly as required by POSIX, so do not add quotes.
3501       sed -n \
3502         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
3503       ;;
3504     esac;
3505 } |
3506   sed '
3507      t clear
3508      : clear
3509      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
3510      t end
3511      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
3512      : end' >>confcache
3513 if diff $cache_file confcache >/dev/null 2>&1; then :; else
3514   if test -w $cache_file; then
3515     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
3516     cat confcache >$cache_file
3517   else
3518     echo "not updating unwritable cache $cache_file"
3519   fi
3520 fi
3521 rm -f confcache
3522
3523 test "x$prefix" = xNONE && prefix=$ac_default_prefix
3524 # Let make expand exec_prefix.
3525 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3526
3527 # VPATH may cause trouble with some makes, so we remove $(srcdir),
3528 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
3529 # trailing colons and then remove the whole line if VPATH becomes empty
3530 # (actually we leave an empty line to preserve line numbers).
3531 if test "x$srcdir" = x.; then
3532   ac_vpsub='/^[  ]*VPATH[        ]*=/{
3533 s/:*\$(srcdir):*/:/;
3534 s/:*\${srcdir}:*/:/;
3535 s/:*@srcdir@:*/:/;
3536 s/^\([^=]*=[     ]*\):*/\1/;
3537 s/:*$//;
3538 s/^[^=]*=[       ]*$//;
3539 }'
3540 fi
3541
3542 # Transform confdefs.h into DEFS.
3543 # Protect against shell expansion while executing Makefile rules.
3544 # Protect against Makefile macro expansion.
3545 #
3546 # If the first sed substitution is executed (which looks for macros that
3547 # take arguments), then we branch to the quote section.  Otherwise,
3548 # look for a macro that doesn't take arguments.
3549 cat >confdef2opt.sed <<\_ACEOF
3550 t clear
3551 : clear
3552 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\),-D\1=\2,g
3553 t quote
3554 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\),-D\1=\2,g
3555 t quote
3556 d
3557 : quote
3558 s,[      `~#$^&*(){}\\|;'"<>?],\\&,g
3559 s,\[,\\&,g
3560 s,\],\\&,g
3561 s,\$,$$,g
3562 p
3563 _ACEOF
3564 # We use echo to avoid assuming a particular line-breaking character.
3565 # The extra dot is to prevent the shell from consuming trailing
3566 # line-breaks from the sub-command output.  A line-break within
3567 # single-quotes doesn't work because, if this script is created in a
3568 # platform that uses two characters for line-breaks (e.g., DOS), tr
3569 # would break.
3570 ac_LF_and_DOT=`echo; echo .`
3571 DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
3572 rm -f confdef2opt.sed
3573
3574
3575 ac_libobjs=
3576 ac_ltlibobjs=
3577 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
3578   # 1. Remove the extension, and $U if already installed.
3579   ac_i=`echo "$ac_i" |
3580          sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
3581   # 2. Add them.
3582   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
3583   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
3584 done
3585 LIBOBJS=$ac_libobjs
3586
3587 LTLIBOBJS=$ac_ltlibobjs
3588
3589
3590
3591 : ${CONFIG_STATUS=./config.status}
3592 ac_clean_files_save=$ac_clean_files
3593 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
3594 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
3595 echo "$as_me: creating $CONFIG_STATUS" >&6;}
3596 cat >$CONFIG_STATUS <<_ACEOF
3597 #! $SHELL
3598 # Generated by $as_me.
3599 # Run this file to recreate the current configuration.
3600 # Compiler output produced by configure, useful for debugging
3601 # configure, is in config.log if it exists.
3602
3603 debug=false
3604 ac_cs_recheck=false
3605 ac_cs_silent=false
3606 SHELL=\${CONFIG_SHELL-$SHELL}
3607 _ACEOF
3608
3609 cat >>$CONFIG_STATUS <<\_ACEOF
3610 ## --------------------- ##
3611 ## M4sh Initialization.  ##
3612 ## --------------------- ##
3613
3614 # Be Bourne compatible
3615 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
3616   emulate sh
3617   NULLCMD=:
3618   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
3619   # is contrary to our usage.  Disable this feature.
3620   alias -g '${1+"$@"}'='"$@"'
3621 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
3622   set -o posix
3623 fi
3624 DUALCASE=1; export DUALCASE # for MKS sh
3625
3626 # Support unset when possible.
3627 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
3628   as_unset=unset
3629 else
3630   as_unset=false
3631 fi
3632
3633
3634 # Work around bugs in pre-3.0 UWIN ksh.
3635 $as_unset ENV MAIL MAILPATH
3636 PS1='$ '
3637 PS2='> '
3638 PS4='+ '
3639
3640 # NLS nuisances.
3641 for as_var in \
3642   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
3643   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
3644   LC_TELEPHONE LC_TIME
3645 do
3646   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
3647     eval $as_var=C; export $as_var
3648   else
3649     $as_unset $as_var
3650   fi
3651 done
3652
3653 # Required to use basename.
3654 if expr a : '\(a\)' >/dev/null 2>&1; then
3655   as_expr=expr
3656 else
3657   as_expr=false
3658 fi
3659
3660 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
3661   as_basename=basename
3662 else
3663   as_basename=false
3664 fi
3665
3666
3667 # Name of the executable.
3668 as_me=`$as_basename "$0" ||
3669 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
3670          X"$0" : 'X\(//\)$' \| \
3671          X"$0" : 'X\(/\)$' \| \
3672          .     : '\(.\)' 2>/dev/null ||
3673 echo X/"$0" |
3674     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
3675           /^X\/\(\/\/\)$/{ s//\1/; q; }
3676           /^X\/\(\/\).*/{ s//\1/; q; }
3677           s/.*/./; q'`
3678
3679
3680 # PATH needs CR, and LINENO needs CR and PATH.
3681 # Avoid depending upon Character Ranges.
3682 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
3683 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
3684 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
3685 as_cr_digits='0123456789'
3686 as_cr_alnum=$as_cr_Letters$as_cr_digits
3687
3688 # The user is always right.
3689 if test "${PATH_SEPARATOR+set}" != set; then
3690   echo "#! /bin/sh" >conf$$.sh
3691   echo  "exit 0"   >>conf$$.sh
3692   chmod +x conf$$.sh
3693   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
3694     PATH_SEPARATOR=';'
3695   else
3696     PATH_SEPARATOR=:
3697   fi
3698   rm -f conf$$.sh
3699 fi
3700
3701
3702   as_lineno_1=$LINENO
3703   as_lineno_2=$LINENO
3704   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
3705   test "x$as_lineno_1" != "x$as_lineno_2" &&
3706   test "x$as_lineno_3"  = "x$as_lineno_2"  || {
3707   # Find who we are.  Look in the path if we contain no path at all
3708   # relative or not.
3709   case $0 in
3710     *[\\/]* ) as_myself=$0 ;;
3711     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3712 for as_dir in $PATH
3713 do
3714   IFS=$as_save_IFS
3715   test -z "$as_dir" && as_dir=.
3716   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
3717 done
3718
3719        ;;
3720   esac
3721   # We did not find ourselves, most probably we were run as `sh COMMAND'
3722   # in which case we are not to be found in the path.
3723   if test "x$as_myself" = x; then
3724     as_myself=$0
3725   fi
3726   if test ! -f "$as_myself"; then
3727     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
3728 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
3729    { (exit 1); exit 1; }; }
3730   fi
3731   case $CONFIG_SHELL in
3732   '')
3733     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3734 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
3735 do
3736   IFS=$as_save_IFS
3737   test -z "$as_dir" && as_dir=.
3738   for as_base in sh bash ksh sh5; do
3739          case $as_dir in
3740          /*)
3741            if ("$as_dir/$as_base" -c '
3742   as_lineno_1=$LINENO
3743   as_lineno_2=$LINENO
3744   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
3745   test "x$as_lineno_1" != "x$as_lineno_2" &&
3746   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
3747              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
3748              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
3749              CONFIG_SHELL=$as_dir/$as_base
3750              export CONFIG_SHELL
3751              exec "$CONFIG_SHELL" "$0" ${1+"$@"}
3752            fi;;
3753          esac
3754        done
3755 done
3756 ;;
3757   esac
3758
3759   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
3760   # uniformly replaced by the line number.  The first 'sed' inserts a
3761   # line-number line before each line; the second 'sed' does the real
3762   # work.  The second script uses 'N' to pair each line-number line
3763   # with the numbered line, and appends trailing '-' during
3764   # substitution so that $LINENO is not a special case at line end.
3765   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
3766   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
3767   sed '=' <$as_myself |
3768     sed '
3769       N
3770       s,$,-,
3771       : loop
3772       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
3773       t loop
3774       s,-$,,
3775       s,^['$as_cr_digits']*\n,,
3776     ' >$as_me.lineno &&
3777   chmod +x $as_me.lineno ||
3778     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
3779 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
3780    { (exit 1); exit 1; }; }
3781
3782   # Don't try to exec as it changes $[0], causing all sort of problems
3783   # (the dirname of $[0] is not the place where we might find the
3784   # original and so on.  Autoconf is especially sensible to this).
3785   . ./$as_me.lineno
3786   # Exit status is that of the last command.
3787   exit
3788 }
3789
3790
3791 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
3792   *c*,-n*) ECHO_N= ECHO_C='
3793 ' ECHO_T='      ' ;;
3794   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
3795   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
3796 esac
3797
3798 if expr a : '\(a\)' >/dev/null 2>&1; then
3799   as_expr=expr
3800 else
3801   as_expr=false
3802 fi
3803
3804 rm -f conf$$ conf$$.exe conf$$.file
3805 echo >conf$$.file
3806 if ln -s conf$$.file conf$$ 2>/dev/null; then
3807   # We could just check for DJGPP; but this test a) works b) is more generic
3808   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
3809   if test -f conf$$.exe; then
3810     # Don't use ln at all; we don't have any links
3811     as_ln_s='cp -p'
3812   else
3813     as_ln_s='ln -s'
3814   fi
3815 elif ln conf$$.file conf$$ 2>/dev/null; then
3816   as_ln_s=ln
3817 else
3818   as_ln_s='cp -p'
3819 fi
3820 rm -f conf$$ conf$$.exe conf$$.file
3821
3822 if mkdir -p . 2>/dev/null; then
3823   as_mkdir_p=:
3824 else
3825   test -d ./-p && rmdir ./-p
3826   as_mkdir_p=false
3827 fi
3828
3829 as_executable_p="test -f"
3830
3831 # Sed expression to map a string onto a valid CPP name.
3832 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
3833
3834 # Sed expression to map a string onto a valid variable name.
3835 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
3836
3837
3838 # IFS
3839 # We need space, tab and new line, in precisely that order.
3840 as_nl='
3841 '
3842 IFS="   $as_nl"
3843
3844 # CDPATH.
3845 $as_unset CDPATH
3846
3847 exec 6>&1
3848
3849 # Open the log real soon, to keep \$[0] and so on meaningful, and to
3850 # report actual input values of CONFIG_FILES etc. instead of their
3851 # values after options handling.  Logging --version etc. is OK.
3852 exec 5>>config.log
3853 {
3854   echo
3855   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
3856 ## Running $as_me. ##
3857 _ASBOX
3858 } >&5
3859 cat >&5 <<_CSEOF
3860
3861 This file was extended by $as_me, which was
3862 generated by GNU Autoconf 2.59.  Invocation command line was
3863
3864   CONFIG_FILES    = $CONFIG_FILES
3865   CONFIG_HEADERS  = $CONFIG_HEADERS
3866   CONFIG_LINKS    = $CONFIG_LINKS
3867   CONFIG_COMMANDS = $CONFIG_COMMANDS
3868   $ $0 $@
3869
3870 _CSEOF
3871 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
3872 echo >&5
3873 _ACEOF
3874
3875 # Files that config.status was made for.
3876 if test -n "$ac_config_files"; then
3877   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
3878 fi
3879
3880 if test -n "$ac_config_headers"; then
3881   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
3882 fi
3883
3884 if test -n "$ac_config_links"; then
3885   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
3886 fi
3887
3888 if test -n "$ac_config_commands"; then
3889   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
3890 fi
3891
3892 cat >>$CONFIG_STATUS <<\_ACEOF
3893
3894 ac_cs_usage="\
3895 \`$as_me' instantiates files from templates according to the
3896 current configuration.
3897
3898 Usage: $0 [OPTIONS] [FILE]...
3899
3900   -h, --help       print this help, then exit
3901   -V, --version    print version number, then exit
3902   -q, --quiet      do not print progress messages
3903   -d, --debug      don't remove temporary files
3904       --recheck    update $as_me by reconfiguring in the same conditions
3905   --file=FILE[:TEMPLATE]
3906                    instantiate the configuration file FILE
3907
3908 Configuration files:
3909 $config_files
3910
3911 Report bugs to <bug-autoconf@gnu.org>."
3912 _ACEOF
3913
3914 cat >>$CONFIG_STATUS <<_ACEOF
3915 ac_cs_version="\\
3916 config.status
3917 configured by $0, generated by GNU Autoconf 2.59,
3918   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
3919
3920 Copyright (C) 2003 Free Software Foundation, Inc.
3921 This config.status script is free software; the Free Software Foundation
3922 gives unlimited permission to copy, distribute and modify it."
3923 srcdir=$srcdir
3924 _ACEOF
3925
3926 cat >>$CONFIG_STATUS <<\_ACEOF
3927 # If no file are specified by the user, then we need to provide default
3928 # value.  By we need to know if files were specified by the user.
3929 ac_need_defaults=:
3930 while test $# != 0
3931 do
3932   case $1 in
3933   --*=*)
3934     ac_option=`expr "x$1" : 'x\([^=]*\)='`
3935     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
3936     ac_shift=:
3937     ;;
3938   -*)
3939     ac_option=$1
3940     ac_optarg=$2
3941     ac_shift=shift
3942     ;;
3943   *) # This is not an option, so the user has probably given explicit
3944      # arguments.
3945      ac_option=$1
3946      ac_need_defaults=false;;
3947   esac
3948
3949   case $ac_option in
3950   # Handling of the options.
3951 _ACEOF
3952 cat >>$CONFIG_STATUS <<\_ACEOF
3953   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3954     ac_cs_recheck=: ;;
3955   --version | --vers* | -V )
3956     echo "$ac_cs_version"; exit 0 ;;
3957   --he | --h)
3958     # Conflict between --help and --header
3959     { { echo "$as_me:$LINENO: error: ambiguous option: $1
3960 Try \`$0 --help' for more information." >&5
3961 echo "$as_me: error: ambiguous option: $1
3962 Try \`$0 --help' for more information." >&2;}
3963    { (exit 1); exit 1; }; };;
3964   --help | --hel | -h )
3965     echo "$ac_cs_usage"; exit 0 ;;
3966   --debug | --d* | -d )
3967     debug=: ;;
3968   --file | --fil | --fi | --f )
3969     $ac_shift
3970     CONFIG_FILES="$CONFIG_FILES $ac_optarg"
3971     ac_need_defaults=false;;
3972   --header | --heade | --head | --hea )
3973     $ac_shift
3974     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
3975     ac_need_defaults=false;;
3976   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3977   | -silent | --silent | --silen | --sile | --sil | --si | --s)
3978     ac_cs_silent=: ;;
3979
3980   # This is an error.
3981   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
3982 Try \`$0 --help' for more information." >&5
3983 echo "$as_me: error: unrecognized option: $1
3984 Try \`$0 --help' for more information." >&2;}
3985    { (exit 1); exit 1; }; } ;;
3986
3987   *) ac_config_targets="$ac_config_targets $1" ;;
3988
3989   esac
3990   shift
3991 done
3992
3993 ac_configure_extra_args=
3994
3995 if $ac_cs_silent; then
3996   exec 6>/dev/null
3997   ac_configure_extra_args="$ac_configure_extra_args --silent"
3998 fi
3999
4000 _ACEOF
4001 cat >>$CONFIG_STATUS <<_ACEOF
4002 if \$ac_cs_recheck; then
4003   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
4004   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
4005 fi
4006
4007 _ACEOF
4008
4009
4010
4011
4012
4013 cat >>$CONFIG_STATUS <<\_ACEOF
4014 for ac_config_target in $ac_config_targets
4015 do
4016   case "$ac_config_target" in
4017   # Handling of arguments.
4018   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
4019   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
4020 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
4021    { (exit 1); exit 1; }; };;
4022   esac
4023 done
4024
4025 # If the user did not use the arguments to specify the items to instantiate,
4026 # then the envvar interface is used.  Set only those that are not.
4027 # We use the long form for the default assignment because of an extremely
4028 # bizarre bug on SunOS 4.1.3.
4029 if $ac_need_defaults; then
4030   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
4031 fi
4032
4033 # Have a temporary directory for convenience.  Make it in the build tree
4034 # simply because there is no reason to put it here, and in addition,
4035 # creating and moving files from /tmp can sometimes cause problems.
4036 # Create a temporary directory, and hook for its removal unless debugging.
4037 $debug ||
4038 {
4039   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
4040   trap '{ (exit 1); exit 1; }' 1 2 13 15
4041 }
4042
4043 # Create a (secure) tmp directory for tmp files.
4044
4045 {
4046   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
4047   test -n "$tmp" && test -d "$tmp"
4048 }  ||
4049 {
4050   tmp=./confstat$$-$RANDOM
4051   (umask 077 && mkdir $tmp)
4052 } ||
4053 {
4054    echo "$me: cannot create a temporary directory in ." >&2
4055    { (exit 1); exit 1; }
4056 }
4057
4058 _ACEOF
4059
4060 cat >>$CONFIG_STATUS <<_ACEOF
4061
4062 #
4063 # CONFIG_FILES section.
4064 #
4065
4066 # No need to generate the scripts if there are no CONFIG_FILES.
4067 # This happens for instance when ./config.status config.h
4068 if test -n "\$CONFIG_FILES"; then
4069   # Protect against being on the right side of a sed subst in config.status.
4070   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
4071    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
4072 s,@SHELL@,$SHELL,;t t
4073 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
4074 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
4075 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
4076 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
4077 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
4078 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
4079 s,@exec_prefix@,$exec_prefix,;t t
4080 s,@prefix@,$prefix,;t t
4081 s,@program_transform_name@,$program_transform_name,;t t
4082 s,@bindir@,$bindir,;t t
4083 s,@sbindir@,$sbindir,;t t
4084 s,@libexecdir@,$libexecdir,;t t
4085 s,@datadir@,$datadir,;t t
4086 s,@sysconfdir@,$sysconfdir,;t t
4087 s,@sharedstatedir@,$sharedstatedir,;t t
4088 s,@localstatedir@,$localstatedir,;t t
4089 s,@libdir@,$libdir,;t t
4090 s,@includedir@,$includedir,;t t
4091 s,@oldincludedir@,$oldincludedir,;t t
4092 s,@infodir@,$infodir,;t t
4093 s,@mandir@,$mandir,;t t
4094 s,@build_alias@,$build_alias,;t t
4095 s,@host_alias@,$host_alias,;t t
4096 s,@target_alias@,$target_alias,;t t
4097 s,@DEFS@,$DEFS,;t t
4098 s,@ECHO_C@,$ECHO_C,;t t
4099 s,@ECHO_N@,$ECHO_N,;t t
4100 s,@ECHO_T@,$ECHO_T,;t t
4101 s,@LIBS@,$LIBS,;t t
4102 s,@CC@,$CC,;t t
4103 s,@CFLAGS@,$CFLAGS,;t t
4104 s,@LDFLAGS@,$LDFLAGS,;t t
4105 s,@CPPFLAGS@,$CPPFLAGS,;t t
4106 s,@ac_ct_CC@,$ac_ct_CC,;t t
4107 s,@EXEEXT@,$EXEEXT,;t t
4108 s,@OBJEXT@,$OBJEXT,;t t
4109 s,@edir@,$edir,;t t
4110 s,@ldap_ldflags@,$ldap_ldflags,;t t
4111 s,@ldap_cflags@,$ldap_cflags,;t t
4112 s,@targetname@,$targetname,;t t
4113 s,@LIBOBJS@,$LIBOBJS,;t t
4114 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
4115 CEOF
4116
4117 _ACEOF
4118
4119   cat >>$CONFIG_STATUS <<\_ACEOF
4120   # Split the substitutions into bite-sized pieces for seds with
4121   # small command number limits, like on Digital OSF/1 and HP-UX.
4122   ac_max_sed_lines=48
4123   ac_sed_frag=1 # Number of current file.
4124   ac_beg=1 # First line for current file.
4125   ac_end=$ac_max_sed_lines # Line after last line for current file.
4126   ac_more_lines=:
4127   ac_sed_cmds=
4128   while $ac_more_lines; do
4129     if test $ac_beg -gt 1; then
4130       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
4131     else
4132       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
4133     fi
4134     if test ! -s $tmp/subs.frag; then
4135       ac_more_lines=false
4136     else
4137       # The purpose of the label and of the branching condition is to
4138       # speed up the sed processing (if there are no `@' at all, there
4139       # is no need to browse any of the substitutions).
4140       # These are the two extra sed commands mentioned above.
4141       (echo ':t
4142   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
4143       if test -z "$ac_sed_cmds"; then
4144         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
4145       else
4146         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
4147       fi
4148       ac_sed_frag=`expr $ac_sed_frag + 1`
4149       ac_beg=$ac_end
4150       ac_end=`expr $ac_end + $ac_max_sed_lines`
4151     fi
4152   done
4153   if test -z "$ac_sed_cmds"; then
4154     ac_sed_cmds=cat
4155   fi
4156 fi # test -n "$CONFIG_FILES"
4157
4158 _ACEOF
4159 cat >>$CONFIG_STATUS <<\_ACEOF
4160 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
4161   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4162   case $ac_file in
4163   - | *:- | *:-:* ) # input from stdin
4164         cat >$tmp/stdin
4165         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
4166         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
4167   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
4168         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
4169   * )   ac_file_in=$ac_file.in ;;
4170   esac
4171
4172   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
4173   ac_dir=`(dirname "$ac_file") 2>/dev/null ||
4174 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4175          X"$ac_file" : 'X\(//\)[^/]' \| \
4176          X"$ac_file" : 'X\(//\)$' \| \
4177          X"$ac_file" : 'X\(/\)' \| \
4178          .     : '\(.\)' 2>/dev/null ||
4179 echo X"$ac_file" |
4180     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
4181           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
4182           /^X\(\/\/\)$/{ s//\1/; q; }
4183           /^X\(\/\).*/{ s//\1/; q; }
4184           s/.*/./; q'`
4185   { if $as_mkdir_p; then
4186     mkdir -p "$ac_dir"
4187   else
4188     as_dir="$ac_dir"
4189     as_dirs=
4190     while test ! -d "$as_dir"; do
4191       as_dirs="$as_dir $as_dirs"
4192       as_dir=`(dirname "$as_dir") 2>/dev/null ||
4193 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
4194          X"$as_dir" : 'X\(//\)[^/]' \| \
4195          X"$as_dir" : 'X\(//\)$' \| \
4196          X"$as_dir" : 'X\(/\)' \| \
4197          .     : '\(.\)' 2>/dev/null ||
4198 echo X"$as_dir" |
4199     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
4200           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
4201           /^X\(\/\/\)$/{ s//\1/; q; }
4202           /^X\(\/\).*/{ s//\1/; q; }
4203           s/.*/./; q'`
4204     done
4205     test ! -n "$as_dirs" || mkdir $as_dirs
4206   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
4207 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
4208    { (exit 1); exit 1; }; }; }
4209
4210   ac_builddir=.
4211
4212 if test "$ac_dir" != .; then
4213   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
4214   # A "../" for each directory in $ac_dir_suffix.
4215   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
4216 else
4217   ac_dir_suffix= ac_top_builddir=
4218 fi
4219
4220 case $srcdir in
4221   .)  # No --srcdir option.  We are building in place.
4222     ac_srcdir=.
4223     if test -z "$ac_top_builddir"; then
4224        ac_top_srcdir=.
4225     else
4226        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
4227     fi ;;
4228   [\\/]* | ?:[\\/]* )  # Absolute path.
4229     ac_srcdir=$srcdir$ac_dir_suffix;
4230     ac_top_srcdir=$srcdir ;;
4231   *) # Relative path.
4232     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
4233     ac_top_srcdir=$ac_top_builddir$srcdir ;;
4234 esac
4235
4236 # Do not use `cd foo && pwd` to compute absolute paths, because
4237 # the directories may not exist.
4238 case `pwd` in
4239 .) ac_abs_builddir="$ac_dir";;
4240 *)
4241   case "$ac_dir" in
4242   .) ac_abs_builddir=`pwd`;;
4243   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
4244   *) ac_abs_builddir=`pwd`/"$ac_dir";;
4245   esac;;
4246 esac
4247 case $ac_abs_builddir in
4248 .) ac_abs_top_builddir=${ac_top_builddir}.;;
4249 *)
4250   case ${ac_top_builddir}. in
4251   .) ac_abs_top_builddir=$ac_abs_builddir;;
4252   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
4253   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
4254   esac;;
4255 esac
4256 case $ac_abs_builddir in
4257 .) ac_abs_srcdir=$ac_srcdir;;
4258 *)
4259   case $ac_srcdir in
4260   .) ac_abs_srcdir=$ac_abs_builddir;;
4261   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
4262   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
4263   esac;;
4264 esac
4265 case $ac_abs_builddir in
4266 .) ac_abs_top_srcdir=$ac_top_srcdir;;
4267 *)
4268   case $ac_top_srcdir in
4269   .) ac_abs_top_srcdir=$ac_abs_builddir;;
4270   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
4271   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
4272   esac;;
4273 esac
4274
4275
4276
4277   if test x"$ac_file" != x-; then
4278     { echo "$as_me:$LINENO: creating $ac_file" >&5
4279 echo "$as_me: creating $ac_file" >&6;}
4280     rm -f "$ac_file"
4281   fi
4282   # Let's still pretend it is `configure' which instantiates (i.e., don't
4283   # use $as_me), people would be surprised to read:
4284   #    /* config.h.  Generated by config.status.  */
4285   if test x"$ac_file" = x-; then
4286     configure_input=
4287   else
4288     configure_input="$ac_file.  "
4289   fi
4290   configure_input=$configure_input"Generated from `echo $ac_file_in |
4291                                      sed 's,.*/,,'` by configure."
4292
4293   # First look for the input files in the build tree, otherwise in the
4294   # src tree.
4295   ac_file_inputs=`IFS=:
4296     for f in $ac_file_in; do
4297       case $f in
4298       -) echo $tmp/stdin ;;
4299       [\\/$]*)
4300          # Absolute (can't be DOS-style, as IFS=:)
4301          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
4302 echo "$as_me: error: cannot find input file: $f" >&2;}
4303    { (exit 1); exit 1; }; }
4304          echo "$f";;
4305       *) # Relative
4306          if test -f "$f"; then
4307            # Build tree
4308            echo "$f"
4309          elif test -f "$srcdir/$f"; then
4310            # Source tree
4311            echo "$srcdir/$f"
4312          else
4313            # /dev/null tree
4314            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
4315 echo "$as_me: error: cannot find input file: $f" >&2;}
4316    { (exit 1); exit 1; }; }
4317          fi;;
4318       esac
4319     done` || { (exit 1); exit 1; }
4320 _ACEOF
4321 cat >>$CONFIG_STATUS <<_ACEOF
4322   sed "$ac_vpsub
4323 $extrasub
4324 _ACEOF
4325 cat >>$CONFIG_STATUS <<\_ACEOF
4326 :t
4327 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
4328 s,@configure_input@,$configure_input,;t t
4329 s,@srcdir@,$ac_srcdir,;t t
4330 s,@abs_srcdir@,$ac_abs_srcdir,;t t
4331 s,@top_srcdir@,$ac_top_srcdir,;t t
4332 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
4333 s,@builddir@,$ac_builddir,;t t
4334 s,@abs_builddir@,$ac_abs_builddir,;t t
4335 s,@top_builddir@,$ac_top_builddir,;t t
4336 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
4337 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
4338   rm -f $tmp/stdin
4339   if test x"$ac_file" != x-; then
4340     mv $tmp/out $ac_file
4341   else
4342     cat $tmp/out
4343     rm -f $tmp/out
4344   fi
4345
4346 done
4347 _ACEOF
4348
4349 cat >>$CONFIG_STATUS <<\_ACEOF
4350
4351 { (exit 0); exit 0; }
4352 _ACEOF
4353 chmod +x $CONFIG_STATUS
4354 ac_clean_files=$ac_clean_files_save
4355
4356
4357 # configure is writing to config.log, and then calls config.status.
4358 # config.status does its own redirection, appending to config.log.
4359 # Unfortunately, on DOS this fails, as config.log is still kept open
4360 # by configure, so config.status won't be able to write to it; its
4361 # output is simply discarded.  So we exec the FD to /dev/null,
4362 # effectively closing config.log, so it can be properly (re)opened and
4363 # appended to by config.status.  When coming back to configure, we
4364 # need to make the FD available again.
4365 if test "$no_create" != yes; then
4366   ac_cs_success=:
4367   ac_config_status_args=
4368   test "$silent" = yes &&
4369     ac_config_status_args="$ac_config_status_args --quiet"
4370   exec 5>/dev/null
4371   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
4372   exec 5>>config.log
4373   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
4374   # would make configure fail if this is the last instruction.
4375   $ac_cs_success || { (exit 1); exit 1; }
4376 fi
4377