lilypond-1.3.141
[lilypond.git] / flower / configure.in
blobaa9aa5f516b117db10cfe136e506d0cecf8848f4
1 dnl -*-shell-script-*-
2 dnl Process this file with autoconf to produce a configure script.-
4 AC_INIT(choleski.cc)
6 . $srcdir/VERSION
7 FULL_VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
8 if test x$MY_PATCH_LEVEL != x; then
9         FULL_VERSION=$FULL_VERSION.$MY_PATCH_LEVEL
11 AM_INIT_AUTOMAKE(flower, $FULL_VERSION)
13 AC_PROG_CC
14 AC_PROG_CXX
17 # turn off shared libraries by default (may be enabled using --enable-shared)
18 AM_DISABLE_SHARED
19 AM_PROG_LIBTOOL
21 printing_b=no
22 checking_b=yes
23 optimise_b=no
24 profile_b=no
26 AC_ARG_ENABLE(printing,
27     [  enable-printing         turn on debug printing. Default: off],
28     [printing_b=$enableval])
30 AC_ARG_ENABLE(checking,
31     [  enable-checking         set runtime checks (assert calls). Default: on],
32     [checking_b=$enableval] )
34 AC_ARG_ENABLE(optimise,
35     [  enable-optimise         use maximal speed optimisations. Default: off],
36     [optimise_b=$enableval])
37     
38 AC_ARG_ENABLE(profiling, 
39     [  enable-profiling        compile with gprof support. Default: off],
40     [profile_b=$enableval])
41     
42 if test $printing_b = no; then
43     AC_DEFINE(NPRINT)
45     
46 if test $checking_b = no; then
47     AC_DEFINE(NDEBUG)
50 if test $optimise_b = yes; then
51 #    DEFINES="$DEFINES -finline-functions -O2 -DSTRING_UTILS_INLINED"
52     AC_DEFINE(STRINGS_UTILS_INLINED)
55 # oeps, broken for now
56 if test $profile_b = yes; then
57     EXTRA_LIBES="-pg"
58     DEFINES="$DEFINES -pg"
61 AC_LANG_CPLUSPLUS
63 LIB_SUFFIX=.a
64 MODULE_CXXFLAGS="$MODULE_CXXFLAGS -D_REENTRANT"
66 AC_SUBST(MODULE_CXXFLAGS)
67 AC_SUBST(MODULE_LDFLAGS)
68 AC_SUBST(LIB_SUFFIX)
70 # AC_SUBST(FULL_VERSION)
71 # AC_SUBST(MAJOR_VERSION)
72 # AC_SUBST(MINOR_VERSION)
73 # AC_SUBST(PATCH_LEVEL)
74 # AC_SUBST(MY_PATCH_LEVEL)
76 # libtool.info ...
77 # **Never** try to set library version numbers so that they correspond
78 # to the release number of your package.  This is an abuse that only
79 # fosters misunderstanding of the purpose of library versions.
81 REVISION=$PATCH_LEVEL
82 # CURRENT=$MINOR_VERSION
83 CURRENT=`expr $MINOR_VERSION + 1`
84 # AGE=$(expr $MAJOR_VERSION + 1)
85 AGE=$MAJOR_VERSION
86 AC_SUBST(CURRENT)
87 AC_SUBST(REVISION)
88 AC_SUBST(AGE)
89 AC_SUBST(PERL)
91 AC_PATH_PROG(PERL, perl, error)
93 AC_FUNC_MEMCMP
94 AC_FUNC_VPRINTF
95 AC_CHECK_FUNCS(memmem snprintf )
97 AC_DEFINE_UNQUOTED(MODULE_VERSION, "${FULL_VERSION}")
99 touch stamp-h.in
100 AM_CONFIG_HEADER(config.hh:config.hh.in)
101 AC_OUTPUT(Makefile include/Makefile test/Makefile)