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