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)
17 # turn off shared libraries by default (may be enabled using --enable-shared)
21 # ugh, automake: we want (and check for) bison
24 # ugh, automake: we want (and check for) flex
29 ac_cv_prog_lex_root=lex.yy
40 AC_ARG_ENABLE(printing,
41 [ enable-printing turn on debug printing. Default: off],
42 [printing_b=$enableval])
44 AC_ARG_ENABLE(checking,
45 [ enable-checking set runtime checks (assert calls). Default: on],
46 [checking_b=$enableval] )
48 AC_ARG_ENABLE(optimise,
49 [ enable-optimise use maximal speed optimisations. Default: off],
50 [optimise_b=$enableval])
52 AC_ARG_ENABLE(profiling,
53 [ enable-profiling compile with gprof support. Default: off],
54 [profile_b=$enableval])
56 AC_ARG_ENABLE(debugging,
57 [ enable-debugging set debug info. Default: on],
60 AC_ARG_ENABLE(mingw-prefix,
61 [ enable-mingw-prefix=DIR set the mingw32 directory (standalone windows32 exes)],
62 [MINGWPREFIX=$enableval],
65 AC_ARG_ENABLE(tex-prefix,
66 [ enable-tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)],
67 [TEXPREFIX=$enableval],
70 AC_ARG_ENABLE(tex-dir,
71 [ enable-tex-dir=DIR set the directory to put LilyPond TeX files in. ],
76 [ enable-mf-dir=DIR set the directory to put LilyPond MetaFont files in. ],
80 if test "$printing_b" = no; then
84 if test "$checking_b" = no; then
88 if test "$optimise_b" = yes; then
89 # DEFINES="$DEFINES -finline-functions -O2 -DSTRING_UTILS_INLINED"
90 AC_DEFINE(STRINGS_UTILS_INLINED)
93 # oeps, broken for now
94 if test $profile_b = yes; then
96 DEFINES="$DEFINES -pg"
99 if test $debug_b = yes; then
100 DEFINES="$DEFINES -g"
103 # however, C++ support in mingw32 v 0.1.4 is still flaky
104 if test x$MINGWPREFIX != xno; then
105 ICFLAGS="-I$MINGWPREFIX/include"
106 ILDFLAGS="-$MINGWPREFIX/lib"
109 if test "x$OSTYPE" = "xWindows_NT"; then
110 LN=cp # hard link does not work under cygnus-nt (yet?)
117 dnl COMPILEINFO="$HOST $host $TARGET $target"
118 AUTOGENERATE="This file was automatically generated by configure"
119 CPPFLAGS=${CPPFLAGS:-""} # we don't want -g -O junk
120 CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk
125 AC_CHECK_PROGS(TAR, tar, error)
126 AC_CHECK_PROGS(FIND, find, error)
128 dnl should check out -print
129 AC_CHECK_SEARCH_RESULT($FIND, \`find\'. Please use --enable-tex-dir)
132 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, "${FULL_VERSION}")
133 # ugh: produces "${prefix}/share/lilypond"
134 # DIR_DATADIR=$datadir/lilypond
135 # ugh: produces "NONE/share/lilypond"
136 # DIR_DATADIR=$prefix/share/lilypond
138 DIR_DATADIR=$prefix/share/lilypond
139 if test x$prefix = xNONE; then
140 DIR_DATADIR=/usr/local/share/lilypond
142 AC_DEFINE_UNQUOTED(DIR_DATADIR, "${DIR_DATADIR}")
144 absolute_builddir="`pwd`"
152 AC_SUBST(COMPILEINFO)
153 AC_SUBST(AUTOGENERATE)
163 AC_SUBST(DIR_DATADIR)
164 AC_SUBST(absolute_builddir)
165 AC_SUBST(EXTRA_LIBES)
167 AC_CHECK_PROGS(BISON, bison, error)
168 AC_CHECK_PROGS(FLEX, flex, error)
169 AC_CHECK_PROGS(MAKE, make, error)
170 AC_PATH_PROG(PERL, perl, error)
171 AC_PATH_PROG(PYTHON, python, error)
172 AC_CHECK_PROGS(POD2HTML, pod2html, error)
173 AC_CHECK_PROGS(POD2MAN, pod2man, error)
176 if test "x$TEXPREFIX" = xauto ; then
177 AC_TEX_PREFIX(TEXPREFIX)
179 find_texprefix=$TEXPREFIX
182 # if test "x$MFDIR" = xauto; then
183 # AC_MF_SUBDIR(MFDIR)
186 if test "x$TEXDIR" = xauto ; then
187 AC_TEX_SUBDIR(TEXDIR)
191 # AC_JUNK_ARGS( [if test "x$MFDIR" = xauto; then
192 # AC_MF_SUBDIR(MFDIR)
196 AC_CHECK_SEARCH_RESULT($MAKE, GNU make, You should install GNU make)
197 AC_CHECK_SEARCH_RESULT($BISON, bison, Please install Bison, 1.25 or better)
198 AC_CHECK_SEARCH_RESULT($PERL, perl, You should install Perl, version 5 or better)
199 AC_CHECK_SEARCH_RESULT($PYTHON, python, You should install Python)
200 AC_CHECK_SEARCH_RESULT($FLEX, flex, Please install Flex, 2.5 or better)
201 AC_CHECK_SEARCH_RESULT($POD2MAN, pod, You should install Perl, version 5 or better)
204 if test $MAKE != "error" ; then
205 $MAKE -v| grep GNU > /dev/null
208 AC_LILY_WARN(Please install *GNU* make)
212 if test $BISON != "error"; then
213 bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
214 if test $bison_version -lt 25; then
215 AC_LILY_WARN(Your bison is too old (1.$bison_version). Please install 1.25)
221 changequote(<<, >>)dnl
222 if $CXX --version | grep '2\.[78]' > /dev/null
227 AC_LILY_WARN(can't find g++ 2.7 or 2.8)
230 AC_CHECK_HEADER(FlexLexer.h, true,
231 AC_LILY_WARN(can't find flex header. Please install Flex headers correctly))
233 AC_CONFIG_SUBDIRS(flower)
236 # AM_CONFIG_HEADER(lib/config.hh:lib/config.hh.in)
237 AM_CONFIG_HEADER(lib/config.hh:config.hh.in)
239 # first do Foobar/Makefile then Foobar/include/Makefile
240 AC_OUTPUT(bin/Makefile lib/Makefile lib/include/Makefile lily/Makefile
241 lily/include/Makefile mf/Makefile mi2mu/Makefile
242 mi2mu/include/Makefile debian/Makefile Documentation/Makefile
243 init/Makefile input/Makefile tex/Makefile make/Makefile
244 mutopia/Makefile mutopia/J.S.Bach/Makefile Makefile bin/add-URLs
245 bin/clean-diaper bin/clean-embeds bin/clean-fonts bin/conflily
246 bin/convert-mudela bin/cvm bin/find-typenames bin/foo bin/genheader
247 bin/ly2dvi bin/make-docxx bin/make-examples bin/make-patch
248 bin/make-version bin/make-website bin/mf-deps bin/mf-to-table
249 bin/mudela-book bin/ps-to-gifs bin/release bin/show-latest)
252 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