2 dnl Process this file with autoconf to produce a configure script.
4 AC_INIT(flower/choleski.cc)
7 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
8 if test x$MY_PATCH_LEVEL != x; then
9 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
11 AM_INIT_AUTOMAKE(lilypond, $FULL_VERSION)
16 # turn off shared libraries by default (may be enabled using --enable-shared)
20 # ugh, automake: we want (and check for) bison
23 # ugh, automake: we want (and check for) flex
28 ac_cv_prog_lex_root=lex.yy
30 missing_dir=`cd $ac_aux_dir && pwd`
32 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
33 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
34 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
35 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
36 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
47 AC_ARG_ENABLE(printing,
48 [ enable-printing turn on debug printing. Default: off],
49 [printing_b=$enableval])
52 AC_ARG_ENABLE(checking,
53 [ enable-checking set runtime checks (assert calls). Default: on],
54 [checking_b=$enableval] )
56 AC_ARG_ENABLE(debugging,
57 [ enable-debugging set debug info. Default: on],
60 AC_ARG_ENABLE(optimise,
61 [ enable-optimise use maximal speed optimisations. Default: off],
62 [optimise_b=$enableval])
64 AC_ARG_ENABLE(profiling,
65 [ enable-profiling compile with gprof support. Default: off],
66 [profile_b=$enableval])
68 AC_ARG_ENABLE(mingw-prefix,
69 [ enable-mingw-prefix=DIR set the mingw32 directory (standalone windows32 exes)],
70 [MINGWPREFIX=$enableval],
73 AC_ARG_ENABLE(tex-prefix,
74 [ enable-tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)],
75 [TEXPREFIX=$enableval],
78 AC_ARG_ENABLE(tex-dir,
79 [ enable-tex-dir=DIR set the directory to put LilyPond TeX files in. ],
84 [ enable-mf-dir=DIR set the directory to put LilyPond MetaFont files in. ],
88 if test $profile_b = yes; then
90 DEFINES="$DEFINES -pg"
93 if test $printing_b = no; then
94 DEFINES="$DEFINES -DNPRINT=1"
97 if test $debug_b = yes; then
100 if test $checking_b = no; then
101 DEFINES="$DEFINES -DNDEBUG=1"
104 # however, C++ support in mingw32 v 0.1.4 is still flaky
105 if test x$MINGWPREFIX != xno; then
106 ICFLAGS="-I$MINGWPREFIX/include"
107 ILDFLAGS="-$MINGWPREFIX/lib"
110 if test $optimise_b = yes; then
111 DEFINES="$DEFINES -finline-functions -O2 -DSTRING_UTILS_INLINED"
114 if test "x$OSTYPE" = "xWindows_NT"; then
115 LN=cp # hard link does not work under cygnus-nt (yet?)
122 dnl COMPILEINFO="$HOST $host $TARGET $target"
123 AUTOHEADER="This file was automatically generated by configure"
124 CPPFLAGS=${CPPFLAGS:-""} # we don't want -g -O junk
125 CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk
130 AC_CHECK_PROGS(TAR, tar, error)
131 AC_CHECK_PROGS(FIND, find, error)
133 dnl should check out -print
134 AC_CHECK_SEARCH_RESULT($FIND, \`find\'. Please use --enable-tex-dir)
143 AC_SUBST(COMPILEINFO)
154 AC_SUBST(DIR_DATADIR)
155 AC_SUBST(EXTRA_LIBES)
157 AC_CHECK_PROGS(BISON, bison, error)
158 AC_CHECK_PROGS(FLEX, flex, error)
159 AC_CHECK_PROGS(MAKE, make, error)
160 AC_PATH_PROG(PERL, perl, error)
161 AC_PATH_PROG(PYTHON, python, error)
162 AC_CHECK_PROGS(POD2HTML, pod2html, error)
163 AC_CHECK_PROGS(POD2MAN, pod2man, error)
166 if test "x$TEXPREFIX" = xauto ; then
167 AC_TEX_PREFIX(TEXPREFIX)
169 find_texprefix=$TEXPREFIX
172 # if test "x$MFDIR" = xauto; then
173 # AC_MF_SUBDIR(MFDIR)
176 if test "x$TEXDIR" = xauto ; then
177 AC_TEX_SUBDIR(TEXDIR)
181 # AC_JUNK_ARGS( [if test "x$MFDIR" = xauto; then
182 # AC_MF_SUBDIR(MFDIR)
186 AC_CHECK_SEARCH_RESULT($MAKE, GNU make, You should install GNU make)
187 AC_CHECK_SEARCH_RESULT($BISON, bison, Please install Bison, 1.25 or better)
188 AC_CHECK_SEARCH_RESULT($PERL, perl, You should install Perl, version 5 or better)
189 AC_CHECK_SEARCH_RESULT($PYTHON, python, You should install Python)
190 AC_CHECK_SEARCH_RESULT($FLEX, flex, Please install Flex, 2.5 or better)
191 AC_CHECK_SEARCH_RESULT($POD2MAN, pod, You should install Perl, version 5 or better)
194 if test $MAKE != "error" ; then
195 $MAKE -v| grep GNU > /dev/null
198 AC_LILY_WARN(Please install *GNU* make)
202 if test $BISON != "error"; then
203 bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
204 if test $bison_version -lt 25; then
205 AC_LILY_WARN(Your bison is too old (1.$bison_version). Please install 1.25)
211 changequote(<<, >>)dnl
212 if $CXX --version | grep '2\.[78]' > /dev/null
217 AC_LILY_WARN(can't find g++ 2.7 or 2.8)
220 AC_CHECK_HEADER(FlexLexer.h, true,
221 AC_LILY_WARN(can't find flex header. Please install Flex headers correctly))
223 AC_CONFIG_SUBDIRS(flower)
225 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, "${FULL_VERSION}")
228 AM_CONFIG_HEADER(lib/config.hh:lib/config.hh.in)
229 echo \#define TOPLEVEL_VERSION \"$FULL_VERSION\" >> lib/config.hh
231 # first do Foobar/Makefile then Foobar/include/Makefile
232 AC_OUTPUT(bin/Makefile lib/Makefile lib/include/Makefile lily/Makefile
233 lily/include/Makefile mf/Makefile mi2mu/Makefile
234 mi2mu/include/Makefile debian/Makefile Documentation/Makefile
235 init/Makefile input/Makefile tex/Makefile make/Makefile
236 mutopia/Makefile mutopia/J.S.Bach/Makefile Makefile bin/add-URLs
237 bin/clean-diaper bin/clean-embeds bin/clean-fonts bin/conflily
238 bin/convert-mudela bin/cvm bin/find-typenames bin/foo bin/genheader
239 bin/ly2dvi bin/make-docxx bin/make-examples bin/make-patch
240 bin/make-version bin/make-website bin/mf-deps bin/mf-to-table
241 bin/mudela-book bin/ps-to-gifs bin/release bin/show-latest)
244 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