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