1 dnl configure.in -*-shell-script-*-
2 dnl Process this file with autoconf to produce a configure script.
6 # Bootstrap the init proces.
9 # Bootstrap StepMake configure
11 AC_CONFIG_AUX_DIR([stepmake/bin])
13 # For stepmake package:
14 # AC_CONFIG_AUX_DIR(bin)
19 # List a file that identifies your package.
20 AC_CONFIG_SRCDIR([lily/main.cc])
23 AC_CONFIG_HEADER([$CONFIGFILE.hh:config.hh.in])
25 # Uncomment the configuration options your package needs.
28 AC_ARG_ENABLE(documentation,
29 [ --enable-documentation build Documentation. Default: on],
30 [DOCUMENTATION=$enableval])
31 AC_SUBST(DOCUMENTATION)
34 [ --with-ncsb-dir=DIR location of Century Schoolbook fonts.],
39 AC_ARG_ENABLE(relocation,
40 [ --enable-relocation compile with dynamic relocation. Default: off],
45 [ --enable-rpath hardcode runtime library path. Default: off],
48 LINK_GXX_STATICALLY=no
49 AC_ARG_ENABLE(static-gxx,
50 [ --enable-static-gxx link libstdc++.a statically. Default: off],
51 [LINK_GXX_STATICALLY=$enableval])
52 AC_SUBST(LINK_GXX_STATICALLY)
54 # must come before any header checks
57 AC_CHECK_PROG(FCLIST, fc-list, fc-list)
58 AC_MSG_CHECKING([New Century Schoolbook PFB files])
59 AC_SUBST(NCSB_SOURCE_FILES)
60 if test "$NCSB_DIR" != "" ; then
62 for f in c059013l c059016l c059033l c059036l; do
63 if test ! -f "$NCSB_DIR/$f.pfb"; then
64 STEPMAKE_WARN($NCSB_DIR does not contain $f.pfb.)
66 NCSB_SOURCE_FILES="$NCSB_DIR/$f.pfb $NCSB_SOURCE_FILES"
70 if test "$FCLIST" != ""; then
71 for style in Roman Italic "Bold Italic" Bold; do
72 NCSB_FILE=`$FCLIST "Century Schoolbook L:style=$style:foundry=urw:fontformat=Type 1" file \
74 NCSB_FILE=`echo $NCSB_FILE | sed 's/^\(.*\):$/\1/g'`
75 NCSB_FILE=`$PYTHON "$srcdir/scripts/auxiliar/readlink.py" $NCSB_FILE`
76 NCSB_SOURCE_FILES="$NCSB_FILE $NCSB_SOURCE_FILES"
79 AC_MSG_RESULT(not found)
80 echo "Can't find Century Schoolbook files. Install FontConfig's fc-list,"
81 echo "or use --with-ncsb-dir"
84 AC_MSG_RESULT($NCSB_SOURCE_FILES)
88 STEPMAKE_PYTHON(REQUIRED, 2.4)
89 STEPMAKE_GCC(REQUIRED, 3.4)
91 STEPMAKE_CXX(REQUIRED)
92 STEPMAKE_GXX(REQUIRED, 3.4)
94 STEPMAKE_STL_DATA_METHOD
95 STEPMAKE_LIB(REQUIRED)
97 # Do not use bison 1.50 and 1.75.
98 # 1.29 is required fr %locations, but I'm not sure it's enough --ns
99 STEPMAKE_BISON(OPTIONAL, 1.29)
100 STEPMAKE_FLEX(REQUIRED)
101 STEPMAKE_FLEXLEXER(REQUIRED)
102 STEPMAKE_FLEXLEXER_LOCATION
106 STEPMAKE_MSGFMT(REQUIRED)
107 STEPMAKE_TEXMF(REQUIRED)
109 STEPMAKE_GUILE_DEVEL(REQUIRED, 1.8.2)
111 # check for 2 typedefs added in Guile 1.9
112 save_CFLAGS="$CFLAGS"
113 CFLAGS="$GUILE_CFLAGS $CFLAGS"
114 AC_CHECK_TYPES([scm_t_hash_fold_fn, scm_t_hash_handle_fn],
115 [AC_DEFINE(HAVE_GUILE_HASH_FUNC)], [],
116 [#include <libguile.h>])
117 CFLAGS="$save_CFLAGS"
119 ## check rational bugfix.
120 save_CPPFLAGS="$CPPFLAGS"
121 CPPFLAGS="$GUILE_CFLAGS $CPPFLAGS"
122 AC_MSG_CHECKING(GUILE rational bugfix)
123 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include <libguile.h>
124 #ifdef SCM_FRACTION_REDUCED_BIT
127 ]])],[AC_MSG_RESULT(ok)],[REQUIRED="$REQUIRED GUILE-with-rational-bugfix"
128 AC_MSG_RESULT(Must have patched GUILE rational support. See INSTALL.txt)])
129 CPPFLAGS="$save_CPPFLAGS"
132 STEPMAKE_PYTHON_DEVEL(REQUIRED)
134 STEPMAKE_PATH_PROG(GHOSTSCRIPT, gs, OPTIONAL, 8.60)
136 STEPMAKE_PATH_PROG(FONTFORGE, fontforge, REQUIRED, 20050624)
138 STEPMAKE_PATH_PROG(T1ASM, t1asm, REQUIRED)
140 AC_CHECK_HEADERS([assert.h grp.h libio.h pwd.h sys/stat.h wchar.h fpu_control.h])
142 AC_CHECK_HEADERS([sstream])
147 AC_CHECK_FUNCS([chroot fopencookie funopen gettext isinf memmem snprintf vsnprintf wcrtomb])
149 STEPMAKE_PROGS(PKG_CONFIG, pkg-config, REQUIRED, 0.9.0)
151 AC_MSG_CHECKING(whether to enable dynamic relocation)
152 if test "$reloc_b" = "yes"; then
153 AC_DEFINE(ARGV0_RELOCATION)
155 AC_MSG_RESULT($reloc_b)
157 AC_MSG_CHECKING(for rpath linkage)
158 if test "$rpath_b" = "yes"; then
159 LDFLAGS="$LDFLAGS -Wl,-rpath -Wl,\\\$\$ORIGIN/../lib"
160 elif test "$rpath_b" != "no"; then
161 LDFLAGS="$LDFLAGS -Wl,-rpath -Wl,$rpath_b"
163 AC_MSG_RESULT($rpath_b)
165 HOST_ARCH=`$CC -dumpmachine`
168 STEPMAKE_PANGO_FT2(pangoft2, REQUIRED, 1.6.0)
169 STEPMAKE_FONTCONFIG(fontconfig, REQUIRED, 2.2.0)
170 STEPMAKE_FREETYPE2(freetype2, REQUIRED, 2.1.10)
174 ## Optional tools for building documentation, website, extra fonts.
176 # guile executable for some scripts
177 STEPMAKE_GUILE(OPTIONAL)
180 STEPMAKE_PERL(OPTIONAL)
182 STEPMAKE_PROGS(MAKEINFO, makeinfo, REQUIRED, 4.11)
183 STEPMAKE_PROGS(TEXI2HTML, texi2html, OPTIONAL, 1.82)
185 AC_DEFINE_UNQUOTED(FLOWER_VERSION, "${FULL_FLOWER_VERSION}")
187 # must also have local.make if configure fails.
190 if test "$reloc_b$rpath_b" = "yesno"; then
191 STEPMAKE_WARN([Using --enable-relocation without --enable-rpath. LilyPond may have trouble finding libraries.])
194 # Gather requirements and generate output.
197 test -n "$CONFIGURATION" && mc=" conf=$CONFIGURATION" || mc=""
199 if make top-doc 1>/dev/null 2>&1; then
200 rm -f INSTALL.txt && ln Documentation/topdocs/out/INSTALL.txt .
201 rm -f README.txt && ln Documentation/topdocs/out/README.txt .
207 make$mc all to build LilyPond
208 make$mc install to install LilyPond
209 make$mc help to see all possible targets
211 Edit local.make for local Makefile overrides.