]> git.donarmstrong.com Git - lilypond.git/blob - configure
release: 0.1.65
[lilypond.git] / 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-printing         turn on debug printing. Default: off"
16 ac_help="$ac_help
17   enable-checking         set runtime checks (assert calls). Default: on"
18 ac_help="$ac_help
19   enable-optimise         use maximal speed optimisations. Default: off"
20 ac_help="$ac_help
21   enable-profiling        compile with gprof support. Default: off"
22 ac_help="$ac_help
23   enable-debugging        set debug info. Default: on"
24 ac_help="$ac_help
25   enable-mingw-prefix=DIR        set the mingw32 directory (standalone windows32 exes)"
26 ac_help="$ac_help
27   enable-tex-prefix=DIR          set the tex-directory to find TeX subdirectories. (default: PREFIX)"
28 ac_help="$ac_help
29   enable-tex-dir=DIR             set the directory to put LilyPond TeX files in. "
30 ac_help="$ac_help
31   enable-mf-dir=DIR             set the directory to put LilyPond MetaFont files in. "
32 ac_help="$ac_help
33   enable-config=FILE            put configure settings in config-FILE.make"
34
35 # Initialize some variables set by options.
36 # The variables have the same names as the options, with
37 # dashes changed to underlines.
38 build=NONE
39 cache_file=./config.cache
40 exec_prefix=NONE
41 host=NONE
42 no_create=
43 nonopt=NONE
44 no_recursion=
45 prefix=NONE
46 program_prefix=NONE
47 program_suffix=NONE
48 program_transform_name=s,x,x,
49 silent=
50 site=
51 srcdir=
52 target=NONE
53 verbose=
54 x_includes=NONE
55 x_libraries=NONE
56 bindir='${exec_prefix}/bin'
57 sbindir='${exec_prefix}/sbin'
58 libexecdir='${exec_prefix}/libexec'
59 datadir='${prefix}/share'
60 sysconfdir='${prefix}/etc'
61 sharedstatedir='${prefix}/com'
62 localstatedir='${prefix}/var'
63 libdir='${exec_prefix}/lib'
64 includedir='${prefix}/include'
65 oldincludedir='/usr/include'
66 infodir='${prefix}/info'
67 mandir='${prefix}/man'
68
69 # Initialize some other variables.
70 subdirs=
71 MFLAGS= MAKEFLAGS=
72 # Maximum number of lines to put in a shell here document.
73 ac_max_here_lines=12
74
75 ac_prev=
76 for ac_option
77 do
78
79   # If the previous option needs an argument, assign it.
80   if test -n "$ac_prev"; then
81     eval "$ac_prev=\$ac_option"
82     ac_prev=
83     continue
84   fi
85
86   case "$ac_option" in
87   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
88   *) ac_optarg= ;;
89   esac
90
91   # Accept the important Cygnus configure options, so we can diagnose typos.
92
93   case "$ac_option" in
94
95   -bindir | --bindir | --bindi | --bind | --bin | --bi)
96     ac_prev=bindir ;;
97   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
98     bindir="$ac_optarg" ;;
99
100   -build | --build | --buil | --bui | --bu)
101     ac_prev=build ;;
102   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
103     build="$ac_optarg" ;;
104
105   -cache-file | --cache-file | --cache-fil | --cache-fi \
106   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
107     ac_prev=cache_file ;;
108   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
109   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
110     cache_file="$ac_optarg" ;;
111
112   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
113     ac_prev=datadir ;;
114   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
115   | --da=*)
116     datadir="$ac_optarg" ;;
117
118   -disable-* | --disable-*)
119     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
120     # Reject names that are not valid shell variable names.
121     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
122       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
123     fi
124     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
125     eval "enable_${ac_feature}=no" ;;
126
127   -enable-* | --enable-*)
128     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
129     # Reject names that are not valid shell variable names.
130     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
131       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
132     fi
133     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
134     case "$ac_option" in
135       *=*) ;;
136       *) ac_optarg=yes ;;
137     esac
138     eval "enable_${ac_feature}='$ac_optarg'" ;;
139
140   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
141   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
142   | --exec | --exe | --ex)
143     ac_prev=exec_prefix ;;
144   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
145   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
146   | --exec=* | --exe=* | --ex=*)
147     exec_prefix="$ac_optarg" ;;
148
149   -gas | --gas | --ga | --g)
150     # Obsolete; use --with-gas.
151     with_gas=yes ;;
152
153   -help | --help | --hel | --he)
154     # Omit some internal or obsolete options to make the list less imposing.
155     # This message is too long to be a string in the A/UX 3.1 sh.
156     cat << EOF
157 Usage: configure [options] [host]
158 Options: [defaults in brackets after descriptions]
159 Configuration:
160   --cache-file=FILE       cache test results in FILE
161   --help                  print this message
162   --no-create             do not create output files
163   --quiet, --silent       do not print \`checking...' messages
164   --version               print the version of autoconf that created configure
165 Directory and file names:
166   --prefix=PREFIX         install architecture-independent files in PREFIX
167                           [$ac_default_prefix]
168   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
169                           [same as prefix]
170   --bindir=DIR            user executables in DIR [EPREFIX/bin]
171   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
172   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
173   --datadir=DIR           read-only architecture-independent data in DIR
174                           [PREFIX/share]
175   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
176   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
177                           [PREFIX/com]
178   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
179   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
180   --includedir=DIR        C header files in DIR [PREFIX/include]
181   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
182   --infodir=DIR           info documentation in DIR [PREFIX/info]
183   --mandir=DIR            man documentation in DIR [PREFIX/man]
184   --srcdir=DIR            find the sources in DIR [configure dir or ..]
185   --program-prefix=PREFIX prepend PREFIX to installed program names
186   --program-suffix=SUFFIX append SUFFIX to installed program names
187   --program-transform-name=PROGRAM
188                           run sed PROGRAM on installed program names
189 EOF
190     cat << EOF
191 Host type:
192   --build=BUILD           configure for building on BUILD [BUILD=HOST]
193   --host=HOST             configure for HOST [guessed]
194   --target=TARGET         configure for TARGET [TARGET=HOST]
195 Features and packages:
196   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
197   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
198   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
199   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
200   --x-includes=DIR        X include files are in DIR
201   --x-libraries=DIR       X library files are in DIR
202 EOF
203     if test -n "$ac_help"; then
204       echo "--enable and --with options recognized:$ac_help"
205     fi
206     exit 0 ;;
207
208   -host | --host | --hos | --ho)
209     ac_prev=host ;;
210   -host=* | --host=* | --hos=* | --ho=*)
211     host="$ac_optarg" ;;
212
213   -includedir | --includedir | --includedi | --included | --include \
214   | --includ | --inclu | --incl | --inc)
215     ac_prev=includedir ;;
216   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
217   | --includ=* | --inclu=* | --incl=* | --inc=*)
218     includedir="$ac_optarg" ;;
219
220   -infodir | --infodir | --infodi | --infod | --info | --inf)
221     ac_prev=infodir ;;
222   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
223     infodir="$ac_optarg" ;;
224
225   -libdir | --libdir | --libdi | --libd)
226     ac_prev=libdir ;;
227   -libdir=* | --libdir=* | --libdi=* | --libd=*)
228     libdir="$ac_optarg" ;;
229
230   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
231   | --libexe | --libex | --libe)
232     ac_prev=libexecdir ;;
233   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
234   | --libexe=* | --libex=* | --libe=*)
235     libexecdir="$ac_optarg" ;;
236
237   -localstatedir | --localstatedir | --localstatedi | --localstated \
238   | --localstate | --localstat | --localsta | --localst \
239   | --locals | --local | --loca | --loc | --lo)
240     ac_prev=localstatedir ;;
241   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
242   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
243   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
244     localstatedir="$ac_optarg" ;;
245
246   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
247     ac_prev=mandir ;;
248   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
249     mandir="$ac_optarg" ;;
250
251   -nfp | --nfp | --nf)
252     # Obsolete; use --without-fp.
253     with_fp=no ;;
254
255   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
256   | --no-cr | --no-c)
257     no_create=yes ;;
258
259   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
260   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
261     no_recursion=yes ;;
262
263   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
264   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
265   | --oldin | --oldi | --old | --ol | --o)
266     ac_prev=oldincludedir ;;
267   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
268   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
269   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
270     oldincludedir="$ac_optarg" ;;
271
272   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
273     ac_prev=prefix ;;
274   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
275     prefix="$ac_optarg" ;;
276
277   -program-prefix | --program-prefix | --program-prefi | --program-pref \
278   | --program-pre | --program-pr | --program-p)
279     ac_prev=program_prefix ;;
280   -program-prefix=* | --program-prefix=* | --program-prefi=* \
281   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
282     program_prefix="$ac_optarg" ;;
283
284   -program-suffix | --program-suffix | --program-suffi | --program-suff \
285   | --program-suf | --program-su | --program-s)
286     ac_prev=program_suffix ;;
287   -program-suffix=* | --program-suffix=* | --program-suffi=* \
288   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
289     program_suffix="$ac_optarg" ;;
290
291   -program-transform-name | --program-transform-name \
292   | --program-transform-nam | --program-transform-na \
293   | --program-transform-n | --program-transform- \
294   | --program-transform | --program-transfor \
295   | --program-transfo | --program-transf \
296   | --program-trans | --program-tran \
297   | --progr-tra | --program-tr | --program-t)
298     ac_prev=program_transform_name ;;
299   -program-transform-name=* | --program-transform-name=* \
300   | --program-transform-nam=* | --program-transform-na=* \
301   | --program-transform-n=* | --program-transform-=* \
302   | --program-transform=* | --program-transfor=* \
303   | --program-transfo=* | --program-transf=* \
304   | --program-trans=* | --program-tran=* \
305   | --progr-tra=* | --program-tr=* | --program-t=*)
306     program_transform_name="$ac_optarg" ;;
307
308   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
309   | -silent | --silent | --silen | --sile | --sil)
310     silent=yes ;;
311
312   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
313     ac_prev=sbindir ;;
314   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
315   | --sbi=* | --sb=*)
316     sbindir="$ac_optarg" ;;
317
318   -sharedstatedir | --sharedstatedir | --sharedstatedi \
319   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
320   | --sharedst | --shareds | --shared | --share | --shar \
321   | --sha | --sh)
322     ac_prev=sharedstatedir ;;
323   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
324   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
325   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
326   | --sha=* | --sh=*)
327     sharedstatedir="$ac_optarg" ;;
328
329   -site | --site | --sit)
330     ac_prev=site ;;
331   -site=* | --site=* | --sit=*)
332     site="$ac_optarg" ;;
333
334   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
335     ac_prev=srcdir ;;
336   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
337     srcdir="$ac_optarg" ;;
338
339   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
340   | --syscon | --sysco | --sysc | --sys | --sy)
341     ac_prev=sysconfdir ;;
342   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
343   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
344     sysconfdir="$ac_optarg" ;;
345
346   -target | --target | --targe | --targ | --tar | --ta | --t)
347     ac_prev=target ;;
348   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
349     target="$ac_optarg" ;;
350
351   -v | -verbose | --verbose | --verbos | --verbo | --verb)
352     verbose=yes ;;
353
354   -version | --version | --versio | --versi | --vers)
355     echo "configure generated by autoconf version 2.12"
356     exit 0 ;;
357
358   -with-* | --with-*)
359     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
360     # Reject names that are not valid shell variable names.
361     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
362       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
363     fi
364     ac_package=`echo $ac_package| sed 's/-/_/g'`
365     case "$ac_option" in
366       *=*) ;;
367       *) ac_optarg=yes ;;
368     esac
369     eval "with_${ac_package}='$ac_optarg'" ;;
370
371   -without-* | --without-*)
372     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
373     # Reject names that are not valid shell variable names.
374     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
375       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
376     fi
377     ac_package=`echo $ac_package| sed 's/-/_/g'`
378     eval "with_${ac_package}=no" ;;
379
380   --x)
381     # Obsolete; use --with-x.
382     with_x=yes ;;
383
384   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
385   | --x-incl | --x-inc | --x-in | --x-i)
386     ac_prev=x_includes ;;
387   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
388   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
389     x_includes="$ac_optarg" ;;
390
391   -x-libraries | --x-libraries | --x-librarie | --x-librari \
392   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
393     ac_prev=x_libraries ;;
394   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
395   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
396     x_libraries="$ac_optarg" ;;
397
398   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
399     ;;
400
401   *)
402     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
403       echo "configure: warning: $ac_option: invalid host type" 1>&2
404     fi
405     if test "x$nonopt" != xNONE; then
406       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
407     fi
408     nonopt="$ac_option"
409     ;;
410
411   esac
412 done
413
414 if test -n "$ac_prev"; then
415   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
416 fi
417
418 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
419
420 # File descriptor usage:
421 # 0 standard input
422 # 1 file creation
423 # 2 errors and warnings
424 # 3 some systems may open it to /dev/tty
425 # 4 used on the Kubota Titan
426 # 6 checking for... messages and results
427 # 5 compiler messages saved in config.log
428 if test "$silent" = yes; then
429   exec 6>/dev/null
430 else
431   exec 6>&1
432 fi
433 exec 5>./config.log
434
435 echo "\
436 This file contains any messages produced by compilers while
437 running configure, to aid debugging if configure makes a mistake.
438 " 1>&5
439
440 # Strip out --no-create and --no-recursion so they do not pile up.
441 # Also quote any args containing shell metacharacters.
442 ac_configure_args=
443 for ac_arg
444 do
445   case "$ac_arg" in
446   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
447   | --no-cr | --no-c) ;;
448   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
449   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
450   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
451   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
452   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
453   esac
454 done
455
456 # NLS nuisances.
457 # Only set these to C if already set.  These must not be set unconditionally
458 # because not all systems understand e.g. LANG=C (notably SCO).
459 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
460 # Non-C LC_CTYPE values break the ctype check.
461 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
462 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
463 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
464 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
465
466 # confdefs.h avoids OS command line length limits that DEFS can exceed.
467 rm -rf conftest* confdefs.h
468 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
469 echo > confdefs.h
470
471 # A filename unique to this package, relative to the directory that
472 # configure is in, which we can look for to find out if srcdir is correct.
473 ac_unique_file=flower/choleski.cc
474
475 # Find the source files, if location was not specified.
476 if test -z "$srcdir"; then
477   ac_srcdir_defaulted=yes
478   # Try the directory containing this script, then its parent.
479   ac_prog=$0
480   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
481   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
482   srcdir=$ac_confdir
483   if test ! -r $srcdir/$ac_unique_file; then
484     srcdir=..
485   fi
486 else
487   ac_srcdir_defaulted=no
488 fi
489 if test ! -r $srcdir/$ac_unique_file; then
490   if test "$ac_srcdir_defaulted" = yes; then
491     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
492   else
493     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
494   fi
495 fi
496 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
497
498 # Prefer explicitly selected file to automatically selected ones.
499 if test -z "$CONFIG_SITE"; then
500   if test "x$prefix" != xNONE; then
501     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
502   else
503     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
504   fi
505 fi
506 for ac_site_file in $CONFIG_SITE; do
507   if test -r "$ac_site_file"; then
508     echo "loading site script $ac_site_file"
509     . "$ac_site_file"
510   fi
511 done
512
513 if test -r "$cache_file"; then
514   echo "loading cache $cache_file"
515   . $cache_file
516 else
517   echo "creating cache $cache_file"
518   > $cache_file
519 fi
520
521 ac_ext=c
522 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
523 ac_cpp='$CPP $CPPFLAGS'
524 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
525 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
526 cross_compiling=$ac_cv_prog_cc_cross
527
528 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
529   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
530   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
531     ac_n= ac_c='
532 ' ac_t='        '
533   else
534     ac_n=-n ac_c= ac_t=
535   fi
536 else
537   ac_n= ac_c='\c' ac_t=
538 fi
539
540
541  #ugh flower/out/
542 ac_aux_dir=
543 for ac_dir in bin $srcdir/bin; do
544   if test -f $ac_dir/install-sh; then
545     ac_aux_dir=$ac_dir
546     ac_install_sh="$ac_aux_dir/install-sh -c"
547     break
548   elif test -f $ac_dir/install.sh; then
549     ac_aux_dir=$ac_dir
550     ac_install_sh="$ac_aux_dir/install.sh -c"
551     break
552   fi
553 done
554 if test -z "$ac_aux_dir"; then
555   { echo "configure: error: can not find install-sh or install.sh in bin $srcdir/bin" 1>&2; exit 1; }
556 fi
557 ac_config_guess=$ac_aux_dir/config.guess
558 ac_config_sub=$ac_aux_dir/config.sub
559 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
560
561
562 # Make sure we can run config.sub.
563 if $ac_config_sub sun4 >/dev/null 2>&1; then :
564 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
565 fi
566
567 echo $ac_n "checking host system type""... $ac_c" 1>&6
568 echo "configure:569: checking host system type" >&5
569
570 host_alias=$host
571 case "$host_alias" in
572 NONE)
573   case $nonopt in
574   NONE)
575     if host_alias=`$ac_config_guess`; then :
576     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
577     fi ;;
578   *) host_alias=$nonopt ;;
579   esac ;;
580 esac
581
582 host=`$ac_config_sub $host_alias`
583 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
584 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
585 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
586 echo "$ac_t""$host" 1>&6
587
588
589
590 . $srcdir/VERSION
591 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
592 if test x$MY_PATCH_LEVEL != x; then
593         FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
594 fi
595
596
597 . $srcdir/flower/VERSION
598 FULL_FLOWER_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
599
600 # libtool.info ...
601 # **Never** try to set library version numbers so that they correspond
602 # to the release number of your package.  This is an abuse that only
603 # fosters misunderstanding of the purpose of library versions.
604
605 REVISION=$PATCH_LEVEL
606 # CURRENT=$MINOR_VERSION
607 CURRENT=`expr $MINOR_VERSION + 1`
608 # AGE=$(expr $MAJOR_VERSION + 1)
609 AGE=$MAJOR_VERSION
610
611
612
613
614 # turn off shared libraries by default (may be enabled using --enable-shared)
615 #AM_DISABLE_SHARED
616 #AM_PROG_LIBTOOL
617
618 # ugh, automake: we want (and check for) bison
619 for ac_prog in 'bison -y' byacc
620 do
621 # Extract the first word of "$ac_prog", so it can be a program name with args.
622 set dummy $ac_prog; ac_word=$2
623 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
624 echo "configure:625: checking for $ac_word" >&5
625 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
626   echo $ac_n "(cached) $ac_c" 1>&6
627 else
628   if test -n "$YACC"; then
629   ac_cv_prog_YACC="$YACC" # Let the user override the test.
630 else
631   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
632   for ac_dir in $PATH; do
633     test -z "$ac_dir" && ac_dir=.
634     if test -f $ac_dir/$ac_word; then
635       ac_cv_prog_YACC="$ac_prog"
636       break
637     fi
638   done
639   IFS="$ac_save_ifs"
640 fi
641 fi
642 YACC="$ac_cv_prog_YACC"
643 if test -n "$YACC"; then
644   echo "$ac_t""$YACC" 1>&6
645 else
646   echo "$ac_t""no" 1>&6
647 fi
648
649 test -n "$YACC" && break
650 done
651 test -n "$YACC" || YACC="yacc"
652
653
654 # ugh, automake: we want (and check for) flex
655 # AC_PROG_LEX
656 # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
657
658 # AC_DECL_YYTEXT
659 # ugh, ugh
660 ac_cv_prog_lex_root=lex.yy
661
662 # -O is necessary to get inlining
663 OPTIMIZE="-O"
664 printing_b=no
665 checking_b=yes
666 optimise_b=tja
667 profile_b=no
668 CONFIGSUFFIX=
669 debug_b=yes
670      
671
672
673 ac_ext=C
674 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
675 ac_cpp='$CXXCPP $CPPFLAGS'
676 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
677 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
678 cross_compiling=$ac_cv_prog_cxx_cross
679
680
681 echo $ac_n "checking whether explicit instantiation is needed""... $ac_c" 1>&6
682 echo "configure:683: checking whether explicit instantiation is needed" >&5
683 if eval "test \"`echo '$''{'lily_cv_need_explicit_instantiation'+set}'`\" = set"; then
684   echo $ac_n "(cached) $ac_c" 1>&6
685 else
686   cat > conftest.$ac_ext <<EOF
687 #line 688 "configure"
688 #include "confdefs.h"
689
690 template <class T> struct foo { static int baz; };
691 template <class T> int foo<T>::baz = 1;
692
693 int main() {
694  return foo<int>::baz; 
695 ; return 0; }
696 EOF
697 if { (eval echo configure:698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
698   rm -rf conftest*
699   lily_cv_need_explicit_instantiation=no
700 else
701   echo "configure: failed program was:" >&5
702   cat conftest.$ac_ext >&5
703   rm -rf conftest*
704   lily_cv_need_explicit_instantiation=yes
705 fi
706 rm -f conftest*
707 fi
708
709 echo "$ac_t""$lily_cv_need_explicit_instantiation" 1>&6
710 if test x"$lily_cv_need_explicit_instantiation"x = x"yes"x; then
711     cat >> confdefs.h <<\EOF
712 #define NEED_EXPLICIT_INSTANTIATION 1
713 EOF
714
715 fi
716
717 # Check whether --enable-printing or --disable-printing was given.
718 if test "${enable_printing+set}" = set; then
719   enableval="$enable_printing"
720   printing_b=$enableval
721 fi
722
723
724 # Check whether --enable-checking or --disable-checking was given.
725 if test "${enable_checking+set}" = set; then
726   enableval="$enable_checking"
727   checking_b=$enableval 
728 fi
729
730
731 # Check whether --enable-optimise or --disable-optimise was given.
732 if test "${enable_optimise+set}" = set; then
733   enableval="$enable_optimise"
734   optimise_b=$enableval
735 fi
736
737     
738 # Check whether --enable-profiling or --disable-profiling was given.
739 if test "${enable_profiling+set}" = set; then
740   enableval="$enable_profiling"
741   profile_b=$enableval
742 fi
743
744     
745 # Check whether --enable-debugging or --disable-debugging was given.
746 if test "${enable_debugging+set}" = set; then
747   enableval="$enable_debugging"
748   debug_b=$enableval
749 fi
750
751
752 # Check whether --enable-mingw-prefix or --disable-mingw-prefix was given.
753 if test "${enable_mingw_prefix+set}" = set; then
754   enableval="$enable_mingw_prefix"
755   MINGWPREFIX=$enableval
756 else
757   MINGWPREFIX=no
758 fi
759
760     
761 # Check whether --enable-tex-prefix or --disable-tex-prefix was given.
762 if test "${enable_tex_prefix+set}" = set; then
763   enableval="$enable_tex_prefix"
764   TEXPREFIX=$enableval
765 else
766   TEXPREFIX=auto 
767 fi
768
769     
770 # Check whether --enable-tex-dir or --disable-tex-dir was given.
771 if test "${enable_tex_dir+set}" = set; then
772   enableval="$enable_tex_dir"
773   TEXDIR=$enableval
774 else
775   TEXDIR=auto 
776 fi
777
778
779 # Check whether --enable-mf-dir or --disable-mf-dir was given.
780 if test "${enable_mf_dir+set}" = set; then
781   enableval="$enable_mf_dir"
782   MFDIR=$enableval
783 else
784   MFDIR=auto
785 fi
786
787
788 # Check whether --enable-config or --disable-config was given.
789 if test "${enable_config+set}" = set; then
790   enableval="$enable_config"
791   CONFIGSUFFIX=$enableval
792 fi
793
794      
795
796 if test "$printing_b" = no; then
797     # ugh
798     cat >> confdefs.h <<\EOF
799 #define NPRINT 1
800 EOF
801
802     DEFINES="$DEFINES -DNPRINT"
803 fi
804     
805 if test "$checking_b" = no; then
806     # ugh
807     cat >> confdefs.h <<\EOF
808 #define NDEBUG 1
809 EOF
810
811     DEFINES="$DEFINES -DNDEBUG"
812 fi
813
814 if test "$optimise_b" = yes; then
815     DEFINES="$DEFINES -finline-functions -DSTRING_UTILS_INLINED"
816     OPTIMIZE="-O2"
817     cat >> confdefs.h <<\EOF
818 #define STRINGS_UTILS_INLINED 1
819 EOF
820
821 fi
822
823 if test "$optimise_b" = no; then
824     OPTIMIZE=""
825 fi
826
827 if test $profile_b = yes; then
828     EXTRA_LIBES="-pg"
829     DEFINES="$DEFINES -pg"
830 fi
831
832 if test $debug_b = yes; then    
833     DEFINES="$DEFINES -g"
834 fi
835
836 # however, C++ support in mingw32 v 0.1.4 is still flaky
837 if test x$MINGWPREFIX != xno; then 
838     ICFLAGS="-I$MINGWPREFIX/include"
839     ILDFLAGS="-$MINGWPREFIX/lib"
840 fi
841
842 if test "x$OSTYPE" = "xWindows_NT"; then
843     LN=cp # hard link does not work under cygnus-nt (yet?)
844     ZIP="zip -r -9" #
845 else
846     LN=ln
847     ZIP="zip -r -9"
848 fi
849
850 if test "$CONFIGSUFFIX" != "" ; then
851     CONFIGFILE=config-$CONFIGSUFFIX
852 else
853     CONFIGFILE=config
854 fi
855      
856
857
858 AUTOGENERATE="This file was automatically generated by configure"
859 CPPFLAGS=${CPPFLAGS:-""}        # we don't want -g -O junk
860 # CXXFLAGS=${CXXFLAGS:-""}      # we don't want -g -O junk
861 CXXFLAGS="$DEFINES $OPTIMIZE"
862 LDFLAGS=$EXTRA_LIBES
863
864 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
865 do
866 # Extract the first word of "$ac_prog", so it can be a program name with args.
867 set dummy $ac_prog; ac_word=$2
868 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
869 echo "configure:870: checking for $ac_word" >&5
870 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
871   echo $ac_n "(cached) $ac_c" 1>&6
872 else
873   if test -n "$CXX"; then
874   ac_cv_prog_CXX="$CXX" # Let the user override the test.
875 else
876   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
877   for ac_dir in $PATH; do
878     test -z "$ac_dir" && ac_dir=.
879     if test -f $ac_dir/$ac_word; then
880       ac_cv_prog_CXX="$ac_prog"
881       break
882     fi
883   done
884   IFS="$ac_save_ifs"
885 fi
886 fi
887 CXX="$ac_cv_prog_CXX"
888 if test -n "$CXX"; then
889   echo "$ac_t""$CXX" 1>&6
890 else
891   echo "$ac_t""no" 1>&6
892 fi
893
894 test -n "$CXX" && break
895 done
896 test -n "$CXX" || CXX="gcc"
897
898
899 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
900 echo "configure:901: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
901
902 ac_ext=C
903 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
904 ac_cpp='$CXXCPP $CPPFLAGS'
905 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
906 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
907 cross_compiling=$ac_cv_prog_cxx_cross
908
909 cat > conftest.$ac_ext <<EOF
910 #line 911 "configure"
911 #include "confdefs.h"
912 main(){return(0);}
913 EOF
914 if { (eval echo configure:915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
915   ac_cv_prog_cxx_works=yes
916   # If we can't run a trivial program, we are probably using a cross compiler.
917   if (./conftest; exit) 2>/dev/null; then
918     ac_cv_prog_cxx_cross=no
919   else
920     ac_cv_prog_cxx_cross=yes
921   fi
922 else
923   echo "configure: failed program was:" >&5
924   cat conftest.$ac_ext >&5
925   ac_cv_prog_cxx_works=no
926 fi
927 rm -fr conftest*
928
929 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
930 if test $ac_cv_prog_cxx_works = no; then
931   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
932 fi
933 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
934 echo "configure:935: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
935 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
936 cross_compiling=$ac_cv_prog_cxx_cross
937
938 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
939 echo "configure:940: checking whether we are using GNU C++" >&5
940 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
941   echo $ac_n "(cached) $ac_c" 1>&6
942 else
943   cat > conftest.C <<EOF
944 #ifdef __GNUC__
945   yes;
946 #endif
947 EOF
948 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
949   ac_cv_prog_gxx=yes
950 else
951   ac_cv_prog_gxx=no
952 fi
953 fi
954
955 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
956
957 if test $ac_cv_prog_gxx = yes; then
958   GXX=yes
959   ac_test_CXXFLAGS="${CXXFLAGS+set}"
960   ac_save_CXXFLAGS="$CXXFLAGS"
961   CXXFLAGS=
962   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
963 echo "configure:964: checking whether ${CXX-g++} accepts -g" >&5
964 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
965   echo $ac_n "(cached) $ac_c" 1>&6
966 else
967   echo 'void f(){}' > conftest.cc
968 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
969   ac_cv_prog_cxx_g=yes
970 else
971   ac_cv_prog_cxx_g=no
972 fi
973 rm -f conftest*
974
975 fi
976
977 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
978   if test "$ac_test_CXXFLAGS" = set; then
979     CXXFLAGS="$ac_save_CXXFLAGS"
980   elif test $ac_cv_prog_cxx_g = yes; then
981     CXXFLAGS="-g -O2"
982   else
983     CXXFLAGS="-O2"
984   fi
985 else
986   GXX=
987   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
988 fi
989
990 # Extract the first word of "ranlib", so it can be a program name with args.
991 set dummy ranlib; ac_word=$2
992 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
993 echo "configure:994: checking for $ac_word" >&5
994 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
995   echo $ac_n "(cached) $ac_c" 1>&6
996 else
997   if test -n "$RANLIB"; then
998   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
999 else
1000   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1001   for ac_dir in $PATH; do
1002     test -z "$ac_dir" && ac_dir=.
1003     if test -f $ac_dir/$ac_word; then
1004       ac_cv_prog_RANLIB="ranlib"
1005       break
1006     fi
1007   done
1008   IFS="$ac_save_ifs"
1009   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1010 fi
1011 fi
1012 RANLIB="$ac_cv_prog_RANLIB"
1013 if test -n "$RANLIB"; then
1014   echo "$ac_t""$RANLIB" 1>&6
1015 else
1016   echo "$ac_t""no" 1>&6
1017 fi
1018
1019 # Find a good install program.  We prefer a C program (faster),
1020 # so one script is as good as another.  But avoid the broken or
1021 # incompatible versions:
1022 # SysV /etc/install, /usr/sbin/install
1023 # SunOS /usr/etc/install
1024 # IRIX /sbin/install
1025 # AIX /bin/install
1026 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1027 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1028 # ./install, which can be erroneously created by make from ./install.sh.
1029 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1030 echo "configure:1031: checking for a BSD compatible install" >&5
1031 if test -z "$INSTALL"; then
1032 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1033   echo $ac_n "(cached) $ac_c" 1>&6
1034 else
1035     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1036   for ac_dir in $PATH; do
1037     # Account for people who put trailing slashes in PATH elements.
1038     case "$ac_dir/" in
1039     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1040     *)
1041       # OSF1 and SCO ODT 3.0 have their own names for install.
1042       for ac_prog in ginstall installbsd scoinst install; do
1043         if test -f $ac_dir/$ac_prog; then
1044           if test $ac_prog = install &&
1045             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1046             # AIX install.  It has an incompatible calling convention.
1047             # OSF/1 installbsd also uses dspmsg, but is usable.
1048             :
1049           else
1050             ac_cv_path_install="$ac_dir/$ac_prog -c"
1051             break 2
1052           fi
1053         fi
1054       done
1055       ;;
1056     esac
1057   done
1058   IFS="$ac_save_IFS"
1059
1060 fi
1061   if test "${ac_cv_path_install+set}" = set; then
1062     INSTALL="$ac_cv_path_install"
1063   else
1064     # As a last resort, use the slow shell script.  We don't cache a
1065     # path for INSTALL within a source directory, because that will
1066     # break other packages using the cache if that directory is
1067     # removed, or if the path is relative.
1068     INSTALL="$ac_install_sh"
1069   fi
1070 fi
1071 echo "$ac_t""$INSTALL" 1>&6
1072
1073 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1074 # It thinks the first close brace ends the variable substitution.
1075 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1076
1077 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1078
1079 for ac_prog in tar
1080 do
1081 # Extract the first word of "$ac_prog", so it can be a program name with args.
1082 set dummy $ac_prog; ac_word=$2
1083 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1084 echo "configure:1085: checking for $ac_word" >&5
1085 if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then
1086   echo $ac_n "(cached) $ac_c" 1>&6
1087 else
1088   if test -n "$TAR"; then
1089   ac_cv_prog_TAR="$TAR" # Let the user override the test.
1090 else
1091   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1092   for ac_dir in $PATH; do
1093     test -z "$ac_dir" && ac_dir=.
1094     if test -f $ac_dir/$ac_word; then
1095       ac_cv_prog_TAR="$ac_prog"
1096       break
1097     fi
1098   done
1099   IFS="$ac_save_ifs"
1100 fi
1101 fi
1102 TAR="$ac_cv_prog_TAR"
1103 if test -n "$TAR"; then
1104   echo "$ac_t""$TAR" 1>&6
1105 else
1106   echo "$ac_t""no" 1>&6
1107 fi
1108
1109 test -n "$TAR" && break
1110 done
1111 test -n "$TAR" || TAR="error"
1112
1113 for ac_prog in find
1114 do
1115 # Extract the first word of "$ac_prog", so it can be a program name with args.
1116 set dummy $ac_prog; ac_word=$2
1117 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1118 echo "configure:1119: checking for $ac_word" >&5
1119 if eval "test \"`echo '$''{'ac_cv_prog_FIND'+set}'`\" = set"; then
1120   echo $ac_n "(cached) $ac_c" 1>&6
1121 else
1122   if test -n "$FIND"; then
1123   ac_cv_prog_FIND="$FIND" # Let the user override the test.
1124 else
1125   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1126   for ac_dir in $PATH; do
1127     test -z "$ac_dir" && ac_dir=.
1128     if test -f $ac_dir/$ac_word; then
1129       ac_cv_prog_FIND="$ac_prog"
1130       break
1131     fi
1132   done
1133   IFS="$ac_save_ifs"
1134 fi
1135 fi
1136 FIND="$ac_cv_prog_FIND"
1137 if test -n "$FIND"; then
1138   echo "$ac_t""$FIND" 1>&6
1139 else
1140   echo "$ac_t""no" 1>&6
1141 fi
1142
1143 test -n "$FIND" && break
1144 done
1145 test -n "$FIND" || FIND="error"
1146
1147
1148
1149         if test $FIND = "error" 
1150         then
1151                 
1152     echo "configure: warning: can't find \`find\'. Please use --enable-tex-dir. " 1>&2
1153     warn_b=yes
1154
1155         fi
1156
1157
1158 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
1159 echo "configure:1160: checking for 8-bit clean memcmp" >&5
1160 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
1161   echo $ac_n "(cached) $ac_c" 1>&6
1162 else
1163   if test "$cross_compiling" = yes; then
1164   ac_cv_func_memcmp_clean=no
1165 else
1166   cat > conftest.$ac_ext <<EOF
1167 #line 1168 "configure"
1168 #include "confdefs.h"
1169 #ifdef __cplusplus
1170 extern "C" void exit(int);
1171 #endif
1172
1173 main()
1174 {
1175   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
1176   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
1177 }
1178
1179 EOF
1180 if { (eval echo configure:1181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1181 then
1182   ac_cv_func_memcmp_clean=yes
1183 else
1184   echo "configure: failed program was:" >&5
1185   cat conftest.$ac_ext >&5
1186   rm -fr conftest*
1187   ac_cv_func_memcmp_clean=no
1188 fi
1189 rm -fr conftest*
1190 fi
1191
1192 fi
1193
1194 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
1195 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
1196
1197 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
1198 echo "configure:1199: checking for vprintf" >&5
1199 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
1200   echo $ac_n "(cached) $ac_c" 1>&6
1201 else
1202   cat > conftest.$ac_ext <<EOF
1203 #line 1204 "configure"
1204 #include "confdefs.h"
1205 /* System header to define __stub macros and hopefully few prototypes,
1206     which can conflict with char vprintf(); below.  */
1207 #include <assert.h>
1208 /* Override any gcc2 internal prototype to avoid an error.  */
1209 #ifdef __cplusplus
1210 extern "C"
1211 #endif
1212 /* We use char because int might match the return type of a gcc2
1213     builtin and then its argument prototype would still apply.  */
1214 char vprintf();
1215
1216 int main() {
1217
1218 /* The GNU C library defines this for functions which it implements
1219     to always fail with ENOSYS.  Some functions are actually named
1220     something starting with __ and the normal name is an alias.  */
1221 #if defined (__stub_vprintf) || defined (__stub___vprintf)
1222 choke me
1223 #else
1224 vprintf();
1225 #endif
1226
1227 ; return 0; }
1228 EOF
1229 if { (eval echo configure:1230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1230   rm -rf conftest*
1231   eval "ac_cv_func_vprintf=yes"
1232 else
1233   echo "configure: failed program was:" >&5
1234   cat conftest.$ac_ext >&5
1235   rm -rf conftest*
1236   eval "ac_cv_func_vprintf=no"
1237 fi
1238 rm -f conftest*
1239 fi
1240
1241 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
1242   echo "$ac_t""yes" 1>&6
1243   cat >> confdefs.h <<\EOF
1244 #define HAVE_VPRINTF 1
1245 EOF
1246
1247 else
1248   echo "$ac_t""no" 1>&6
1249 fi
1250
1251 if test "$ac_cv_func_vprintf" != yes; then
1252 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
1253 echo "configure:1254: checking for _doprnt" >&5
1254 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
1255   echo $ac_n "(cached) $ac_c" 1>&6
1256 else
1257   cat > conftest.$ac_ext <<EOF
1258 #line 1259 "configure"
1259 #include "confdefs.h"
1260 /* System header to define __stub macros and hopefully few prototypes,
1261     which can conflict with char _doprnt(); below.  */
1262 #include <assert.h>
1263 /* Override any gcc2 internal prototype to avoid an error.  */
1264 #ifdef __cplusplus
1265 extern "C"
1266 #endif
1267 /* We use char because int might match the return type of a gcc2
1268     builtin and then its argument prototype would still apply.  */
1269 char _doprnt();
1270
1271 int main() {
1272
1273 /* The GNU C library defines this for functions which it implements
1274     to always fail with ENOSYS.  Some functions are actually named
1275     something starting with __ and the normal name is an alias.  */
1276 #if defined (__stub__doprnt) || defined (__stub____doprnt)
1277 choke me
1278 #else
1279 _doprnt();
1280 #endif
1281
1282 ; return 0; }
1283 EOF
1284 if { (eval echo configure:1285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1285   rm -rf conftest*
1286   eval "ac_cv_func__doprnt=yes"
1287 else
1288   echo "configure: failed program was:" >&5
1289   cat conftest.$ac_ext >&5
1290   rm -rf conftest*
1291   eval "ac_cv_func__doprnt=no"
1292 fi
1293 rm -f conftest*
1294 fi
1295
1296 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
1297   echo "$ac_t""yes" 1>&6
1298   cat >> confdefs.h <<\EOF
1299 #define HAVE_DOPRNT 1
1300 EOF
1301
1302 else
1303   echo "$ac_t""no" 1>&6
1304 fi
1305
1306 fi
1307
1308 for ac_func in memmem snprintf 
1309 do
1310 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1311 echo "configure:1312: checking for $ac_func" >&5
1312 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1313   echo $ac_n "(cached) $ac_c" 1>&6
1314 else
1315   cat > conftest.$ac_ext <<EOF
1316 #line 1317 "configure"
1317 #include "confdefs.h"
1318 /* System header to define __stub macros and hopefully few prototypes,
1319     which can conflict with char $ac_func(); below.  */
1320 #include <assert.h>
1321 /* Override any gcc2 internal prototype to avoid an error.  */
1322 #ifdef __cplusplus
1323 extern "C"
1324 #endif
1325 /* We use char because int might match the return type of a gcc2
1326     builtin and then its argument prototype would still apply.  */
1327 char $ac_func();
1328
1329 int main() {
1330
1331 /* The GNU C library defines this for functions which it implements
1332     to always fail with ENOSYS.  Some functions are actually named
1333     something starting with __ and the normal name is an alias.  */
1334 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1335 choke me
1336 #else
1337 $ac_func();
1338 #endif
1339
1340 ; return 0; }
1341 EOF
1342 if { (eval echo configure:1343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1343   rm -rf conftest*
1344   eval "ac_cv_func_$ac_func=yes"
1345 else
1346   echo "configure: failed program was:" >&5
1347   cat conftest.$ac_ext >&5
1348   rm -rf conftest*
1349   eval "ac_cv_func_$ac_func=no"
1350 fi
1351 rm -f conftest*
1352 fi
1353
1354 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1355   echo "$ac_t""yes" 1>&6
1356     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1357   cat >> confdefs.h <<EOF
1358 #define $ac_tr_func 1
1359 EOF
1360  
1361 else
1362   echo "$ac_t""no" 1>&6
1363 fi
1364 done
1365
1366
1367 cat >> confdefs.h <<EOF
1368 #define TOPLEVEL_VERSION "${FULL_VERSION}"
1369 EOF
1370
1371 cat >> confdefs.h <<EOF
1372 #define FLOWER_VERSION "${FULL_FLOWER_VERSION}"
1373 EOF
1374
1375 # ugh: produces "${prefix}/share/lilypond"
1376 # DIR_DATADIR=$datadir/lilypond
1377 # ugh: produces "NONE/share/lilypond"
1378 # DIR_DATADIR=$prefix/share/lilypond
1379
1380 DIR_DATADIR=$prefix/share/lilypond
1381 if test x$prefix = xNONE; then
1382         DIR_DATADIR=/usr/local/share/lilypond
1383 fi
1384 cat >> confdefs.h <<EOF
1385 #define DIR_DATADIR "${DIR_DATADIR}"
1386 EOF
1387
1388
1389 absolute_builddir="`pwd`"
1390     
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414 for ac_prog in bison
1415 do
1416 # Extract the first word of "$ac_prog", so it can be a program name with args.
1417 set dummy $ac_prog; ac_word=$2
1418 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1419 echo "configure:1420: checking for $ac_word" >&5
1420 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
1421   echo $ac_n "(cached) $ac_c" 1>&6
1422 else
1423   if test -n "$BISON"; then
1424   ac_cv_prog_BISON="$BISON" # Let the user override the test.
1425 else
1426   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1427   for ac_dir in $PATH; do
1428     test -z "$ac_dir" && ac_dir=.
1429     if test -f $ac_dir/$ac_word; then
1430       ac_cv_prog_BISON="$ac_prog"
1431       break
1432     fi
1433   done
1434   IFS="$ac_save_ifs"
1435 fi
1436 fi
1437 BISON="$ac_cv_prog_BISON"
1438 if test -n "$BISON"; then
1439   echo "$ac_t""$BISON" 1>&6
1440 else
1441   echo "$ac_t""no" 1>&6
1442 fi
1443
1444 test -n "$BISON" && break
1445 done
1446 test -n "$BISON" || BISON="error"
1447
1448 for ac_prog in flex
1449 do
1450 # Extract the first word of "$ac_prog", so it can be a program name with args.
1451 set dummy $ac_prog; ac_word=$2
1452 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1453 echo "configure:1454: checking for $ac_word" >&5
1454 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
1455   echo $ac_n "(cached) $ac_c" 1>&6
1456 else
1457   if test -n "$FLEX"; then
1458   ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
1459 else
1460   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1461   for ac_dir in $PATH; do
1462     test -z "$ac_dir" && ac_dir=.
1463     if test -f $ac_dir/$ac_word; then
1464       ac_cv_prog_FLEX="$ac_prog"
1465       break
1466     fi
1467   done
1468   IFS="$ac_save_ifs"
1469 fi
1470 fi
1471 FLEX="$ac_cv_prog_FLEX"
1472 if test -n "$FLEX"; then
1473   echo "$ac_t""$FLEX" 1>&6
1474 else
1475   echo "$ac_t""no" 1>&6
1476 fi
1477
1478 test -n "$FLEX" && break
1479 done
1480 test -n "$FLEX" || FLEX="error"
1481
1482 for ac_prog in make
1483 do
1484 # Extract the first word of "$ac_prog", so it can be a program name with args.
1485 set dummy $ac_prog; ac_word=$2
1486 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1487 echo "configure:1488: checking for $ac_word" >&5
1488 if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
1489   echo $ac_n "(cached) $ac_c" 1>&6
1490 else
1491   if test -n "$MAKE"; then
1492   ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
1493 else
1494   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1495   for ac_dir in $PATH; do
1496     test -z "$ac_dir" && ac_dir=.
1497     if test -f $ac_dir/$ac_word; then
1498       ac_cv_prog_MAKE="$ac_prog"
1499       break
1500     fi
1501   done
1502   IFS="$ac_save_ifs"
1503 fi
1504 fi
1505 MAKE="$ac_cv_prog_MAKE"
1506 if test -n "$MAKE"; then
1507   echo "$ac_t""$MAKE" 1>&6
1508 else
1509   echo "$ac_t""no" 1>&6
1510 fi
1511
1512 test -n "$MAKE" && break
1513 done
1514 test -n "$MAKE" || MAKE="error"
1515
1516 # Extract the first word of "perl", so it can be a program name with args.
1517 set dummy perl; ac_word=$2
1518 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1519 echo "configure:1520: checking for $ac_word" >&5
1520 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
1521   echo $ac_n "(cached) $ac_c" 1>&6
1522 else
1523   case "$PERL" in
1524   /*)
1525   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
1526   ;;
1527   *)
1528   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1529   for ac_dir in $PATH; do
1530     test -z "$ac_dir" && ac_dir=.
1531     if test -f $ac_dir/$ac_word; then
1532       ac_cv_path_PERL="$ac_dir/$ac_word"
1533       break
1534     fi
1535   done
1536   IFS="$ac_save_ifs"
1537   test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="error"
1538   ;;
1539 esac
1540 fi
1541 PERL="$ac_cv_path_PERL"
1542 if test -n "$PERL"; then
1543   echo "$ac_t""$PERL" 1>&6
1544 else
1545   echo "$ac_t""no" 1>&6
1546 fi
1547
1548 # Extract the first word of "python", so it can be a program name with args.
1549 set dummy python; ac_word=$2
1550 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1551 echo "configure:1552: checking for $ac_word" >&5
1552 if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then
1553   echo $ac_n "(cached) $ac_c" 1>&6
1554 else
1555   case "$PYTHON" in
1556   /*)
1557   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
1558   ;;
1559   *)
1560   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1561   for ac_dir in $PATH; do
1562     test -z "$ac_dir" && ac_dir=.
1563     if test -f $ac_dir/$ac_word; then
1564       ac_cv_path_PYTHON="$ac_dir/$ac_word"
1565       break
1566     fi
1567   done
1568   IFS="$ac_save_ifs"
1569   test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON="error"
1570   ;;
1571 esac
1572 fi
1573 PYTHON="$ac_cv_path_PYTHON"
1574 if test -n "$PYTHON"; then
1575   echo "$ac_t""$PYTHON" 1>&6
1576 else
1577   echo "$ac_t""no" 1>&6
1578 fi
1579
1580 for ac_prog in pod2html
1581 do
1582 # Extract the first word of "$ac_prog", so it can be a program name with args.
1583 set dummy $ac_prog; ac_word=$2
1584 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1585 echo "configure:1586: checking for $ac_word" >&5
1586 if eval "test \"`echo '$''{'ac_cv_prog_POD2HTML'+set}'`\" = set"; then
1587   echo $ac_n "(cached) $ac_c" 1>&6
1588 else
1589   if test -n "$POD2HTML"; then
1590   ac_cv_prog_POD2HTML="$POD2HTML" # Let the user override the test.
1591 else
1592   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1593   for ac_dir in $PATH; do
1594     test -z "$ac_dir" && ac_dir=.
1595     if test -f $ac_dir/$ac_word; then
1596       ac_cv_prog_POD2HTML="$ac_prog"
1597       break
1598     fi
1599   done
1600   IFS="$ac_save_ifs"
1601 fi
1602 fi
1603 POD2HTML="$ac_cv_prog_POD2HTML"
1604 if test -n "$POD2HTML"; then
1605   echo "$ac_t""$POD2HTML" 1>&6
1606 else
1607   echo "$ac_t""no" 1>&6
1608 fi
1609
1610 test -n "$POD2HTML" && break
1611 done
1612 test -n "$POD2HTML" || POD2HTML="error"
1613
1614 for ac_prog in pod2man
1615 do
1616 # Extract the first word of "$ac_prog", so it can be a program name with args.
1617 set dummy $ac_prog; ac_word=$2
1618 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1619 echo "configure:1620: checking for $ac_word" >&5
1620 if eval "test \"`echo '$''{'ac_cv_prog_POD2MAN'+set}'`\" = set"; then
1621   echo $ac_n "(cached) $ac_c" 1>&6
1622 else
1623   if test -n "$POD2MAN"; then
1624   ac_cv_prog_POD2MAN="$POD2MAN" # Let the user override the test.
1625 else
1626   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1627   for ac_dir in $PATH; do
1628     test -z "$ac_dir" && ac_dir=.
1629     if test -f $ac_dir/$ac_word; then
1630       ac_cv_prog_POD2MAN="$ac_prog"
1631       break
1632     fi
1633   done
1634   IFS="$ac_save_ifs"
1635 fi
1636 fi
1637 POD2MAN="$ac_cv_prog_POD2MAN"
1638 if test -n "$POD2MAN"; then
1639   echo "$ac_t""$POD2MAN" 1>&6
1640 else
1641   echo "$ac_t""no" 1>&6
1642 fi
1643
1644 test -n "$POD2MAN" && break
1645 done
1646 test -n "$POD2MAN" || POD2MAN="error"
1647
1648
1649
1650 if test "x$TEXPREFIX" = xauto ; then
1651     
1652     
1653
1654     echo $ac_n "checking TeX/MF root dir directory""... $ac_c" 1>&6
1655 echo "configure:1656: checking TeX/MF root dir directory" >&5    
1656
1657     find_root_prefix="$prefix"
1658     
1659
1660     test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix"
1661     find_texpostfix="";
1662     for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do
1663         find_texprefix="$find_root_prefix$postfix"
1664         if test -d $find_texprefix; then
1665             find_texpostfix=$postfix
1666             break;
1667         fi
1668     done
1669     
1670     if test "x$find_texpostfix" = x; then
1671         find_texpostfix='/lib/texmf/tex'
1672         
1673     echo "configure: warning: Cannot determine the TeX-directory. Please use --enable-tex-prefix" 1>&2
1674     warn_b=yes
1675
1676     fi
1677
1678     find_texprefix="$find_root_prefix/$find_texpostfix"
1679
1680     # only assign if variablename not empty
1681     if test x != "x$TEXPREFIX"; then
1682         TEXPREFIX='${prefix}'/"$find_texpostfix"
1683     fi
1684     echo "$ac_t""$find_texprefix" 1>&6
1685
1686
1687 else
1688  find_texprefix=$TEXPREFIX
1689 fi
1690
1691 if test "x$MFDIR" = xauto; then
1692     
1693     
1694     
1695     echo $ac_n "checking MF input directory""... $ac_c" 1>&6
1696 echo "configure:1697: checking MF input directory" >&5    
1697     find_dirdir=`(cd $find_texprefix; 
1698       $FIND ./ -type d -a -name source -print |sort|head -1|sed 's#^\./##')`
1699     
1700
1701     if test "x$find_dirdir" = x; then
1702        find_dirdir="/source";
1703        
1704     echo "configure: warning: Cannot determine MF input subdirectory. Please set from command-line" 1>&2
1705     warn_b=yes
1706
1707         true
1708     fi
1709     MFDIR=$find_dirdir
1710     echo "$ac_t""$find_texprefix/$find_dirdir" 1>&6
1711
1712     MFDIR="$TEXPREFIX/$MFDIR"
1713
1714 fi
1715     
1716 if test "x$TEXDIR" = xauto ; then
1717     
1718     
1719     
1720     echo $ac_n "checking TeX input directory""... $ac_c" 1>&6
1721 echo "configure:1722: checking TeX input directory" >&5    
1722     find_dirdir=`(cd $find_texprefix; 
1723       $FIND ./ -type d -a -name tex -print |sort|head -1|sed 's#^\./##')`
1724     
1725
1726     if test "x$find_dirdir" = x; then
1727        find_dirdir="/tex";
1728        
1729     echo "configure: warning: Cannot determine TeX input subdirectory. Please set from command-line" 1>&2
1730     warn_b=yes
1731
1732         true
1733     fi
1734     TEXDIR=$find_dirdir
1735     echo "$ac_t""$find_texprefix/$find_dirdir" 1>&6
1736
1737     TEXDIR="$TEXPREFIX/$TEXDIR"
1738
1739 fi
1740
1741
1742 # AC_JUNK_ARGS( [if test "x$MFDIR" = xauto; then
1743 #      AC_MF_SUBDIR(MFDIR)
1744 #  fi]
1745 # )
1746
1747
1748         if test $MAKE = "error" 
1749         then
1750                 
1751     echo "configure: warning: can't find GNU make. You should install GNU make" 1>&2
1752     warn_b=yes
1753
1754         fi
1755
1756
1757         if test $BISON = "error" 
1758         then
1759                 
1760     echo "configure: warning: can't find bison. Please install Bison" 1>&2
1761     warn_b=yes
1762
1763         fi
1764
1765
1766         if test $PERL = "error" 
1767         then
1768                 
1769     echo "configure: warning: can't find perl. You should install Perl" 1>&2
1770     warn_b=yes
1771
1772         fi
1773
1774
1775         if test $PYTHON = "error" 
1776         then
1777                 
1778     echo "configure: warning: can't find python. You should install Python" 1>&2
1779     warn_b=yes
1780
1781         fi
1782
1783
1784         if test $FLEX = "error" 
1785         then
1786                 
1787     echo "configure: warning: can't find flex. Please install Flex" 1>&2
1788     warn_b=yes
1789
1790         fi
1791
1792
1793         if test $POD2MAN = "error" 
1794         then
1795                 
1796     echo "configure: warning: can't find pod. You should install Perl" 1>&2
1797     warn_b=yes
1798
1799         fi
1800
1801
1802
1803 if test $MAKE != "error" ; then
1804     $MAKE -v| grep GNU > /dev/null
1805     if test "$?" = 1
1806     then
1807             
1808     echo "configure: warning: Please install *GNU* make" 1>&2
1809     warn_b=yes
1810  
1811     fi 
1812 fi 
1813     
1814 if test $BISON != "error"; then
1815     bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
1816     if test $bison_version -lt 25; then
1817         
1818     echo "configure: warning: Your bison is too old (1.$bison_version). Please install 1.25" 1>&2
1819     warn_b=yes
1820
1821     fi  
1822 fi
1823
1824 if test "$INSTALL" = "bin/install-sh"; then
1825     export INSTALL="\$\(depth\)/bin/install-sh"
1826 fi
1827
1828 # ugh autoconf
1829 if $CXX --version | grep '2\.[78]' > /dev/null ||
1830     $CXX --version | grep 'egcs' > /dev/null
1831 then
1832         true
1833 else
1834         
1835     echo "configure: warning: can't find g++ 2.7" 1>&2
1836     warn_b=yes
1837
1838 fi
1839
1840 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
1841 echo "configure:1842: checking how to run the C++ preprocessor" >&5
1842 if test -z "$CXXCPP"; then
1843 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
1844   echo $ac_n "(cached) $ac_c" 1>&6
1845 else
1846   ac_ext=C
1847 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1848 ac_cpp='$CXXCPP $CPPFLAGS'
1849 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1850 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1851 cross_compiling=$ac_cv_prog_cxx_cross
1852   CXXCPP="${CXX-g++} -E"
1853   cat > conftest.$ac_ext <<EOF
1854 #line 1855 "configure"
1855 #include "confdefs.h"
1856 #include <stdlib.h>
1857 EOF
1858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1859 { (eval echo configure:1860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1860 ac_err=`grep -v '^ *+' conftest.out`
1861 if test -z "$ac_err"; then
1862   :
1863 else
1864   echo "$ac_err" >&5
1865   echo "configure: failed program was:" >&5
1866   cat conftest.$ac_ext >&5
1867   rm -rf conftest*
1868   CXXCPP=/lib/cpp
1869 fi
1870 rm -f conftest*
1871   ac_cv_prog_CXXCPP="$CXXCPP"
1872 fi
1873 fi
1874 CXXCPP="$ac_cv_prog_CXXCPP"
1875 echo "$ac_t""$CXXCPP" 1>&6
1876
1877 ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'`
1878 echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6
1879 echo "configure:1880: checking for FlexLexer.h" >&5
1880 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1881   echo $ac_n "(cached) $ac_c" 1>&6
1882 else
1883   cat > conftest.$ac_ext <<EOF
1884 #line 1885 "configure"
1885 #include "confdefs.h"
1886 #include <FlexLexer.h>
1887 EOF
1888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1889 { (eval echo configure:1890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1890 ac_err=`grep -v '^ *+' conftest.out`
1891 if test -z "$ac_err"; then
1892   rm -rf conftest*
1893   eval "ac_cv_header_$ac_safe=yes"
1894 else
1895   echo "$ac_err" >&5
1896   echo "configure: failed program was:" >&5
1897   cat conftest.$ac_ext >&5
1898   rm -rf conftest*
1899   eval "ac_cv_header_$ac_safe=no"
1900 fi
1901 rm -f conftest*
1902 fi
1903 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1904   echo "$ac_t""yes" 1>&6
1905   true
1906 else
1907   echo "$ac_t""no" 1>&6
1908
1909     echo "configure: warning: can't find flex header. Please install Flex headers correctly" 1>&2
1910     warn_b=yes
1911
1912 fi
1913
1914
1915 touch stamp-h.in
1916
1917
1918
1919 # first do Foobar/Makefile then Foobar/include/Makefile
1920 trap '' 1 2 15
1921 cat > confcache <<\EOF
1922 # This file is a shell script that caches the results of configure
1923 # tests run on this system so they can be shared between configure
1924 # scripts and configure runs.  It is not useful on other systems.
1925 # If it contains results you don't want to keep, you may remove or edit it.
1926 #
1927 # By default, configure uses ./config.cache as the cache file,
1928 # creating it if it does not exist already.  You can give configure
1929 # the --cache-file=FILE option to use a different cache file; that is
1930 # what configure does when it calls configure scripts in
1931 # subdirectories, so they share the cache.
1932 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1933 # config.status only pays attention to the cache file if you give it the
1934 # --recheck option to rerun configure.
1935 #
1936 EOF
1937 # The following way of writing the cache mishandles newlines in values,
1938 # but we know of no workaround that is simple, portable, and efficient.
1939 # So, don't put newlines in cache variables' values.
1940 # Ultrix sh set writes to stderr and can't be redirected directly,
1941 # and sets the high bit in the cache file unless we assign to the vars.
1942 (set) 2>&1 |
1943   case `(ac_space=' '; set) 2>&1` in
1944   *ac_space=\ *)
1945     # `set' does not quote correctly, so add quotes (double-quote substitution
1946     # turns \\\\ into \\, and sed turns \\ into \).
1947     sed -n \
1948       -e "s/'/'\\\\''/g" \
1949       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1950     ;;
1951   *)
1952     # `set' quotes correctly as required by POSIX, so do not add quotes.
1953     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1954     ;;
1955   esac >> confcache
1956 if cmp -s $cache_file confcache; then
1957   :
1958 else
1959   if test -w $cache_file; then
1960     echo "updating cache $cache_file"
1961     cat confcache > $cache_file
1962   else
1963     echo "not updating unwritable cache $cache_file"
1964   fi
1965 fi
1966 rm -f confcache
1967
1968 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1969
1970 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1971 # Let make expand exec_prefix.
1972 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1973
1974 # Any assignment to VPATH causes Sun make to only execute
1975 # the first set of double-colon rules, so remove it if not needed.
1976 # If there is a colon in the path, we need to keep it.
1977 if test "x$srcdir" = x.; then
1978   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1979 fi
1980
1981 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1982
1983 DEFS=-DHAVE_CONFIG_H
1984
1985 # Without the "./", some shells look in PATH for config.status.
1986 : ${CONFIG_STATUS=./config.status}
1987
1988 echo creating $CONFIG_STATUS
1989 rm -f $CONFIG_STATUS
1990 cat > $CONFIG_STATUS <<EOF
1991 #! /bin/sh
1992 # Generated automatically by configure.
1993 # Run this file to recreate the current configuration.
1994 # This directory was configured as follows,
1995 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1996 #
1997 # $0 $ac_configure_args
1998 #
1999 # Compiler output produced by configure, useful for debugging
2000 # configure, is in ./config.log if it exists.
2001
2002 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2003 for ac_option
2004 do
2005   case "\$ac_option" in
2006   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2007     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2008     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2009   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2010     echo "$CONFIG_STATUS generated by autoconf version 2.12"
2011     exit 0 ;;
2012   -help | --help | --hel | --he | --h)
2013     echo "\$ac_cs_usage"; exit 0 ;;
2014   *) echo "\$ac_cs_usage"; exit 1 ;;
2015   esac
2016 done
2017
2018 ac_given_srcdir=$srcdir
2019 ac_given_INSTALL="$INSTALL"
2020
2021 trap 'rm -fr `echo "$CONFIGFILE.make:config.make.in $CONFIGFILE.hh:config.hh.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2022 EOF
2023 cat >> $CONFIG_STATUS <<EOF
2024
2025 # Protect against being on the right side of a sed subst in config.status.
2026 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2027  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2028 $ac_vpsub
2029 $extrasub
2030 s%@CFLAGS@%$CFLAGS%g
2031 s%@CPPFLAGS@%$CPPFLAGS%g
2032 s%@CXXFLAGS@%$CXXFLAGS%g
2033 s%@DEFS@%$DEFS%g
2034 s%@LDFLAGS@%$LDFLAGS%g
2035 s%@LIBS@%$LIBS%g
2036 s%@exec_prefix@%$exec_prefix%g
2037 s%@prefix@%$prefix%g
2038 s%@program_transform_name@%$program_transform_name%g
2039 s%@bindir@%$bindir%g
2040 s%@sbindir@%$sbindir%g
2041 s%@libexecdir@%$libexecdir%g
2042 s%@datadir@%$datadir%g
2043 s%@sysconfdir@%$sysconfdir%g
2044 s%@sharedstatedir@%$sharedstatedir%g
2045 s%@localstatedir@%$localstatedir%g
2046 s%@libdir@%$libdir%g
2047 s%@includedir@%$includedir%g
2048 s%@oldincludedir@%$oldincludedir%g
2049 s%@infodir@%$infodir%g
2050 s%@mandir@%$mandir%g
2051 s%@host@%$host%g
2052 s%@host_alias@%$host_alias%g
2053 s%@host_cpu@%$host_cpu%g
2054 s%@host_vendor@%$host_vendor%g
2055 s%@host_os@%$host_os%g
2056 s%@CURRENT@%$CURRENT%g
2057 s%@REVISION@%$REVISION%g
2058 s%@AGE@%$AGE%g
2059 s%@YACC@%$YACC%g
2060 s%@CXX@%$CXX%g
2061 s%@RANLIB@%$RANLIB%g
2062 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2063 s%@INSTALL_DATA@%$INSTALL_DATA%g
2064 s%@TAR@%$TAR%g
2065 s%@FIND@%$FIND%g
2066 s%@LIBOBJS@%$LIBOBJS%g
2067 s%@ICFLAGS@%$ICFLAGS%g
2068 s%@ILDFLAGS@%$ILDFLAGS%g
2069 s%@DEFINES@%$DEFINES%g
2070 s%@COMPILEINFO@%$COMPILEINFO%g
2071 s%@AUTOGENERATE@%$AUTOGENERATE%g
2072 s%@BISON@%$BISON%g
2073 s%@FLEX@%$FLEX%g
2074 s%@LN@%$LN%g
2075 s%@PERL@%$PERL%g
2076 s%@PYTHON@%$PYTHON%g
2077 s%@ZIP@%$ZIP%g
2078 s%@TEXPREFIX@%$TEXPREFIX%g
2079 s%@TEXDIR@%$TEXDIR%g
2080 s%@MFDIR@%$MFDIR%g
2081 s%@DIR_DATADIR@%$DIR_DATADIR%g
2082 s%@absolute_builddir@%$absolute_builddir%g
2083 s%@EXTRA_LIBES@%$EXTRA_LIBES%g
2084 s%@CONFIGSUFFIX@%$CONFIGSUFFIX%g
2085 s%@MAKE@%$MAKE%g
2086 s%@POD2HTML@%$POD2HTML%g
2087 s%@POD2MAN@%$POD2MAN%g
2088 s%@CXXCPP@%$CXXCPP%g
2089
2090 CEOF
2091 EOF
2092
2093 cat >> $CONFIG_STATUS <<\EOF
2094
2095 # Split the substitutions into bite-sized pieces for seds with
2096 # small command number limits, like on Digital OSF/1 and HP-UX.
2097 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2098 ac_file=1 # Number of current file.
2099 ac_beg=1 # First line for current file.
2100 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2101 ac_more_lines=:
2102 ac_sed_cmds=""
2103 while $ac_more_lines; do
2104   if test $ac_beg -gt 1; then
2105     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2106   else
2107     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2108   fi
2109   if test ! -s conftest.s$ac_file; then
2110     ac_more_lines=false
2111     rm -f conftest.s$ac_file
2112   else
2113     if test -z "$ac_sed_cmds"; then
2114       ac_sed_cmds="sed -f conftest.s$ac_file"
2115     else
2116       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2117     fi
2118     ac_file=`expr $ac_file + 1`
2119     ac_beg=$ac_end
2120     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2121   fi
2122 done
2123 if test -z "$ac_sed_cmds"; then
2124   ac_sed_cmds=cat
2125 fi
2126 EOF
2127
2128 cat >> $CONFIG_STATUS <<EOF
2129
2130 CONFIG_FILES=\${CONFIG_FILES-"$CONFIGFILE.make:config.make.in"}
2131 EOF
2132 cat >> $CONFIG_STATUS <<\EOF
2133 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2134   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2135   case "$ac_file" in
2136   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2137        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2138   *) ac_file_in="${ac_file}.in" ;;
2139   esac
2140
2141   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2142
2143   # Remove last slash and all that follows it.  Not all systems have dirname.
2144   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2145   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2146     # The file is in a subdirectory.
2147     test ! -d "$ac_dir" && mkdir "$ac_dir"
2148     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2149     # A "../" for each directory in $ac_dir_suffix.
2150     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2151   else
2152     ac_dir_suffix= ac_dots=
2153   fi
2154
2155   case "$ac_given_srcdir" in
2156   .)  srcdir=.
2157       if test -z "$ac_dots"; then top_srcdir=.
2158       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2159   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2160   *) # Relative path.
2161     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2162     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2163   esac
2164
2165   case "$ac_given_INSTALL" in
2166   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2167   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2168   esac
2169
2170   echo creating "$ac_file"
2171   rm -f "$ac_file"
2172   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2173   case "$ac_file" in
2174   *Makefile*) ac_comsub="1i\\
2175 # $configure_input" ;;
2176   *) ac_comsub= ;;
2177   esac
2178
2179   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2180   sed -e "$ac_comsub
2181 s%@configure_input@%$configure_input%g
2182 s%@srcdir@%$srcdir%g
2183 s%@top_srcdir@%$top_srcdir%g
2184 s%@INSTALL@%$INSTALL%g
2185 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2186 fi; done
2187 rm -f conftest.s*
2188
2189 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2190 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2191 #
2192 # ac_d sets the value in "#define NAME VALUE" lines.
2193 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2194 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2195 ac_dC='\3'
2196 ac_dD='%g'
2197 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2198 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2199 ac_uB='\([      ]\)%\1#\2define\3'
2200 ac_uC=' '
2201 ac_uD='\4%g'
2202 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2203 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2204 ac_eB='$%\1#\2define\3'
2205 ac_eC=' '
2206 ac_eD='%g'
2207
2208 if test "${CONFIG_HEADERS+set}" != set; then
2209 EOF
2210 cat >> $CONFIG_STATUS <<EOF
2211   CONFIG_HEADERS="$CONFIGFILE.hh:config.hh.in"
2212 EOF
2213 cat >> $CONFIG_STATUS <<\EOF
2214 fi
2215 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2216   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2217   case "$ac_file" in
2218   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2219        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2220   *) ac_file_in="${ac_file}.in" ;;
2221   esac
2222
2223   echo creating $ac_file
2224
2225   rm -f conftest.frag conftest.in conftest.out
2226   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2227   cat $ac_file_inputs > conftest.in
2228
2229 EOF
2230
2231 # Transform confdefs.h into a sed script conftest.vals that substitutes
2232 # the proper values into config.h.in to produce config.h.  And first:
2233 # Protect against being on the right side of a sed subst in config.status.
2234 # Protect against being in an unquoted here document in config.status.
2235 rm -f conftest.vals
2236 cat > conftest.hdr <<\EOF
2237 s/[\\&%]/\\&/g
2238 s%[\\$`]%\\&%g
2239 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2240 s%ac_d%ac_u%gp
2241 s%ac_u%ac_e%gp
2242 EOF
2243 sed -n -f conftest.hdr confdefs.h > conftest.vals
2244 rm -f conftest.hdr
2245
2246 # This sed command replaces #undef with comments.  This is necessary, for
2247 # example, in the case of _POSIX_SOURCE, which is predefined and required
2248 # on some systems where configure will not decide to define it.
2249 cat >> conftest.vals <<\EOF
2250 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2251 EOF
2252
2253 # Break up conftest.vals because some shells have a limit on
2254 # the size of here documents, and old seds have small limits too.
2255
2256 rm -f conftest.tail
2257 while :
2258 do
2259   ac_lines=`grep -c . conftest.vals`
2260   # grep -c gives empty output for an empty file on some AIX systems.
2261   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2262   # Write a limited-size here document to conftest.frag.
2263   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2264   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2265   echo 'CEOF
2266   sed -f conftest.frag conftest.in > conftest.out
2267   rm -f conftest.in
2268   mv conftest.out conftest.in
2269 ' >> $CONFIG_STATUS
2270   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2271   rm -f conftest.vals
2272   mv conftest.tail conftest.vals
2273 done
2274 rm -f conftest.vals
2275
2276 cat >> $CONFIG_STATUS <<\EOF
2277   rm -f conftest.frag conftest.h
2278   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2279   cat conftest.in >> conftest.h
2280   rm -f conftest.in
2281   if cmp -s $ac_file conftest.h 2>/dev/null; then
2282     echo "$ac_file is unchanged"
2283     rm -f conftest.h
2284   else
2285     # Remove last slash and all that follows it.  Not all systems have dirname.
2286       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2287       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2288       # The file is in a subdirectory.
2289       test ! -d "$ac_dir" && mkdir "$ac_dir"
2290     fi
2291     rm -f $ac_file
2292     mv conftest.h $ac_file
2293   fi
2294 fi; done
2295
2296 EOF
2297 cat >> $CONFIG_STATUS <<EOF
2298
2299 EOF
2300 cat >> $CONFIG_STATUS <<\EOF
2301
2302 exit 0
2303 EOF
2304 chmod +x $CONFIG_STATUS
2305 rm -fr confdefs* $ac_clean_files
2306 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2307
2308
2309 rm -f Makefile
2310 cp make/Toplevel.make.in ./Makefile
2311 chmod 444 Makefile
2312