2 dnl Process this file with autoconf to produce a configure script.
5 AC_INIT(flower/choleski.cc)
8 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
9 if test x$MY_PATCH_LEVEL != x; then
10 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
12 AM_INIT_AUTOMAKE(lilypond, $FULL_VERSION)
14 . $srcdir/flower/VERSION
15 FULL_FLOWER_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
18 # **Never** try to set library version numbers so that they correspond
19 # to the release number of your package. This is an abuse that only
20 # fosters misunderstanding of the purpose of library versions.
23 # CURRENT=$MINOR_VERSION
24 CURRENT=`expr $MINOR_VERSION + 1`
25 # AGE=$(expr $MAJOR_VERSION + 1)
31 # turn off shared libraries by default (may be enabled using --enable-shared)
35 # ugh, automake: we want (and check for) bison
38 # ugh, automake: we want (and check for) flex
43 ac_cv_prog_lex_root=lex.yy
54 AC_ARG_ENABLE(printing,
55 [ enable-printing turn on debug printing. Default: off],
56 [printing_b=$enableval])
58 AC_ARG_ENABLE(checking,
59 [ enable-checking set runtime checks (assert calls). Default: on],
60 [checking_b=$enableval] )
62 AC_ARG_ENABLE(optimise,
63 [ enable-optimise use maximal speed optimisations. Default: off],
64 [optimise_b=$enableval])
66 AC_ARG_ENABLE(profiling,
67 [ enable-profiling compile with gprof support. Default: off],
68 [profile_b=$enableval])
70 AC_ARG_ENABLE(debugging,
71 [ enable-debugging set debug info. Default: on],
74 AC_ARG_ENABLE(mingw-prefix,
75 [ enable-mingw-prefix=DIR set the mingw32 directory (standalone windows32 exes)],
76 [MINGWPREFIX=$enableval],
79 AC_ARG_ENABLE(tex-prefix,
80 [ enable-tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)],
81 [TEXPREFIX=$enableval],
84 AC_ARG_ENABLE(tex-dir,
85 [ enable-tex-dir=DIR set the directory to put LilyPond TeX files in. ],
90 [ enable-mf-dir=DIR set the directory to put LilyPond MetaFont files in. ],
94 if test "$printing_b" = no; then
98 if test "$checking_b" = no; then
102 if test "$optimise_b" = yes; then
103 DEFINES="$DEFINES -finline-functions -O2 -DSTRING_UTILS_INLINED"
104 AC_DEFINE(STRINGS_UTILS_INLINED)
107 if test $profile_b = yes; then
109 DEFINES="$DEFINES -pg"
112 if test $debug_b = yes; then
113 DEFINES="$DEFINES -g"
116 # however, C++ support in mingw32 v 0.1.4 is still flaky
117 if test x$MINGWPREFIX != xno; then
118 ICFLAGS="-I$MINGWPREFIX/include"
119 ILDFLAGS="-$MINGWPREFIX/lib"
122 if test "x$OSTYPE" = "xWindows_NT"; then
123 LN=cp # hard link does not work under cygnus-nt (yet?)
130 dnl COMPILEINFO="$HOST $host $TARGET $target"
131 AUTOGENERATE="This file was automatically generated by configure"
132 CPPFLAGS=${CPPFLAGS:-""} # we don't want -g -O junk
133 # CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk
140 AC_CHECK_PROGS(TAR, tar, error)
141 AC_CHECK_PROGS(FIND, find, error)
143 dnl should check out -print
144 AC_CHECK_SEARCH_RESULT($FIND, \`find\'. Please use --enable-tex-dir)
147 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, "${FULL_VERSION}")
148 AC_DEFINE_UNQUOTED(FLOWER_VERSION, "${FULL_FLOWER_VERSION}")
149 # ugh: produces "${prefix}/share/lilypond"
150 # DIR_DATADIR=$datadir/lilypond
151 # ugh: produces "NONE/share/lilypond"
152 # DIR_DATADIR=$prefix/share/lilypond
154 DIR_DATADIR=$prefix/share/lilypond
155 if test x$prefix = xNONE; then
156 DIR_DATADIR=/usr/local/share/lilypond
158 AC_DEFINE_UNQUOTED(DIR_DATADIR, "${DIR_DATADIR}")
160 absolute_builddir="`pwd`"
169 AC_SUBST(COMPILEINFO)
170 AC_SUBST(AUTOGENERATE)
180 AC_SUBST(DIR_DATADIR)
181 AC_SUBST(absolute_builddir)
182 AC_SUBST(EXTRA_LIBES)
184 AC_CHECK_PROGS(BISON, bison, error)
185 AC_CHECK_PROGS(FLEX, flex, error)
186 AC_CHECK_PROGS(MAKE, make, error)
187 AC_PATH_PROG(PERL, perl, error)
188 AC_PATH_PROG(PYTHON, python, error)
189 AC_CHECK_PROGS(POD2HTML, pod2html, error)
190 AC_CHECK_PROGS(POD2MAN, pod2man, error)
193 if test "x$TEXPREFIX" = xauto ; then
194 AC_TEX_PREFIX(TEXPREFIX)
196 find_texprefix=$TEXPREFIX
199 if test "x$MFDIR" = xauto; then
203 if test "x$TEXDIR" = xauto ; then
204 AC_TEX_SUBDIR(TEXDIR)
208 # AC_JUNK_ARGS( [if test "x$MFDIR" = xauto; then
209 # AC_MF_SUBDIR(MFDIR)
213 AC_CHECK_SEARCH_RESULT($MAKE, GNU make, You should install GNU make)
214 AC_CHECK_SEARCH_RESULT($BISON, bison, Please install Bison, 1.25 or better)
215 AC_CHECK_SEARCH_RESULT($PERL, perl, You should install Perl, version 5 or better)
216 AC_CHECK_SEARCH_RESULT($PYTHON, python, You should install Python)
217 AC_CHECK_SEARCH_RESULT($FLEX, flex, Please install Flex, 2.5 or better)
218 AC_CHECK_SEARCH_RESULT($POD2MAN, pod, You should install Perl, version 5 or better)
221 if test $MAKE != "error" ; then
222 $MAKE -v| grep GNU > /dev/null
225 AC_LILY_WARN(Please install *GNU* make)
229 if test $BISON != "error"; then
230 bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
231 if test $bison_version -lt 25; then
232 AC_LILY_WARN(Your bison is too old (1.$bison_version). Please install 1.25)
238 changequote(<<, >>)dnl
239 if $CXX --version | grep '2\.[78]' > /dev/null
244 AC_LILY_WARN(can't find g++ 2.7 or 2.8)
247 AC_CHECK_HEADER(FlexLexer.h, true,
248 AC_LILY_WARN(can't find flex header. Please install Flex headers correctly))
251 AM_CONFIG_HEADER(flower/config.hh:config.hh.in)
253 # first do Foobar/Makefile then Foobar/include/Makefile
254 AC_OUTPUT(bin/Makefile flower/Makefile flower/include/Makefile
255 flowertest/Makefile lib/Makefile lib/include/Makefile
256 lily/Makefile lily/include/Makefile mf/Makefile mi2mu/Makefile
257 mi2mu/include/Makefile debian/Makefile Documentation/Makefile
258 init/Makefile input/Makefile tex/Makefile make/Makefile
259 mutopia/Makefile mutopia/J.S.Bach/Makefile mutopia/Coriolan/Makefile
260 test/Makefile Makefile
261 bin/add-URLs bin/clean-diaper bin/clean-embeds bin/clean-fonts
262 bin/conflily bin/convert-mudela bin/cvm bin/find-typenames bin/foo
263 bin/genheader bin/ly2dvi bin/make-docxx bin/make-examples
264 bin/make-patch bin/make-version bin/make-website bin/mf-deps
265 bin/mf-to-table bin/mudela-book bin/ps-to-gifs bin/release
269 chmod 755 bin/add-URLs bin/clean-diaper bin/clean-embeds bin/clean-fonts bin/conflily bin/convert-mudela bin/cvm bin/find-typenames bin/foo bin/genheader bin/ly2dvi bin/make-docxx bin/make-examples bin/make-patch bin/make-version bin/make-website bin/mf-deps bin/mf-to-table bin/mudela-book bin/ps-to-gifs bin/release bin/show-latest