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)
17 # ugh, automake: we want (and check for) bison
20 # ugh, automake: we want (and check for) flex
25 ac_cv_prog_lex_root=lex.yy
27 missing_dir=`cd $ac_aux_dir && pwd`
29 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
30 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
31 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
32 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
33 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
35 if test x$srcdir != x.; then
36 echo Please look in the INSTALL instructions for
37 echo directions for multi-architecture building
39 AC_LILY_WARN(This package does not support --srcdir!)
50 AC_ARG_ENABLE(printing,
51 [ enable-printing turn on debug printing. Default: off],
52 [printing_b=$enableval])
55 AC_ARG_ENABLE(checking,
56 [ enable-checking set runtime checks (assert calls). Default: on],
57 [checking_b=$enableval] )
59 AC_ARG_ENABLE(debugging,
60 [ enable-debugging set debug info. Default: on],
63 AC_ARG_ENABLE(optimise,
64 [ enable-optimise use maximal speed optimisations. Default: off],
65 [optimise_b=$enableval])
67 AC_ARG_ENABLE(profiling,
68 [ enable-profiling compile with gprof support. Default: off],
69 [profile_b=$enableval])
71 AC_ARG_ENABLE(mingw-prefix,
72 [ enable-mingw-prefix=DIR set the mingw32 directory (standalone windows32 exes)],
73 [MINGWPREFIX=$enableval],
76 AC_ARG_ENABLE(tex-prefix,
77 [ enable-tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)],
78 [TEXPREFIX=$enableval],
81 AC_ARG_ENABLE(tex-dir,
82 [ enable-tex-dir=DIR set the directory to put LilyPond TeX files in. ],
87 [ enable-mf-dir=DIR set the directory to put LilyPond MetaFont files in. ],
91 if test $profile_b = yes; then
93 DEFINES="$DEFINES -pg"
96 if test $printing_b = no; then
97 DEFINES="$DEFINES -DNPRINT=1"
100 if test $debug_b = yes; then
101 DEFINES="$DEFINES -g"
103 if test $checking_b = no; then
104 DEFINES="$DEFINES -DNDEBUG=1"
107 # however, C++ support in mingw32 v 0.1.4 is still flaky
108 if test x$MINGWPREFIX != xno; then
109 ICFLAGS="-I$MINGWPREFIX/include"
110 ILDFLAGS="-$MINGWPREFIX/lib"
113 if test $optimise_b = yes; then
114 DEFINES="$DEFINES -finline-functions -O2 -DSTRING_UTILS_INLINED"
117 if test "x$OSTYPE" = "xWindows_NT"; then
118 LN=cp # hard link does not work under cygnus-nt (yet?)
125 dnl COMPILEINFO="$HOST $host $TARGET $target"
126 AUTOHEADER="This file was automatically generated by configure"
127 CPPFLAGS=${CPPFLAGS:-""} # we don't want -g -O junk
128 CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk
133 AC_CHECK_PROGS(TAR, tar, error)
134 AC_CHECK_PROGS(FIND, find, error)
136 dnl should check out -print
137 AC_CHECK_SEARCH_RESULT($FIND, \`find\'. Please use --enable-tex-dir)
146 AC_SUBST(COMPILEINFO)
157 AC_SUBST(DIR_DATADIR)
158 AC_SUBST(EXTRA_LIBES)
160 AC_CHECK_PROGS(BISON, bison, error)
161 AC_CHECK_PROGS(FLEX, flex, error)
162 AC_CHECK_PROGS(MAKE, make, error)
163 AC_PATH_PROG(PERL, perl, error)
164 AC_PATH_PROG(PYTHON, python, error)
165 AC_CHECK_PROGS(POD2HTML, pod2html, error)
166 AC_CHECK_PROGS(POD2MAN, pod2man, error)
169 if test "x$TEXPREFIX" = xauto ; then
170 AC_TEX_PREFIX(TEXPREFIX)
172 find_texprefix=$TEXPREFIX
175 # if test "x$MFDIR" = xauto; then
176 # AC_MF_SUBDIR(MFDIR)
179 if test "x$TEXDIR" = xauto ; then
180 AC_TEX_SUBDIR(TEXDIR)
184 # AC_JUNK_ARGS( [if test "x$MFDIR" = xauto; then
185 # AC_MF_SUBDIR(MFDIR)
189 AC_CHECK_SEARCH_RESULT($MAKE, GNU make, You should install GNU make)
190 AC_CHECK_SEARCH_RESULT($BISON, bison, Please install Bison, 1.25 or better)
191 AC_CHECK_SEARCH_RESULT($PERL, perl, You should install Perl, version 5 or better)
192 AC_CHECK_SEARCH_RESULT($PYTHON, python, You should install Python)
193 AC_CHECK_SEARCH_RESULT($PODMAN, pod, You should install Perl, version 5 or better)
194 AC_CHECK_SEARCH_RESULT( $FLEX, flex, Please install Flex, 2.5 or better)
197 if test $MAKE != "error" ; then
198 $MAKE -v| grep GNU > /dev/null
201 AC_LILY_WARN(Please install *GNU* make)
205 if test $BISON != "error"; then
206 bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
207 if test $bison_version -lt 25; then
208 AC_LILY_WARN(Your bison is too old (1.$bison_version). Please install 1.25)
214 changequote(<<, >>)dnl
215 if $CXX --version | grep '2\.[78]' > /dev/null
220 AC_LILY_WARN(can't find g++ 2.7 or 2.8)
223 AC_CHECK_HEADER(FlexLexer.h, true,
224 AC_LILY_WARN(can't find flex header. Please install Flex headers correctly))
226 AC_CONFIG_SUBDIRS(flower)
228 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, "${FULL_VERSION}")
231 AM_CONFIG_HEADER(lib/config.hh:lib/config.hh.in)
232 echo \#define TOPLEVEL_VERSION \"$FULL_VERSION\" >> lib/config.hh
234 AC_OUTPUT(bin/Makefile lib/include/Makefile lib/Makefile lily/include/Makefile lily/Makefile mf/Makefile mi2mu/include/Makefile mi2mu/Makefile debian/Makefile Documentation/Makefile init/Makefile input/Makefile tex/Makefile make/Makefile mutopia/J.S.Bach/Makefile mutopia/Makefile Makefile 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)
237 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