]> git.donarmstrong.com Git - lilypond.git/blob - configure.in
* lily/main.cc:
[lilypond.git] / configure.in
1 dnl configure.in   -*-shell-script-*-
2 dnl Process this file with autoconf to produce a configure script. 
3
4 # Bootstrap the init proces.
5 AC_INIT
6
7 # Bootstrap StepMake configure
8 # For user package:
9 AC_CONFIG_AUX_DIR([stepmake/bin])
10
11 # For stepmake package:
12 # AC_CONFIG_AUX_DIR(bin)
13
14
15 STEPMAKE_INIT
16
17 # List a file that identifies your package.
18 AC_CONFIG_SRCDIR([lily/main.cc])
19
20 # Move to aclocal.m4?
21 AC_CONFIG_HEADER([$CONFIGFILE.hh:config.hh.in])
22
23 # Uncomment the configuration options your package needs.
24
25 DOCUMENTATION=yes
26 AC_ARG_ENABLE(documentation,
27     [  --enable-documentation  build Documentation.  Default: on],
28     [DOCUMENTATION=$enableval])
29 AC_SUBST(DOCUMENTATION)
30
31 gui_b=no
32 AC_ARG_ENABLE(gui,
33     [  --enable-gui            compile with experimental GNOME output module.  Default: off],
34     [gui_b=$enableval])
35
36
37 NCSB_DIR=unknown
38 AC_ARG_WITH(ncsb,
39 [  --with-ncsb-dir=DIR     location of Century Schoolbook fonts
40                             Default: detect with locate(1)],
41     [NCSB_DIR=$withval])
42
43
44 reloc_b=no
45 AC_ARG_ENABLE(relocation,
46     [  --enable-relocation     compile with dynamic relocation.  Default: off],
47     [reloc_b=$enableval])
48
49 FRAMEWORKDIR=".."
50 AC_ARG_WITH(framework-dir,
51     [  --with-framework-dir=DIR
52                           relative location of framework],[
53         if test "$withval" = "yes" -o "$withval" = "no"; then
54             AC_MSG_WARN(Usage: --with-framework-dir=../lib/FRAMEWORK/DIR)
55         else
56             FRAMEWORKDIR="${withval}"
57             LDFLAGS="$LDFLAGS -Wl,--rpath,'\$\${ORIGIN}/$FRAMEWORKDIR/lib'"
58         fi
59         ])
60 AC_DEFINE_UNQUOTED(FRAMEWORKDIR, ["${FRAMEWORKDIR}"])
61
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)
67
68 # must come before any header checks
69 STEPMAKE_COMPILE
70
71 STEPMAKE_PYTHON(REQUIRED, 2.2)
72 STEPMAKE_GCC(REQUIRED, 2.8)
73 STEPMAKE_CXX(REQUIRED)
74 STEPMAKE_GXX(REQUIRED, 3.0.5)
75 STEPMAKE_CXXTEMPLATE
76 STEPMAKE_LIB(REQUIRED)
77 STEPMAKE_DLOPEN
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
84 AC_LANG_C
85 STEPMAKE_LOCALE
86 STEPMAKE_GETTEXT
87 STEPMAKE_MSGFMT(REQUIRED)
88 STEPMAKE_TEXMF(REQUIRED)
89 STEPMAKE_TEXMF_DIRS
90 STEPMAKE_GUILE_DEVEL(REQUIRED, 1.6.5)
91 STEPMAKE_MAKEINFO(REQUIRED)
92 STEPMAKE_PYTHON_DEVEL(REQUIRED)
93
94 STEPMAKE_PATH_PROG(GHOSTSCRIPT, gs, OPTIONAL, 8.15)
95
96 STEPMAKE_PROGS(MFTRACE, mftrace, REQUIRED, 1.1.9)
97 STEPMAKE_PATH_PROG(FONTFORGE, fontforge, REQUIRED, 20050624)
98
99 AC_CHECK_HEADERS([assert.h grp.h libio.h pwd.h sys/stat.h wchar.h])
100 AC_LANG_PUSH(C++)
101 AC_CHECK_HEADERS([sstream])
102 AC_LANG_POP(C++)
103 AC_HEADER_STAT
104 AC_FUNC_MEMCMP
105 AC_FUNC_VPRINTF
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])
109
110 STEPMAKE_PROGS(PKG_CONFIG, pkg-config, REQUIRED, 0.9.0)
111
112 if test "$gui_b" = "yes"; then
113     STEPMAKE_GTK2(gtk+-2.0, REQUIRED, 2.4.0)
114 fi
115
116 if test "$reloc_b" = "yes"; then
117     AC_DEFINE(ARGV0_RELOCATION)
118 fi
119
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"`
127               break 
128           fi
129       done
130       if test "$NCSB_DIR" = "unknown";  then
131           AC_MSG_WARN(Could not find c059033l.pfb. Use --enable-ncsb-path to set path)
132       fi
133   else
134      AC_MSG_WARN(Could not find locate(1). Use --enable-ncsb-path to set path to c059033l.pfb)
135   fi
136 fi
137
138 AC_MSG_RESULT($NCSB_DIR)
139 AC_SUBST(NCSB_DIR)
140
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)
145
146 STEPMAKE_WINDOWS
147
148 ## Optional tools for building documentation, website, extra fonts.
149
150 # guile executable for some scripts
151 STEPMAKE_GUILE(OPTIONAL)
152
153 # perl for help2man.
154 STEPMAKE_PERL(OPTIONAL)
155
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)
161
162 if test "$optimise_b" = yes; then
163     DEFINES="$DEFINES -DSTRING_UTILS_INLINED"
164     AC_DEFINE(STRINGS_UTILS_INLINED)
165 fi
166
167 AC_DEFINE_UNQUOTED(FLOWER_VERSION, "${FULL_FLOWER_VERSION}")
168
169 # Gather requirements and generate output.
170 STEPMAKE_END
171
172 test -n "$CONFIGURATION" && mc=" conf=$CONFIGURATION" || mc=""
173
174 cat <<EOF
175
176 Type:
177     make$mc all       to build LilyPond
178     make$mc install   to install LilyPond
179     make$mc help      to see all possible targets
180
181 EOF