File: configure.ac

package info (click to toggle)
solfege 2.0.4-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,200 kB
  • ctags: 1,844
  • sloc: python: 12,160; xml: 5,458; ansic: 1,486; makefile: 562; sh: 233
file content (237 lines) | stat: -rw-r--r-- 7,690 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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# GNU Solfege - eartraining for GNOME
# Copyright (C) 2000, 2001, 2002, 2003  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

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

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

PACKAGE=solfege
AC_SUBST(PACKAGE)

MAJOR_VERSION=2
MINOR_VERSION=0
PATCH_LEVEL=4
VERSION=2.0.4

AC_SUBST(MAJOR_VERSION)
AC_SUBST(MINOR_VERSION)
AC_SUBST(PATCH_LEVEL)
AC_SUBST(VERSION)

AC_PROG_CC

define(BUGGY_MSG,
[[Use the --with-buggy-distro option if you use RedHat 8.0 or you think
that bugs in your linux distribution is causing this problems.]])

AC_ARG_WITH(buggy-distro, AC_HELP_STRING([--with-buggy-distro],
   [Use this option if you have problems detecting some of the software that
   are required, for example PyGNOME. Using this option will make the configure
   script use black magick to check if software are installed even if the linux
   distribution (for example RedHat 8.0) does not include the proper files to
   check for this.]),
   BUGGY_DISTRO=yes,
   BUGGY_DISTRO=no
   )


AC_ARG_WITH(local-xmlcatalog, AC_HELP_STRING([--with-local-xmlcatalog],
  [Use the xml catalog file supplied with Solfege. Use this option if there
   are no catalog file on you system and you have no network while building.
   You might have to edit online-docs/stupid_catalog_file.cat to make it fit you system.]),
   [WITH_LOCAL_XMLCATALOG=$withval],
   [WITH_LOCAL_XMLCATALOG=no])
AC_SUBST(WITH_LOCAL_XMLCATALOG)
GNOME_REQUIRE_PKGCONFIG
AM_PATH_PYTHON(2.2)
AM_CHECK_PYTHON_HEADERS(HAVE_PYTHON_H="yes", HAVE_PYTHON_H="no")

AC_PROG_INSTALL
AC_PROG_MAKE_SET

dnl Check for programs

MY_PATH_PROG(SWIG, swig, [
*** You need to install swig. You can find it at http://www.swig.org
*** and it is probably available in a binary package from the CD or
*** ftp site of your favourite linux distro. ])

MY_SWIG_TEST(SWIG_VERSION)
AC_SUBST(SWIG_VERSION)

MY_PATH_PROG(M4, m4, [You need to install m4.])
MY_PATH_PROG(XGETTEXT, xgettext, [You need to install the gettext.])
MY_PATH_PROG(MSGFMT, msgfmt, [You need to install the gettext.])
MY_PATH_PROG(MSGMERGE, msgmerge, [You need to install the gettext.])
MY_PATH_PROG(MAKEINFO, makeinfo [You need to install the texinfo.])
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)

if test x"$run_pygtk_test" = xyes; then
  PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= 1.99.11)
fi

AC_ARG_WITH(gnome, AC_HELP_STRING([--without-gnome],
    [build Solfege without GNOME support]),
    WITH_GNOME=$withval,
    WITH_GNOME=yes)
AC_SUBST(WITH_GNOME)

AC_ARG_ENABLE(pygnome-test, AC_HELP_STRING([--disable-pygnome-test],
    [Don't test for gnome-python, assume it is installed]),
    run_pygnome_test=$enableval,
    run_pygnome_test=yes)

if test x"$run_pygnome_test" = xyes; then
 if test x"$WITH_GNOME" = xyes; then
 PKG_CHECK_MODULES(GNOMEPYTHON, gnome-python-2.0 >= 1.99.11,
     have_gnomepython=yes, 
     have_gnomepython=no)
  if test x"$BUGGY_DISTRO" = x"yes"; then
   if test $have_gnomepython=no; then
    BUGGY_DISTRO_CHECK_PYGNOME2(have_gnomepython=yes, have_gnomepython=no)
   fi
  fi
  if test xyes != x"$have_gnomepython"
  then
     AC_MSG_ERROR([
**** The python interpreter can't find the python bindings for GNOME.
**** Run ./configure with --without-gnome if you don't have GNOME 2 installed.
BUGGY_MSG()
])
  fi
 fi
else
 have_gnomepython=yes
fi

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=yes])
AC_SUBST(ENABLE_OSS_SOUND)

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" = x"yes"; then
    AC_DEFINE(ENABLE_TUNER)
    AC_CHECK_LIB(rfftw, rfftw, [
        AC_DEFINE(HAVE_FFTW)
        LIBS="$LIBS -lfftw -lrfftw"], ,-lfftw)
fi

AC_ARG_WITH(gtkhtml, AC_HELP_STRING([--without-gtkhtml],
    [Build the application to run without gtkhtml2.]),
    WITH_GTKHTML=$withval,
    WITH_GTKHTML=yes)
AC_SUBST(WITH_GTKHTML)

if test x"$WITH_GTKHTML" = x"yes"; then
  PKG_CHECK_MODULES(GTKHTML2, libgtkhtml-2.0 >= 1.99.9,
      HAVE_GTKHTML="yes",
      HAVE_GTKHTML="no")
  if test x"$HAVE_GTKHTML" = x"no"; then
   AC_MSG_ERROR([
**** You said --with-gtkhtml, but configure cannot find gtkhtml-2
**** Run ./configure with --without-gtkhtml if you don't have gtkhtml2
**** and its devel files installed.
   ])
  fi
  AC_SUBST(HAVE_GTKHTML)
fi

dnl  If we use --without-gnome, we cannot use gtkhtml, even if it is installed.
dnl if test x"$WITH_GNOME" = x"no"; then
dnl         WITH_GTKHTML=no
dnl 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
AC_CHECK_HEADERS(linux/awe_voice.h, [HAVE_LINUX_AWE_VOICE_H="yes"])
AC_SUBST(HAVE_LINUX_AWE_VOICE_H)


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

dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
#AC_CONFIG_FILES

MY_PATH_PROG(XSLTPROC, xsltproc, [We need xsltproc (http://xmlsoft.org/XSLT) to create the online-docs!])

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_filename=$enableval],
  [stylesheet_filename=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl])

AC_CHECK_FILE($stylesheet_filename, HAVE_CHUNK_XSL=$yes, HAVE_CHUNK_XSL=no)

if test x"$HAVE_CHUNK_XSL" = xno
then
  AC_MSG_ERROR([
Cannot find chunk.xsl, a XSL stylesheet for docbook. On debian, the
file is called
/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl
Please check the INSTALL file for required software.
You can set the path to the file using the 
--enable-docbook-stylesheet option. Redhat 8.0 users should set
--enable-docbook-stylesheet=/usr/share/sgml/docbook/xsl-stylesheets-1.50.0-3/html/chunk.xsl

])
fi

AC_SUBST(stylesheet_filename)

dnl Let xsltproc check if it likes the stylesheet.
TEST_STYLESHEET

$CAT run-solfege.py.in | $SED "s/@VERSION@//" > debian-solfege.py.in

AC_CONFIG_FILES([
	 run-solfege.py debian-solfege.py src/configureoutput.py
         topdocs/defs.texi
         online-docs/texidefinitions.m4
         windowsinstaller.iss solfege.manpage.xml
         Makefile.inc Makefile 
	 solfege.redhat8.spec solfege.redhat9.spec solfege.suse82.spec])
AC_OUTPUT