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_LILY_WARN(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"}
29 AC_ARG_ENABLE(printing,
30 [ enable-printing turn on debug printing],
31 [printing_b=$enableval])
34 AC_ARG_ENABLE(checking,
35 [ enable-checking set runtime checks (assert calls). Default: on],
36 [checking_b=$enableval] )
38 AC_ARG_ENABLE(debugging,
39 [ enable-debugging set debug info. Default: on],
42 AC_ARG_ENABLE(optimise,
43 [ enable-optimise use maximal speed optimisations. Default: off],
44 [optimise_b=$enableval])
46 AC_ARG_ENABLE(profiling,
47 [ enable-profiling compile with gprof support. Default: off],
48 [profile_b=$enableval])
50 AC_ARG_ENABLE(mingw-prefix,
51 [ mingw-prefix=DIR set the mingw32 directory (standalone windows32 exes)],
52 [MINGWPREFIX=$enableval],
55 AC_ARG_ENABLE(tex-prefix,
56 [ tex-prefix=DIR set the tex-directory to find TeX subdirectories. (default: PREFIX)],
57 [TEXPREFIX=$enableval],
60 AC_ARG_ENABLE(tex-dir,
61 [ tex-dir=DIR set the directory to put LilyPond TeX files in. ],
65 AC_JUNK_ARGS( AC_ARG_ENABLE(mf-dir,
66 [ mf-dir=DIR set the directory to put LilyPond MetaFont files in. (obsolete)],
70 AC_ARG_ENABLE(out-dir,
71 [ out-dir set the directory for machine generated files. Default out or out-HOST],
72 [OUTDIR_NAME=$enableval]
75 if test $profile_b = yes; then
77 DEFINES="$DEFINES -pg"
80 if test $printing_b = no; then
81 DEFINES="$DEFINES -DNPRINT=1"
84 if test $debug_b = yes; then
87 if test $checking_b = no; then
88 DEFINES="$DEFINES -DNDEBUG=1"
91 # however, C++ support in mingw32 v 0.1.4 is still flaky
92 if test x$MINGWPREFIX != xno; then
93 ICFLAGS="-I$MINGWPREFIX/include"
94 ILDFLAGS="-$MINGWPREFIX/lib"
97 if test $optimise_b = yes; then
98 DEFINES="$DEFINES -O2 -DSTRING_UTILS_INLINED"
101 if test "x$OSTYPE" = "xWindows_NT"; then
102 LN=cp # hard link does not work under cygnus-nt (yet?)
109 dnl COMPILEINFO="$HOST $host $TARGET $target"
110 AUTOHEADER="This file was automatically generated by configure"
111 CPPFLAGS=${CPPFLAGS:-""} # we don't want -g -O junk
112 CXXFLAGS=${CXXFLAGS:-""} # we don't want -g -O junk
117 AC_CHECK_PROGS(TAR, tar, error)
118 AC_CHECK_PROGS(FIND, find, error)
120 dnl should check out -print
121 AC_CHECK_SEARCH_RESULT($FIND, \`find\'. Please use --enable-tex-dir)
124 AC_SUBST(OUTDIR_NAME)
131 AC_SUBST(COMPILEINFO)
141 AC_SUBST(DIR_DATADIR)
142 AC_SUBST(EXTRA_LIBES)
144 AC_CHECK_PROGS(BISON, bison, error)
145 AC_CHECK_PROGS(FLEX, flex, error)
146 AC_CHECK_PROGS(MAKE, make, error)
147 AC_PATH_PROG(PERL, perl, error)
148 AC_CHECK_PROGS(PODMAN, pod2man, error)
151 if test "x$TEXPREFIX" = xauto ; then
152 AC_TEX_PREFIX(TEXPREFIX)
154 find_texprefix=$TEXPREFIX
157 if test "x$TEXDIR" = xauto ; then
158 AC_TEX_SUBDIR(TEXDIR)
162 AC_JUNK_ARGS( [if test "x$MFDIR" = xauto; then
167 AC_CHECK_SEARCH_RESULT($MAKE, GNU make, You should install GNU make)
168 AC_CHECK_SEARCH_RESULT( $BISON, bison, Please install Bison, 1.25 or better)
169 AC_CHECK_SEARCH_RESULT($PERL, perl, You should install Perl, version 5 or better)
170 AC_CHECK_SEARCH_RESULT($PODMAN, pod, You should install Perl, version 5 or better)
171 AC_CHECK_SEARCH_RESULT( $FLEX, flex, Please install Flex, 2.5 or better)
174 if test $MAKE != "error" ; then
175 $MAKE -v| grep GNU > /dev/null
178 AC_LILY_WARN(Please install *GNU* make)
182 if test $BISON != "error"; then
183 bison_version=`$BISON --version| sed 's/^.*version 1.//g' `
184 if test $bison_version -lt 25; then
185 AC_LILY_WARN(Your bison is too old (1.$bison_version). Please install 1.25)
189 if $CXX --version | grep '2\.7' > /dev/null
193 AC_LILY_WARN(can't find g++ 2.7)
196 AC_CHECK_HEADER(FlexLexer.h, true,
197 AC_LILY_WARN(can't find flex header. Please install Flex headers correctly))
199 for a in `find . -type d -and -not -name 'out*' -print`; do
200 if test ! -d $a/$OUTDIR_NAME; then
201 mkdir $a/$OUTDIR_NAME
205 AC_CONFIG_SUBDIRS(flower)
208 AC_OUTPUT(make/$OUTDIR_NAME/Configure_variables.make:make/Configure_variables.make.in
209 Makefile:make/Toplevel.make.in)
211 touch make/$OUTDIR_NAME/Site.make
214 For making everything, do:
218 or if you used --outdir=blabla
220 make OUTDIR_NAME=blabla
222 If you want to make site-wide extensions to the makefiles, please use
224 make/$OUTDIR_NAME/Site.make
228 if test x$warn_b = "xyes" ; then
231 **************************************************
232 Warning: configure encountered warnings or errors.
233 Please try to resolve these, and rerun configure
234 before sending a bugreport.
235 If you cannot resolve some warnings, the make
236 process may still be succesful, but be warned.
237 **************************************************