~ubuntu-branches/ubuntu/utopic/lebiniou/utopic

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Package Import Robot
  • Author(s): Olivier Girondel
  • Date: 2012-04-22 22:07:40 UTC
  • mfrom: (6.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20120422220740-xncgwhc3g71nopnu
Tags: 3.18-1
* New upstream release 3.18.
* Support older libswscale.
* Add missing Build-Depends: libfreetype6-dev, libasound2-dev,
  libpulse-dev. (Closes: #669437)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
AC_INIT([lebiniou],[3.13],[olivier@biniou.info])
 
1
AC_INIT([lebiniou],[3.18],[olivier@biniou.info])
2
2
AC_PREREQ([2.68])
3
3
AC_CONFIG_SRCDIR([src/main.c])
4
4
AC_CONFIG_AUX_DIR([build-aux])
10
10
dnl Versioning
11
11
dnl ------------------------------------------------------------------
12
12
BINIOU_MAJOR=3
13
 
BINIOU_MINOR=13
14
 
dnl BINIOU_PATCH_LEVEL=0
 
13
BINIOU_MINOR=18
 
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)
17
18
 
18
19
dnl Prelude
19
 
CFLAGS="$CFLAGS -O3"
20
20
LDFLAGS="$LDFLAGS -rdynamic"
21
21
 
22
22
dnl Checks for programs
25
25
CFLAGS="$OLD_FLAGS"
26
26
AM_PROG_CC_C_O
27
27
AC_PROG_CXX
 
28
AC_ERLANG_PATH_ERLC
28
29
 
29
30
m4_undefine([AC_PROG_F77])
30
31
m4_defun([AC_PROG_F77],[])
40
41
PLUGIN_CFLAGS="$PLUGIN_CFLAGS -I../../../../../src"
41
42
 
42
43
if test "x${COMPILER}" = "xgcc"; then
43
 
        PLUGIN_LDFLAGS="${PLUGIN_LDFLAGS} -module -export-dynamic"
 
44
        PLUGIN_LDFLAGS="${PLUGIN_LDFLAGS} -export-dynamic"
44
45
fi
45
46
AC_SUBST([PLUGIN_CFLAGS])
46
47
AC_SUBST([PLUGIN_LDFLAGS])
47
48
 
48
49
 
49
50
# Checks for libraries
 
51
 
 
52
# erl_interface
 
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])
 
56
fi
 
57
 
50
58
# glib-2.0
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`"
61
69
 
 
70
# freetype-2
 
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`"
 
73
 
62
74
# zlib - we assume it's installed on most systems
63
75
LIBS="${GLIB_LIBS} ${FFTW3_LIBS} ${XML2_LIBS} -lz -lm"
64
76
 
 
77
# OpenGL / GLU
 
78
dnl have_opengl=no
 
79
PKG_CHECK_MODULES([GLU],[glu],[have_opengl="yes"],[have_opengl="no"])
 
80
dnl OpenGL - remove when it becomes official
 
81
have_opengl=no
 
82
AC_ARG_ENABLE([opengl],
 
83
        AS_HELP_STRING([--enable-opengl],[enable OpenGL support [default=no]]),,
 
84
        [enable_opengl="no"])
 
85
AM_CONDITIONAL([EXTRA_OPENGL], [test "x${enable_opengl}" == "xyes"])
 
86
 
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])
86
108
 
 
109
 
 
110
dnl Compile the core engine
 
111
AC_ARG_ENABLE([core],
 
112
        AS_HELP_STRING([--enable-core],[build the core engine [default=yes]]),,
 
113
        enable_core="yes")
 
114
AM_CONDITIONAL([WITH_CORE], [test "x${enable_core}" = "xyes"])
 
115
 
87
116
dnl Check for Alsa
88
117
alsa_present="no"
89
118
AC_ARG_ENABLE([alsa],
98
127
fi
99
128
 
100
129
 
 
130
dnl Check for JACK Audio
 
131
jack_present="no"
 
132
AC_ARG_ENABLE([jackaudio],
 
133
        AS_HELP_STRING([--enable-jack],[build the JACK Audio input plugin [default=yes]]),,
 
134
        enable_jack="yes")
 
135
if test "x${enable_jack}" = "xyes"; then
 
136
   PKG_CHECK_MODULES([JACK], jack, jack_present=yes, jack_present=no)
 
137
fi
 
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"
 
142
fi
 
143
 
 
144
 
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)
108
152
fi
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"
163
207
fi
164
208
 
 
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],
 
213
        [enable_fixed="no"])
 
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"
 
218
fi
 
219
 
 
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"])
 
225
CAP_W=320
 
226
CAP_H=240
 
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"
 
231
fi
165
232
 
166
233
dnl Check for getopt / getopt_long
167
234
dnl XXX completely review this -- only needed for the main binary --oliv3
213
280
sys/soundcard.h
214
281
])
215
282
 
216
 
dnl linux/videodev2.h \
217
 
 
218
283
dnl FIXME have_cexp=yes by default ?! --oliv3
219
284
have_cexp=yes
220
285
AC_CHECK_LIB([m],[cexp],[AC_DEFINE([HAVE_CEXP],[1],[libm includes cexp])], [have_cexp=no])
222
287
 
223
288
 
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
226
292
 
 
293
dnl temp for OpenGL
 
294
if test "x${enable_opengl}" = "xyes"; then
 
295
   CPPFLAGS="$CPPFLAGS -DWITH_GL"
 
296
   DEFAULT_OUTPUT_PLUGIN=GL
 
297
   OUTPUT_PLUGINS+=", GL"
 
298
fi
227
299
 
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)
236
308
 
237
309
 
 
310
dnl ffmpeg/RTMP
 
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"
 
315
fi
 
316
 
238
317
dnl Video4Linux2
239
318
AC_CHECK_HEADERS(linux/videodev2.h, have_v4l2=yes)
240
319
 
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])
273
353
AC_SUBST(LIBS)
274
354
 
275
355
dnl ------------------------------------------------------------------
282
362
        enable_debug="no")
283
363
if test "x${enable_debug}" = "xyes"; then
284
364
        CPPFLAGS="$CPPFLAGS -DDEBUG"
285
 
        CFLAGS="$CFLAGS -g"
 
365
        CFLAGS="$CFLAGS -g -O0"
286
366
else
287
367
        CPPFLAGS="$CPPFLAGS -DNDEBUG"
288
 
        CFLAGS="$CFLAGS -fomit-frame-pointer"
 
368
        CFLAGS="$CFLAGS -fomit-frame-pointer -O3"
289
369
fi
290
370
 
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"
297
377
fi
298
378
 
 
379
dnl Use embedded pnglite
 
380
AC_ARG_WITH([pnglite],
 
381
            [AS_HELP_STRING([--with-pnglite],
 
382
              [Use embedded pnglite library])],
 
383
            [],
 
384
            [with_pnglite=no])
 
385
AM_CONDITIONAL([WITH_PNGLITE], [test "x${with_pnglite}" != "xno"])
 
386
if test "x${with_pnglite}" == "xno"; then
 
387
   LIBS="$LIBS -lpnglite"
 
388
fi
 
389
 
299
390
dnl ------------------------------------------------------------------
300
391
dnl Plugin-specific stuff
301
392
dnl ------------------------------------------------------------------
308
399
fi
309
400
 
310
401
AC_ARG_ENABLE([erlang],
311
 
        AS_HELP_STRING([--enable-erlang],[compile the Erlang output plugin (needs OpenGL development libs) [default=yes]]),,
312
 
        enable_erlang="yes")
 
402
        AS_HELP_STRING([--enable-erlang],[compile the Erlang output plugin (needs OpenGL development libs) [default=no]]),,
 
403
        enable_erlang="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"
316
407
fi
317
408
 
 
409
if test "x${have_ei}" = "xyes"; then
 
410
   AC_ARG_ENABLE([bew],
 
411
        AS_HELP_STRING([--enable-bew],[compile the Biniou Erlang wrapper [default=no]]),,
 
412
        enable_bew="no")
 
413
   if test "x${enable_bew}" = "xyes"; then
 
414
      CPPFLAGS="$CPPFLAGS -DWITH_BEW"
 
415
      OUTPUT_PLUGINS+=", bew"
 
416
   fi
 
417
fi
 
418
AM_CONDITIONAL([EXTRA_BEW], [test "x${enable_bew}" == "xyes"])
 
419
 
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]]),,
321
 
                enable_webcam="yes")
 
422
        AS_HELP_STRING([--enable-webcam],[compile the Webcam plugin (Linux only) [default=yes]]),[enable_webcam=$enableval],
 
423
        [enable_webcam="yes"])
322
424
fi
323
425
AM_CONDITIONAL([EXTRA_WEBCAM], [test "x${enable_webcam}" == "xyes"])
 
426
if test "x${enable_webcam}" = "xyes"; then
 
427
   CPPFLAGS="$CPPFLAGS -DWITH_WEBCAM"
 
428
fi
 
429
 
 
430
dnl enable_target=no
 
431
AC_ARG_ENABLE([target],
 
432
        AS_HELP_STRING([--enable-target],[Display a target when no plugins were run [default=yes]]),
 
433
        enable_target="no",
 
434
        enable_target="yes")
 
435
if test "x${enable_target}" = "xyes"; then
 
436
   CPPFLAGS="$CPPFLAGS -DFEAT_TARGET"
 
437
fi
324
438
 
325
439
dnl ------------------------------------------------------------------
326
440
dnl Output files
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
350
465
 
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
 
553
 
 
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
437
561
 
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
442
569
 
443
570
])
444
571
 
471
598
echo "=== Le Biniou v${BINIOU_VERSION} ==="
472
599
echo
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}"
 
609
echo
 
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}"
 
614
fi
 
615
echo -n "        Webcam:                     ${enable_webcam}"
 
616
if test "x${enable_webcam}" != "xno"; then
 
617
   echo " (capture at ${CAP_W}x${CAP_H})"
 
618
else
 
619
   echo
 
620
fi
479
621
 
480
622
echo
481
623
echo " * Input plugins:"
482
624
yn yes "OSS"
 
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"
492
635
 
493
636
echo
494
637
echo " * Output plugins:"
495
 
        yn ${have_sdl} "SDL"
 
638
yn ${have_sdl} "SDL"
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"
 
644
fi
 
645
yn ${have_ffmpeg} "RTMP transport"
 
646
echo "   (Default output plugin: "${DEFAULT_OUTPUT_PLUGIN}")"
499
647
 
500
648
echo
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"
 
654
fi
503
655
echo