import from HEAD:
[freeradius.git] / src / modules / rlm_otp / 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-otp-lib-dir        directory for otp libs"
16 ac_help="$ac_help
17   --with-rlm-otp-include-dir    directory for otp includes"
18 ac_help="$ac_help
19   --with-openssl-libraries=DIR  directory to look for OpenSSL library files"
20 ac_help="$ac_help
21   --with-openssl-includes=DIR   directory to look for OpenSSL include 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=otp_rlm.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.1.2.4 
533
534
535 otp_cflags=
536 otp_ldflags=
537
538 if test x$with_rlm_otp != xno; then
539
540                         
541                 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
542 echo "configure:543: checking how to run the C preprocessor" >&5
543 # On Suns, sometimes $CPP names a directory.
544 if test -n "$CPP" && test -d "$CPP"; then
545   CPP=
546 fi
547 if test -z "$CPP"; then
548 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
549   echo $ac_n "(cached) $ac_c" 1>&6
550 else
551     # This must be in double quotes, not single quotes, because CPP may get
552   # substituted into the Makefile and "${CC-cc}" will confuse make.
553   CPP="${CC-cc} -E"
554   # On the NeXT, cc -E runs the code through the compiler's parser,
555   # not just through cpp.
556   cat > conftest.$ac_ext <<EOF
557 #line 558 "configure"
558 #include "confdefs.h"
559 #include <assert.h>
560 Syntax Error
561 EOF
562 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
563 { (eval echo configure:564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
564 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
565 if test -z "$ac_err"; then
566   :
567 else
568   echo "$ac_err" >&5
569   echo "configure: failed program was:" >&5
570   cat conftest.$ac_ext >&5
571   rm -rf conftest*
572   CPP="${CC-cc} -E -traditional-cpp"
573   cat > conftest.$ac_ext <<EOF
574 #line 575 "configure"
575 #include "confdefs.h"
576 #include <assert.h>
577 Syntax Error
578 EOF
579 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
580 { (eval echo configure:581: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
581 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
582 if test -z "$ac_err"; then
583   :
584 else
585   echo "$ac_err" >&5
586   echo "configure: failed program was:" >&5
587   cat conftest.$ac_ext >&5
588   rm -rf conftest*
589   CPP="${CC-cc} -nologo -E"
590   cat > conftest.$ac_ext <<EOF
591 #line 592 "configure"
592 #include "confdefs.h"
593 #include <assert.h>
594 Syntax Error
595 EOF
596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
597 { (eval echo configure:598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
599 if test -z "$ac_err"; then
600   :
601 else
602   echo "$ac_err" >&5
603   echo "configure: failed program was:" >&5
604   cat conftest.$ac_ext >&5
605   rm -rf conftest*
606   CPP=/lib/cpp
607 fi
608 rm -f conftest*
609 fi
610 rm -f conftest*
611 fi
612 rm -f conftest*
613   ac_cv_prog_CPP="$CPP"
614 fi
615   CPP="$ac_cv_prog_CPP"
616 else
617   ac_cv_prog_CPP="$CPP"
618 fi
619 echo "$ac_t""$CPP" 1>&6
620
621 ac_safe=`echo "inttypes.h" | sed 'y%./+-%__p_%'`
622 echo $ac_n "checking for inttypes.h""... $ac_c" 1>&6
623 echo "configure:624: checking for inttypes.h" >&5
624 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
625   echo $ac_n "(cached) $ac_c" 1>&6
626 else
627   cat > conftest.$ac_ext <<EOF
628 #line 629 "configure"
629 #include "confdefs.h"
630 #include <inttypes.h>
631 EOF
632 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
633 { (eval echo configure:634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
634 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
635 if test -z "$ac_err"; then
636   rm -rf conftest*
637   eval "ac_cv_header_$ac_safe=yes"
638 else
639   echo "$ac_err" >&5
640   echo "configure: failed program was:" >&5
641   cat conftest.$ac_ext >&5
642   rm -rf conftest*
643   eval "ac_cv_header_$ac_safe=no"
644 fi
645 rm -f conftest*
646 fi
647 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
648   echo "$ac_t""yes" 1>&6
649   :
650 else
651   echo "$ac_t""no" 1>&6
652  fail="$fail inttypes.h" 
653         
654 fi
655
656
657                         
658                 # Check whether --with-rlm-otp-lib-dir or --without-rlm-otp-lib-dir was given.
659 if test "${with_rlm_otp_lib_dir+set}" = set; then
660   withval="$with_rlm_otp_lib_dir"
661   otp_ldflags="-L$withval $otp_ldflags"
662 fi
663
664         # Check whether --with-rlm-otp-include-dir or --without-rlm-otp-include-dir was given.
665 if test "${with_rlm_otp_include_dir+set}" = set; then
666   withval="$with_rlm_otp_include_dir"
667   otp_cflags="$otp_cflags -I$withval"
668 fi
669
670
671                 # Check whether --with-openssl-libraries or --without-openssl-libraries was given.
672 if test "${with_openssl_libraries+set}" = set; then
673   withval="$with_openssl_libraries"
674   otp_ldflags="-L$withval $otp_ldflags"
675 fi
676
677
678                 # Check whether --with-openssl-includes or --without-openssl-includes was given.
679 if test "${with_openssl_includes+set}" = set; then
680   withval="$with_openssl_includes"
681   otp_cflags="$otp_cflags -I$withval"
682 fi
683
684
685                         
686         old_LDFLAGS="$LDFLAGS"
687         LDFLAGS="$otp_ldflags $LDFLAGS"
688         echo $ac_n "checking for SSL_new in -lssl""... $ac_c" 1>&6
689 echo "configure:690: checking for SSL_new in -lssl" >&5
690 ac_lib_var=`echo ssl'_'SSL_new | sed 'y%./+-%__p_%'`
691 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
692   echo $ac_n "(cached) $ac_c" 1>&6
693 else
694   ac_save_LIBS="$LIBS"
695 LIBS="-lssl  $LIBS"
696 cat > conftest.$ac_ext <<EOF
697 #line 698 "configure"
698 #include "confdefs.h"
699 /* Override any gcc2 internal prototype to avoid an error.  */
700 /* We use char because int might match the return type of a gcc2
701     builtin and then its argument prototype would still apply.  */
702 char SSL_new();
703
704 int main() {
705 SSL_new()
706 ; return 0; }
707 EOF
708 if { (eval echo configure:709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
709   rm -rf conftest*
710   eval "ac_cv_lib_$ac_lib_var=yes"
711 else
712   echo "configure: failed program was:" >&5
713   cat conftest.$ac_ext >&5
714   rm -rf conftest*
715   eval "ac_cv_lib_$ac_lib_var=no"
716 fi
717 rm -f conftest*
718 LIBS="$ac_save_LIBS"
719
720 fi
721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
722   echo "$ac_t""yes" 1>&6
723     ac_tr_lib=HAVE_LIB`echo ssl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
724     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
725   cat >> confdefs.h <<EOF
726 #define $ac_tr_lib 1
727 EOF
728
729   LIBS="-lssl $LIBS"
730
731 else
732   echo "$ac_t""no" 1>&6
733  fail="$fail openssl-libs" 
734 fi
735
736         LDFLAGS="$old_LDFLAGS"
737
738                         
739         old_CFLAGS="$CFLAGS"
740         CFLAGS="$CFLAGS $otp_cflags"
741         for ac_hdr in \
742                 openssl/des.h \
743                 openssl/hmac.h \
744                 openssl/md4.h \
745                 openssl/md5.h \
746                 openssl/sha.h
747 do
748 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
749 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
750 echo "configure:751: checking for $ac_hdr" >&5
751 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
752   echo $ac_n "(cached) $ac_c" 1>&6
753 else
754   cat > conftest.$ac_ext <<EOF
755 #line 756 "configure"
756 #include "confdefs.h"
757 #include <$ac_hdr>
758 EOF
759 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
760 { (eval echo configure:761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
761 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
762 if test -z "$ac_err"; then
763   rm -rf conftest*
764   eval "ac_cv_header_$ac_safe=yes"
765 else
766   echo "$ac_err" >&5
767   echo "configure: failed program was:" >&5
768   cat conftest.$ac_ext >&5
769   rm -rf conftest*
770   eval "ac_cv_header_$ac_safe=no"
771 fi
772 rm -f conftest*
773 fi
774 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
775   echo "$ac_t""yes" 1>&6
776     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
777   cat >> confdefs.h <<EOF
778 #define $ac_tr_hdr 1
779 EOF
780  
781 else
782   echo "$ac_t""no" 1>&6
783 fail="$fail openssl-includes" 
784         
785 fi
786 done
787
788         CFLAGS="$old_CFLAGS"
789
790         targetname=rlm_otp     # keep this!  Don't change!
791 else
792         targetname=            # keep this!  Don't change!
793         echo \*\*\* module rlm_otp is disabled.  # keep this!  Don't change!
794 fi
795
796 if test x"$fail" != x""; then
797         if test x"${enable_strict_dependencies}" = x"yes"; then
798                 { echo "configure: error: set --without-rlm_otp to disable it explicitly." 1>&2; exit 1; }
799         else
800                 echo "configure: warning: silently not building rlm_otp." 1>&2
801                 echo "configure: warning: FAILURE: rlm_otp requires: $fail." 1>&2
802                 targetname=""
803         fi
804 fi
805
806 otp_cflags="$otp_cflags -DOTP_MODULE_NAME=\\\"rlm_otp\\\" -DFREERADIUS"
807
808
809
810   # keep this!  Don't change!
811 trap '' 1 2 15
812 cat > confcache <<\EOF
813 # This file is a shell script that caches the results of configure
814 # tests run on this system so they can be shared between configure
815 # scripts and configure runs.  It is not useful on other systems.
816 # If it contains results you don't want to keep, you may remove or edit it.
817 #
818 # By default, configure uses ./config.cache as the cache file,
819 # creating it if it does not exist already.  You can give configure
820 # the --cache-file=FILE option to use a different cache file; that is
821 # what configure does when it calls configure scripts in
822 # subdirectories, so they share the cache.
823 # Giving --cache-file=/dev/null disables caching, for debugging configure.
824 # config.status only pays attention to the cache file if you give it the
825 # --recheck option to rerun configure.
826 #
827 EOF
828 # The following way of writing the cache mishandles newlines in values,
829 # but we know of no workaround that is simple, portable, and efficient.
830 # So, don't put newlines in cache variables' values.
831 # Ultrix sh set writes to stderr and can't be redirected directly,
832 # and sets the high bit in the cache file unless we assign to the vars.
833 (set) 2>&1 |
834   case `(ac_space=' '; set | grep ac_space) 2>&1` in
835   *ac_space=\ *)
836     # `set' does not quote correctly, so add quotes (double-quote substitution
837     # turns \\\\ into \\, and sed turns \\ into \).
838     sed -n \
839       -e "s/'/'\\\\''/g" \
840       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
841     ;;
842   *)
843     # `set' quotes correctly as required by POSIX, so do not add quotes.
844     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
845     ;;
846   esac >> confcache
847 if cmp -s $cache_file confcache; then
848   :
849 else
850   if test -w $cache_file; then
851     echo "updating cache $cache_file"
852     cat confcache > $cache_file
853   else
854     echo "not updating unwritable cache $cache_file"
855   fi
856 fi
857 rm -f confcache
858
859 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
860
861 test "x$prefix" = xNONE && prefix=$ac_default_prefix
862 # Let make expand exec_prefix.
863 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
864
865 # Any assignment to VPATH causes Sun make to only execute
866 # the first set of double-colon rules, so remove it if not needed.
867 # If there is a colon in the path, we need to keep it.
868 if test "x$srcdir" = x.; then
869   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
870 fi
871
872 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
873
874 # Transform confdefs.h into DEFS.
875 # Protect against shell expansion while executing Makefile rules.
876 # Protect against Makefile macro expansion.
877 cat > conftest.defs <<\EOF
878 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
879 s%[     `~#$^&*(){}\\|;'"<>?]%\\&%g
880 s%\[%\\&%g
881 s%\]%\\&%g
882 s%\$%$$%g
883 EOF
884 DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
885 rm -f conftest.defs
886
887
888 # Without the "./", some shells look in PATH for config.status.
889 : ${CONFIG_STATUS=./config.status}
890
891 echo creating $CONFIG_STATUS
892 rm -f $CONFIG_STATUS
893 cat > $CONFIG_STATUS <<EOF
894 #! /bin/sh
895 # Generated automatically by configure.
896 # Run this file to recreate the current configuration.
897 # This directory was configured as follows,
898 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
899 #
900 # $0 $ac_configure_args
901 #
902 # Compiler output produced by configure, useful for debugging
903 # configure, is in ./config.log if it exists.
904
905 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
906 for ac_option
907 do
908   case "\$ac_option" in
909   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
910     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
911     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
912   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
913     echo "$CONFIG_STATUS generated by autoconf version 2.13"
914     exit 0 ;;
915   -help | --help | --hel | --he | --h)
916     echo "\$ac_cs_usage"; exit 0 ;;
917   *) echo "\$ac_cs_usage"; exit 1 ;;
918   esac
919 done
920
921 ac_given_srcdir=$srcdir
922
923 trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
924 EOF
925 cat >> $CONFIG_STATUS <<EOF
926
927 # Protect against being on the right side of a sed subst in config.status.
928 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
929  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
930 $ac_vpsub
931 $extrasub
932 s%@SHELL@%$SHELL%g
933 s%@CFLAGS@%$CFLAGS%g
934 s%@CPPFLAGS@%$CPPFLAGS%g
935 s%@CXXFLAGS@%$CXXFLAGS%g
936 s%@FFLAGS@%$FFLAGS%g
937 s%@DEFS@%$DEFS%g
938 s%@LDFLAGS@%$LDFLAGS%g
939 s%@LIBS@%$LIBS%g
940 s%@exec_prefix@%$exec_prefix%g
941 s%@prefix@%$prefix%g
942 s%@program_transform_name@%$program_transform_name%g
943 s%@bindir@%$bindir%g
944 s%@sbindir@%$sbindir%g
945 s%@libexecdir@%$libexecdir%g
946 s%@datadir@%$datadir%g
947 s%@sysconfdir@%$sysconfdir%g
948 s%@sharedstatedir@%$sharedstatedir%g
949 s%@localstatedir@%$localstatedir%g
950 s%@libdir@%$libdir%g
951 s%@includedir@%$includedir%g
952 s%@oldincludedir@%$oldincludedir%g
953 s%@infodir@%$infodir%g
954 s%@mandir@%$mandir%g
955 s%@CPP@%$CPP%g
956 s%@otp_cflags@%$otp_cflags%g
957 s%@otp_ldflags@%$otp_ldflags%g
958 s%@targetname@%$targetname%g
959
960 CEOF
961 EOF
962
963 cat >> $CONFIG_STATUS <<\EOF
964
965 # Split the substitutions into bite-sized pieces for seds with
966 # small command number limits, like on Digital OSF/1 and HP-UX.
967 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
968 ac_file=1 # Number of current file.
969 ac_beg=1 # First line for current file.
970 ac_end=$ac_max_sed_cmds # Line after last line for current file.
971 ac_more_lines=:
972 ac_sed_cmds=""
973 while $ac_more_lines; do
974   if test $ac_beg -gt 1; then
975     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
976   else
977     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
978   fi
979   if test ! -s conftest.s$ac_file; then
980     ac_more_lines=false
981     rm -f conftest.s$ac_file
982   else
983     if test -z "$ac_sed_cmds"; then
984       ac_sed_cmds="sed -f conftest.s$ac_file"
985     else
986       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
987     fi
988     ac_file=`expr $ac_file + 1`
989     ac_beg=$ac_end
990     ac_end=`expr $ac_end + $ac_max_sed_cmds`
991   fi
992 done
993 if test -z "$ac_sed_cmds"; then
994   ac_sed_cmds=cat
995 fi
996 EOF
997
998 cat >> $CONFIG_STATUS <<EOF
999
1000 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1001 EOF
1002 cat >> $CONFIG_STATUS <<\EOF
1003 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1004   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1005   case "$ac_file" in
1006   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1007        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1008   *) ac_file_in="${ac_file}.in" ;;
1009   esac
1010
1011   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1012
1013   # Remove last slash and all that follows it.  Not all systems have dirname.
1014   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1015   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1016     # The file is in a subdirectory.
1017     test ! -d "$ac_dir" && mkdir "$ac_dir"
1018     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1019     # A "../" for each directory in $ac_dir_suffix.
1020     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1021   else
1022     ac_dir_suffix= ac_dots=
1023   fi
1024
1025   case "$ac_given_srcdir" in
1026   .)  srcdir=.
1027       if test -z "$ac_dots"; then top_srcdir=.
1028       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1029   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1030   *) # Relative path.
1031     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1032     top_srcdir="$ac_dots$ac_given_srcdir" ;;
1033   esac
1034
1035
1036   echo creating "$ac_file"
1037   rm -f "$ac_file"
1038   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1039   case "$ac_file" in
1040   *Makefile*) ac_comsub="1i\\
1041 # $configure_input" ;;
1042   *) ac_comsub= ;;
1043   esac
1044
1045   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1046   sed -e "$ac_comsub
1047 s%@configure_input@%$configure_input%g
1048 s%@srcdir@%$srcdir%g
1049 s%@top_srcdir@%$top_srcdir%g
1050 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1051 fi; done
1052 rm -f conftest.s*
1053
1054 EOF
1055 cat >> $CONFIG_STATUS <<EOF
1056
1057 EOF
1058 cat >> $CONFIG_STATUS <<\EOF
1059
1060 exit 0
1061 EOF
1062 chmod +x $CONFIG_STATUS
1063 rm -fr confdefs* $ac_clean_files
1064 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
1065   # keep this!  Don't change!