]> git.donarmstrong.com Git - lilypond.git/blob - configure.in
(LINK_GXX_STATICALLY): --enable-ncsb-path option.
[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_PATH=unknown
38 AC_ARG_ENABLE(gui,
39 [  --enable-ncsb-path      set the path where Century Schoolbook fonts can be found.
40                             Default: detect with locate(1)],
41     [NCSB_PATH=$enableval])
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 the optional framework directory],[
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_PATH" = "unknown"; then
122   which locate >& /dev/null
123   if test "$?" = "0"; then
124       ## sort to give precedence to /usr/  
125       NCSB_PATH=`locate c059033l.pfb | sort -r | head -1`
126       if then "$NCSB_PATH" = "";
127           AC_MSG_WARN(Could not find c059033l.pfb. Use --enable-ncsb-path to set path)
128       fi
129       NCSB_PATH=`dirname "$NCSB_PATH"`
130   else
131      AC_MSG_WARN(Could not find locate(1). Use --enable-ncsb-path to set path to c059033l.pfb)
132   fi
133 fi
134 AC_MSG_RESULT($NCSB_PATH)
135 AC_SUBST(NCSB_PATH)
136
137 STEPMAKE_PANGO_FT2(pangoft2, REQUIRED, 1.6.0)
138 #STEPMAKE_PANGO(pango, REQUIRED, 1.6.0)
139 STEPMAKE_FONTCONFIG(fontconfig, REQUIRED, 2.2.0)
140 STEPMAKE_FREETYPE2(freetype2, REQUIRED, 0)
141
142 STEPMAKE_WINDOWS
143
144 ## Optional tools for building documentation, website, extra fonts.
145
146 # guile executable for some scripts
147 STEPMAKE_GUILE(OPTIONAL)
148
149 # perl for help2man.
150 STEPMAKE_PERL(OPTIONAL)
151
152 # New makeinfo for multi-page website docs Simply always require new
153 # makeinfo should avoid bug reports; if people want to build lily
154 # without the docs, they can find this comment and use an older
155 # makeinfo--but hopefully won't report makeinfo problems.
156 STEPMAKE_PROGS(MAKEINFO, makeinfo, REQUIRED, 4.7)
157
158 if test "$optimise_b" = yes; then
159     DEFINES="$DEFINES -DSTRING_UTILS_INLINED"
160     AC_DEFINE(STRINGS_UTILS_INLINED)
161 fi
162
163 AC_DEFINE_UNQUOTED(FLOWER_VERSION, "${FULL_FLOWER_VERSION}")
164
165 # Gather requirements and generate output.
166 STEPMAKE_END
167
168 test -n "$CONFIGURATION" && mc=" conf=$CONFIGURATION" || mc=""
169
170 cat <<EOF
171
172 Type:
173     make$mc all       to build LilyPond
174     make$mc install   to install LilyPond
175     make$mc help      to see all possible targets
176
177 EOF