2 dnl Process this file with autoconf to produce a configure script.
4 AC_INIT(flower/choleski.cc)
7 if test x$srcdir != x.; then
8 echo Please look in the INSTALL instructions for
9 echo directions for multi-architecture building
11 AC_LILY_WARN(This package does not support --srcdir!)
14 # if given here, these vars are initted at the checking point.
15 if test x$host = xNONE; then
16 OUTDIR_NAME=${OUTDIR_NAME-"out"}
18 OUTDIR_NAME=${OUTDIR_NAME-"out-$host"}
29 AC_ARG_ENABLE(printing,
30 [ enable-printing turn on debug printing],
31 [printing_b=$enableval])
34 AC_ARG_ENABLE(checking,
35 [ enable-checking set runtime checks (assert calls). Default: on],
36 [checking_b=$enableval] )
38 AC_ARG_ENABLE(debugging,
39 [ enable-debugging set debug info. Default: on],
42 AC_ARG_ENABLE(optimise,
43 [ enable-optimise use maximal speed optimisations. Default: off],
44 [optimise_b=$enableval])
46 AC_ARG_ENABLE(profiling,
47 [ enable-profiling compile with gprof support. Default: off],
48 [profile_b=$enableval])
50 AC_ARG_ENABLE(mingw-prefix,
51 [ mingw-prefix=DIR set the mingw32 directory (standalone windows32 exes)],
52 [MINGWPREFIX=$enableval],
55 AC_ARG_ENABLE(tex-prefix,
56 [ tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)],
57 [TEXPREFIX=$enableval],
60 AC_ARG_ENABLE(tex-dir,
61 [ tex-dir=DIR set the directory to put LilyPond TeX files in. ],
66 [ mf-dir=DIR set the directory to put LilyPond MetaFont files in. (obsolete)],
70 AC_ARG_ENABLE(out-dir,
71 [ out-dir set the directory for machine generated files. Default out or out-HOST],
72 [OUTDIR_NAME=$enableval]
75 if test $profile_b = yes; then
77 DEFINES="$DEFINES -pg"
80 if test $printing_b = no; then
81 DEFINES="$DEFINES -DNPRINT=1"
84 if test $debug_b = yes; then
87 if test $checking_b = no; then
88 DEFINES="$DEFINES -DNDEBUG=1"
91 # however, C++ support in mingw32 v 0.1.4 is still flaky
92 if test x$MINGWPREFIX != xno; then
93 ICFLAGS="-I$MINGWPREFIX/include"
94 ILDFLAGS="-$MINGWPREFIX/lib"
97 if test $optimise_b = yes; then
98 DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED"
101 if test "x$OSTYPE" = "xWindows_NT"; then
102 LN=cp # hard link does not work under cygnus-nt (yet?)
109 dnl COMPILEINFO="$HOST $host $TARGET $target"
110 AUTOHEADER="This file was automatically generated by configure"
111 CPPFLAGS=${CPPFLAGS:-""} # we don't want -g -O junk
112 CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk
117 AC_CHECK_PROGS(TAR, tar, error)
118 AC_CHECK_PROGS(FIND, find, error)
120 dnl should check out -print
121 AC_CHECK_SEARCH_RESULT($FIND, \`find\'. Please use --enable-tex-dir)
124 AC_SUBST(OUTDIR_NAME)
131 AC_SUBST(COMPILEINFO)
142 AC_SUBST(DIR_DATADIR)
143 AC_SUBST(EXTRA_LIBES)
145 AC_CHECK_PROGS(BISON, bison, error)
146 AC_CHECK_PROGS(FLEX, flex, error)
147 AC_CHECK_PROGS(MAKE, make, error)
148 AC_PATH_PROG(PERL, perl, error)
149 AC_PATH_PROG(PYTHON, python, error)
150 AC_CHECK_PROGS(PODMAN, pod2man, error)
153 if test "x$TEXPREFIX" = xauto ; then
154 AC_TEX_PREFIX(TEXPREFIX)
156 find_texprefix=$TEXPREFIX
159 if test "x$MFDIR" = xauto; then
163 if test "x$TEXDIR" = xauto ; then
164 AC_TEX_SUBDIR(TEXDIR)
168 AC_JUNK_ARGS( [if test "x$MFDIR" = xauto; then
173 AC_CHECK_SEARCH_RESULT($MAKE, GNU make, You should install GNU make)
174 AC_CHECK_SEARCH_RESULT( $BISON, bison, Please install Bison, 1.25 or better)
175 AC_CHECK_SEARCH_RESULT($PERL, perl, You should install Perl, version 5 or better)
176 AC_CHECK_SEARCH_RESULT($PYTHON, python, You should install Python)
177 AC_CHECK_SEARCH_RESULT($PODMAN, pod, You should install Perl, version 5 or better)
178 AC_CHECK_SEARCH_RESULT( $FLEX, flex, Please install Flex, 2.5 or better)
181 if test $MAKE != "error" ; then
182 $MAKE -v| grep GNU > /dev/null
185 AC_LILY_WARN(Please install *GNU* make)
189 if test $BISON != "error"; then
190 bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
191 if test $bison_version -lt 25; then
192 AC_LILY_WARN(Your bison is too old (1.$bison_version). Please install 1.25)
196 if $CXX --version | grep '2\.7' > /dev/null
200 AC_LILY_WARN(can't find g++ 2.7)
203 AC_CHECK_HEADER(FlexLexer.h, true,
204 AC_LILY_WARN(can't find flex header. Please install Flex headers correctly))
206 for a in `find . -type d -and -not -name 'out*' -print`; do
207 if test ! -d $a/$OUTDIR_NAME; then
208 mkdir $a/$OUTDIR_NAME
212 AC_CONFIG_SUBDIRS(flower)
215 AC_OUTPUT(make/$OUTDIR_NAME/Configure_variables.make:make/Configure_variables.make.in
216 Makefile:make/Toplevel.make.in)
218 touch make/$OUTDIR_NAME/Site.make
221 For making everything, do:
225 or if you used --outdir=blabla
227 make OUTDIR_NAME=blabla
229 If you want to make site-wide extensions to the makefiles, please use
231 make/$OUTDIR_NAME/Site.make
235 if test x$warn_b = "xyes" ; then
238 **************************************************
239 Warning: configure encountered warnings or errors.
240 Please try to resolve these, and rerun configure
241 before sending a bugreport.
242 If you cannot resolve some warnings, the make
243 process may still be succesful, but be warned.
244 **************************************************