2 dnl Process this file with autoconf to produce a configure script.
4 AC_INIT(flower/choleski.cc)
7 if test x$srcdir != x.; then
8 echo Please look in the INSTALL instructions for
9 echo directions for multi-architecture building
11 AC_MSG_ERROR(This package does not support --srcdir.)
14 # if given here, these vars are initted at the checking point.
15 if test x$host = xNONE; then
16 OUTDIR_NAME=${OUTDIR_NAME-"out"}
18 OUTDIR_NAME=${OUTDIR_NAME-"out-$host"}
30 AC_ARG_ENABLE(printing,
31 [ enable-printing turn on debug printing],
32 [printing_b=$enableval])
35 AC_ARG_ENABLE(checking,
36 [ enable-checking set runtime checks (assert calls). Default: on],
37 [checking_b=$enableval] )
39 AC_ARG_ENABLE(debugging,
40 [ enable-debugging set debug info. Default: on],
43 AC_ARG_ENABLE(optimise,
44 [ enable-optimise use maximal speed optimisations. Default: off],
45 [optimise_b=$enableval])
47 AC_ARG_ENABLE(profiling,
48 [ enable-profiling compile with gprof support. Default: off],
49 [profile_b=$enableval])
51 AC_ARG_ENABLE(mingw-prefix,
52 [ mingw-prefix=DIR set the mingw32 directory (standalone windows32 exes)],
53 [MINGWPREFIX=$enableval],
56 AC_ARG_ENABLE(tex-prefix,
57 [ tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)],
58 [TEXPREFIX=$enableval],
61 AC_ARG_ENABLE(tex-dir,
62 [ tex-dir=DIR set the directory to put LilyPond TeX files in. ],
66 AC_JUNK_ARGS( AC_ARG_ENABLE(mf-dir,
67 [ mf-dir=DIR set the directory to put LilyPond MetaFont files in. (obsolete)],
71 AC_ARG_ENABLE(out-dir,
72 [ out-dir set the directory for machine generated files. Default out or out-HOST],
73 [OUTDIR_NAME=$enableval]
76 if test $profile_b = yes; then
78 DEFINES="$DEFINES -pg"
81 if test $printing_b = no; then
82 DEFINES="$DEFINES -DNPRINT=1"
85 if test $debug_b = yes; then
88 if test $checking_b = no; then
89 DEFINES="$DEFINES -DNDEBUG=1"
92 # however, C++ support in mingw32 v 0.1.4 is still flaky
93 if test x$MINGWPREFIX != xno; then
94 ICFLAGS="-I$MINGWPREFIX/include"
95 ILDFLAGS="-$MINGWPREFIX/lib"
98 if test $optimise_b = yes; then
99 DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED"
102 if test "x$OSTYPE" = "xWindows_NT"; then
103 LN=cp # hard link does not work under cygnus-nt (yet?)
110 dnl COMPILEINFO="$HOST $host $TARGET $target"
111 AUTOHEADER="This file was automatically generated by configure"
112 CPPFLAGS=${CPPFLAGS:-""} # we don't want -g -O junk
113 CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk
118 AC_CHECK_PROGS(TAR, tar, error)
119 AC_CHECK_PROGS(FIND, find, error)
121 dnl should check out -print
122 if test FIND = error; then
123 AC_LILY_WARN(Couldn't find \`find'. Please use --enable-tex-dir)
126 AC_SUBST(OUTDIR_NAME)
133 AC_SUBST(COMPILEINFO)
143 AC_SUBST(DIR_DATADIR)
144 AC_SUBST(EXTRA_LIBES)
146 AC_CHECK_PROGS(BISON, bison, error)
147 AC_CHECK_PROGS(FLEX, flex, error)
148 AC_CHECK_PROGS(MAKE, make, error)
149 AC_PATH_PROG(PERL, perl, error)
150 AC_CHECK_PROGS(PODMAN, pod2man, error)
153 if test "x$TEXPREFIX" = xauto ; then
154 AC_TEX_PREFIX(TEXPREFIX)
156 find_texprefix=$TEXPREFIX
159 if test "x$TEXDIR" = xauto ; then
160 AC_TEX_SUBDIR(TEXDIR)
163 dnl if test "x$MFDIR" = xauto; then
164 dnl AC_MF_SUBDIR(MFDIR)
168 AC_CHECK_SEARCH_RESULT($MAKE, GNU make, You should install GNU make)
169 AC_CHECK_SEARCH_RESULT( $BISON, bison, Please install Bison, 1.25 or better)
170 AC_CHECK_SEARCH_RESULT($PERL, perl, You should install Perl, version 5 or better)
171 AC_CHECK_SEARCH_RESULT($PODMAN, pod, You should install Perl, version 5 or better)
172 AC_CHECK_SEARCH_RESULT( $FLEX, flex, Please install Flex, 2.5 or better)
175 if test $MAKE != "error" ; then
176 $MAKE -v| grep GNU > /dev/null
179 AC_LILY_WARN(Please install *GNU* make)
183 if test $BISON != "error"; then
184 bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
185 if test $bison_version -lt 25; then
186 AC_LILY_WARN(Your bison is too old (1.$bison_version). Please install 1.25)
190 if $CXX --version | grep '2\.7' > /dev/null
194 AC_LILY_WARN(can't find g++ 2.7)
197 AC_CHECK_HEADER(FlexLexer.h, true,
198 AC_LILY_WARN(can't find flex header. Please install Flex headers correctly))
200 for a in `find -type d -and -not -name 'out*'`; do
201 if test ! -d $a/$OUTDIR_NAME; then
202 mkdir $a/$OUTDIR_NAME
206 AC_CONFIG_SUBDIRS(flower)
209 eval "DIR_DATADIR=$datadir/lilypond"
211 AC_OUTPUT(make/$OUTDIR_NAME/Configure_variables.make:make/Configure_variables.make.in
212 lib/$OUTDIR_NAME/config.hh:lib/config.hh.in
213 Makefile:make/Toplevel.make.in)
215 touch make/$OUTDIR_NAME/Site.make
218 For making everything, do:
222 or if you used --outdir=blabla
224 make OUTDIR_NAME=blabla
226 If you want to make site-wide extensions to the makefiles, please use
228 make/$OUTDIR_NAME/Site.make
232 if test $warn_b = "yes" ; then
235 **************************************************
236 Warning: configure encountered warnings or errors.
237 Please try to resolve these, and rerun configure
238 before sending a bugreport.
239 If you cannot resolve some warnings, the make
240 process may still be succesful, but be warned.
241 **************************************************