root / configure.ac @ 9890c9b2
History | View | Annotate | Download (12.9 kB)
| 1 |
# Process this file with autoconf to produce a configure script. |
|---|---|
| 2 |
|
| 3 |
# scenic package version number, (as distinct from shared library version) |
| 4 |
# An odd micro number indicates in-progress development from Git |
| 5 |
# An even micro number indicates a released version |
| 6 |
# |
| 7 |
# Making a point release: |
| 8 |
# - increase scenic_micro_version to the next even number |
| 9 |
# - increase scenic_interface_age to the next even number |
| 10 |
# UNLESS there was an API addition/deprecation, in which case |
| 11 |
# - set scenic_interface_age to 0 |
| 12 |
# After the release: |
| 13 |
# - increase scenic_micro_version to the next odd number |
| 14 |
# - increase scenic_interface_version to the next odd number |
| 15 |
m4_define([scenic_major_version], [0]) |
| 16 |
m4_define([scenic_minor_version], [7]) |
| 17 |
m4_define([scenic_micro_version], [1]) |
| 18 |
|
| 19 |
m4_define([scenic_release_status], |
| 20 |
[m4_if(m4_eval(scenic_micro_version % 2), [1], [git], |
| 21 |
[m4_if(m4_eval(scenic_minor_version % 2), [1], [snapshot], |
| 22 |
[release])])]) |
| 23 |
|
| 24 |
m4_define([scenic_version], [scenic_major_version.scenic_minor_version.scenic_micro_version]) |
| 25 |
|
| 26 |
# change this only when breaking the API |
| 27 |
m4_define([shmdata_api_version], [0.7]) |
| 28 |
|
| 29 |
# increase the interface age by 1 for each release; if the API changes, |
| 30 |
# set to 0. interface_age and binary_age are used to create the soname |
| 31 |
# of the shared object: |
| 32 |
# |
| 33 |
# (<minor> * 100 + <micro>) - <interface_age> |
| 34 |
# |
| 35 |
# this allows using the same soname for different micro-releases in case |
| 36 |
# no API was added or deprecated. for instance: |
| 37 |
# |
| 38 |
# shmdata 1.2.0 -> 100 * 2 + 0 = 200, interface age = 0 -> 200 |
| 39 |
# shmdata 1.2.2 -> 100 * 2 + 2 = 202, interface age = 2 -> 200 |
| 40 |
# shmdata 1.2.4 -> 100 * 2 + 4 = 204, interface age = 4 -> 200 |
| 41 |
# [ API addition, deprecation ] |
| 42 |
# shmdata 1.2.6 -> 100 * 2 + 6 = 206, interface age = 0 -> 206 |
| 43 |
# shmdata 1.2.8 -> 100 * 2 + 8 = 208, interface age = 2 -> 206 |
| 44 |
# shmdata 1.2.10 -> 100 * 2 + 10 = 210, interface age = 4 -> 206 |
| 45 |
# ... |
| 46 |
# |
| 47 |
m4_define([shmdata_interface_age], [0]) |
| 48 |
m4_define([shmdata_binary_age], [m4_eval(100 * scenic_minor_version + scenic_micro_version)]) |
| 49 |
|
| 50 |
AC_PREREQ([2.63]) |
| 51 |
AC_INIT([scenic], |
| 52 |
[scenic_version], |
| 53 |
[http://code.sat.qc.ca/trac/scenic/wiki/BugReport], |
| 54 |
[scenic], |
| 55 |
[http://code.sat.qc.ca/trac/scenic]) |
| 56 |
AC_CONFIG_MACRO_DIR([m4]) |
| 57 |
AC_MSG_NOTICE([Configuring scenic]) |
| 58 |
|
| 59 |
AC_SUBST([SCENIC_MAJOR_VERSION], [scenic_major_version]) |
| 60 |
AC_SUBST([SCENIC_MINOR_VERSION], [scenic_minor_version]) |
| 61 |
AC_SUBST([SCENIC_MICRO_VERSION], [scenic_micro_version]) |
| 62 |
AC_SUBST([SCENIC_VERSION], [scenic_version]) |
| 63 |
AC_SUBST([SHMDATA_API_VERSION], [scenic_api_version]) |
| 64 |
AC_SUBST([SHMDATA_API_VERSION_AM], [$SCENIC_MAJOR_VERSION\_0]) |
| 65 |
AC_SUBST([SCENIC_RELEASE_STATUS], [scenic_release_status]) |
| 66 |
|
| 67 |
m4_define([lt_current], [m4_eval(100 * scenic_minor_version + scenic_micro_version - shmdata_interface_age)]) |
| 68 |
m4_define([lt_revision], [shmdata_interface_age]) |
| 69 |
m4_define([lt_age], [m4_eval(shmdata_binary_age - shmdata_interface_age)]) |
| 70 |
SCENIC_LT_CURRENT=lt_current |
| 71 |
SCENIC_LT_REV=lt_revision |
| 72 |
SCENIC_LT_AGE=lt_age |
| 73 |
SCENIC_LT_VERSION="$SHMDATA_LT_CURRENT:$SHMDATA_LT_REV:$SHMDATA_LT_AGE" |
| 74 |
AC_SUBST([SCENIC_LT_VERSION], "$SHMDATA_LT_VERSION") |
| 75 |
SCENIC_LT_LDFLAGS="-version-info $SHMDATA_LT_VERSION" |
| 76 |
# -*- Autoconf -*- |
| 77 |
# Process this file with autoconf to produce a configure script. |
| 78 |
|
| 79 |
# version should always be .1 greater than last tag, unless this is a tag |
| 80 |
AC_CONFIG_SRCDIR([src/main/milhouse.cpp]) |
| 81 |
AC_CONFIG_MACRO_DIR([m4]) |
| 82 |
|
| 83 |
AC_CONFIG_AUX_DIR([build-aux]) |
| 84 |
AM_INIT_AUTOMAKE([subdir-objects -Wno-portability]) |
| 85 |
AC_CONFIG_HEADERS([src/config.h]) |
| 86 |
AC_CANONICAL_HOST # fills $host variable |
| 87 |
|
| 88 |
dnl we use this to avoid causing normal builds to regenerate autotools if |
| 89 |
dnl "too old" which might happen accidentally, especially when using a VCS |
| 90 |
dnl such as when building debian packages |
| 91 |
AM_MAINTAINER_MODE([enable]) |
| 92 |
AC_SUBST([BUILD_TIME], ["`date +%F\ %T\ %Z`"]) |
| 93 |
|
| 94 |
# Check for C and C++ compilers |
| 95 |
AC_PROG_CXX |
| 96 |
AC_PROG_CC |
| 97 |
AC_PROG_INSTALL |
| 98 |
AC_PROG_LIBTOOL |
| 99 |
|
| 100 |
#i18n: |
| 101 |
AM_GNU_GETTEXT_VERSION([0.17]) |
| 102 |
AM_GNU_GETTEXT([external]) |
| 103 |
|
| 104 |
# Checks for header files. |
| 105 |
AC_HEADER_STDC |
| 106 |
|
| 107 |
# Checks for typedefs, structures, and compiler characteristics. |
| 108 |
AC_HEADER_STDBOOL |
| 109 |
AC_C_CONST |
| 110 |
PKG_PROG_PKG_CONFIG |
| 111 |
|
| 112 |
AC_PROG_GCC_TRADITIONAL |
| 113 |
AC_CHECK_FUNCS([inet_ntoa memset socket]) |
| 114 |
|
| 115 |
AC_MSG_CHECKING(whether to enable debugging) |
| 116 |
AC_ARG_ENABLE([debug], [ |
| 117 |
--enable-debug debug symbols, build test programs, stricter compile ],, |
| 118 |
enable_debug=yes) |
| 119 |
|
| 120 |
AC_ARG_ENABLE([svn-revision], [ --enable-svn-revision ],,enable_svn_revision=no) |
| 121 |
AM_CONDITIONAL([SVN],test "x${enable_svn_revision}" = "xyes")
|
| 122 |
|
| 123 |
AC_MSG_WARN([${ac_prefix}])
|
| 124 |
# Checks for library functions. |
| 125 |
|
| 126 |
PKG_CHECK_MODULES(GLIB, [glib-2.0 gthread-2.0], have_glib=true, have_glib=false) |
| 127 |
if test "x${have_glib}" = "xfalse" ; then
|
| 128 |
AC_MSG_ERROR([Missing libglib2.0-dev]) |
| 129 |
fi |
| 130 |
|
| 131 |
AM_PATH_GTK_2_0([2.10.0],,AC_MSG_ERROR([Gtk+ 2.10.0 or higher required.])) |
| 132 |
|
| 133 |
#Trying to set GST_CFLAGS GST_LIBS using pkg-config |
| 134 |
PKG_CHECK_MODULES(GST, gstreamer-0.10, have_gstreamer=true, have_gstreamer=false) |
| 135 |
if test "x${have_gstreamer}" = "xfalse" ; then
|
| 136 |
AC_MSG_ERROR([Missing libgstreamer0.10-dev, gstreamer not found.]) |
| 137 |
fi |
| 138 |
|
| 139 |
#Trying to set GSTAUDIO using pkg-config |
| 140 |
PKG_CHECK_MODULES(GSTAUDIO, gstreamer-audio-0.10, have_gstreamer_audio=true, have_gstreamer_audio=false) |
| 141 |
if test "x${have_gstreamer_audio}" = "xfalse" ; then
|
| 142 |
AC_MSG_ERROR([missing package: libgstreamer-plugins-audio0.10-dev ]) |
| 143 |
fi |
| 144 |
|
| 145 |
#Trying to set GSTAPP using pkg-config |
| 146 |
PKG_CHECK_MODULES(GSTAPP, gstreamer-app-0.10, have_gstreamer_app=true, have_gstreamer_app=false) |
| 147 |
if test "x${have_gstreamer_app}" = "xfalse" ; then
|
| 148 |
AC_MSG_ERROR([missing package: libgstreamer-plugins-app0.10-dev ]) |
| 149 |
fi |
| 150 |
|
| 151 |
#Trying to set CAIRO using pkg-config |
| 152 |
PKG_CHECK_MODULES(CAIRO, cairo, have_cairo=true, have_cairo=false) |
| 153 |
if test "x${have_cairo}" = "xfalse" ; then
|
| 154 |
AC_MSG_ERROR([missing package: libcairo2-dev ]) |
| 155 |
fi |
| 156 |
|
| 157 |
#Trying to set GSTVIDEO using pkg-config |
| 158 |
PKG_CHECK_MODULES(GSTVIDEO, gstreamer-video-0.10, have_gstreamer_video=true, have_gstreamer_video=false) |
| 159 |
if test "x${have_gstreamer_video}" = "xfalse" ; then
|
| 160 |
AC_MSG_ERROR([missing package: libgstreamer-plugins-video0.10-dev ]) |
| 161 |
fi |
| 162 |
|
| 163 |
#Trying to set GSTRTSP using pkg-config |
| 164 |
PKG_CHECK_MODULES(GST_RTSP_SERVER, gst-rtsp-server-0.10 gstreamer-rtsp-0.10, have_gstreamer_rtsp=true, have_gstreamer_rtsp=false) |
| 165 |
if test "x${have_gstreamer_rtsp}" = "xfalse" ; then
|
| 166 |
AC_MSG_ERROR([missing package: libgstrtsp-server-0.10-dev]) |
| 167 |
fi |
| 168 |
|
| 169 |
#Trying to set JACK using pkg-config |
| 170 |
PKG_CHECK_MODULES(JACK, jack >= 0.99.10, have_jack=true, have_jack=false) |
| 171 |
if test "x${have_jack}" = "xfalse" ; then
|
| 172 |
AC_MSG_ERROR([missing package: libjack0 and/or libjack-dev]) |
| 173 |
fi |
| 174 |
|
| 175 |
#Trying to set LIBAVC1394 using pkg-config |
| 176 |
PKG_CHECK_MODULES(LIBAVC1394, [libavc1394], have_libavc1394=true, have_libavc1394=false) |
| 177 |
if test "x${have_libavc1394}" = "xfalse" ; then
|
| 178 |
AC_MSG_ERROR([missing package: libavc1394-dev ]) |
| 179 |
fi |
| 180 |
|
| 181 |
#Trying to set LIBRAW1394 using pkg-config |
| 182 |
PKG_CHECK_MODULES(LIBRAW1394, [libraw1394 libavc1394], have_libraw1394=true, have_libraw1394=false) |
| 183 |
if test "x${have_libraw1394}" = "xfalse" ; then
|
| 184 |
AC_MSG_ERROR([missing package: libraw1394-dev ]) |
| 185 |
fi |
| 186 |
|
| 187 |
#Trying to set LIBDC1394 using pkg-config |
| 188 |
PKG_CHECK_MODULES(LIBDC1394, [libdc1394-2], have_libdc1394=true, have_libdc1394=false) |
| 189 |
if test "x${have_libdc1394}" = "xfalse" ; then
|
| 190 |
AC_MSG_ERROR([missing package: libdc1394-2]) |
| 191 |
fi |
| 192 |
|
| 193 |
GNOME_DOC_INIT(0.12.2, , AC_MSG_WARN(["DocBook Documentation will not be converted to HTML."])) |
| 194 |
|
| 195 |
dnl check for python |
| 196 |
AM_PATH_PYTHON([2.5]) |
| 197 |
|
| 198 |
dnl BOOST m4 tests |
| 199 |
AX_BOOST_BASE([1.35], [], AC_MSG_ERROR(["libboost-1.35 or greater required"])) |
| 200 |
AX_BOOST_THREAD |
| 201 |
if test "x${ax_cv_boost_thread}" = "xno" ; then
|
| 202 |
AC_MSG_ERROR([missing package: libboost-thread-dev]) |
| 203 |
fi |
| 204 |
AX_BOOST_SYSTEM |
| 205 |
if test "x${ax_cv_boost_system}" = "xno" ; then
|
| 206 |
AC_MSG_ERROR([missing package: libboost-system-dev]) |
| 207 |
fi |
| 208 |
AX_BOOST_PROGRAM_OPTIONS |
| 209 |
if test "x${ax_cv_boost_program_options}" = "xno" ; then
|
| 210 |
AC_MSG_ERROR([missing package: libboost-program-options-dev]) |
| 211 |
fi |
| 212 |
AX_BOOST_ASIO |
| 213 |
if test "x${ax_cv_boost_asio}" = "xno" ; then
|
| 214 |
AC_MSG_ERROR([missing package: libboost-asio-dev]) |
| 215 |
fi |
| 216 |
AX_BOOST_DATE_TIME |
| 217 |
if test "x${ax_cv_boost_date_time}" = "xno" ; then
|
| 218 |
AC_MSG_ERROR([missing package: libboost-date-time-dev]) |
| 219 |
fi |
| 220 |
AX_BOOST_FILESYSTEM |
| 221 |
if test "x${ax_cv_boost_filesystem}" = "xno" ; then
|
| 222 |
AC_MSG_ERROR([missing package: libboost-filesystem-dev]) |
| 223 |
fi |
| 224 |
|
| 225 |
# GNU help2man creates man pages from --help output; in many cases, this |
| 226 |
# is sufficient, and obviates the need to maintain man pages separately. |
| 227 |
# However, this means invoking executables, which we generally cannot do |
| 228 |
# when cross-compiling, so we test to avoid that (the variable |
| 229 |
# "cross_compiling" is set by AC_PROG_CC). |
| 230 |
if test $cross_compiling = no; then |
| 231 |
AM_MISSING_PROG(HELP2MAN, help2man) |
| 232 |
else |
| 233 |
HELP2MAN=: |
| 234 |
fi |
| 235 |
|
| 236 |
# Check for python modules, if second arg is non-empty, |
| 237 |
# configure exits with an error (NOTE: it will not print this argument!) |
| 238 |
|
| 239 |
AX_PYTHON_MODULE([pypm], []) |
| 240 |
AS_IF([test "x${HAVE_PYMOD_PYPM}" = "xno"],
|
| 241 |
[AC_MSG_WARN(["The Scenic graphical user interface requires pypm, available at http://bitbucket.org/aalex/pyportmidi/wiki/Home or in python-pygame 1.9 and above."])]) |
| 242 |
# We install midistream anyways, but the MIDI support is checked by Scenic and will be disabled if pypm if not found at runtime. |
| 243 |
|
| 244 |
AX_PYTHON_MODULE([twisted], [Fatal]) |
| 245 |
AX_PYTHON_MODULE([gtk], [Fatal]) |
| 246 |
AX_PYTHON_MODULE([gst], [Fatal]) |
| 247 |
AX_PYTHON_MODULE([json], []) |
| 248 |
AX_PYTHON_MODULE([simplejson], []) |
| 249 |
|
| 250 |
AS_IF([test "x${HAVE_PYMOD_JSON}" = "xno"],
|
| 251 |
AS_IF([test "x${HAVE_PYMOD_SIMPLEJSON}" = "xno"],
|
| 252 |
[AC_MSG_ERROR([The Scenic graphical user interface requires one of json or simplejson])])) |
| 253 |
|
| 254 |
AS_AC_EXPAND(PYTHON_LIB_PATH, "${pythondir}")
|
| 255 |
|
| 256 |
# check for programs |
| 257 |
# TODO: move those checks for programs up. (it should always be second in the configure.ac file) |
| 258 |
# FIXME: some checks should be done at runtime, not build time |
| 259 |
# Maybe $PATH does not contain /sbin |
| 260 |
AC_CHECK_PROG(IFCONFIG, ifconfig, yes, no, "${PATH}:/sbin")
|
| 261 |
AS_IF([test "x${IFCONFIG}" = "xno"],
|
| 262 |
[AC_MSG_WARN(["The Scenic graphical user interface requires ifconfig"])]) |
| 263 |
|
| 264 |
AC_CHECK_PROG(XDPYINFO, xdpyinfo, yes, no) |
| 265 |
AS_IF([test "x${XDPYINFO}" = "xno"],
|
| 266 |
[AC_MSG_WARN(["The Scenic graphical user interface requires xdpyinfo"])]) |
| 267 |
|
| 268 |
AC_CHECK_PROG(XVINFO, xvinfo, yes, no) |
| 269 |
AS_IF([test "x${XVINFO}" = "xno"],
|
| 270 |
[AC_MSG_WARN(["The Scenic graphical user interface requires xvinfo"])]) |
| 271 |
|
| 272 |
AC_CHECK_PROG(JACKD, jackd, yes, no) |
| 273 |
AS_IF([test "x${JACKD}" = "xno"],
|
| 274 |
[AC_MSG_WARN(["The Scenic graphical user interface requires jackd"])]) |
| 275 |
|
| 276 |
AC_CHECK_PROG(YELP, yelp, yes, no) |
| 277 |
AS_IF([test "x${YELP}" = "xno"],
|
| 278 |
[AC_MSG_WARN(["The Scenic graphical user interface requires yelp"])]) |
| 279 |
|
| 280 |
# Check for gst-plugins that we use |
| 281 |
GST_CHECK=$srcdir/utils/gst_check.py |
| 282 |
# PYTHON defined in ax_python_module |
| 283 |
AS_IF([! $PYTHON $GST_CHECK], [AC_MSG_ERROR([Not all gstreamer plugins installed])]) |
| 284 |
|
| 285 |
# see /usr/share/aclocal/gst-element-check-0.10.m4 |
| 286 |
#AM_GST_ELEMENT_CHECK(["xvimagesink"], [AC_MSG_NOTICE([OK])], [AC_MSG_ERROR([Requires xvimagesink])]) |
| 287 |
CFLAGS="-O2" |
| 288 |
CXXFLAGS=$CFLAGS |
| 289 |
dnl -std=c99 -pedantic XXX commas at end of enumation list are not C++-OK |
| 290 |
if test "x${enable_debug}" = "xyes" ; then
|
| 291 |
AC_DEFINE(CONFIG_DEBUG_LOCAL,[],[Debug define from configure]) |
| 292 |
CFLAGS="-O2 -Wextra -Wfatal-errors -Werror -Wall -Wno-long-long -Wno-variadic-macros -Wshadow" |
| 293 |
CXXFLAGS="-Weffc++ " |
| 294 |
CXXFLAGS+=$CFLAGS |
| 295 |
fi |
| 296 |
|
| 297 |
CXXFLAGS+=" -fPIC " |
| 298 |
|
| 299 |
AM_CONDITIONAL([PROJ_DEBUG],test "x${enable_debug}" = "xyes")
|
| 300 |
|
| 301 |
AC_SUBST(LOCALE_DIR, $localedir) |
| 302 |
|
| 303 |
AS_AC_EXPAND(DATADIR, $datadir) |
| 304 |
|
| 305 |
PIXMAPS_DIR=$DATADIR/scenic/pixmaps |
| 306 |
AC_SUBST(PIXMAPS_DIR) |
| 307 |
|
| 308 |
AC_CONFIG_FILES([py/scripts/scenic], [chmod +x py/scripts/scenic]) |
| 309 |
AC_CONFIG_FILES([py/scripts/midistream], [chmod +x py/scripts/midistream]) |
| 310 |
|
| 311 |
# TODO: indent the following list of files: |
| 312 |
AC_CONFIG_FILES([ |
| 313 |
Makefile |
| 314 |
shmdata/Makefile |
| 315 |
shmdata/tests/Makefile |
| 316 |
data/Makefile |
| 317 |
data/glade/Makefile |
| 318 |
data/pixmaps/Makefile |
| 319 |
data/themes/Makefile |
| 320 |
data/themes/Darklooks/Makefile |
| 321 |
doc/Makefile |
| 322 |
doc/docbook/Makefile |
| 323 |
doc/docbook/en/Makefile |
| 324 |
doc/docbook/en/fig/Makefile |
| 325 |
doc/docbook/en/user/Makefile |
| 326 |
doc/docbook/en/user-manual.xml |
| 327 |
doc/docbook/en/installation/Makefile |
| 328 |
doc/docbook/en/installation-manual.xml |
| 329 |
doc/docbook/fr/Makefile |
| 330 |
doc/docbook/fr/fig/Makefile |
| 331 |
doc/docbook/fr/user/Makefile |
| 332 |
doc/docbook/fr/user-manual.xml |
| 333 |
doc/docbook/fr/installation/Makefile |
| 334 |
doc/docbook/fr/installation-manual.xml |
| 335 |
doc/Doxyfile |
| 336 |
man/Makefile |
| 337 |
utils/Makefile |
| 338 |
utils/dc-ctl/Makefile |
| 339 |
utils/firereset/Makefile |
| 340 |
utils/jack-info/Makefile |
| 341 |
src/Makefile |
| 342 |
py/Makefile |
| 343 |
py/doc/Makefile |
| 344 |
py/rtpmidi/Makefile |
| 345 |
py/rtpmidi/engines/Makefile |
| 346 |
py/rtpmidi/engines/midi/Makefile |
| 347 |
py/rtpmidi/protocols/Makefile |
| 348 |
py/rtpmidi/protocols/rtp/Makefile |
| 349 |
py/scenic/Makefile |
| 350 |
py/scenic/configure.py |
| 351 |
py/scenic/devices/Makefile |
| 352 |
po/Makefile.in |
| 353 |
py/scenic/test/Makefile |
| 354 |
py/scripts/Makefile |
| 355 |
src/util/Makefile |
| 356 |
src/gutil/Makefile |
| 357 |
src/vumeter/Makefile |
| 358 |
src/vumeter/test/Makefile |
| 359 |
src/caps/Makefile |
| 360 |
src/caps/test/Makefile |
| 361 |
src/devices/Makefile |
| 362 |
src/gst/Makefile |
| 363 |
src/rtsp/Makefile |
| 364 |
src/rtsp/examples/Makefile |
| 365 |
src/main/Makefile |
| 366 |
src/main/test/Makefile |
| 367 |
shmdata-${SHMDATA_API_VERSION}.pc:shmdata.pc.in
|
| 368 |
]) |
| 369 |
|
| 370 |
AC_OUTPUT |
| 371 |
|
