2 dnl Process this file with autoconf to produce a configure script.
5 AC_INIT(flower/choleski.cc)
6 AC_CONFIG_HEADER($CONFIGFILE.hh:config.hh.in) #ugh flower/out/
12 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
13 if test x$MY_PATCH_LEVEL != x; then
14 FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
18 . $srcdir/flower/VERSION
19 FULL_FLOWER_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
22 # **Never** try to set library version numbers so that they correspond
23 # to the release number of your package. This is an abuse that only
24 # fosters misunderstanding of the purpose of library versions.
27 # CURRENT=$MINOR_VERSION
28 CURRENT=`expr $MINOR_VERSION + 1`
29 # AGE=$(expr $MAJOR_VERSION + 1)
35 # turn off shared libraries by default (may be enabled using --enable-shared)
39 # ugh, automake: we want (and check for) bison
42 # ugh, automake: we want (and check for) flex
44 # urg: automake 1.3: hope this doesn't break 1.2 ac_cv_pro_lex_root hack...
48 ac_cv_prog_lex_root=lex.yy
50 # -O is necessary to get inlining
63 AC_CACHE_CHECK([whether explicit instantiation is needed],
64 lily_cv_need_explicit_instantiation,
66 template <class T> struct foo { static int baz; };
67 template <class T> int foo<T>::baz = 1;
68 ], [ return foo<int>::baz; ],
69 lily_cv_need_explicit_instantiation=no,
70 lily_cv_need_explicit_instantiation=yes))
71 if test x"$lily_cv_need_explicit_instantiation"x = x"yes"x; then
72 AC_DEFINE(NEED_EXPLICIT_INSTANTIATION)
75 AC_ARG_ENABLE(printing,
76 [ enable-printing turn on debug printing. Default: off],
77 [printing_b=$enableval])
79 AC_ARG_ENABLE(checking,
80 [ enable-checking set runtime checks (assert calls). Default: on],
81 [checking_b=$enableval] )
83 AC_ARG_ENABLE(optimise,
84 [ enable-optimise use maximal speed optimisations. Default: off],
85 [optimise_b=$enableval])
87 AC_ARG_ENABLE(profiling,
88 [ enable-profiling compile with gprof support. Default: off],
89 [profile_b=$enableval])
91 AC_ARG_ENABLE(debugging,
92 [ enable-debugging set debug info. Default: on],
95 AC_ARG_ENABLE(mingw-prefix,
96 [ enable-mingw-prefix=DIR set the mingw32 directory (standalone windows32 exes)],
97 [MINGWPREFIX=$enableval],
100 AC_ARG_ENABLE(tex-prefix,
101 [ enable-tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)],
102 [TEXPREFIX=$enableval],
105 AC_ARG_ENABLE(tex-dir,
106 [ enable-tex-dir=DIR set the directory to put LilyPond TeX files in. ],
110 AC_ARG_ENABLE(mf-dir,
111 [ enable-mf-dir=DIR set the directory to put LilyPond MetaFont files in. ],
115 AC_ARG_ENABLE(config,
116 [ enable-config=FILE put configure settings in config-FILE.make],
117 [CONFIGSUFFIX=$enableval])
120 if test "$printing_b" = no; then
123 DEFINES="$DEFINES -DNPRINT"
126 if test "$checking_b" = no; then
129 DEFINES="$DEFINES -DNDEBUG"
132 if test "$optimise_b" = yes; then
133 DEFINES="$DEFINES -finline-functions -DSTRING_UTILS_INLINED"
135 AC_DEFINE(STRINGS_UTILS_INLINED)
138 if test "$optimise_b" = no; then
142 if test $profile_b = yes; then
144 DEFINES="$DEFINES -pg"
147 if test $debug_b = yes; then
148 DEFINES="$DEFINES -g"
151 # however, C++ support in mingw32 v 0.1.4 is still flaky
152 if test x$MINGWPREFIX != xno; then
153 ICFLAGS="-I$MINGWPREFIX/include"
154 ILDFLAGS="-$MINGWPREFIX/lib"
157 if test "x$OSTYPE" = "xWindows_NT"; then
158 LN=cp # hard link does not work under cygnus-nt (yet?)
165 if test "$CONFIGSUFFIX" != "" ; then
166 CONFIGFILE=config-$CONFIGSUFFIX
173 dnl COMPILEINFO="$HOST $host $TARGET $target"
174 AUTOGENERATE="This file was automatically generated by configure"
175 CPPFLAGS=${CPPFLAGS:-""} # we don't want -g -O junk
176 # CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk
177 CXXFLAGS="$DEFINES $OPTIMIZE"
183 AC_CHECK_PROGS(TAR, tar, error)
184 AC_CHECK_PROGS(FIND, find, error)
186 dnl should check out -print
187 AC_CHECK_SEARCH_RESULT($FIND, \`find\'. Please use --enable-tex-dir)
191 AC_CHECK_FUNCS(memmem snprintf )
193 AC_DEFINE_UNQUOTED(TOPLEVEL_VERSION, "${FULL_VERSION}")
194 AC_DEFINE_UNQUOTED(FLOWER_VERSION, "${FULL_FLOWER_VERSION}")
195 # ugh: produces "${prefix}/share/lilypond"
196 # DIR_DATADIR=$datadir/lilypond
197 # ugh: produces "NONE/share/lilypond"
198 # DIR_DATADIR=$prefix/share/lilypond
200 DIR_DATADIR=$prefix/share/lilypond
201 if test x$prefix = xNONE; then
202 DIR_DATADIR=/usr/local/share/lilypond
204 AC_DEFINE_UNQUOTED(DIR_DATADIR, "${DIR_DATADIR}")
206 absolute_builddir="`pwd`"
216 AC_SUBST(COMPILEINFO)
217 AC_SUBST(AUTOGENERATE)
227 AC_SUBST(DIR_DATADIR)
228 AC_SUBST(absolute_builddir)
229 AC_SUBST(EXTRA_LIBES)
230 AC_SUBST(CONFIGSUFFIX)
231 AC_CHECK_PROGS(BISON, bison, error)
232 AC_CHECK_PROGS(FLEX, flex, error)
233 AC_CHECK_PROGS(MAKE, make, error)
234 AC_PATH_PROG(PERL, perl, error)
235 AC_PATH_PROG(PYTHON, python, error)
236 AC_CHECK_PROGS(POD2HTML, pod2html, error)
237 AC_CHECK_PROGS(POD2MAN, pod2man, error)
240 if test "x$TEXPREFIX" = xauto ; then
241 AC_TEX_PREFIX(TEXPREFIX)
243 find_texprefix=$TEXPREFIX
246 if test "x$MFDIR" = xauto; then
250 if test "x$TEXDIR" = xauto ; then
251 AC_TEX_SUBDIR(TEXDIR)
255 # AC_JUNK_ARGS( [if test "x$MFDIR" = xauto; then
256 # AC_MF_SUBDIR(MFDIR)
260 AC_CHECK_SEARCH_RESULT($MAKE, GNU make, You should install GNU make)
261 AC_CHECK_SEARCH_RESULT($BISON, bison, Please install Bison, 1.25 or better)
262 AC_CHECK_SEARCH_RESULT($PERL, perl, You should install Perl, version 5 or better)
263 AC_CHECK_SEARCH_RESULT($PYTHON, python, You should install Python)
264 AC_CHECK_SEARCH_RESULT($FLEX, flex, Please install Flex, 2.5 or better)
265 AC_CHECK_SEARCH_RESULT($POD2MAN, pod, You should install Perl, version 5 or better)
268 if test $MAKE != "error" ; then
269 $MAKE -v| grep GNU > /dev/null
272 AC_LILY_WARN(Please install *GNU* make)
276 if test $BISON != "error"; then
277 bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
278 if test $bison_version -lt 25; then
279 AC_LILY_WARN(Your bison is too old (1.$bison_version). Please install 1.25)
283 if test "$INSTALL" = "bin/install-sh"; then
284 export INSTALL="\$\(depth\)/bin/install-sh"
288 changequote(<<, >>)dnl
289 if $CXX --version | grep '2\.[78]' > /dev/null ||
290 $CXX --version | grep 'egcs' > /dev/null
295 AC_LILY_WARN(can't find g++ 2.7, 2.8 or egcs)
298 AC_CHECK_HEADER(FlexLexer.h, true,
299 AC_LILY_WARN(can't find flex header. Please install Flex headers correctly))
305 # first do Foobar/Makefile then Foobar/include/Makefile
306 AC_OUTPUT($CONFIGFILE.make:config.make.in)
309 cp make/Toplevel.make.in ./Makefile