File: configure.ac

package info (click to toggle)
solfege 3.16.4-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 34,472 kB
  • ctags: 5,287
  • sloc: python: 22,642; xml: 14,196; ansic: 4,682; makefile: 621; sh: 287
file content (193 lines) | stat: -rw-r--r-- 6,008 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# GNU Solfege - ear training for GNOME
# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008  Tom Cato Amundsen
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin ST, Fifth Floor, Boston, MA  02110-1301  USA

# Process this file with autoconf to produce a configure script.

AC_INIT([GNU Solfege],[3.16.4],[bug-solfege@gnu.org])
AC_CONFIG_HEADER(config.h)

PACKAGE=solfege
AC_SUBST(PACKAGE)

# We set MAJOR_VERSION AND MINOR_VERSION the the correct version number as
# soon we create a new branch. This because the version numbers are used
# when uploading the user manual to docs.solfege.org
MAJOR_VERSION=3
MINOR_VERSION=16
# ALWAYS set PATCH_LEVEL to bzr-checkout for non-releases.
# Never commit an actual patch level to the bzr repo.
PATCH_LEVEL=4
# Revision id of the last official release of this branch.
REVISION_ID="tca@gnu.org-20100722212759-3k20aqprqqvvwx70"
AC_SUBST(MAJOR_VERSION)
AC_SUBST(MINOR_VERSION)
AC_SUBST(PATCH_LEVEL)
AC_SUBST(REVISION_ID)

VERSION=$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL
AC_SUBST(VERSION)

AC_PROG_CC

# Remember to update solfege/runtime.py and topdocs/README.texi
# when we change the requried python version.
AM_PATH_PYTHON(2.5)
AM_CHECK_PYTHON_HEADERS(HAVE_PYTHON_H=yes, HAVE_PYTHON_H=no)

AC_PROG_INSTALL
AC_PROG_MAKE_SET

dnl Check for programs

AC_PATH_PROG(RSVG, rsvg)
AC_SUBST(RSVG)

AC_PATH_PROG(SWIG, swig)
AC_SUBST(SWIG)

AC_PATH_PROG(LILYPOND, lilypond)
AC_SUBST(LILYPOND)

AC_PATH_PROG(BZR, bzr, "notfound")
AC_SUBST(BZR)

AC_PATH_PROG(GS, gs)
AC_SUBST(GS)

MY_SWIG_TEST(SWIG_VERSION)
AC_SUBST(SWIG_VERSION)

# This does not get the exact version, just check if we have version 2.10
# or another version.
MY_LILYPOND_TEST(LILYPOND_VERSION)
AC_SUBST(LILYPOND_VERSION)

MY_PATH_PROG(XGETTEXT, xgettext, [You need to install the gettext package.])
MY_PATH_PROG(MSGFMT, msgfmt, [You need to install the gettext package.])
MY_PATH_PROG(MSGMERGE, msgmerge, [You need to install the gettext package.])
MY_PATH_PROG(MSGGREP, msggrep, [You need the gettext package package.])
MY_PATH_PROG(MAKEINFO, makeinfo [You need to install the texinfo package.])
MY_PATH_PROG(SED, sed)
MY_PATH_PROG(CAT, cat)

AC_ARG_ENABLE(pygtk-test, AC_HELP_STRING([--disable-pygtk-test],
    [Don't test for PyGTK, assume it is installed]),
    run_pygtk_test=$enableval,
    run_pygtk_test=yes)


PKG_PROG_PKG_CONFIG(0.17.0)

# Remember to update solfege/runtime.py and topdocs/README.texi when
# we change the minimum version of pygtk.
if test "x$run_pygtk_test" = xyes; then
  PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= 2.12.0)
fi

#PKG_CHECK_MODULES(XML2PO, xml2po >= 0.4)
AC_PATH_PROG(XML2PO, xml2po)
AC_SUBST(XML2PO)

AC_PATH_PROG(XSLTPROC, xsltproc)
AC_SUBST(XSLTPROC)

AC_ARG_ENABLE(docbook-stylesheet,
   AC_HELP_STRING([--enable-docbook-stylesheet=PATH],
   [PATH is filename including full path to the html/chunk.xsl
    stylesheet.]),
  [STYLESHEET=$enableval],
  [STYLESHEET=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl])

AC_CHECK_FILE($STYLESHEET, HAVE_STYLESHEET=yes, HAVE_STYLESHEET=no)
AC_SUBST(STYLESHEET)
AC_SUBST(HAVE_STYLESHEET)

AC_CHECK_HEADER(sys/soundcard.h, HAVE_SOUNDCARD_H=yes, HAVE_SOUNDCARD_H=no)
AC_SUBST(HAVE_SOUNDCARD_H)

AC_ARG_ENABLE(oss-sound, AC_HELP_STRING([--disable-oss-sound],
    [Do not build module for OSS sound. Use this if you OS don't support OSS]),
    [ENABLE_OSS_SOUND=$enableval],
    [ENABLE_OSS_SOUND=$HAVE_SOUNDCARD_H])
AC_SUBST(ENABLE_OSS_SOUND)

if test $HAVE_SOUNDCARD_H = "no"; then
  if test $ENABLE_OSS_SOUND = "yes"; then
      AC_MSG_ERROR([Cannot find sys/soundcard.h
                  --enable-oss-sound require sys/soundcard.h])
  fi
fi

AC_ARG_ENABLE(winmidi, AC_HELP_STRING([--enable-winmidi],
    [Build the winmidi.pyd module. This is required to get sound on MS Windows.]),
    [ENABLE_WINMIDI=$enableval],
    [ENABLE_WINMIDI=no])
AC_SUBST(ENABLE_WINMIDI)

AC_ARG_ENABLE(tuner, AC_HELP_STRING([--enable-tuner],
    [the microphone experiment (default: disable). This code is dead, it
     does not work.]),
    [ENABLE_TUNER=$enableval],
    [ENABLE_TUNER=no])
AC_SUBST(ENABLE_TUNER)

dnl Checks for libraries.
if test "x$ENABLE_TUNER" = xyes; then
    AC_DEFINE(ENABLE_TUNER)
    AC_CHECK_LIB(rfftw, rfftw, [
        AC_DEFINE(HAVE_FFTW)
        LIBS="$LIBS -lfftw -lrfftw"], ,-lfftw)
fi

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)

if test "x$ENABLE_OSS_SOUND" = xyes; then
  if test "x$HAVE_PYTHON_H" = xno; then
        AC_MSG_ERROR([
*** We need the python header files to build the OSS sound module.
*** The debian package is called python-dev, other distributions
*** probably have a similar name.])
  fi
fi

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
#AC_CONFIG_FILES

AC_CONFIG_FILES([
	 run-solfege.py solfege/buildinfo.py
         topdocs/defs.texi
         windowsinstaller.iss
         Makefile
         autopackage/default.apspec
         help/C/solfege.xml
         ])
AC_OUTPUT

AC_MSG_NOTICE
AC_MSG_NOTICE([Please remember to rerun configure if you change swig versions!])
if test -z "$XML2PO"; then
AC_MSG_NOTICE
AC_MSG_NOTICE([xml2po was not found. This is no big deal, but it mean that the])
AC_MSG_NOTICE([translated user manuals will not be updated if you make changes])
AC_MSG_NOTICE([to the english manual.])
fi