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