1
AC_INIT([lebiniou],[3.13],[olivier@biniou.info])
1
AC_INIT([lebiniou],[3.18],[olivier@biniou.info])
3
3
AC_CONFIG_SRCDIR([src/main.c])
4
4
AC_CONFIG_AUX_DIR([build-aux])
11
11
dnl ------------------------------------------------------------------
14
dnl BINIOU_PATCH_LEVEL=0
14
dnl BINIOU_PATCH_LEVEL=1
15
dnl BINIOU_VERSION="$BINIOU_MAJOR.$BINIOU_MINOR.$BINIOU_PATCH_LEVEL"
15
16
BINIOU_VERSION="$BINIOU_MAJOR.$BINIOU_MINOR"
16
17
AC_SUBST(BINIOU_VERSION)
20
20
LDFLAGS="$LDFLAGS -rdynamic"
22
22
dnl Checks for programs
40
41
PLUGIN_CFLAGS="$PLUGIN_CFLAGS -I../../../../../src"
42
43
if test "x${COMPILER}" = "xgcc"; then
43
PLUGIN_LDFLAGS="${PLUGIN_LDFLAGS} -module -export-dynamic"
44
PLUGIN_LDFLAGS="${PLUGIN_LDFLAGS} -export-dynamic"
45
46
AC_SUBST([PLUGIN_CFLAGS])
46
47
AC_SUBST([PLUGIN_LDFLAGS])
49
50
# Checks for libraries
53
if test "x${ERLC}" != "x"; then
54
AC_ERLANG_CHECK_LIB([erl_interface],[have_ei=yes])
55
AC_SUBST([ERLANG_LIB_DIR_erl_interface])
51
59
PKG_CHECK_MODULES([GLIB], [glib-2.0], , [AC_MSG_ERROR([You must have libglib2.0-dev installed])])
52
60
CPPFLAGS="$CPPFLAGS `pkg-config glib-2.0 --cflags`"
59
67
PKG_CHECK_MODULES([XML2], [libxml-2.0 >= 2.6.0], , [AC_MSG_ERROR([You must have libxml2-dev >= 2.6 installed])])
60
68
CPPFLAGS="$CPPFLAGS `pkg-config libxml-2.0 --cflags`"
71
PKG_CHECK_MODULES([FT2], [freetype2], , [AC_MSG_ERROR([You must have libfreetype-dev for Free Type 2 installed])])
72
CPPFLAGS="$CPPFLAGS `pkg-config freetype2 --cflags`"
62
74
# zlib - we assume it's installed on most systems
63
75
LIBS="${GLIB_LIBS} ${FFTW3_LIBS} ${XML2_LIBS} -lz -lm"
79
PKG_CHECK_MODULES([GLU],[glu],[have_opengl="yes"],[have_opengl="no"])
80
dnl OpenGL - remove when it becomes official
82
AC_ARG_ENABLE([opengl],
83
AS_HELP_STRING([--enable-opengl],[enable OpenGL support [default=no]]),,
85
AM_CONDITIONAL([EXTRA_OPENGL], [test "x${enable_opengl}" == "xyes"])
65
87
# We need to know which prefix we used to find some default values
66
88
if test "x${prefix}" = "xNONE"; then
67
89
prefix="/usr/local"
84
106
OUTPUT_PLUGINS="SDL"
85
107
AC_SUBST([OUTPUT_PLUGINS])
110
dnl Compile the core engine
111
AC_ARG_ENABLE([core],
112
AS_HELP_STRING([--enable-core],[build the core engine [default=yes]]),,
114
AM_CONDITIONAL([WITH_CORE], [test "x${enable_core}" = "xyes"])
87
116
dnl Check for Alsa
89
118
AC_ARG_ENABLE([alsa],
130
dnl Check for JACK Audio
132
AC_ARG_ENABLE([jackaudio],
133
AS_HELP_STRING([--enable-jack],[build the JACK Audio input plugin [default=yes]]),,
135
if test "x${enable_jack}" = "xyes"; then
136
PKG_CHECK_MODULES([JACK], jack, jack_present=yes, jack_present=no)
138
AM_CONDITIONAL([JACK_PLUGIN], [test "x${jack_present}" = "xyes"])
139
if test "x${jack_present}" = "xyes"; then
140
CPPFLAGS="$CPPFLAGS -DWITH_JACK"
141
INPUT_PLUGINS+=", jackaudio"
101
145
dnl Check for libpulse
102
146
pulseaudio_present="no"
103
147
AC_ARG_ENABLE([pulseaudio],
104
148
AS_HELP_STRING([--enable-pulseaudio],[build the PulseAudio input plugin [default=yes]]),,
105
149
enable_pulseaudio="yes")
106
150
if test "x${enable_pulseaudio}" = "xyes"; then
107
PKG_CHECK_MODULES([PULSEAUDIO], libpulse-simple, pulseaudio_present=yes, pulseaudio_present=no)
151
PKG_CHECK_MODULES([PULSEAUDIO], libpulse, pulseaudio_present=yes, pulseaudio_present=no)
109
153
AM_CONDITIONAL([PULSEAUDIO_PLUGIN], [test "x${pulseaudio_present}" = "xyes"])
110
154
if test "x${pulseaudio_present}" = "xyes"; then
162
206
OUTPUT_PLUGINS+=", caca"
209
dnl Fixed buffers support
210
AC_ARG_ENABLE([fixed],
211
[AS_HELP_STRING([--enable-fixed="WIDTHxHEIGHT"],[Use fixed-size video buffers [default=no]])],
212
[enable_fixed=$enableval],
214
if test "x${enable_fixed}" != "xno"; then
215
FIXED_W=${enableval/x*}
216
FIXED_H=${enableval/*x}
217
CPPFLAGS="$CPPFLAGS -DFIXED -DWIDTH=$FIXED_W -DHEIGHT=$FIXED_H"
220
dnl Set webcam capture size
221
AC_ARG_ENABLE([camsize],
222
[AS_HELP_STRING([--enable-camsize="WIDTHxHEIGHT"],[Set webcam capture size [default="640x480"]])],
223
[enable_camsize=$enableval],
224
[enable_camsize="no"])
227
if test "x${enable_camsize}" != "xno"; then
228
CAP_W=${enableval/x*}
229
CAP_H=${enableval/*x}
230
CPPFLAGS="$CPPFLAGS -DCAPTURE_SET -DCAP_WIDTH=$CAP_W -DCAP_HEIGHT=$CAP_H"
166
233
dnl Check for getopt / getopt_long
167
234
dnl XXX completely review this -- only needed for the main binary --oliv3
216
dnl linux/videodev2.h \
218
283
dnl FIXME have_cexp=yes by default ?! --oliv3
220
285
AC_CHECK_LIB([m],[cexp],[AC_DEFINE([HAVE_CEXP],[1],[libm includes cexp])], [have_cexp=no])
224
289
dnl Check for SDL
225
PKG_CHECK_MODULES([SDL], [sdl >= 1.2.0], have_sdl=yes, [AC_MSG_ERROR([You must have libsdl1.2 -dev installed])])
290
PKG_CHECK_MODULES([SDL], [sdl >= 1.2.0], have_sdl=yes, [AC_MSG_ERROR([You must have libsdl1.2-dev installed])])
291
DEFAULT_OUTPUT_PLUGIN=SDL
294
if test "x${enable_opengl}" = "xyes"; then
295
CPPFLAGS="$CPPFLAGS -DWITH_GL"
296
DEFAULT_OUTPUT_PLUGIN=GL
297
OUTPUT_PLUGINS+=", GL"
228
300
dnl Check for SDL_ttf
229
301
dnl the LD_LIBRARY_PATH trick is needed in case the lib is in /usr/local/lib
235
307
AC_SUBST(SDL_TTF_LIBS)
311
AC_CHECK_PROG([have_ffmpeg],[ffmpeg],[yes],[no])
312
AM_CONDITIONAL([WITH_FFMPEG], [test "x${have_ffmpeg}" == "xyes"])
313
if test "x${have_ffmpeg}" = "xyes"; then
314
OUTPUT_PLUGINS+=", RTMP"
239
318
AC_CHECK_HEADERS(linux/videodev2.h, have_v4l2=yes)
270
349
AM_CONDITIONAL([OS_LINUX_FAMILY], [test x"$os_family" = x"linux"])
271
350
AM_CONDITIONAL([OS_NETBSD_OR_OPENBSD], [test x"$os_netbsd_or_openbsd" = x"true"])
272
351
AC_DEFINE_UNQUOTED([DEFAULT_INPUT_PLUGIN], ["$DEFAULT_INPUT_PLUGIN"], [Default input plugin])
352
AC_DEFINE_UNQUOTED([DEFAULT_OUTPUT_PLUGIN], ["$DEFAULT_OUTPUT_PLUGIN"], [Default output plugin])
275
355
dnl ------------------------------------------------------------------
282
362
enable_debug="no")
283
363
if test "x${enable_debug}" = "xyes"; then
284
364
CPPFLAGS="$CPPFLAGS -DDEBUG"
365
CFLAGS="$CFLAGS -g -O0"
287
367
CPPFLAGS="$CPPFLAGS -DNDEBUG"
288
CFLAGS="$CFLAGS -fomit-frame-pointer"
368
CFLAGS="$CFLAGS -fomit-frame-pointer -O3"
291
371
dnl Treat warnings as errors
292
372
AC_ARG_ENABLE([warnings],
293
AS_HELP_STRING([--enable-warnings],[treat warnings as errors [default=no]]),,
294
enable_warnings="no")
373
AS_HELP_STRING([--enable-warnings],[treat warnings as errors [default=yes]]),,
374
enable_warnings="yes")
295
375
if test "x${enable_warnings}" = "xyes" -a "x${GCC}" = "xyes"; then
296
376
CFLAGS="$CFLAGS -Wall -Werror -Wextra"
379
dnl Use embedded pnglite
380
AC_ARG_WITH([pnglite],
381
[AS_HELP_STRING([--with-pnglite],
382
[Use embedded pnglite library])],
385
AM_CONDITIONAL([WITH_PNGLITE], [test "x${with_pnglite}" != "xno"])
386
if test "x${with_pnglite}" == "xno"; then
387
LIBS="$LIBS -lpnglite"
299
390
dnl ------------------------------------------------------------------
300
391
dnl Plugin-specific stuff
301
392
dnl ------------------------------------------------------------------
310
401
AC_ARG_ENABLE([erlang],
311
AS_HELP_STRING([--enable-erlang],[compile the Erlang output plugin (needs OpenGL development libs) [default=yes]]),,
402
AS_HELP_STRING([--enable-erlang],[compile the Erlang output plugin (needs OpenGL development libs) [default=no]]),,
313
404
AM_CONDITIONAL([EXTRA_ERLANG], [test "x${enable_erlang}" == "xyes"])
314
405
if test "x${enable_erlang}" = "xyes"; then
315
406
OUTPUT_PLUGINS+=", erlang"
409
if test "x${have_ei}" = "xyes"; then
411
AS_HELP_STRING([--enable-bew],[compile the Biniou Erlang wrapper [default=no]]),,
413
if test "x${enable_bew}" = "xyes"; then
414
CPPFLAGS="$CPPFLAGS -DWITH_BEW"
415
OUTPUT_PLUGINS+=", bew"
418
AM_CONDITIONAL([EXTRA_BEW], [test "x${enable_bew}" == "xyes"])
318
420
if test "x$have_v4l2" = "xyes"; then
319
421
AC_ARG_ENABLE([webcam],
320
AS_HELP_STRING([--enable-webcam],[compile the Webcam plugin (Linux only) [default=yes]]),,
422
AS_HELP_STRING([--enable-webcam],[compile the Webcam plugin (Linux only) [default=yes]]),[enable_webcam=$enableval],
423
[enable_webcam="yes"])
323
425
AM_CONDITIONAL([EXTRA_WEBCAM], [test "x${enable_webcam}" == "xyes"])
426
if test "x${enable_webcam}" = "xyes"; then
427
CPPFLAGS="$CPPFLAGS -DWITH_WEBCAM"
431
AC_ARG_ENABLE([target],
432
AS_HELP_STRING([--enable-target],[Display a target when no plugins were run [default=yes]]),
435
if test "x${enable_target}" = "xyes"; then
436
CPPFLAGS="$CPPFLAGS -DFEAT_TARGET"
325
439
dnl ------------------------------------------------------------------
347
461
plugins/stable/input/pulseaudio/Makefile
348
462
plugins/stable/input/sndfile/Makefile
349
463
plugins/stable/input/twip/Makefile
464
plugins/stable/input/jackaudio/Makefile
351
466
plugins/stable/main/aurora/Makefile
352
467
plugins/stable/main/bassline/Makefile
434
549
plugins/stable/main/yshaker/Makefile
435
550
plugins/stable/main/ywave/Makefile
436
551
plugins/stable/main/zebu1/Makefile
552
plugins/stable/main/GLCube/Makefile
554
plugins/stable/main/QuarkTV/Makefile
555
plugins/stable/main/StreakTV/Makefile
556
plugins/stable/main/1dTV/Makefile
557
plugins/stable/main/NervousTV/Makefile
558
plugins/stable/main/PredatorTV/Makefile
559
plugins/stable/main/FireTV/Makefile
560
plugins/stable/main/DiffTV/Makefile
438
562
plugins/stable/output/caca/Makefile
439
563
plugins/stable/output/diskwriter/Makefile
440
564
plugins/stable/output/erlang/Makefile
441
565
plugins/stable/output/SDL/Makefile
566
plugins/stable/output/GL/Makefile
567
plugins/stable/output/bew/Makefile
568
plugins/stable/output/RTMP/Makefile
471
598
echo "=== Le Biniou v${BINIOU_VERSION} ==="
473
600
echo " * Build options:"
474
echo " Prefix: ${prefix}"
475
echo " Compiler flags: ${CFLAGS}"
601
echo " OS family: ${os_family}"
602
echo " Installation prefix: ${prefix}"
603
echo " Preprocessor flags: ${CPPFLAGS}"
604
echo " Compiler flags: ${CFLAGS}"
605
echo " Linker flags: ${LDFLAGS}"
606
echo " Libraries: ${LIBS}"
476
607
echo " Debug enabled: ${enable_debug}"
477
608
echo " Treat warnings as errors: ${enable_warnings}"
478
echo " OS family: ${os_family}"
610
echo " Core engine: ${enable_core}"
611
echo " Embedded pnglite: ${with_pnglite}"
612
if test "x${enable_fixed}" != "xno"; then
613
echo " Fixed video buffers: ${enable_fixed}"
615
echo -n " Webcam: ${enable_webcam}"
616
if test "x${enable_webcam}" != "xno"; then
617
echo " (capture at ${CAP_W}x${CAP_H})"
481
623
echo " * Input plugins:"
625
yn ${jack_present} "JACK Audio"
483
626
if test "x${os_family}" == "xlinux"; then
484
627
yn ${alsa_present} "ALSA"
485
628
yn ${pulseaudio_present} "PulseAudio"
494
637
echo " * Output plugins:"
496
639
yn ${caca_present} "libcaca"
497
640
yn ${enable_diskwriter} "Diskwriter"
498
641
yn ${enable_erlang} "Erlang port"
642
if test "x${enable_opengl}" = "xyes"; then
643
yn ${enable_opengl} "GL"
645
yn ${have_ffmpeg} "RTMP transport"
646
echo " (Default output plugin: "${DEFAULT_OUTPUT_PLUGIN}")"
501
echo " * Experimental plugins:"
502
yn ${enable_webcam} "Webcam"
649
echo " * Experimental features:"
650
yn ${enable_opengl} "OpenGL"
651
yn ${enable_target} "Biniou-TV target"
652
if test "x${have_ei}" = "xyes"; then
653
yn ${enable_bew} "Biniou Erlang Wrapper"