]> git.donarmstrong.com Git - lilypond.git/blob - configure
release: 0.1.63
[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 # Check whether --enable-printing or --disable-printing was given.
682 if test "${enable_printing+set}" = set; then
683   enableval="$enable_printing"
684   printing_b=$enableval
685 fi
686
687
688 # Check whether --enable-checking or --disable-checking was given.
689 if test "${enable_checking+set}" = set; then
690   enableval="$enable_checking"
691   checking_b=$enableval 
692 fi
693
694
695 # Check whether --enable-optimise or --disable-optimise was given.
696 if test "${enable_optimise+set}" = set; then
697   enableval="$enable_optimise"
698   optimise_b=$enableval
699 fi
700
701     
702 # Check whether --enable-profiling or --disable-profiling was given.
703 if test "${enable_profiling+set}" = set; then
704   enableval="$enable_profiling"
705   profile_b=$enableval
706 fi
707
708     
709 # Check whether --enable-debugging or --disable-debugging was given.
710 if test "${enable_debugging+set}" = set; then
711   enableval="$enable_debugging"
712   debug_b=$enableval
713 fi
714
715
716 # Check whether --enable-mingw-prefix or --disable-mingw-prefix was given.
717 if test "${enable_mingw_prefix+set}" = set; then
718   enableval="$enable_mingw_prefix"
719   MINGWPREFIX=$enableval
720 else
721   MINGWPREFIX=no
722 fi
723
724     
725 # Check whether --enable-tex-prefix or --disable-tex-prefix was given.
726 if test "${enable_tex_prefix+set}" = set; then
727   enableval="$enable_tex_prefix"
728   TEXPREFIX=$enableval
729 else
730   TEXPREFIX=auto 
731 fi
732
733     
734 # Check whether --enable-tex-dir or --disable-tex-dir was given.
735 if test "${enable_tex_dir+set}" = set; then
736   enableval="$enable_tex_dir"
737   TEXDIR=$enableval
738 else
739   TEXDIR=auto 
740 fi
741
742
743 # Check whether --enable-mf-dir or --disable-mf-dir was given.
744 if test "${enable_mf_dir+set}" = set; then
745   enableval="$enable_mf_dir"
746   MFDIR=$enableval
747 else
748   MFDIR=auto
749 fi
750
751
752 # Check whether --enable-config or --disable-config was given.
753 if test "${enable_config+set}" = set; then
754   enableval="$enable_config"
755   CONFIGSUFFIX=$enableval
756 fi
757
758      
759
760 if test "$printing_b" = no; then
761     # ugh
762     cat >> confdefs.h <<\EOF
763 #define NPRINT 1
764 EOF
765
766     DEFINES="$DEFINES -DNPRINT"
767 fi
768     
769 if test "$checking_b" = no; then
770     # ugh
771     cat >> confdefs.h <<\EOF
772 #define NDEBUG 1
773 EOF
774
775     DEFINES="$DEFINES -DNDEBUG"
776 fi
777
778 if test "$optimise_b" = yes; then
779     DEFINES="$DEFINES -finline-functions -DSTRING_UTILS_INLINED"
780     OPTIMIZE="-O2"
781     cat >> confdefs.h <<\EOF
782 #define STRINGS_UTILS_INLINED 1
783 EOF
784
785 fi
786
787 if test "$optimise_b" = no; then
788     OPTIMIZE=""
789 fi
790
791 if test $profile_b = yes; then
792     EXTRA_LIBES="-pg"
793     DEFINES="$DEFINES -pg"
794 fi
795
796 if test $debug_b = yes; then    
797     DEFINES="$DEFINES -g"
798 fi
799
800 # however, C++ support in mingw32 v 0.1.4 is still flaky
801 if test x$MINGWPREFIX != xno; then 
802     ICFLAGS="-I$MINGWPREFIX/include"
803     ILDFLAGS="-$MINGWPREFIX/lib"
804 fi
805
806 if test "x$OSTYPE" = "xWindows_NT"; then
807     LN=cp # hard link does not work under cygnus-nt (yet?)
808     ZIP="zip -r -9" #
809 else
810     LN=ln
811     ZIP="zip -r -9"
812 fi
813
814 if test "$CONFIGSUFFIX" != "" ; then
815     CONFIGFILE=config-$CONFIGSUFFIX
816 else
817     CONFIGFILE=config
818 fi
819      
820
821
822 AUTOGENERATE="This file was automatically generated by configure"
823 CPPFLAGS=${CPPFLAGS:-""}        # we don't want -g -O junk
824 # CXXFLAGS=${CXXFLAGS:-""}      # we don't want -g -O junk
825 CXXFLAGS="$DEFINES $OPTIMIZE"
826 LDFLAGS=$EXTRA_LIBES
827
828 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
829 do
830 # Extract the first word of "$ac_prog", so it can be a program name with args.
831 set dummy $ac_prog; ac_word=$2
832 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
833 echo "configure:834: checking for $ac_word" >&5
834 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
835   echo $ac_n "(cached) $ac_c" 1>&6
836 else
837   if test -n "$CXX"; then
838   ac_cv_prog_CXX="$CXX" # Let the user override the test.
839 else
840   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
841   for ac_dir in $PATH; do
842     test -z "$ac_dir" && ac_dir=.
843     if test -f $ac_dir/$ac_word; then
844       ac_cv_prog_CXX="$ac_prog"
845       break
846     fi
847   done
848   IFS="$ac_save_ifs"
849 fi
850 fi
851 CXX="$ac_cv_prog_CXX"
852 if test -n "$CXX"; then
853   echo "$ac_t""$CXX" 1>&6
854 else
855   echo "$ac_t""no" 1>&6
856 fi
857
858 test -n "$CXX" && break
859 done
860 test -n "$CXX" || CXX="gcc"
861
862
863 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
864 echo "configure:865: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
865
866 ac_ext=C
867 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
868 ac_cpp='$CXXCPP $CPPFLAGS'
869 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
870 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
871 cross_compiling=$ac_cv_prog_cxx_cross
872
873 cat > conftest.$ac_ext <<EOF
874 #line 875 "configure"
875 #include "confdefs.h"
876 main(){return(0);}
877 EOF
878 if { (eval echo configure:879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
879   ac_cv_prog_cxx_works=yes
880   # If we can't run a trivial program, we are probably using a cross compiler.
881   if (./conftest; exit) 2>/dev/null; then
882     ac_cv_prog_cxx_cross=no
883   else
884     ac_cv_prog_cxx_cross=yes
885   fi
886 else
887   echo "configure: failed program was:" >&5
888   cat conftest.$ac_ext >&5
889   ac_cv_prog_cxx_works=no
890 fi
891 rm -fr conftest*
892
893 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
894 if test $ac_cv_prog_cxx_works = no; then
895   { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
896 fi
897 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
898 echo "configure:899: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
899 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
900 cross_compiling=$ac_cv_prog_cxx_cross
901
902 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
903 echo "configure:904: checking whether we are using GNU C++" >&5
904 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
905   echo $ac_n "(cached) $ac_c" 1>&6
906 else
907   cat > conftest.C <<EOF
908 #ifdef __GNUC__
909   yes;
910 #endif
911 EOF
912 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
913   ac_cv_prog_gxx=yes
914 else
915   ac_cv_prog_gxx=no
916 fi
917 fi
918
919 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
920
921 if test $ac_cv_prog_gxx = yes; then
922   GXX=yes
923   ac_test_CXXFLAGS="${CXXFLAGS+set}"
924   ac_save_CXXFLAGS="$CXXFLAGS"
925   CXXFLAGS=
926   echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
927 echo "configure:928: checking whether ${CXX-g++} accepts -g" >&5
928 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
929   echo $ac_n "(cached) $ac_c" 1>&6
930 else
931   echo 'void f(){}' > conftest.cc
932 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
933   ac_cv_prog_cxx_g=yes
934 else
935   ac_cv_prog_cxx_g=no
936 fi
937 rm -f conftest*
938
939 fi
940
941 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
942   if test "$ac_test_CXXFLAGS" = set; then
943     CXXFLAGS="$ac_save_CXXFLAGS"
944   elif test $ac_cv_prog_cxx_g = yes; then
945     CXXFLAGS="-g -O2"
946   else
947     CXXFLAGS="-O2"
948   fi
949 else
950   GXX=
951   test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
952 fi
953
954 # Extract the first word of "ranlib", so it can be a program name with args.
955 set dummy ranlib; ac_word=$2
956 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
957 echo "configure:958: checking for $ac_word" >&5
958 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
959   echo $ac_n "(cached) $ac_c" 1>&6
960 else
961   if test -n "$RANLIB"; then
962   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
963 else
964   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
965   for ac_dir in $PATH; do
966     test -z "$ac_dir" && ac_dir=.
967     if test -f $ac_dir/$ac_word; then
968       ac_cv_prog_RANLIB="ranlib"
969       break
970     fi
971   done
972   IFS="$ac_save_ifs"
973   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
974 fi
975 fi
976 RANLIB="$ac_cv_prog_RANLIB"
977 if test -n "$RANLIB"; then
978   echo "$ac_t""$RANLIB" 1>&6
979 else
980   echo "$ac_t""no" 1>&6
981 fi
982
983 # Find a good install program.  We prefer a C program (faster),
984 # so one script is as good as another.  But avoid the broken or
985 # incompatible versions:
986 # SysV /etc/install, /usr/sbin/install
987 # SunOS /usr/etc/install
988 # IRIX /sbin/install
989 # AIX /bin/install
990 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
991 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
992 # ./install, which can be erroneously created by make from ./install.sh.
993 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
994 echo "configure:995: checking for a BSD compatible install" >&5
995 if test -z "$INSTALL"; then
996 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
997   echo $ac_n "(cached) $ac_c" 1>&6
998 else
999     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1000   for ac_dir in $PATH; do
1001     # Account for people who put trailing slashes in PATH elements.
1002     case "$ac_dir/" in
1003     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1004     *)
1005       # OSF1 and SCO ODT 3.0 have their own names for install.
1006       for ac_prog in ginstall installbsd scoinst install; do
1007         if test -f $ac_dir/$ac_prog; then
1008           if test $ac_prog = install &&
1009             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1010             # AIX install.  It has an incompatible calling convention.
1011             # OSF/1 installbsd also uses dspmsg, but is usable.
1012             :
1013           else
1014             ac_cv_path_install="$ac_dir/$ac_prog -c"
1015             break 2
1016           fi
1017         fi
1018       done
1019       ;;
1020     esac
1021   done
1022   IFS="$ac_save_IFS"
1023
1024 fi
1025   if test "${ac_cv_path_install+set}" = set; then
1026     INSTALL="$ac_cv_path_install"
1027   else
1028     # As a last resort, use the slow shell script.  We don't cache a
1029     # path for INSTALL within a source directory, because that will
1030     # break other packages using the cache if that directory is
1031     # removed, or if the path is relative.
1032     INSTALL="$ac_install_sh"
1033   fi
1034 fi
1035 echo "$ac_t""$INSTALL" 1>&6
1036
1037 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1038 # It thinks the first close brace ends the variable substitution.
1039 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1040
1041 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1042
1043 for ac_prog in tar
1044 do
1045 # Extract the first word of "$ac_prog", so it can be a program name with args.
1046 set dummy $ac_prog; ac_word=$2
1047 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1048 echo "configure:1049: checking for $ac_word" >&5
1049 if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then
1050   echo $ac_n "(cached) $ac_c" 1>&6
1051 else
1052   if test -n "$TAR"; then
1053   ac_cv_prog_TAR="$TAR" # Let the user override the test.
1054 else
1055   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1056   for ac_dir in $PATH; do
1057     test -z "$ac_dir" && ac_dir=.
1058     if test -f $ac_dir/$ac_word; then
1059       ac_cv_prog_TAR="$ac_prog"
1060       break
1061     fi
1062   done
1063   IFS="$ac_save_ifs"
1064 fi
1065 fi
1066 TAR="$ac_cv_prog_TAR"
1067 if test -n "$TAR"; then
1068   echo "$ac_t""$TAR" 1>&6
1069 else
1070   echo "$ac_t""no" 1>&6
1071 fi
1072
1073 test -n "$TAR" && break
1074 done
1075 test -n "$TAR" || TAR="error"
1076
1077 for ac_prog in find
1078 do
1079 # Extract the first word of "$ac_prog", so it can be a program name with args.
1080 set dummy $ac_prog; ac_word=$2
1081 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1082 echo "configure:1083: checking for $ac_word" >&5
1083 if eval "test \"`echo '$''{'ac_cv_prog_FIND'+set}'`\" = set"; then
1084   echo $ac_n "(cached) $ac_c" 1>&6
1085 else
1086   if test -n "$FIND"; then
1087   ac_cv_prog_FIND="$FIND" # Let the user override the test.
1088 else
1089   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1090   for ac_dir in $PATH; do
1091     test -z "$ac_dir" && ac_dir=.
1092     if test -f $ac_dir/$ac_word; then
1093       ac_cv_prog_FIND="$ac_prog"
1094       break
1095     fi
1096   done
1097   IFS="$ac_save_ifs"
1098 fi
1099 fi
1100 FIND="$ac_cv_prog_FIND"
1101 if test -n "$FIND"; then
1102   echo "$ac_t""$FIND" 1>&6
1103 else
1104   echo "$ac_t""no" 1>&6
1105 fi
1106
1107 test -n "$FIND" && break
1108 done
1109 test -n "$FIND" || FIND="error"
1110
1111
1112
1113         if test $FIND = "error" 
1114         then
1115                 
1116     echo "configure: warning: can't find \`find\'. Please use --enable-tex-dir. " 1>&2
1117     warn_b=yes
1118
1119         fi
1120
1121
1122 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
1123 echo "configure:1124: checking for 8-bit clean memcmp" >&5
1124 if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
1125   echo $ac_n "(cached) $ac_c" 1>&6
1126 else
1127   if test "$cross_compiling" = yes; then
1128   ac_cv_func_memcmp_clean=no
1129 else
1130   cat > conftest.$ac_ext <<EOF
1131 #line 1132 "configure"
1132 #include "confdefs.h"
1133 #ifdef __cplusplus
1134 extern "C" void exit(int);
1135 #endif
1136
1137 main()
1138 {
1139   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
1140   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
1141 }
1142
1143 EOF
1144 if { (eval echo configure:1145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
1145 then
1146   ac_cv_func_memcmp_clean=yes
1147 else
1148   echo "configure: failed program was:" >&5
1149   cat conftest.$ac_ext >&5
1150   rm -fr conftest*
1151   ac_cv_func_memcmp_clean=no
1152 fi
1153 rm -fr conftest*
1154 fi
1155
1156 fi
1157
1158 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
1159 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
1160
1161 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
1162 echo "configure:1163: checking for vprintf" >&5
1163 if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
1164   echo $ac_n "(cached) $ac_c" 1>&6
1165 else
1166   cat > conftest.$ac_ext <<EOF
1167 #line 1168 "configure"
1168 #include "confdefs.h"
1169 /* System header to define __stub macros and hopefully few prototypes,
1170     which can conflict with char vprintf(); below.  */
1171 #include <assert.h>
1172 /* Override any gcc2 internal prototype to avoid an error.  */
1173 #ifdef __cplusplus
1174 extern "C"
1175 #endif
1176 /* We use char because int might match the return type of a gcc2
1177     builtin and then its argument prototype would still apply.  */
1178 char vprintf();
1179
1180 int main() {
1181
1182 /* The GNU C library defines this for functions which it implements
1183     to always fail with ENOSYS.  Some functions are actually named
1184     something starting with __ and the normal name is an alias.  */
1185 #if defined (__stub_vprintf) || defined (__stub___vprintf)
1186 choke me
1187 #else
1188 vprintf();
1189 #endif
1190
1191 ; return 0; }
1192 EOF
1193 if { (eval echo configure:1194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1194   rm -rf conftest*
1195   eval "ac_cv_func_vprintf=yes"
1196 else
1197   echo "configure: failed program was:" >&5
1198   cat conftest.$ac_ext >&5
1199   rm -rf conftest*
1200   eval "ac_cv_func_vprintf=no"
1201 fi
1202 rm -f conftest*
1203 fi
1204
1205 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
1206   echo "$ac_t""yes" 1>&6
1207   cat >> confdefs.h <<\EOF
1208 #define HAVE_VPRINTF 1
1209 EOF
1210
1211 else
1212   echo "$ac_t""no" 1>&6
1213 fi
1214
1215 if test "$ac_cv_func_vprintf" != yes; then
1216 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
1217 echo "configure:1218: checking for _doprnt" >&5
1218 if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
1219   echo $ac_n "(cached) $ac_c" 1>&6
1220 else
1221   cat > conftest.$ac_ext <<EOF
1222 #line 1223 "configure"
1223 #include "confdefs.h"
1224 /* System header to define __stub macros and hopefully few prototypes,
1225     which can conflict with char _doprnt(); below.  */
1226 #include <assert.h>
1227 /* Override any gcc2 internal prototype to avoid an error.  */
1228 #ifdef __cplusplus
1229 extern "C"
1230 #endif
1231 /* We use char because int might match the return type of a gcc2
1232     builtin and then its argument prototype would still apply.  */
1233 char _doprnt();
1234
1235 int main() {
1236
1237 /* The GNU C library defines this for functions which it implements
1238     to always fail with ENOSYS.  Some functions are actually named
1239     something starting with __ and the normal name is an alias.  */
1240 #if defined (__stub__doprnt) || defined (__stub____doprnt)
1241 choke me
1242 #else
1243 _doprnt();
1244 #endif
1245
1246 ; return 0; }
1247 EOF
1248 if { (eval echo configure:1249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1249   rm -rf conftest*
1250   eval "ac_cv_func__doprnt=yes"
1251 else
1252   echo "configure: failed program was:" >&5
1253   cat conftest.$ac_ext >&5
1254   rm -rf conftest*
1255   eval "ac_cv_func__doprnt=no"
1256 fi
1257 rm -f conftest*
1258 fi
1259
1260 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
1261   echo "$ac_t""yes" 1>&6
1262   cat >> confdefs.h <<\EOF
1263 #define HAVE_DOPRNT 1
1264 EOF
1265
1266 else
1267   echo "$ac_t""no" 1>&6
1268 fi
1269
1270 fi
1271
1272 for ac_func in memmem snprintf 
1273 do
1274 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1275 echo "configure:1276: checking for $ac_func" >&5
1276 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1277   echo $ac_n "(cached) $ac_c" 1>&6
1278 else
1279   cat > conftest.$ac_ext <<EOF
1280 #line 1281 "configure"
1281 #include "confdefs.h"
1282 /* System header to define __stub macros and hopefully few prototypes,
1283     which can conflict with char $ac_func(); below.  */
1284 #include <assert.h>
1285 /* Override any gcc2 internal prototype to avoid an error.  */
1286 #ifdef __cplusplus
1287 extern "C"
1288 #endif
1289 /* We use char because int might match the return type of a gcc2
1290     builtin and then its argument prototype would still apply.  */
1291 char $ac_func();
1292
1293 int main() {
1294
1295 /* The GNU C library defines this for functions which it implements
1296     to always fail with ENOSYS.  Some functions are actually named
1297     something starting with __ and the normal name is an alias.  */
1298 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1299 choke me
1300 #else
1301 $ac_func();
1302 #endif
1303
1304 ; return 0; }
1305 EOF
1306 if { (eval echo configure:1307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1307   rm -rf conftest*
1308   eval "ac_cv_func_$ac_func=yes"
1309 else
1310   echo "configure: failed program was:" >&5
1311   cat conftest.$ac_ext >&5
1312   rm -rf conftest*
1313   eval "ac_cv_func_$ac_func=no"
1314 fi
1315 rm -f conftest*
1316 fi
1317
1318 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1319   echo "$ac_t""yes" 1>&6
1320     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1321   cat >> confdefs.h <<EOF
1322 #define $ac_tr_func 1
1323 EOF
1324  
1325 else
1326   echo "$ac_t""no" 1>&6
1327 fi
1328 done
1329
1330
1331 cat >> confdefs.h <<EOF
1332 #define TOPLEVEL_VERSION "${FULL_VERSION}"
1333 EOF
1334
1335 cat >> confdefs.h <<EOF
1336 #define FLOWER_VERSION "${FULL_FLOWER_VERSION}"
1337 EOF
1338
1339 # ugh: produces "${prefix}/share/lilypond"
1340 # DIR_DATADIR=$datadir/lilypond
1341 # ugh: produces "NONE/share/lilypond"
1342 # DIR_DATADIR=$prefix/share/lilypond
1343
1344 DIR_DATADIR=$prefix/share/lilypond
1345 if test x$prefix = xNONE; then
1346         DIR_DATADIR=/usr/local/share/lilypond
1347 fi
1348 cat >> confdefs.h <<EOF
1349 #define DIR_DATADIR "${DIR_DATADIR}"
1350 EOF
1351
1352
1353 absolute_builddir="`pwd`"
1354     
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378 for ac_prog in bison
1379 do
1380 # Extract the first word of "$ac_prog", so it can be a program name with args.
1381 set dummy $ac_prog; ac_word=$2
1382 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1383 echo "configure:1384: checking for $ac_word" >&5
1384 if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
1385   echo $ac_n "(cached) $ac_c" 1>&6
1386 else
1387   if test -n "$BISON"; then
1388   ac_cv_prog_BISON="$BISON" # Let the user override the test.
1389 else
1390   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1391   for ac_dir in $PATH; do
1392     test -z "$ac_dir" && ac_dir=.
1393     if test -f $ac_dir/$ac_word; then
1394       ac_cv_prog_BISON="$ac_prog"
1395       break
1396     fi
1397   done
1398   IFS="$ac_save_ifs"
1399 fi
1400 fi
1401 BISON="$ac_cv_prog_BISON"
1402 if test -n "$BISON"; then
1403   echo "$ac_t""$BISON" 1>&6
1404 else
1405   echo "$ac_t""no" 1>&6
1406 fi
1407
1408 test -n "$BISON" && break
1409 done
1410 test -n "$BISON" || BISON="error"
1411
1412 for ac_prog in flex
1413 do
1414 # Extract the first word of "$ac_prog", so it can be a program name with args.
1415 set dummy $ac_prog; ac_word=$2
1416 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1417 echo "configure:1418: checking for $ac_word" >&5
1418 if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
1419   echo $ac_n "(cached) $ac_c" 1>&6
1420 else
1421   if test -n "$FLEX"; then
1422   ac_cv_prog_FLEX="$FLEX" # Let the user override the test.
1423 else
1424   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1425   for ac_dir in $PATH; do
1426     test -z "$ac_dir" && ac_dir=.
1427     if test -f $ac_dir/$ac_word; then
1428       ac_cv_prog_FLEX="$ac_prog"
1429       break
1430     fi
1431   done
1432   IFS="$ac_save_ifs"
1433 fi
1434 fi
1435 FLEX="$ac_cv_prog_FLEX"
1436 if test -n "$FLEX"; then
1437   echo "$ac_t""$FLEX" 1>&6
1438 else
1439   echo "$ac_t""no" 1>&6
1440 fi
1441
1442 test -n "$FLEX" && break
1443 done
1444 test -n "$FLEX" || FLEX="error"
1445
1446 for ac_prog in make
1447 do
1448 # Extract the first word of "$ac_prog", so it can be a program name with args.
1449 set dummy $ac_prog; ac_word=$2
1450 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1451 echo "configure:1452: checking for $ac_word" >&5
1452 if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
1453   echo $ac_n "(cached) $ac_c" 1>&6
1454 else
1455   if test -n "$MAKE"; then
1456   ac_cv_prog_MAKE="$MAKE" # Let the user override the test.
1457 else
1458   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1459   for ac_dir in $PATH; do
1460     test -z "$ac_dir" && ac_dir=.
1461     if test -f $ac_dir/$ac_word; then
1462       ac_cv_prog_MAKE="$ac_prog"
1463       break
1464     fi
1465   done
1466   IFS="$ac_save_ifs"
1467 fi
1468 fi
1469 MAKE="$ac_cv_prog_MAKE"
1470 if test -n "$MAKE"; then
1471   echo "$ac_t""$MAKE" 1>&6
1472 else
1473   echo "$ac_t""no" 1>&6
1474 fi
1475
1476 test -n "$MAKE" && break
1477 done
1478 test -n "$MAKE" || MAKE="error"
1479
1480 # Extract the first word of "perl", so it can be a program name with args.
1481 set dummy perl; ac_word=$2
1482 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1483 echo "configure:1484: checking for $ac_word" >&5
1484 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
1485   echo $ac_n "(cached) $ac_c" 1>&6
1486 else
1487   case "$PERL" in
1488   /*)
1489   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
1490   ;;
1491   *)
1492   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1493   for ac_dir in $PATH; do
1494     test -z "$ac_dir" && ac_dir=.
1495     if test -f $ac_dir/$ac_word; then
1496       ac_cv_path_PERL="$ac_dir/$ac_word"
1497       break
1498     fi
1499   done
1500   IFS="$ac_save_ifs"
1501   test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="error"
1502   ;;
1503 esac
1504 fi
1505 PERL="$ac_cv_path_PERL"
1506 if test -n "$PERL"; then
1507   echo "$ac_t""$PERL" 1>&6
1508 else
1509   echo "$ac_t""no" 1>&6
1510 fi
1511
1512 # Extract the first word of "python", so it can be a program name with args.
1513 set dummy python; ac_word=$2
1514 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1515 echo "configure:1516: checking for $ac_word" >&5
1516 if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then
1517   echo $ac_n "(cached) $ac_c" 1>&6
1518 else
1519   case "$PYTHON" in
1520   /*)
1521   ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
1522   ;;
1523   *)
1524   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1525   for ac_dir in $PATH; do
1526     test -z "$ac_dir" && ac_dir=.
1527     if test -f $ac_dir/$ac_word; then
1528       ac_cv_path_PYTHON="$ac_dir/$ac_word"
1529       break
1530     fi
1531   done
1532   IFS="$ac_save_ifs"
1533   test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON="error"
1534   ;;
1535 esac
1536 fi
1537 PYTHON="$ac_cv_path_PYTHON"
1538 if test -n "$PYTHON"; then
1539   echo "$ac_t""$PYTHON" 1>&6
1540 else
1541   echo "$ac_t""no" 1>&6
1542 fi
1543
1544 for ac_prog in pod2html
1545 do
1546 # Extract the first word of "$ac_prog", so it can be a program name with args.
1547 set dummy $ac_prog; ac_word=$2
1548 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1549 echo "configure:1550: checking for $ac_word" >&5
1550 if eval "test \"`echo '$''{'ac_cv_prog_POD2HTML'+set}'`\" = set"; then
1551   echo $ac_n "(cached) $ac_c" 1>&6
1552 else
1553   if test -n "$POD2HTML"; then
1554   ac_cv_prog_POD2HTML="$POD2HTML" # Let the user override the test.
1555 else
1556   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1557   for ac_dir in $PATH; do
1558     test -z "$ac_dir" && ac_dir=.
1559     if test -f $ac_dir/$ac_word; then
1560       ac_cv_prog_POD2HTML="$ac_prog"
1561       break
1562     fi
1563   done
1564   IFS="$ac_save_ifs"
1565 fi
1566 fi
1567 POD2HTML="$ac_cv_prog_POD2HTML"
1568 if test -n "$POD2HTML"; then
1569   echo "$ac_t""$POD2HTML" 1>&6
1570 else
1571   echo "$ac_t""no" 1>&6
1572 fi
1573
1574 test -n "$POD2HTML" && break
1575 done
1576 test -n "$POD2HTML" || POD2HTML="error"
1577
1578 for ac_prog in pod2man
1579 do
1580 # Extract the first word of "$ac_prog", so it can be a program name with args.
1581 set dummy $ac_prog; ac_word=$2
1582 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1583 echo "configure:1584: checking for $ac_word" >&5
1584 if eval "test \"`echo '$''{'ac_cv_prog_POD2MAN'+set}'`\" = set"; then
1585   echo $ac_n "(cached) $ac_c" 1>&6
1586 else
1587   if test -n "$POD2MAN"; then
1588   ac_cv_prog_POD2MAN="$POD2MAN" # Let the user override the test.
1589 else
1590   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1591   for ac_dir in $PATH; do
1592     test -z "$ac_dir" && ac_dir=.
1593     if test -f $ac_dir/$ac_word; then
1594       ac_cv_prog_POD2MAN="$ac_prog"
1595       break
1596     fi
1597   done
1598   IFS="$ac_save_ifs"
1599 fi
1600 fi
1601 POD2MAN="$ac_cv_prog_POD2MAN"
1602 if test -n "$POD2MAN"; then
1603   echo "$ac_t""$POD2MAN" 1>&6
1604 else
1605   echo "$ac_t""no" 1>&6
1606 fi
1607
1608 test -n "$POD2MAN" && break
1609 done
1610 test -n "$POD2MAN" || POD2MAN="error"
1611
1612
1613
1614 if test "x$TEXPREFIX" = xauto ; then
1615     
1616     
1617
1618     echo $ac_n "checking TeX/MF root dir directory""... $ac_c" 1>&6
1619 echo "configure:1620: checking TeX/MF root dir directory" >&5    
1620
1621     find_root_prefix="$prefix"
1622     
1623
1624     test "x$find_root_prefix" = xNONE && find_root_prefix="$ac_default_prefix"
1625     find_texpostfix="";
1626     for postfix in "/lib/tex/" "/lib/texmf" "/lib" "/tex" "/texmf"; do
1627         find_texprefix="$find_root_prefix$postfix"
1628         if test -d $find_texprefix; then
1629             find_texpostfix=$postfix
1630             break;
1631         fi
1632     done
1633     
1634     if test "x$find_texpostfix" = x; then
1635         find_texpostfix='/lib/texmf/tex'
1636         
1637     echo "configure: warning: Cannot determine the TeX-directory. Please use --enable-tex-prefix" 1>&2
1638     warn_b=yes
1639
1640     fi
1641
1642     find_texprefix="$find_root_prefix/$find_texpostfix"
1643
1644     # only assign if variablename not empty
1645     if test x != "x$TEXPREFIX"; then
1646         TEXPREFIX='${prefix}'/"$find_texpostfix"
1647     fi
1648     echo "$ac_t""$find_texprefix" 1>&6
1649
1650
1651 else
1652  find_texprefix=$TEXPREFIX
1653 fi
1654
1655 if test "x$MFDIR" = xauto; then
1656     
1657     
1658     
1659     echo $ac_n "checking MF input directory""... $ac_c" 1>&6
1660 echo "configure:1661: checking MF input directory" >&5    
1661     find_dirdir=`(cd $find_texprefix; 
1662       $FIND ./ -type d -a -name source -print |sort|head -1|sed 's#^\./##')`
1663     
1664
1665     if test "x$find_dirdir" = x; then
1666        find_dirdir="/source";
1667        
1668     echo "configure: warning: Cannot determine MF input subdirectory. Please set from command-line" 1>&2
1669     warn_b=yes
1670
1671         true
1672     fi
1673     MFDIR=$find_dirdir
1674     echo "$ac_t""$find_texprefix/$find_dirdir" 1>&6
1675
1676     MFDIR="$TEXPREFIX/$MFDIR"
1677
1678 fi
1679     
1680 if test "x$TEXDIR" = xauto ; then
1681     
1682     
1683     
1684     echo $ac_n "checking TeX input directory""... $ac_c" 1>&6
1685 echo "configure:1686: checking TeX input directory" >&5    
1686     find_dirdir=`(cd $find_texprefix; 
1687       $FIND ./ -type d -a -name tex -print |sort|head -1|sed 's#^\./##')`
1688     
1689
1690     if test "x$find_dirdir" = x; then
1691        find_dirdir="/tex";
1692        
1693     echo "configure: warning: Cannot determine TeX input subdirectory. Please set from command-line" 1>&2
1694     warn_b=yes
1695
1696         true
1697     fi
1698     TEXDIR=$find_dirdir
1699     echo "$ac_t""$find_texprefix/$find_dirdir" 1>&6
1700
1701     TEXDIR="$TEXPREFIX/$TEXDIR"
1702
1703 fi
1704
1705
1706 # AC_JUNK_ARGS( [if test "x$MFDIR" = xauto; then
1707 #      AC_MF_SUBDIR(MFDIR)
1708 #  fi]
1709 # )
1710
1711
1712         if test $MAKE = "error" 
1713         then
1714                 
1715     echo "configure: warning: can't find GNU make. You should install GNU make" 1>&2
1716     warn_b=yes
1717
1718         fi
1719
1720
1721         if test $BISON = "error" 
1722         then
1723                 
1724     echo "configure: warning: can't find bison. Please install Bison" 1>&2
1725     warn_b=yes
1726
1727         fi
1728
1729
1730         if test $PERL = "error" 
1731         then
1732                 
1733     echo "configure: warning: can't find perl. You should install Perl" 1>&2
1734     warn_b=yes
1735
1736         fi
1737
1738
1739         if test $PYTHON = "error" 
1740         then
1741                 
1742     echo "configure: warning: can't find python. You should install Python" 1>&2
1743     warn_b=yes
1744
1745         fi
1746
1747
1748         if test $FLEX = "error" 
1749         then
1750                 
1751     echo "configure: warning: can't find flex. Please install Flex" 1>&2
1752     warn_b=yes
1753
1754         fi
1755
1756
1757         if test $POD2MAN = "error" 
1758         then
1759                 
1760     echo "configure: warning: can't find pod. You should install Perl" 1>&2
1761     warn_b=yes
1762
1763         fi
1764
1765
1766
1767 if test $MAKE != "error" ; then
1768     $MAKE -v| grep GNU > /dev/null
1769     if test "$?" = 1
1770     then
1771             
1772     echo "configure: warning: Please install *GNU* make" 1>&2
1773     warn_b=yes
1774  
1775     fi 
1776 fi 
1777     
1778 if test $BISON != "error"; then
1779     bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
1780     if test $bison_version -lt 25; then
1781         
1782     echo "configure: warning: Your bison is too old (1.$bison_version). Please install 1.25" 1>&2
1783     warn_b=yes
1784
1785     fi  
1786 fi
1787
1788 if test "$INSTALL" = "bin/install-sh"; then
1789     export INSTALL="\$\(depth\)/bin/install-sh"
1790 fi
1791
1792 # ugh autoconf
1793 if $CXX --version | grep '2\.[78]' > /dev/null ||
1794     $CXX --version | grep 'egcs' > /dev/null
1795 then
1796         true
1797 else
1798         
1799     echo "configure: warning: can't find g++ 2.7" 1>&2
1800     warn_b=yes
1801
1802 fi
1803
1804 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
1805 echo "configure:1806: checking how to run the C++ preprocessor" >&5
1806 if test -z "$CXXCPP"; then
1807 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
1808   echo $ac_n "(cached) $ac_c" 1>&6
1809 else
1810   ac_ext=C
1811 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1812 ac_cpp='$CXXCPP $CPPFLAGS'
1813 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1814 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1815 cross_compiling=$ac_cv_prog_cxx_cross
1816   CXXCPP="${CXX-g++} -E"
1817   cat > conftest.$ac_ext <<EOF
1818 #line 1819 "configure"
1819 #include "confdefs.h"
1820 #include <stdlib.h>
1821 EOF
1822 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1823 { (eval echo configure:1824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1824 ac_err=`grep -v '^ *+' conftest.out`
1825 if test -z "$ac_err"; then
1826   :
1827 else
1828   echo "$ac_err" >&5
1829   echo "configure: failed program was:" >&5
1830   cat conftest.$ac_ext >&5
1831   rm -rf conftest*
1832   CXXCPP=/lib/cpp
1833 fi
1834 rm -f conftest*
1835   ac_cv_prog_CXXCPP="$CXXCPP"
1836 fi
1837 fi
1838 CXXCPP="$ac_cv_prog_CXXCPP"
1839 echo "$ac_t""$CXXCPP" 1>&6
1840
1841 ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'`
1842 echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6
1843 echo "configure:1844: checking for FlexLexer.h" >&5
1844 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1845   echo $ac_n "(cached) $ac_c" 1>&6
1846 else
1847   cat > conftest.$ac_ext <<EOF
1848 #line 1849 "configure"
1849 #include "confdefs.h"
1850 #include <FlexLexer.h>
1851 EOF
1852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1853 { (eval echo configure:1854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1854 ac_err=`grep -v '^ *+' conftest.out`
1855 if test -z "$ac_err"; then
1856   rm -rf conftest*
1857   eval "ac_cv_header_$ac_safe=yes"
1858 else
1859   echo "$ac_err" >&5
1860   echo "configure: failed program was:" >&5
1861   cat conftest.$ac_ext >&5
1862   rm -rf conftest*
1863   eval "ac_cv_header_$ac_safe=no"
1864 fi
1865 rm -f conftest*
1866 fi
1867 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1868   echo "$ac_t""yes" 1>&6
1869   true
1870 else
1871   echo "$ac_t""no" 1>&6
1872
1873     echo "configure: warning: can't find flex header. Please install Flex headers correctly" 1>&2
1874     warn_b=yes
1875
1876 fi
1877
1878
1879 touch stamp-h.in
1880
1881
1882
1883 # first do Foobar/Makefile then Foobar/include/Makefile
1884 trap '' 1 2 15
1885 cat > confcache <<\EOF
1886 # This file is a shell script that caches the results of configure
1887 # tests run on this system so they can be shared between configure
1888 # scripts and configure runs.  It is not useful on other systems.
1889 # If it contains results you don't want to keep, you may remove or edit it.
1890 #
1891 # By default, configure uses ./config.cache as the cache file,
1892 # creating it if it does not exist already.  You can give configure
1893 # the --cache-file=FILE option to use a different cache file; that is
1894 # what configure does when it calls configure scripts in
1895 # subdirectories, so they share the cache.
1896 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1897 # config.status only pays attention to the cache file if you give it the
1898 # --recheck option to rerun configure.
1899 #
1900 EOF
1901 # The following way of writing the cache mishandles newlines in values,
1902 # but we know of no workaround that is simple, portable, and efficient.
1903 # So, don't put newlines in cache variables' values.
1904 # Ultrix sh set writes to stderr and can't be redirected directly,
1905 # and sets the high bit in the cache file unless we assign to the vars.
1906 (set) 2>&1 |
1907   case `(ac_space=' '; set) 2>&1` in
1908   *ac_space=\ *)
1909     # `set' does not quote correctly, so add quotes (double-quote substitution
1910     # turns \\\\ into \\, and sed turns \\ into \).
1911     sed -n \
1912       -e "s/'/'\\\\''/g" \
1913       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1914     ;;
1915   *)
1916     # `set' quotes correctly as required by POSIX, so do not add quotes.
1917     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1918     ;;
1919   esac >> confcache
1920 if cmp -s $cache_file confcache; then
1921   :
1922 else
1923   if test -w $cache_file; then
1924     echo "updating cache $cache_file"
1925     cat confcache > $cache_file
1926   else
1927     echo "not updating unwritable cache $cache_file"
1928   fi
1929 fi
1930 rm -f confcache
1931
1932 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1933
1934 test "x$prefix" = xNONE && prefix=$ac_default_prefix
1935 # Let make expand exec_prefix.
1936 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1937
1938 # Any assignment to VPATH causes Sun make to only execute
1939 # the first set of double-colon rules, so remove it if not needed.
1940 # If there is a colon in the path, we need to keep it.
1941 if test "x$srcdir" = x.; then
1942   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
1943 fi
1944
1945 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1946
1947 DEFS=-DHAVE_CONFIG_H
1948
1949 # Without the "./", some shells look in PATH for config.status.
1950 : ${CONFIG_STATUS=./config.status}
1951
1952 echo creating $CONFIG_STATUS
1953 rm -f $CONFIG_STATUS
1954 cat > $CONFIG_STATUS <<EOF
1955 #! /bin/sh
1956 # Generated automatically by configure.
1957 # Run this file to recreate the current configuration.
1958 # This directory was configured as follows,
1959 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1960 #
1961 # $0 $ac_configure_args
1962 #
1963 # Compiler output produced by configure, useful for debugging
1964 # configure, is in ./config.log if it exists.
1965
1966 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1967 for ac_option
1968 do
1969   case "\$ac_option" in
1970   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1971     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1972     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1973   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1974     echo "$CONFIG_STATUS generated by autoconf version 2.12"
1975     exit 0 ;;
1976   -help | --help | --hel | --he | --h)
1977     echo "\$ac_cs_usage"; exit 0 ;;
1978   *) echo "\$ac_cs_usage"; exit 1 ;;
1979   esac
1980 done
1981
1982 ac_given_srcdir=$srcdir
1983 ac_given_INSTALL="$INSTALL"
1984
1985 trap 'rm -fr `echo "$CONFIGFILE.make:config.make.in $CONFIGFILE.hh:config.hh.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1986 EOF
1987 cat >> $CONFIG_STATUS <<EOF
1988
1989 # Protect against being on the right side of a sed subst in config.status.
1990 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1991  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1992 $ac_vpsub
1993 $extrasub
1994 s%@CFLAGS@%$CFLAGS%g
1995 s%@CPPFLAGS@%$CPPFLAGS%g
1996 s%@CXXFLAGS@%$CXXFLAGS%g
1997 s%@DEFS@%$DEFS%g
1998 s%@LDFLAGS@%$LDFLAGS%g
1999 s%@LIBS@%$LIBS%g
2000 s%@exec_prefix@%$exec_prefix%g
2001 s%@prefix@%$prefix%g
2002 s%@program_transform_name@%$program_transform_name%g
2003 s%@bindir@%$bindir%g
2004 s%@sbindir@%$sbindir%g
2005 s%@libexecdir@%$libexecdir%g
2006 s%@datadir@%$datadir%g
2007 s%@sysconfdir@%$sysconfdir%g
2008 s%@sharedstatedir@%$sharedstatedir%g
2009 s%@localstatedir@%$localstatedir%g
2010 s%@libdir@%$libdir%g
2011 s%@includedir@%$includedir%g
2012 s%@oldincludedir@%$oldincludedir%g
2013 s%@infodir@%$infodir%g
2014 s%@mandir@%$mandir%g
2015 s%@host@%$host%g
2016 s%@host_alias@%$host_alias%g
2017 s%@host_cpu@%$host_cpu%g
2018 s%@host_vendor@%$host_vendor%g
2019 s%@host_os@%$host_os%g
2020 s%@CURRENT@%$CURRENT%g
2021 s%@REVISION@%$REVISION%g
2022 s%@AGE@%$AGE%g
2023 s%@YACC@%$YACC%g
2024 s%@CXX@%$CXX%g
2025 s%@RANLIB@%$RANLIB%g
2026 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2027 s%@INSTALL_DATA@%$INSTALL_DATA%g
2028 s%@TAR@%$TAR%g
2029 s%@FIND@%$FIND%g
2030 s%@LIBOBJS@%$LIBOBJS%g
2031 s%@ICFLAGS@%$ICFLAGS%g
2032 s%@ILDFLAGS@%$ILDFLAGS%g
2033 s%@DEFINES@%$DEFINES%g
2034 s%@COMPILEINFO@%$COMPILEINFO%g
2035 s%@AUTOGENERATE@%$AUTOGENERATE%g
2036 s%@BISON@%$BISON%g
2037 s%@FLEX@%$FLEX%g
2038 s%@LN@%$LN%g
2039 s%@PERL@%$PERL%g
2040 s%@PYTHON@%$PYTHON%g
2041 s%@ZIP@%$ZIP%g
2042 s%@TEXPREFIX@%$TEXPREFIX%g
2043 s%@TEXDIR@%$TEXDIR%g
2044 s%@MFDIR@%$MFDIR%g
2045 s%@DIR_DATADIR@%$DIR_DATADIR%g
2046 s%@absolute_builddir@%$absolute_builddir%g
2047 s%@EXTRA_LIBES@%$EXTRA_LIBES%g
2048 s%@CONFIGSUFFIX@%$CONFIGSUFFIX%g
2049 s%@MAKE@%$MAKE%g
2050 s%@POD2HTML@%$POD2HTML%g
2051 s%@POD2MAN@%$POD2MAN%g
2052 s%@CXXCPP@%$CXXCPP%g
2053
2054 CEOF
2055 EOF
2056
2057 cat >> $CONFIG_STATUS <<\EOF
2058
2059 # Split the substitutions into bite-sized pieces for seds with
2060 # small command number limits, like on Digital OSF/1 and HP-UX.
2061 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
2062 ac_file=1 # Number of current file.
2063 ac_beg=1 # First line for current file.
2064 ac_end=$ac_max_sed_cmds # Line after last line for current file.
2065 ac_more_lines=:
2066 ac_sed_cmds=""
2067 while $ac_more_lines; do
2068   if test $ac_beg -gt 1; then
2069     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2070   else
2071     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2072   fi
2073   if test ! -s conftest.s$ac_file; then
2074     ac_more_lines=false
2075     rm -f conftest.s$ac_file
2076   else
2077     if test -z "$ac_sed_cmds"; then
2078       ac_sed_cmds="sed -f conftest.s$ac_file"
2079     else
2080       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2081     fi
2082     ac_file=`expr $ac_file + 1`
2083     ac_beg=$ac_end
2084     ac_end=`expr $ac_end + $ac_max_sed_cmds`
2085   fi
2086 done
2087 if test -z "$ac_sed_cmds"; then
2088   ac_sed_cmds=cat
2089 fi
2090 EOF
2091
2092 cat >> $CONFIG_STATUS <<EOF
2093
2094 CONFIG_FILES=\${CONFIG_FILES-"$CONFIGFILE.make:config.make.in"}
2095 EOF
2096 cat >> $CONFIG_STATUS <<\EOF
2097 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2098   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2099   case "$ac_file" in
2100   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2101        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2102   *) ac_file_in="${ac_file}.in" ;;
2103   esac
2104
2105   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2106
2107   # Remove last slash and all that follows it.  Not all systems have dirname.
2108   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2109   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2110     # The file is in a subdirectory.
2111     test ! -d "$ac_dir" && mkdir "$ac_dir"
2112     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2113     # A "../" for each directory in $ac_dir_suffix.
2114     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2115   else
2116     ac_dir_suffix= ac_dots=
2117   fi
2118
2119   case "$ac_given_srcdir" in
2120   .)  srcdir=.
2121       if test -z "$ac_dots"; then top_srcdir=.
2122       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2123   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2124   *) # Relative path.
2125     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2126     top_srcdir="$ac_dots$ac_given_srcdir" ;;
2127   esac
2128
2129   case "$ac_given_INSTALL" in
2130   [/$]*) INSTALL="$ac_given_INSTALL" ;;
2131   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2132   esac
2133
2134   echo creating "$ac_file"
2135   rm -f "$ac_file"
2136   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2137   case "$ac_file" in
2138   *Makefile*) ac_comsub="1i\\
2139 # $configure_input" ;;
2140   *) ac_comsub= ;;
2141   esac
2142
2143   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2144   sed -e "$ac_comsub
2145 s%@configure_input@%$configure_input%g
2146 s%@srcdir@%$srcdir%g
2147 s%@top_srcdir@%$top_srcdir%g
2148 s%@INSTALL@%$INSTALL%g
2149 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2150 fi; done
2151 rm -f conftest.s*
2152
2153 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
2154 # NAME is the cpp macro being defined and VALUE is the value it is being given.
2155 #
2156 # ac_d sets the value in "#define NAME VALUE" lines.
2157 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
2158 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
2159 ac_dC='\3'
2160 ac_dD='%g'
2161 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2162 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2163 ac_uB='\([      ]\)%\1#\2define\3'
2164 ac_uC=' '
2165 ac_uD='\4%g'
2166 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2167 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
2168 ac_eB='$%\1#\2define\3'
2169 ac_eC=' '
2170 ac_eD='%g'
2171
2172 if test "${CONFIG_HEADERS+set}" != set; then
2173 EOF
2174 cat >> $CONFIG_STATUS <<EOF
2175   CONFIG_HEADERS="$CONFIGFILE.hh:config.hh.in"
2176 EOF
2177 cat >> $CONFIG_STATUS <<\EOF
2178 fi
2179 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
2180   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2181   case "$ac_file" in
2182   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2183        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2184   *) ac_file_in="${ac_file}.in" ;;
2185   esac
2186
2187   echo creating $ac_file
2188
2189   rm -f conftest.frag conftest.in conftest.out
2190   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2191   cat $ac_file_inputs > conftest.in
2192
2193 EOF
2194
2195 # Transform confdefs.h into a sed script conftest.vals that substitutes
2196 # the proper values into config.h.in to produce config.h.  And first:
2197 # Protect against being on the right side of a sed subst in config.status.
2198 # Protect against being in an unquoted here document in config.status.
2199 rm -f conftest.vals
2200 cat > conftest.hdr <<\EOF
2201 s/[\\&%]/\\&/g
2202 s%[\\$`]%\\&%g
2203 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
2204 s%ac_d%ac_u%gp
2205 s%ac_u%ac_e%gp
2206 EOF
2207 sed -n -f conftest.hdr confdefs.h > conftest.vals
2208 rm -f conftest.hdr
2209
2210 # This sed command replaces #undef with comments.  This is necessary, for
2211 # example, in the case of _POSIX_SOURCE, which is predefined and required
2212 # on some systems where configure will not decide to define it.
2213 cat >> conftest.vals <<\EOF
2214 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
2215 EOF
2216
2217 # Break up conftest.vals because some shells have a limit on
2218 # the size of here documents, and old seds have small limits too.
2219
2220 rm -f conftest.tail
2221 while :
2222 do
2223   ac_lines=`grep -c . conftest.vals`
2224   # grep -c gives empty output for an empty file on some AIX systems.
2225   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2226   # Write a limited-size here document to conftest.frag.
2227   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
2228   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
2229   echo 'CEOF
2230   sed -f conftest.frag conftest.in > conftest.out
2231   rm -f conftest.in
2232   mv conftest.out conftest.in
2233 ' >> $CONFIG_STATUS
2234   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
2235   rm -f conftest.vals
2236   mv conftest.tail conftest.vals
2237 done
2238 rm -f conftest.vals
2239
2240 cat >> $CONFIG_STATUS <<\EOF
2241   rm -f conftest.frag conftest.h
2242   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
2243   cat conftest.in >> conftest.h
2244   rm -f conftest.in
2245   if cmp -s $ac_file conftest.h 2>/dev/null; then
2246     echo "$ac_file is unchanged"
2247     rm -f conftest.h
2248   else
2249     # Remove last slash and all that follows it.  Not all systems have dirname.
2250       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2251       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2252       # The file is in a subdirectory.
2253       test ! -d "$ac_dir" && mkdir "$ac_dir"
2254     fi
2255     rm -f $ac_file
2256     mv conftest.h $ac_file
2257   fi
2258 fi; done
2259
2260 EOF
2261 cat >> $CONFIG_STATUS <<EOF
2262
2263 EOF
2264 cat >> $CONFIG_STATUS <<\EOF
2265
2266 exit 0
2267 EOF
2268 chmod +x $CONFIG_STATUS
2269 rm -fr confdefs* $ac_clean_files
2270 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2271
2272
2273 rm -f Makefile
2274 cp make/Toplevel.make.in ./Makefile
2275 chmod 444 Makefile
2276