1 dnl configure.in -*-shell-script-*-
2 dnl Process this file with autoconf to produce a configure script.
4 # Bootstrap the init proces.
7 # Bootstrap StepMake configure
9 AC_CONFIG_AUX_DIR([stepmake/bin])
11 # For stepmake package:
12 # AC_CONFIG_AUX_DIR(bin)
17 # List a file that identifies your package.
18 AC_CONFIG_SRCDIR([lily/main.cc])
21 AC_CONFIG_HEADER([$CONFIGFILE.hh:config.hh.in])
23 # Uncomment the configuration options your package needs.
26 AC_ARG_ENABLE(documentation,
27 [ --enable-documentation build Documentation. Default: on],
28 [DOCUMENTATION=$enableval])
29 AC_SUBST(DOCUMENTATION)
33 [ --enable-gui compile with experimental GNOME output module. Default: off],
39 [ --enable-ncsb-dir set the path where Century Schoolbook fonts can be found.
40 Default: detect with locate(1)],
41 [NCSB_DIR=$enableval])
45 AC_ARG_ENABLE(relocation,
46 [ --enable-relocation compile with dynamic relocation. Default: off],
50 AC_ARG_WITH(framework-dir,
51 [ --with-framework-dir=DIR
52 relative the optional framework directory],[
53 if test "$withval" = "yes" -o "$withval" = "no"; then
54 AC_MSG_WARN(Usage: --with-framework-dir=../lib/FRAMEWORK/DIR)
56 FRAMEWORKDIR="${withval}"
57 LDFLAGS="$LDFLAGS -Wl,--rpath,'\$\${ORIGIN}/$FRAMEWORKDIR/lib'"
60 AC_DEFINE_UNQUOTED(FRAMEWORKDIR, ["${FRAMEWORKDIR}"])
62 LINK_GXX_STATICALLY=no
63 AC_ARG_ENABLE(static-gxx,
64 [ --enable-static-gxx link libstdc++.a statically. Default: off],
65 [LINK_GXX_STATICALLY=$enableval])
66 AC_SUBST(LINK_GXX_STATICALLY)
68 # must come before any header checks
71 STEPMAKE_PYTHON(REQUIRED, 2.2)
72 STEPMAKE_GCC(REQUIRED, 2.8)
73 STEPMAKE_CXX(REQUIRED)
74 STEPMAKE_GXX(REQUIRED, 3.0.5)
76 STEPMAKE_LIB(REQUIRED)
78 # Do not use bison 1.50 and 1.75.
79 # 1.29 is required fr %locations, but I'm not sure it's enough --ns
80 STEPMAKE_BISON(OPTIONAL, 1.29)
81 STEPMAKE_FLEX(REQUIRED)
82 STEPMAKE_FLEXLEXER(REQUIRED)
83 STEPMAKE_FLEXLEXER_LOCATION
87 STEPMAKE_MSGFMT(REQUIRED)
88 STEPMAKE_TEXMF(REQUIRED)
90 STEPMAKE_GUILE_DEVEL(REQUIRED, 1.6.5)
91 STEPMAKE_MAKEINFO(REQUIRED)
92 STEPMAKE_PYTHON_DEVEL(REQUIRED)
94 STEPMAKE_PATH_PROG(GHOSTSCRIPT, gs, OPTIONAL, 8.15)
96 STEPMAKE_PROGS(MFTRACE, mftrace, REQUIRED, 1.1.9)
97 STEPMAKE_PATH_PROG(FONTFORGE, fontforge, REQUIRED, 20050624)
99 AC_CHECK_HEADERS([assert.h grp.h libio.h pwd.h sys/stat.h wchar.h])
101 AC_CHECK_HEADERS([sstream])
106 AC_CHECK_FUNCS([chroot fopencookie funopen gettext isinf mbrtowc memmem snprintf vsnprintf wcrtomb])
107 AC_CHECK_HEADERS([utf8/wchar.h], LIBS="$LIBS -lutf8")
108 AC_SEARCH_LIBS(mbrtowc, [mingwex msvcp60])
110 STEPMAKE_PROGS(PKG_CONFIG, pkg-config, REQUIRED, 0.9.0)
112 if test "$gui_b" = "yes"; then
113 STEPMAKE_GTK2(gtk+-2.0, REQUIRED, 2.4.0)
116 if test "$reloc_b" = "yes"; then
117 AC_DEFINE(ARGV0_RELOCATION)
120 AC_MSG_CHECKING([New Century Schoolbook PFB files])
121 if test "$NCSB_DIR" = "unknown"; then
122 which locate >& /dev/null
123 if test "$?" = "0"; then
124 for d in `locate c059033l.pfb `; do
125 if test -f `dirname "$d"`/c059033l.afm ; then
126 NCSB_DIR=`dirname "$d"`
130 if test "$NCSB_DIR" = "unknown"; then
131 AC_MSG_WARN(Could not find c059033l.pfb. Use --enable-ncsb-path to set path)
134 AC_MSG_WARN(Could not find locate(1). Use --enable-ncsb-path to set path to c059033l.pfb)
138 AC_MSG_RESULT($NCSB_DIR)
141 STEPMAKE_PANGO_FT2(pangoft2, REQUIRED, 1.6.0)
142 #STEPMAKE_PANGO(pango, REQUIRED, 1.6.0)
143 STEPMAKE_FONTCONFIG(fontconfig, REQUIRED, 2.2.0)
144 STEPMAKE_FREETYPE2(freetype2, REQUIRED, 0)
148 ## Optional tools for building documentation, website, extra fonts.
150 # guile executable for some scripts
151 STEPMAKE_GUILE(OPTIONAL)
154 STEPMAKE_PERL(OPTIONAL)
156 # New makeinfo for multi-page website docs Simply always require new
157 # makeinfo should avoid bug reports; if people want to build lily
158 # without the docs, they can find this comment and use an older
159 # makeinfo--but hopefully won't report makeinfo problems.
160 STEPMAKE_PROGS(MAKEINFO, makeinfo, REQUIRED, 4.7)
162 if test "$optimise_b" = yes; then
163 DEFINES="$DEFINES -DSTRING_UTILS_INLINED"
164 AC_DEFINE(STRINGS_UTILS_INLINED)
167 AC_DEFINE_UNQUOTED(FLOWER_VERSION, "${FULL_FLOWER_VERSION}")
169 # Gather requirements and generate output.
172 test -n "$CONFIGURATION" && mc=" conf=$CONFIGURATION" || mc=""
177 make$mc all to build LilyPond
178 make$mc install to install LilyPond
179 make$mc help to see all possible targets