import from HEAD:
[freeradius.git] / src / modules / rlm_ldap / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --with-rlm-ldap-lib-dir=DIR       directory for LDAP library files []"
16 ac_help="$ac_help
17   --with-rlm-ldap-include-dir=DIR   directory for LDAP include files []"
18 ac_help="$ac_help
19   --enable-shared[=PKGS]  build shared libraries [default=yes]"
20 ac_help="$ac_help
21   --with-threads          use threads, if available. (default=yes) "
22 ac_help="$ac_help
23   --with-edir             enable Novell eDirectory integration.  (default=no) "
24
25 # Initialize some variables set by options.
26 # The variables have the same names as the options, with
27 # dashes changed to underlines.
28 build=NONE
29 cache_file=./config.cache
30 exec_prefix=NONE
31 host=NONE
32 no_create=
33 nonopt=NONE
34 no_recursion=
35 prefix=NONE
36 program_prefix=NONE
37 program_suffix=NONE
38 program_transform_name=s,x,x,
39 silent=
40 site=
41 srcdir=
42 target=NONE
43 verbose=
44 x_includes=NONE
45 x_libraries=NONE
46 bindir='${exec_prefix}/bin'
47 sbindir='${exec_prefix}/sbin'
48 libexecdir='${exec_prefix}/libexec'
49 datadir='${prefix}/share'
50 sysconfdir='${prefix}/etc'
51 sharedstatedir='${prefix}/com'
52 localstatedir='${prefix}/var'
53 libdir='${exec_prefix}/lib'
54 includedir='${prefix}/include'
55 oldincludedir='/usr/include'
56 infodir='${prefix}/info'
57 mandir='${prefix}/man'
58
59 # Initialize some other variables.
60 subdirs=
61 MFLAGS= MAKEFLAGS=
62 SHELL=${CONFIG_SHELL-/bin/sh}
63 # Maximum number of lines to put in a shell here document.
64 ac_max_here_lines=12
65
66 ac_prev=
67 for ac_option
68 do
69
70   # If the previous option needs an argument, assign it.
71   if test -n "$ac_prev"; then
72     eval "$ac_prev=\$ac_option"
73     ac_prev=
74     continue
75   fi
76
77   case "$ac_option" in
78   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
79   *) ac_optarg= ;;
80   esac
81
82   # Accept the important Cygnus configure options, so we can diagnose typos.
83
84   case "$ac_option" in
85
86   -bindir | --bindir | --bindi | --bind | --bin | --bi)
87     ac_prev=bindir ;;
88   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
89     bindir="$ac_optarg" ;;
90
91   -build | --build | --buil | --bui | --bu)
92     ac_prev=build ;;
93   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
94     build="$ac_optarg" ;;
95
96   -cache-file | --cache-file | --cache-fil | --cache-fi \
97   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
98     ac_prev=cache_file ;;
99   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
100   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
101     cache_file="$ac_optarg" ;;
102
103   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
104     ac_prev=datadir ;;
105   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
106   | --da=*)
107     datadir="$ac_optarg" ;;
108
109   -disable-* | --disable-*)
110     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
111     # Reject names that are not valid shell variable names.
112     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
113       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
114     fi
115     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
116     eval "enable_${ac_feature}=no" ;;
117
118   -enable-* | --enable-*)
119     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
120     # Reject names that are not valid shell variable names.
121     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
122       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
123     fi
124     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
125     case "$ac_option" in
126       *=*) ;;
127       *) ac_optarg=yes ;;
128     esac
129     eval "enable_${ac_feature}='$ac_optarg'" ;;
130
131   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
132   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
133   | --exec | --exe | --ex)
134     ac_prev=exec_prefix ;;
135   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
136   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
137   | --exec=* | --exe=* | --ex=*)
138     exec_prefix="$ac_optarg" ;;
139
140   -gas | --gas | --ga | --g)
141     # Obsolete; use --with-gas.
142     with_gas=yes ;;
143
144   -help | --help | --hel | --he)
145     # Omit some internal or obsolete options to make the list less imposing.
146     # This message is too long to be a string in the A/UX 3.1 sh.
147     cat << EOF
148 Usage: configure [options] [host]
149 Options: [defaults in brackets after descriptions]
150 Configuration:
151   --cache-file=FILE       cache test results in FILE
152   --help                  print this message
153   --no-create             do not create output files
154   --quiet, --silent       do not print \`checking...' messages
155   --version               print the version of autoconf that created configure
156 Directory and file names:
157   --prefix=PREFIX         install architecture-independent files in PREFIX
158                           [$ac_default_prefix]
159   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
160                           [same as prefix]
161   --bindir=DIR            user executables in DIR [EPREFIX/bin]
162   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
163   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
164   --datadir=DIR           read-only architecture-independent data in DIR
165                           [PREFIX/share]
166   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
167   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
168                           [PREFIX/com]
169   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
170   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
171   --includedir=DIR        C header files in DIR [PREFIX/include]
172   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
173   --infodir=DIR           info documentation in DIR [PREFIX/info]
174   --mandir=DIR            man documentation in DIR [PREFIX/man]
175   --srcdir=DIR            find the sources in DIR [configure dir or ..]
176   --program-prefix=PREFIX prepend PREFIX to installed program names
177   --program-suffix=SUFFIX append SUFFIX to installed program names
178   --program-transform-name=PROGRAM
179                           run sed PROGRAM on installed program names
180 EOF
181     cat << EOF
182 Host type:
183   --build=BUILD           configure for building on BUILD [BUILD=HOST]
184   --host=HOST             configure for HOST [guessed]
185   --target=TARGET         configure for TARGET [TARGET=HOST]
186 Features and packages:
187   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
188   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
189   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
190   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
191   --x-includes=DIR        X include files are in DIR
192   --x-libraries=DIR       X library files are in DIR
193 EOF
194     if test -n "$ac_help"; then
195       echo "--enable and --with options recognized:$ac_help"
196     fi
197     exit 0 ;;
198
199   -host | --host | --hos | --ho)
200     ac_prev=host ;;
201   -host=* | --host=* | --hos=* | --ho=*)
202     host="$ac_optarg" ;;
203
204   -includedir | --includedir | --includedi | --included | --include \
205   | --includ | --inclu | --incl | --inc)
206     ac_prev=includedir ;;
207   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
208   | --includ=* | --inclu=* | --incl=* | --inc=*)
209     includedir="$ac_optarg" ;;
210
211   -infodir | --infodir | --infodi | --infod | --info | --inf)
212     ac_prev=infodir ;;
213   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
214     infodir="$ac_optarg" ;;
215
216   -libdir | --libdir | --libdi | --libd)
217     ac_prev=libdir ;;
218   -libdir=* | --libdir=* | --libdi=* | --libd=*)
219     libdir="$ac_optarg" ;;
220
221   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
222   | --libexe | --libex | --libe)
223     ac_prev=libexecdir ;;
224   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
225   | --libexe=* | --libex=* | --libe=*)
226     libexecdir="$ac_optarg" ;;
227
228   -localstatedir | --localstatedir | --localstatedi | --localstated \
229   | --localstate | --localstat | --localsta | --localst \
230   | --locals | --local | --loca | --loc | --lo)
231     ac_prev=localstatedir ;;
232   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
233   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
234   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
235     localstatedir="$ac_optarg" ;;
236
237   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
238     ac_prev=mandir ;;
239   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
240     mandir="$ac_optarg" ;;
241
242   -nfp | --nfp | --nf)
243     # Obsolete; use --without-fp.
244     with_fp=no ;;
245
246   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
247   | --no-cr | --no-c)
248     no_create=yes ;;
249
250   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
251   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
252     no_recursion=yes ;;
253
254   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
255   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
256   | --oldin | --oldi | --old | --ol | --o)
257     ac_prev=oldincludedir ;;
258   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
259   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
260   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
261     oldincludedir="$ac_optarg" ;;
262
263   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
264     ac_prev=prefix ;;
265   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
266     prefix="$ac_optarg" ;;
267
268   -program-prefix | --program-prefix | --program-prefi | --program-pref \
269   | --program-pre | --program-pr | --program-p)
270     ac_prev=program_prefix ;;
271   -program-prefix=* | --program-prefix=* | --program-prefi=* \
272   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
273     program_prefix="$ac_optarg" ;;
274
275   -program-suffix | --program-suffix | --program-suffi | --program-suff \
276   | --program-suf | --program-su | --program-s)
277     ac_prev=program_suffix ;;
278   -program-suffix=* | --program-suffix=* | --program-suffi=* \
279   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
280     program_suffix="$ac_optarg" ;;
281
282   -program-transform-name | --program-transform-name \
283   | --program-transform-nam | --program-transform-na \
284   | --program-transform-n | --program-transform- \
285   | --program-transform | --program-transfor \
286   | --program-transfo | --program-transf \
287   | --program-trans | --program-tran \
288   | --progr-tra | --program-tr | --program-t)
289     ac_prev=program_transform_name ;;
290   -program-transform-name=* | --program-transform-name=* \
291   | --program-transform-nam=* | --program-transform-na=* \
292   | --program-transform-n=* | --program-transform-=* \
293   | --program-transform=* | --program-transfor=* \
294   | --program-transfo=* | --program-transf=* \
295   | --program-trans=* | --program-tran=* \
296   | --progr-tra=* | --program-tr=* | --program-t=*)
297     program_transform_name="$ac_optarg" ;;
298
299   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
300   | -silent | --silent | --silen | --sile | --sil)
301     silent=yes ;;
302
303   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
304     ac_prev=sbindir ;;
305   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
306   | --sbi=* | --sb=*)
307     sbindir="$ac_optarg" ;;
308
309   -sharedstatedir | --sharedstatedir | --sharedstatedi \
310   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
311   | --sharedst | --shareds | --shared | --share | --shar \
312   | --sha | --sh)
313     ac_prev=sharedstatedir ;;
314   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
315   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
316   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
317   | --sha=* | --sh=*)
318     sharedstatedir="$ac_optarg" ;;
319
320   -site | --site | --sit)
321     ac_prev=site ;;
322   -site=* | --site=* | --sit=*)
323     site="$ac_optarg" ;;
324
325   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
326     ac_prev=srcdir ;;
327   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
328     srcdir="$ac_optarg" ;;
329
330   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
331   | --syscon | --sysco | --sysc | --sys | --sy)
332     ac_prev=sysconfdir ;;
333   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
334   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
335     sysconfdir="$ac_optarg" ;;
336
337   -target | --target | --targe | --targ | --tar | --ta | --t)
338     ac_prev=target ;;
339   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
340     target="$ac_optarg" ;;
341
342   -v | -verbose | --verbose | --verbos | --verbo | --verb)
343     verbose=yes ;;
344
345   -version | --version | --versio | --versi | --vers)
346     echo "configure generated by autoconf version 2.13"
347     exit 0 ;;
348
349   -with-* | --with-*)
350     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
351     # Reject names that are not valid shell variable names.
352     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
353       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
354     fi
355     ac_package=`echo $ac_package| sed 's/-/_/g'`
356     case "$ac_option" in
357       *=*) ;;
358       *) ac_optarg=yes ;;
359     esac
360     eval "with_${ac_package}='$ac_optarg'" ;;
361
362   -without-* | --without-*)
363     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
364     # Reject names that are not valid shell variable names.
365     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
366       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
367     fi
368     ac_package=`echo $ac_package| sed 's/-/_/g'`
369     eval "with_${ac_package}=no" ;;
370
371   --x)
372     # Obsolete; use --with-x.
373     with_x=yes ;;
374
375   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
376   | --x-incl | --x-inc | --x-in | --x-i)
377     ac_prev=x_includes ;;
378   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
379   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
380     x_includes="$ac_optarg" ;;
381
382   -x-libraries | --x-libraries | --x-librarie | --x-librari \
383   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
384     ac_prev=x_libraries ;;
385   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
386   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
387     x_libraries="$ac_optarg" ;;
388
389   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
390     ;;
391
392   *)
393     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
394       echo "configure: warning: $ac_option: invalid host type" 1>&2
395     fi
396     if test "x$nonopt" != xNONE; then
397       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
398     fi
399     nonopt="$ac_option"
400     ;;
401
402   esac
403 done
404
405 if test -n "$ac_prev"; then
406   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
407 fi
408
409 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
410
411 # File descriptor usage:
412 # 0 standard input
413 # 1 file creation
414 # 2 errors and warnings
415 # 3 some systems may open it to /dev/tty
416 # 4 used on the Kubota Titan
417 # 6 checking for... messages and results
418 # 5 compiler messages saved in config.log
419 if test "$silent" = yes; then
420   exec 6>/dev/null
421 else
422   exec 6>&1
423 fi
424 exec 5>./config.log
425
426 echo "\
427 This file contains any messages produced by compilers while
428 running configure, to aid debugging if configure makes a mistake.
429 " 1>&5
430
431 # Strip out --no-create and --no-recursion so they do not pile up.
432 # Also quote any args containing shell metacharacters.
433 ac_configure_args=
434 for ac_arg
435 do
436   case "$ac_arg" in
437   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
438   | --no-cr | --no-c) ;;
439   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
440   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
441   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
442   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
443   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
444   esac
445 done
446
447 # NLS nuisances.
448 # Only set these to C if already set.  These must not be set unconditionally
449 # because not all systems understand e.g. LANG=C (notably SCO).
450 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
451 # Non-C LC_CTYPE values break the ctype check.
452 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
453 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
454 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
455 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
456
457 # confdefs.h avoids OS command line length limits that DEFS can exceed.
458 rm -rf conftest* confdefs.h
459 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
460 echo > confdefs.h
461
462 # A filename unique to this package, relative to the directory that
463 # configure is in, which we can look for to find out if srcdir is correct.
464 ac_unique_file=rlm_ldap.c
465
466 # Find the source files, if location was not specified.
467 if test -z "$srcdir"; then
468   ac_srcdir_defaulted=yes
469   # Try the directory containing this script, then its parent.
470   ac_prog=$0
471   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
472   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
473   srcdir=$ac_confdir
474   if test ! -r $srcdir/$ac_unique_file; then
475     srcdir=..
476   fi
477 else
478   ac_srcdir_defaulted=no
479 fi
480 if test ! -r $srcdir/$ac_unique_file; then
481   if test "$ac_srcdir_defaulted" = yes; then
482     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
483   else
484     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
485   fi
486 fi
487 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
488
489 # Prefer explicitly selected file to automatically selected ones.
490 if test -z "$CONFIG_SITE"; then
491   if test "x$prefix" != xNONE; then
492     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
493   else
494     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
495   fi
496 fi
497 for ac_site_file in $CONFIG_SITE; do
498   if test -r "$ac_site_file"; then
499     echo "loading site script $ac_site_file"
500     . "$ac_site_file"
501   fi
502 done
503
504 if test -r "$cache_file"; then
505   echo "loading cache $cache_file"
506   . $cache_file
507 else
508   echo "creating cache $cache_file"
509   > $cache_file
510 fi
511
512 ac_ext=c
513 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
514 ac_cpp='$CPP $CPPFLAGS'
515 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
516 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
517 cross_compiling=$ac_cv_prog_cc_cross
518
519 ac_exeext=
520 ac_objext=o
521 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
522   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
523   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
524     ac_n= ac_c='
525 ' ac_t='        '
526   else
527     ac_n=-n ac_c= ac_t=
528   fi
529 else
530   ac_n= ac_c='\c' ac_t=
531 fi
532
533
534 # From configure.in Revision: 1.10.2.4 
535
536
537 fail=
538 SMART_LIBS=
539 SMART_CLFAGS=
540 if test x$with_rlm_ldap != xno; then
541
542                                 # Extract the first word of "gcc", so it can be a program name with args.
543 set dummy gcc; ac_word=$2
544 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
545 echo "configure:546: checking for $ac_word" >&5
546 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
547   echo $ac_n "(cached) $ac_c" 1>&6
548 else
549   if test -n "$CC"; then
550   ac_cv_prog_CC="$CC" # Let the user override the test.
551 else
552   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
553   ac_dummy="$PATH"
554   for ac_dir in $ac_dummy; do
555     test -z "$ac_dir" && ac_dir=.
556     if test -f $ac_dir/$ac_word; then
557       ac_cv_prog_CC="gcc"
558       break
559     fi
560   done
561   IFS="$ac_save_ifs"
562 fi
563 fi
564 CC="$ac_cv_prog_CC"
565 if test -n "$CC"; then
566   echo "$ac_t""$CC" 1>&6
567 else
568   echo "$ac_t""no" 1>&6
569 fi
570
571 if test -z "$CC"; then
572   # Extract the first word of "cc", so it can be a program name with args.
573 set dummy cc; ac_word=$2
574 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
575 echo "configure:576: checking for $ac_word" >&5
576 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
577   echo $ac_n "(cached) $ac_c" 1>&6
578 else
579   if test -n "$CC"; then
580   ac_cv_prog_CC="$CC" # Let the user override the test.
581 else
582   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
583   ac_prog_rejected=no
584   ac_dummy="$PATH"
585   for ac_dir in $ac_dummy; do
586     test -z "$ac_dir" && ac_dir=.
587     if test -f $ac_dir/$ac_word; then
588       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
589         ac_prog_rejected=yes
590         continue
591       fi
592       ac_cv_prog_CC="cc"
593       break
594     fi
595   done
596   IFS="$ac_save_ifs"
597 if test $ac_prog_rejected = yes; then
598   # We found a bogon in the path, so make sure we never use it.
599   set dummy $ac_cv_prog_CC
600   shift
601   if test $# -gt 0; then
602     # We chose a different compiler from the bogus one.
603     # However, it has the same basename, so the bogon will be chosen
604     # first if we set CC to just the basename; use the full file name.
605     shift
606     set dummy "$ac_dir/$ac_word" "$@"
607     shift
608     ac_cv_prog_CC="$@"
609   fi
610 fi
611 fi
612 fi
613 CC="$ac_cv_prog_CC"
614 if test -n "$CC"; then
615   echo "$ac_t""$CC" 1>&6
616 else
617   echo "$ac_t""no" 1>&6
618 fi
619
620   if test -z "$CC"; then
621     case "`uname -s`" in
622     *win32* | *WIN32*)
623       # Extract the first word of "cl", so it can be a program name with args.
624 set dummy cl; ac_word=$2
625 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
626 echo "configure:627: checking for $ac_word" >&5
627 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
628   echo $ac_n "(cached) $ac_c" 1>&6
629 else
630   if test -n "$CC"; then
631   ac_cv_prog_CC="$CC" # Let the user override the test.
632 else
633   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
634   ac_dummy="$PATH"
635   for ac_dir in $ac_dummy; do
636     test -z "$ac_dir" && ac_dir=.
637     if test -f $ac_dir/$ac_word; then
638       ac_cv_prog_CC="cl"
639       break
640     fi
641   done
642   IFS="$ac_save_ifs"
643 fi
644 fi
645 CC="$ac_cv_prog_CC"
646 if test -n "$CC"; then
647   echo "$ac_t""$CC" 1>&6
648 else
649   echo "$ac_t""no" 1>&6
650 fi
651  ;;
652     esac
653   fi
654   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
655 fi
656
657 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
658 echo "configure:659: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
659
660 ac_ext=c
661 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
662 ac_cpp='$CPP $CPPFLAGS'
663 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
664 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
665 cross_compiling=$ac_cv_prog_cc_cross
666
667 cat > conftest.$ac_ext << EOF
668
669 #line 670 "configure"
670 #include "confdefs.h"
671
672 main(){return(0);}
673 EOF
674 if { (eval echo configure:675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
675   ac_cv_prog_cc_works=yes
676   # If we can't run a trivial program, we are probably using a cross compiler.
677   if (./conftest; exit) 2>/dev/null; then
678     ac_cv_prog_cc_cross=no
679   else
680     ac_cv_prog_cc_cross=yes
681   fi
682 else
683   echo "configure: failed program was:" >&5
684   cat conftest.$ac_ext >&5
685   ac_cv_prog_cc_works=no
686 fi
687 rm -fr conftest*
688 ac_ext=c
689 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
690 ac_cpp='$CPP $CPPFLAGS'
691 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
692 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
693 cross_compiling=$ac_cv_prog_cc_cross
694
695 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
696 if test $ac_cv_prog_cc_works = no; then
697   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
698 fi
699 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
700 echo "configure:701: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
701 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
702 cross_compiling=$ac_cv_prog_cc_cross
703
704 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
705 echo "configure:706: checking whether we are using GNU C" >&5
706 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
707   echo $ac_n "(cached) $ac_c" 1>&6
708 else
709   cat > conftest.c <<EOF
710 #ifdef __GNUC__
711   yes;
712 #endif
713 EOF
714 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
715   ac_cv_prog_gcc=yes
716 else
717   ac_cv_prog_gcc=no
718 fi
719 fi
720
721 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
722
723 if test $ac_cv_prog_gcc = yes; then
724   GCC=yes
725 else
726   GCC=
727 fi
728
729 ac_test_CFLAGS="${CFLAGS+set}"
730 ac_save_CFLAGS="$CFLAGS"
731 CFLAGS=
732 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
733 echo "configure:734: checking whether ${CC-cc} accepts -g" >&5
734 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
735   echo $ac_n "(cached) $ac_c" 1>&6
736 else
737   echo 'void f(){}' > conftest.c
738 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
739   ac_cv_prog_cc_g=yes
740 else
741   ac_cv_prog_cc_g=no
742 fi
743 rm -f conftest*
744
745 fi
746
747 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
748 if test "$ac_test_CFLAGS" = set; then
749   CFLAGS="$ac_save_CFLAGS"
750 elif test $ac_cv_prog_cc_g = yes; then
751   if test "$GCC" = yes; then
752     CFLAGS="-g -O2"
753   else
754     CFLAGS="-g"
755   fi
756 else
757   if test "$GCC" = yes; then
758     CFLAGS="-O2"
759   else
760     CFLAGS=
761   fi
762 fi
763
764
765                         
766                 rlm_ldap_lib_dir=
767         # Check whether --with-rlm-ldap-lib-dir or --without-rlm-ldap-lib-dir was given.
768 if test "${with_rlm_ldap_lib_dir+set}" = set; then
769   withval="$with_rlm_ldap_lib_dir"
770    case "$withval" in
771             no)
772                 { echo "configure: error: Need rlm-ldap-lib-dir" 1>&2; exit 1; }
773                 ;;
774             yes)
775                 ;;
776             *)
777                 rlm_ldap_lib_dir="$withval"
778                 ;;
779           esac 
780         
781 fi
782
783
784                 rlm_ldap_include_dir=
785         # Check whether --with-rlm-ldap-include-dir or --without-rlm-ldap-include-dir was given.
786 if test "${with_rlm_ldap_include_dir+set}" = set; then
787   withval="$with_rlm_ldap_include_dir"
788    case "$withval" in
789             no)
790                 { echo "configure: error: Need rlm-ldap-include-dir" 1>&2; exit 1; }
791                 ;;
792             yes)
793                 ;;
794             *)
795                 rlm_ldap_include_dir="$withval"
796                 ;;
797           esac 
798         
799 fi
800
801
802                 # Check whether --enable-shared or --disable-shared was given.
803 if test "${enable_shared+set}" = set; then
804   enableval="$enable_shared"
805   p=${PACKAGE-default}
806 case $enableval in
807 yes) enable_shared=yes ;;
808 no) enable_shared=no ;;
809 *)
810   enable_shared=no
811   # Look at the argument we got.  We use all the common list separators.
812   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
813   for pkg in $enableval; do
814     if test "X$pkg" = "X$p"; then
815       enable_shared=yes
816     fi
817   done
818   IFS="$ac_save_ifs"
819   ;;
820 esac
821 else
822   enable_shared=yes
823 fi
824
825
826                                 if test "x$enable_shared" = "xno"; then
827                 echo "configure: warning: Static linking with libldap will probably result in unresolved symbols." 1>&2
828         fi
829
830                 rlm_ldap_with_threads=yes
831         # Check whether --with-threads or --without-threads was given.
832 if test "${with_threads+set}" = set; then
833   withval="$with_threads"
834    case "$withval" in
835             no)
836                 rlm_ldap_with_threads=no
837                 ;;
838             *)
839                 ;;
840             esac 
841 fi
842
843
844                         
845                         if test "x$rlm_ldap_with_threads" = "xyes"; then
846             echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
847 echo "configure:848: checking for pthread_create in -lpthread" >&5
848 ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
849 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
850   echo $ac_n "(cached) $ac_c" 1>&6
851 else
852   ac_save_LIBS="$LIBS"
853 LIBS="-lpthread  $LIBS"
854 cat > conftest.$ac_ext <<EOF
855 #line 856 "configure"
856 #include "confdefs.h"
857 /* Override any gcc2 internal prototype to avoid an error.  */
858 /* We use char because int might match the return type of a gcc2
859     builtin and then its argument prototype would still apply.  */
860 char pthread_create();
861
862 int main() {
863 pthread_create()
864 ; return 0; }
865 EOF
866 if { (eval echo configure:867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
867   rm -rf conftest*
868   eval "ac_cv_lib_$ac_lib_var=yes"
869 else
870   echo "configure: failed program was:" >&5
871   cat conftest.$ac_ext >&5
872   rm -rf conftest*
873   eval "ac_cv_lib_$ac_lib_var=no"
874 fi
875 rm -f conftest*
876 LIBS="$ac_save_LIBS"
877
878 fi
879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
880   echo "$ac_t""yes" 1>&6
881    LIBS="-lpthread $LIBS" 
882 else
883   echo "$ac_t""no" 1>&6
884 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
885 echo "configure:886: checking for pthread_create in -lc_r" >&5
886 ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
887 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
888   echo $ac_n "(cached) $ac_c" 1>&6
889 else
890   ac_save_LIBS="$LIBS"
891 LIBS="-lc_r  $LIBS"
892 cat > conftest.$ac_ext <<EOF
893 #line 894 "configure"
894 #include "confdefs.h"
895 /* Override any gcc2 internal prototype to avoid an error.  */
896 /* We use char because int might match the return type of a gcc2
897     builtin and then its argument prototype would still apply.  */
898 char pthread_create();
899
900 int main() {
901 pthread_create()
902 ; return 0; }
903 EOF
904 if { (eval echo configure:905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
905   rm -rf conftest*
906   eval "ac_cv_lib_$ac_lib_var=yes"
907 else
908   echo "configure: failed program was:" >&5
909   cat conftest.$ac_ext >&5
910   rm -rf conftest*
911   eval "ac_cv_lib_$ac_lib_var=no"
912 fi
913 rm -f conftest*
914 LIBS="$ac_save_LIBS"
915
916 fi
917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
918   echo "$ac_t""yes" 1>&6
919    LIBS="-lc_r $LIBS" 
920 else
921   echo "$ac_t""no" 1>&6
922  rlm_ldap_with_threads="no" 
923                                       
924 fi
925
926                          
927 fi
928
929         fi
930
931                                 smart_try_dir=$rlm_ldap_lib_dir
932         if test "x$rlm_ldap_with_threads" = "xyes"; then
933             
934
935 sm_lib_safe=`echo "ldap_r" | sed 'y%./+-%__p_%'`
936 sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'`
937 echo $ac_n "checking for ldap_init in -lldap_r""... $ac_c" 1>&6
938 echo "configure:939: checking for ldap_init in -lldap_r" >&5
939
940 old_LIBS="$LIBS"
941 smart_lib=
942 smart_lib_dir=
943
944 if test "x$smart_try_dir" != "x"; then
945   for try in $smart_try_dir; do
946     LIBS="-L$try -lldap_r $old_LIBS"
947     cat > conftest.$ac_ext <<EOF
948 #line 949 "configure"
949 #include "confdefs.h"
950 extern char ldap_init();
951 int main() {
952  ldap_init()
953 ; return 0; }
954 EOF
955 if { (eval echo configure:956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
956   rm -rf conftest*
957   smart_lib="-L$try -lldap_r"
958 else
959   echo "configure: failed program was:" >&5
960   cat conftest.$ac_ext >&5
961 fi
962 rm -f conftest*
963     if test "x$smart_lib" != "x"; then
964       break;
965     fi
966   done
967   LIBS="$old_LIBS"
968 fi
969
970 if test "x$smart_lib" = "x"; then
971   LIBS="-lldap_r $old_LIBS"
972   cat > conftest.$ac_ext <<EOF
973 #line 974 "configure"
974 #include "confdefs.h"
975 extern char ldap_init();
976 int main() {
977  ldap_init()
978 ; return 0; }
979 EOF
980 if { (eval echo configure:981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
981   rm -rf conftest*
982   smart_lib="-lldap_r"
983 else
984   echo "configure: failed program was:" >&5
985   cat conftest.$ac_ext >&5
986 fi
987 rm -f conftest*
988   LIBS="$old_LIBS"
989 fi
990
991 if test "x$smart_lib" = "x"; then
992   
993
994 if test "x$LOCATE" != "x"; then
995         DIRS=
996   file=libldap_r${libltdl_cv_shlibext}
997
998   for x in `${LOCATE} $file 2>/dev/null`; do
999                                         base=`echo $x | sed "s%/${file}%%"`
1000     if test "x$x" = "x$base"; then
1001       continue;
1002     fi
1003
1004     dir=`${DIRNAME} $x 2>/dev/null`
1005                 exclude=`echo ${dir} | ${GREP} /home`
1006     if test "x$exclude" != "x"; then
1007       continue
1008     fi
1009
1010                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
1011     if test "x$already" = "x"; then
1012       DIRS="$DIRS $dir"
1013     fi
1014   done
1015 fi
1016
1017 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
1018
1019   
1020
1021 if test "x$LOCATE" != "x"; then
1022         DIRS=
1023   file=libldap_r.a
1024
1025   for x in `${LOCATE} $file 2>/dev/null`; do
1026                                         base=`echo $x | sed "s%/${file}%%"`
1027     if test "x$x" = "x$base"; then
1028       continue;
1029     fi
1030
1031     dir=`${DIRNAME} $x 2>/dev/null`
1032                 exclude=`echo ${dir} | ${GREP} /home`
1033     if test "x$exclude" != "x"; then
1034       continue
1035     fi
1036
1037                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
1038     if test "x$already" = "x"; then
1039       DIRS="$DIRS $dir"
1040     fi
1041   done
1042 fi
1043
1044 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
1045
1046
1047   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
1048     LIBS="-L$try -lldap_r $old_LIBS"
1049     cat > conftest.$ac_ext <<EOF
1050 #line 1051 "configure"
1051 #include "confdefs.h"
1052 extern char ldap_init();
1053 int main() {
1054  ldap_init()
1055 ; return 0; }
1056 EOF
1057 if { (eval echo configure:1058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1058   rm -rf conftest*
1059   smart_lib="-L$try -lldap_r"
1060 else
1061   echo "configure: failed program was:" >&5
1062   cat conftest.$ac_ext >&5
1063 fi
1064 rm -f conftest*
1065     if test "x$smart_lib" != "x"; then
1066       break;
1067     fi
1068   done
1069   LIBS="$old_LIBS"
1070 fi
1071
1072 if test "x$smart_lib" != "x"; then
1073   echo "$ac_t""yes" 1>&6
1074   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
1075   LIBS="$smart_lib $old_LIBS"
1076   SMART_LIBS="$smart_lib $SMART_LIBS"
1077 else
1078   echo "$ac_t""no" 1>&6
1079 fi
1080
1081             if test "x$ac_cv_lib_ldap_r_ldap_init" != "xyes"; then
1082                 fail="$fail libldap_r"
1083             fi
1084         else
1085             
1086
1087 sm_lib_safe=`echo "ldap" | sed 'y%./+-%__p_%'`
1088 sm_func_safe=`echo "ldap_init" | sed 'y%./+-%__p_%'`
1089 echo $ac_n "checking for ldap_init in -lldap""... $ac_c" 1>&6
1090 echo "configure:1091: checking for ldap_init in -lldap" >&5
1091
1092 old_LIBS="$LIBS"
1093 smart_lib=
1094 smart_lib_dir=
1095
1096 if test "x$smart_try_dir" != "x"; then
1097   for try in $smart_try_dir; do
1098     LIBS="-L$try -lldap $old_LIBS"
1099     cat > conftest.$ac_ext <<EOF
1100 #line 1101 "configure"
1101 #include "confdefs.h"
1102 extern char ldap_init();
1103 int main() {
1104  ldap_init()
1105 ; return 0; }
1106 EOF
1107 if { (eval echo configure:1108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1108   rm -rf conftest*
1109   smart_lib="-L$try -lldap"
1110 else
1111   echo "configure: failed program was:" >&5
1112   cat conftest.$ac_ext >&5
1113 fi
1114 rm -f conftest*
1115     if test "x$smart_lib" != "x"; then
1116       break;
1117     fi
1118   done
1119   LIBS="$old_LIBS"
1120 fi
1121
1122 if test "x$smart_lib" = "x"; then
1123   LIBS="-lldap $old_LIBS"
1124   cat > conftest.$ac_ext <<EOF
1125 #line 1126 "configure"
1126 #include "confdefs.h"
1127 extern char ldap_init();
1128 int main() {
1129  ldap_init()
1130 ; return 0; }
1131 EOF
1132 if { (eval echo configure:1133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1133   rm -rf conftest*
1134   smart_lib="-lldap"
1135 else
1136   echo "configure: failed program was:" >&5
1137   cat conftest.$ac_ext >&5
1138 fi
1139 rm -f conftest*
1140   LIBS="$old_LIBS"
1141 fi
1142
1143 if test "x$smart_lib" = "x"; then
1144   
1145
1146 if test "x$LOCATE" != "x"; then
1147         DIRS=
1148   file=libldap${libltdl_cv_shlibext}
1149
1150   for x in `${LOCATE} $file 2>/dev/null`; do
1151                                         base=`echo $x | sed "s%/${file}%%"`
1152     if test "x$x" = "x$base"; then
1153       continue;
1154     fi
1155
1156     dir=`${DIRNAME} $x 2>/dev/null`
1157                 exclude=`echo ${dir} | ${GREP} /home`
1158     if test "x$exclude" != "x"; then
1159       continue
1160     fi
1161
1162                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
1163     if test "x$already" = "x"; then
1164       DIRS="$DIRS $dir"
1165     fi
1166   done
1167 fi
1168
1169 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
1170
1171   
1172
1173 if test "x$LOCATE" != "x"; then
1174         DIRS=
1175   file=libldap.a
1176
1177   for x in `${LOCATE} $file 2>/dev/null`; do
1178                                         base=`echo $x | sed "s%/${file}%%"`
1179     if test "x$x" = "x$base"; then
1180       continue;
1181     fi
1182
1183     dir=`${DIRNAME} $x 2>/dev/null`
1184                 exclude=`echo ${dir} | ${GREP} /home`
1185     if test "x$exclude" != "x"; then
1186       continue
1187     fi
1188
1189                     already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
1190     if test "x$already" = "x"; then
1191       DIRS="$DIRS $dir"
1192     fi
1193   done
1194 fi
1195
1196 eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
1197
1198
1199   for try in $smart_lib_dir /usr/local/lib /opt/lib; do
1200     LIBS="-L$try -lldap $old_LIBS"
1201     cat > conftest.$ac_ext <<EOF
1202 #line 1203 "configure"
1203 #include "confdefs.h"
1204 extern char ldap_init();
1205 int main() {
1206  ldap_init()
1207 ; return 0; }
1208 EOF
1209 if { (eval echo configure:1210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1210   rm -rf conftest*
1211   smart_lib="-L$try -lldap"
1212 else
1213   echo "configure: failed program was:" >&5
1214   cat conftest.$ac_ext >&5
1215 fi
1216 rm -f conftest*
1217     if test "x$smart_lib" != "x"; then
1218       break;
1219     fi
1220   done
1221   LIBS="$old_LIBS"
1222 fi
1223
1224 if test "x$smart_lib" != "x"; then
1225   echo "$ac_t""yes" 1>&6
1226   eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
1227   LIBS="$smart_lib $old_LIBS"
1228   SMART_LIBS="$smart_lib $SMART_LIBS"
1229 else
1230   echo "$ac_t""no" 1>&6
1231 fi
1232
1233             if test "x$ac_cv_lib_ldap_ldap_init" != "xyes"; then
1234                 fail="$fail libldap"
1235             fi
1236         fi
1237
1238                         
1239         smart_try_dir=$rlm_ldap_include_dir
1240         
1241
1242 ac_safe=`echo "ldap.h" | sed 'y%./+-%__pm%'`
1243 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
1244 echo "configure:1245: checking for ldap.h" >&5
1245
1246 old_CFLAGS="$CFLAGS"
1247 smart_include=
1248 smart_include_dir=
1249
1250 if test "x$smart_try_dir" != "x"; then
1251   for try in $smart_try_dir; do
1252     CFLAGS="$old_CFLAGS -I$try"
1253     cat > conftest.$ac_ext <<EOF
1254 #line 1255 "configure"
1255 #include "confdefs.h"
1256
1257                     #include <ldap.h>
1258 int main() {
1259  int a = 1;
1260 ; return 0; }
1261 EOF
1262 if { (eval echo configure:1263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1263   rm -rf conftest*
1264   smart_include="-I$try"
1265 else
1266   echo "configure: failed program was:" >&5
1267   cat conftest.$ac_ext >&5
1268   rm -rf conftest*
1269   smart_include=
1270 fi
1271 rm -f conftest*
1272     if test "x$smart_include" != "x"; then
1273       break;
1274     fi
1275   done
1276   CFLAGS="$old_CFLAGS"
1277 fi
1278
1279 if test "x$smart_include" = "x"; then
1280   cat > conftest.$ac_ext <<EOF
1281 #line 1282 "configure"
1282 #include "confdefs.h"
1283
1284                   #include <ldap.h>
1285 int main() {
1286  int a = 1;
1287 ; return 0; }
1288 EOF
1289 if { (eval echo configure:1290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1290   rm -rf conftest*
1291   smart_include=" "
1292 else
1293   echo "configure: failed program was:" >&5
1294   cat conftest.$ac_ext >&5
1295   rm -rf conftest*
1296   smart_include=
1297 fi
1298 rm -f conftest*
1299 fi
1300
1301 if test "x$smart_include" = "x"; then
1302   
1303
1304 if test "x$LOCATE" != "x"; then
1305         DIRS=
1306   file=ldap.h
1307
1308   for x in `${LOCATE} $file 2>/dev/null`; do
1309                                         base=`echo $x | sed "s%/${file}%%"`
1310     if test "x$x" = "x$base"; then
1311       continue;
1312     fi
1313
1314     dir=`${DIRNAME} $x 2>/dev/null`
1315                 exclude=`echo ${dir} | ${GREP} /home`
1316     if test "x$exclude" != "x"; then
1317       continue
1318     fi
1319
1320                     already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
1321     if test "x$already" = "x"; then
1322       DIRS="$DIRS $dir"
1323     fi
1324   done
1325 fi
1326
1327 eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
1328
1329
1330   for try in $smart_include_dir /usr/local/include /opt/include; do
1331     CFLAGS="$old_CFLAGS -I$try"
1332     cat > conftest.$ac_ext <<EOF
1333 #line 1334 "configure"
1334 #include "confdefs.h"
1335
1336                     #include <ldap.h>
1337 int main() {
1338  int a = 1;
1339 ; return 0; }
1340 EOF
1341 if { (eval echo configure:1342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1342   rm -rf conftest*
1343   smart_include="-I$try"
1344 else
1345   echo "configure: failed program was:" >&5
1346   cat conftest.$ac_ext >&5
1347   rm -rf conftest*
1348   smart_include=
1349 fi
1350 rm -f conftest*
1351     if test "x$smart_include" != "x"; then
1352       break;
1353     fi
1354   done
1355   CFLAGS="$old_CFLAGS"
1356 fi
1357
1358 if test "x$smart_include" != "x"; then
1359   echo "$ac_t""yes" 1>&6
1360   eval "ac_cv_header_$ac_safe=yes"
1361   CFLAGS="$old_CFLAGS $smart_include"
1362   SMART_CFLAGS="$SMART_CFLAGS $smart_include"
1363 else
1364   echo "$ac_t""no" 1>&6
1365 fi
1366
1367         if test "$ac_cv_header_ldap_h" != "yes"; then
1368           fail="$fail ldap.h"
1369         fi
1370
1371                         
1372         if test "x$fail" = "x"; then
1373             echo $ac_n "checking for ldap_start_tls_s""... $ac_c" 1>&6
1374 echo "configure:1375: checking for ldap_start_tls_s" >&5
1375 if eval "test \"`echo '$''{'ac_cv_func_ldap_start_tls_s'+set}'`\" = set"; then
1376   echo $ac_n "(cached) $ac_c" 1>&6
1377 else
1378   cat > conftest.$ac_ext <<EOF
1379 #line 1380 "configure"
1380 #include "confdefs.h"
1381 /* System header to define __stub macros and hopefully few prototypes,
1382     which can conflict with char ldap_start_tls_s(); below.  */
1383 #include <assert.h>
1384 /* Override any gcc2 internal prototype to avoid an error.  */
1385 /* We use char because int might match the return type of a gcc2
1386     builtin and then its argument prototype would still apply.  */
1387 char ldap_start_tls_s();
1388
1389 int main() {
1390
1391 /* The GNU C library defines this for functions which it implements
1392     to always fail with ENOSYS.  Some functions are actually named
1393     something starting with __ and the normal name is an alias.  */
1394 #if defined (__stub_ldap_start_tls_s) || defined (__stub___ldap_start_tls_s)
1395 choke me
1396 #else
1397 ldap_start_tls_s();
1398 #endif
1399
1400 ; return 0; }
1401 EOF
1402 if { (eval echo configure:1403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1403   rm -rf conftest*
1404   eval "ac_cv_func_ldap_start_tls_s=yes"
1405 else
1406   echo "configure: failed program was:" >&5
1407   cat conftest.$ac_ext >&5
1408   rm -rf conftest*
1409   eval "ac_cv_func_ldap_start_tls_s=no"
1410 fi
1411 rm -f conftest*
1412 fi
1413
1414 if eval "test \"`echo '$ac_cv_func_'ldap_start_tls_s`\" = yes"; then
1415   echo "$ac_t""yes" 1>&6
1416    SMART_CFLAGS="$SMART_CFLAGS -DHAVE_LDAP_START_TLS" 
1417 else
1418   echo "$ac_t""no" 1>&6
1419 fi
1420
1421             echo $ac_n "checking for ldap_initialize""... $ac_c" 1>&6
1422 echo "configure:1423: checking for ldap_initialize" >&5
1423 if eval "test \"`echo '$''{'ac_cv_func_ldap_initialize'+set}'`\" = set"; then
1424   echo $ac_n "(cached) $ac_c" 1>&6
1425 else
1426   cat > conftest.$ac_ext <<EOF
1427 #line 1428 "configure"
1428 #include "confdefs.h"
1429 /* System header to define __stub macros and hopefully few prototypes,
1430     which can conflict with char ldap_initialize(); below.  */
1431 #include <assert.h>
1432 /* Override any gcc2 internal prototype to avoid an error.  */
1433 /* We use char because int might match the return type of a gcc2
1434     builtin and then its argument prototype would still apply.  */
1435 char ldap_initialize();
1436
1437 int main() {
1438
1439 /* The GNU C library defines this for functions which it implements
1440     to always fail with ENOSYS.  Some functions are actually named
1441     something starting with __ and the normal name is an alias.  */
1442 #if defined (__stub_ldap_initialize) || defined (__stub___ldap_initialize)
1443 choke me
1444 #else
1445 ldap_initialize();
1446 #endif
1447
1448 ; return 0; }
1449 EOF
1450 if { (eval echo configure:1451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1451   rm -rf conftest*
1452   eval "ac_cv_func_ldap_initialize=yes"
1453 else
1454   echo "configure: failed program was:" >&5
1455   cat conftest.$ac_ext >&5
1456   rm -rf conftest*
1457   eval "ac_cv_func_ldap_initialize=no"
1458 fi
1459 rm -f conftest*
1460 fi
1461
1462 if eval "test \"`echo '$ac_cv_func_'ldap_initialize`\" = yes"; then
1463   echo "$ac_t""yes" 1>&6
1464    SMART_CFLAGS="$SMART_CFLAGS -DHAVE_LDAP_INITIALIZE" 
1465 else
1466   echo "$ac_t""no" 1>&6
1467 fi
1468
1469             echo $ac_n "checking for ldap_int_tls_config""... $ac_c" 1>&6
1470 echo "configure:1471: checking for ldap_int_tls_config" >&5
1471 if eval "test \"`echo '$''{'ac_cv_func_ldap_int_tls_config'+set}'`\" = set"; then
1472   echo $ac_n "(cached) $ac_c" 1>&6
1473 else
1474   cat > conftest.$ac_ext <<EOF
1475 #line 1476 "configure"
1476 #include "confdefs.h"
1477 /* System header to define __stub macros and hopefully few prototypes,
1478     which can conflict with char ldap_int_tls_config(); below.  */
1479 #include <assert.h>
1480 /* Override any gcc2 internal prototype to avoid an error.  */
1481 /* We use char because int might match the return type of a gcc2
1482     builtin and then its argument prototype would still apply.  */
1483 char ldap_int_tls_config();
1484
1485 int main() {
1486
1487 /* The GNU C library defines this for functions which it implements
1488     to always fail with ENOSYS.  Some functions are actually named
1489     something starting with __ and the normal name is an alias.  */
1490 #if defined (__stub_ldap_int_tls_config) || defined (__stub___ldap_int_tls_config)
1491 choke me
1492 #else
1493 ldap_int_tls_config();
1494 #endif
1495
1496 ; return 0; }
1497 EOF
1498 if { (eval echo configure:1499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1499   rm -rf conftest*
1500   eval "ac_cv_func_ldap_int_tls_config=yes"
1501 else
1502   echo "configure: failed program was:" >&5
1503   cat conftest.$ac_ext >&5
1504   rm -rf conftest*
1505   eval "ac_cv_func_ldap_int_tls_config=no"
1506 fi
1507 rm -f conftest*
1508 fi
1509
1510 if eval "test \"`echo '$ac_cv_func_'ldap_int_tls_config`\" = yes"; then
1511   echo "$ac_t""yes" 1>&6
1512    SMART_CFLAGS="$SMART_CFLAGS -DHAVE_LDAP_INT_TLS_CONFIG" 
1513 else
1514   echo "$ac_t""no" 1>&6
1515 fi
1516
1517         fi
1518
1519         targetname=rlm_ldap
1520 else
1521         targetname=
1522         echo \*\*\* module rlm_ldap is disabled.
1523 fi
1524
1525 if test x"$fail" != x""; then
1526         if test x"${enable_strict_dependencies}" = x"yes"; then
1527                 { echo "configure: error: set --without-rlm_ldap to disable it explicitly." 1>&2; exit 1; }
1528         else
1529                 echo "configure: warning: silently not building rlm_ldap." 1>&2
1530                 echo "configure: warning: FAILURE: rlm_ldap requires: $fail." 1>&2
1531                 if test x"$headersuggestion" != x; then
1532                         echo "configure: warning: $headersuggestion" 1>&2
1533                 fi
1534                 if test x"$libsuggestion" != x; then
1535                         echo "configure: warning: $libsuggestion" 1>&2
1536                 fi
1537                 targetname=""
1538         fi
1539 fi
1540
1541 WITH_EDIRECTORY=no
1542 # Check whether --with-edir or --without-edir was given.
1543 if test "${with_edir+set}" = set; then
1544   withval="$with_edir"
1545    case "$withval" in
1546     yes)
1547         SMART_CFLAGS="$SMART_CFLAGS -DNOVELL_UNIVERSAL_PASSWORD -DNOVELL"
1548         edir="edir_ldapext.c"
1549         ;;
1550     *)
1551         ;;
1552   esac 
1553
1554 fi
1555
1556
1557 ldap_ldflags=$SMART_LIBS
1558 ldap_cflags=$SMART_CFLAGS
1559
1560
1561
1562
1563 trap '' 1 2 15
1564 cat > confcache <<\EOF
1565 # This file is a shell script that caches the results of configure
1566 # tests run on this system so they can be shared between configure
1567 # scripts and configure runs.  It is not useful on other systems.
1568 # If it contains results you don't want to keep, you may remove or edit it.
1569 #
1570 # By default, configure uses ./config.cache as the cache file,
1571 # creating it if it does not exist already.  You can give configure
1572 # the --cache-file=FILE option to use a different cache file; that is
1573 # what configure does when it calls configure scripts in
1574 # subdirectories, so they share the cache.
1575 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1576 # config.status only pays attention to the cache file if you give it the
1577 # --recheck option to rerun configure.
1578 #
1579 EOF
1580 # The following way of writing the cache mishandles newlines in values,
1581 # but we know of no workaround that is simple, portable, and efficient.
1582 # So, don't put newlines in cache variables' values.
1583 # Ultrix sh set writes to stderr and can't be redirected directly,
1584 # and sets the high bit in the cache file unless we assign to the vars.
1585 (set) 2>&1 |
1586   case `(ac_space=' '; set | grep ac_space) 2>&1` in
1587   *ac_space=\ *)
1588     # `set' does not quote correctly, so add quotes (double-quote substitution
1589     # turns \\\\ into \\, and sed turns \\ into \).
1590     sed -n \
1591       -e "s/'/'\\\\''/g" \
1592       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1593     ;;
1594   *)
1595     # `set' quotes correctly as required by POSIX, so do not add quotes.
1596     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1597     ;;
1598   esac >> confcache
1599 if cmp -s $cache_file confcache; then
1600   :
1601 else
1602   if test -w $cache_file; then
1603     echo "updating cache $cache_file"
1604     cat confcache > $cache_file
1605   else
1606     echo "not updating unwritable cache $cache_file"
1607   fi
1608 fi
1609 rm -f confcache
1610
1611 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1612
1613 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1614 # Let make expand exec_prefix.
1615 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1616
1617 # Any assignment to VPATH causes Sun make to only execute
1618 # the first set of double-colon rules, so remove it if not needed.
1619 # If there is a colon in the path, we need to keep it.
1620 if test "x$srcdir" = x.; then
1621   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1622 fi
1623
1624 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1625
1626 # Transform confdefs.h into DEFS.
1627 # Protect against shell expansion while executing Makefile rules.
1628 # Protect against Makefile macro expansion.
1629 cat > conftest.defs <<\EOF
1630 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1631 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
1632 s%\[%\\&%g
1633 s%\]%\\&%g
1634 s%\$%$$%g
1635 EOF
1636 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1637 rm -f conftest.defs
1638
1639
1640 # Without the "./", some shells look in PATH for config.status.
1641 : ${CONFIG_STATUS=./config.status}
1642
1643 echo creating $CONFIG_STATUS
1644 rm -f $CONFIG_STATUS
1645 cat > $CONFIG_STATUS <<EOF
1646 #! /bin/sh
1647 # Generated automatically by configure.
1648 # Run this file to recreate the current configuration.
1649 # This directory was configured as follows,
1650 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1651 #
1652 # $0 $ac_configure_args
1653 #
1654 # Compiler output produced by configure, useful for debugging
1655 # configure, is in ./config.log if it exists.
1656
1657 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1658 for ac_option
1659 do
1660   case "\$ac_option" in
1661   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1662     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1663     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1664   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1665     echo "$CONFIG_STATUS generated by autoconf version 2.13"
1666     exit 0 ;;
1667   -help | --help | --hel | --he | --h)
1668     echo "\$ac_cs_usage"; exit 0 ;;
1669   *) echo "\$ac_cs_usage"; exit 1 ;;
1670   esac
1671 done
1672
1673 ac_given_srcdir=$srcdir
1674
1675 trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1676 EOF
1677 cat >> $CONFIG_STATUS <<EOF
1678
1679 # Protect against being on the right side of a sed subst in config.status.
1680 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1681  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1682 $ac_vpsub
1683 $extrasub
1684 s%@SHELL@%$SHELL%g
1685 s%@CFLAGS@%$CFLAGS%g
1686 s%@CPPFLAGS@%$CPPFLAGS%g
1687 s%@CXXFLAGS@%$CXXFLAGS%g
1688 s%@FFLAGS@%$FFLAGS%g
1689 s%@DEFS@%$DEFS%g
1690 s%@LDFLAGS@%$LDFLAGS%g
1691 s%@LIBS@%$LIBS%g
1692 s%@exec_prefix@%$exec_prefix%g
1693 s%@prefix@%$prefix%g
1694 s%@program_transform_name@%$program_transform_name%g
1695 s%@bindir@%$bindir%g
1696 s%@sbindir@%$sbindir%g
1697 s%@libexecdir@%$libexecdir%g
1698 s%@datadir@%$datadir%g
1699 s%@sysconfdir@%$sysconfdir%g
1700 s%@sharedstatedir@%$sharedstatedir%g
1701 s%@localstatedir@%$localstatedir%g
1702 s%@libdir@%$libdir%g
1703 s%@includedir@%$includedir%g
1704 s%@oldincludedir@%$oldincludedir%g
1705 s%@infodir@%$infodir%g
1706 s%@mandir@%$mandir%g
1707 s%@CC@%$CC%g
1708 s%@edir@%$edir%g
1709 s%@ldap_ldflags@%$ldap_ldflags%g
1710 s%@ldap_cflags@%$ldap_cflags%g
1711 s%@targetname@%$targetname%g
1712
1713 CEOF
1714 EOF
1715
1716 cat >> $CONFIG_STATUS <<\EOF
1717
1718 # Split the substitutions into bite-sized pieces for seds with
1719 # small command number limits, like on Digital OSF/1 and HP-UX.
1720 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1721 ac_file=1 # Number of current file.
1722 ac_beg=1 # First line for current file.
1723 ac_end=$ac_max_sed_cmds # Line after last line for current file.
1724 ac_more_lines=:
1725 ac_sed_cmds=""
1726 while $ac_more_lines; do
1727   if test $ac_beg -gt 1; then
1728     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1729   else
1730     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1731   fi
1732   if test ! -s conftest.s$ac_file; then
1733     ac_more_lines=false
1734     rm -f conftest.s$ac_file
1735   else
1736     if test -z "$ac_sed_cmds"; then
1737       ac_sed_cmds="sed -f conftest.s$ac_file"
1738     else
1739       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1740     fi
1741     ac_file=`expr $ac_file + 1`
1742     ac_beg=$ac_end
1743     ac_end=`expr $ac_end + $ac_max_sed_cmds`
1744   fi
1745 done
1746 if test -z "$ac_sed_cmds"; then
1747   ac_sed_cmds=cat
1748 fi
1749 EOF
1750
1751 cat >> $CONFIG_STATUS <<EOF
1752
1753 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1754 EOF
1755 cat >> $CONFIG_STATUS <<\EOF
1756 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1757   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1758   case "$ac_file" in
1759   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1760        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1761   *) ac_file_in="${ac_file}.in" ;;
1762   esac
1763
1764   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1765
1766   # Remove last slash and all that follows it.  Not all systems have dirname.
1767   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1768   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1769     # The file is in a subdirectory.
1770     test ! -d "$ac_dir" && mkdir "$ac_dir"
1771     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1772     # A "../" for each directory in $ac_dir_suffix.
1773     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1774   else
1775     ac_dir_suffix= ac_dots=
1776   fi
1777
1778   case "$ac_given_srcdir" in
1779   .)  srcdir=.
1780       if test -z "$ac_dots"; then top_srcdir=.
1781       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1782   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1783   *) # Relative path.
1784     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1785     top_srcdir="$ac_dots$ac_given_srcdir" ;;
1786   esac
1787
1788
1789   echo creating "$ac_file"
1790   rm -f "$ac_file"
1791   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1792   case "$ac_file" in
1793   *Makefile*) ac_comsub="1i\\
1794 # $configure_input" ;;
1795   *) ac_comsub= ;;
1796   esac
1797
1798   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1799   sed -e "$ac_comsub
1800 s%@configure_input@%$configure_input%g
1801 s%@srcdir@%$srcdir%g
1802 s%@top_srcdir@%$top_srcdir%g
1803 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1804 fi; done
1805 rm -f conftest.s*
1806
1807 EOF
1808 cat >> $CONFIG_STATUS <<EOF
1809
1810 EOF
1811 cat >> $CONFIG_STATUS <<\EOF
1812
1813 exit 0
1814 EOF
1815 chmod +x $CONFIG_STATUS
1816 rm -fr confdefs* $ac_clean_files
1817 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1818