summaryrefslogtreecommitdiff
path: root/configure.ac blob: 9f2c0b20c6fba68f8603c2abb8a871c825061810
1dnl ==============================================================
2dnl Process this file with autoconf to produce a configure script.
3dnl ==============================================================
4
5dnl require autoconf 2.62 (AS_ECHO/AS_ECHO_N)
6AC_PREREQ([2.62])
7
8AC_INIT([FreeJ],[0.11.0],[freej@lists.dyne.org],[freej])
9AC_CONFIG_MACRO_DIR([m4])
10
11AC_CANONICAL_HOST
12
13dnl backwards compatibility for autoconf >= 2.64
14dnl PACKAGE_URL should be the fifth argument of AC_INIT
15m4_define([AC_PACKAGE_URL], [http://freej.dyne.org])
16AC_DEFINE(PACKAGE_URL, "AC_PACKAGE_URL", [Package URL])
17AC_SUBST(PACKAGE_URL, AC_PACKAGE_URL)
18
19dnl ==============================================================
20dnl Get the operating system and version number...
21dnl ==============================================================
22AC_MSG_CHECKING([for which platform we are compiling])
23case "$host_cpu" in
24 powerpc*)
25 have_ppc=yes
26 ;;
27 x86_64*)
28 have_x86_64=yes
29 ;;
30 i*86*)
31 have_x86_32=yes
32 ;;
33esac
34
35case "$host_os" in
36 *linux*)
37 AC_MSG_RESULT([Linux])
38 AC_DEFINE(HAVE_LINUX,1,[define if compiling for Linux])
39 DL_LIBS="-ldl"
40 have_linux=yes
41
42 if test x$have_ppc = xyes; then
43 AC_DEFINE(ARCH_PPC,1,[define if compiling for Linux/PPC])
44 AC_DEFINE(ARCH_POWERPC,1,[define if compiling for Linux/PPC])
45 dnl TODO(godog) what about ppc64?
46 AC_DEFINE(POWERPC_MODE_32BITS,1,[define if compiling for PPC])
47 AC_DEFINE(HAVE_ALTIVEC,1,[define if cpu supports Altivec instruction set])
48 AC_DEFINE(HAVE_ALTIVEC_H,1,[define if cpu supports Altivec instruction set])
49 AC_DEFINE(WORDS_BIGENDIAN,1,[define if compiling for Big Endian CPU])
50 AC_DEFINE(PA_BIG_ENDIAN,1,[define big endian arch for portaudio])
51dnl AC_DEFINE(SDL_BYTEORDER,SDL_BIG_ENDIAN,[define big endian arch for SDL])
52 fi
53
54 if test x$have_x86_64 = xyes; then
55 AC_DEFINE(ARCH_X86,1,[define if compiling for Linux/x86])
56 AC_DEFINE(HAVE_64BIT,1,[define if host has 64 bit])
57 fi
58
59 if test x$have_x86_32 = xyes; then
60 AC_DEFINE(ARCH_X86,1,[define if compiling for Linux/x86])
61 AC_DEFINE(PA_LITTLE_ENDIAN,1,[define little endian arch for portaudio])
62dnl AC_DEFINE(SDL_BYTEORDER,SDL_LIL_ENDIAN,[define little endian arch for SDL])
63 fi
64 ;;
65
66 *darwin*)
67 AC_MSG_RESULT([Darwin/OSX])
68 AC_DEFINE(HAVE_DARWIN,1,[define if compiling for Apple Darwin OSX])
69 have_darwin=yes
70 ;;
71
72 *freebsd*)
73 AC_MSG_RESULT([FreeBSD])
74 AC_DEFINE(HAVE_FREEBSD,1,[define if compiling for FreeBSD])
75 AC_DEFINE(HAVE_SYS_SOCKET_H,1,[define if compiling for FreeBSD])
76 GLOBAL_CFLAGS="$GLOBAL_CFLAGS -I/usr/local/include -L/usr/local/lib"
77 have_freebsd=yes
78 ;;
79
80 *)
81 AC_MSG_RESULT([$host_os?!])
82 AC_MSG_ERROR([[
83[!] Your system architecture is not supported by FreeJ
84[!] if you are interested in porting FreeJ to your architecture
85[!] you are very welcome to contact me <jaromil@dyne.org>
86]], 0)
87 ;;
88esac
89
90
91dnl ==============================================================
92dnl Setup for automake
93dnl ==============================================================
94
95AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects])
96m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
97
98AC_CONFIG_SRCDIR([src/freej.cpp])
99AC_CONFIG_HEADERS([config.h])
100
101dnl never run autotools and configure automatically
102dnl AM_MAINTAINER_MODE
103
104dnl Checks for programs.
105AC_PROG_CXX
106AC_PROG_AWK
107AC_PROG_CC
108AC_PROG_CPP
109AC_PROG_INSTALL
110AC_PROG_LN_S
111AC_PROG_MAKE_SET
112AM_PROG_AS
113dnl compatibility with older libtool
114m4_ifndef([LT_INIT], [AC_PROG_RANLIB])
115
116
117dnl Checks for header files.
118AC_PATH_X
119AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h memory.h stdint.h stdlib.h \
120 string.h strings.h sys/file.h sys/ioctl.h sys/time.h termios.h unistd.h])
121
122dnl Checks for typedefs, structures, and compiler characteristics.
123AC_HEADER_STDBOOL
124AC_C_INLINE
125AC_TYPE_INT16_T
126AC_TYPE_INT32_T
127AC_TYPE_INT64_T
128AC_TYPE_INT8_T
129AC_TYPE_SIZE_T
130AC_TYPE_UINT16_T
131AC_TYPE_UINT32_T
132AC_TYPE_UINT64_T
133AC_TYPE_UINT8_T
134
135dnl Checks for library functions.
136AC_FUNC_ERROR_AT_LINE
137AC_FUNC_FORK
138AC_FUNC_MALLOC
139AC_FUNC_MMAP
140AC_FUNC_REALLOC
141AC_CHECK_FUNCS([bzero floor gettimeofday memmove memset munmap rint select \
142 setenv strcasecmp strdup strerror strncasecmp strrchr strstr])
143
144dnl compatibility with older libtool
145m4_ifdef([LT_INIT],
146 [LT_INIT([disable-static dlopen])],
147 [AC_LIBTOOL_DLOPEN
148 AC_DISABLE_STATIC
149 AC_PROG_LIBTOOL])
150
151dnl versioning info for libtool
152FREEJ_CURRENT=0
153FREEJ_REVISION=0
154FREEJ_AGE=0
155FREEJ_VERSION_INFO="$FREEJ_CURRENT:$FREEJ_REVISION:$FREEJ_AGE"
156dnl Note this is the ABI version which is not the same as our actual
157dnl library version
158AC_SUBST(FREEJ_VERSION_INFO)
159
160
161dnl ==============================================================
162dnl check for swig and whether to enable bindings
163dnl ==============================================================
164AC_PROG_SWIG([1.3])
165SWIG_ENABLE_CXX
166
167if test -z "$SWIG_LIB"; then
168 have_swig=no
169
170 AC_MSG_WARN([No language bindings will be created])
171else
172 have_swig=yes
173
174 SWIG_COMMAND='$(SWIG) -c++ -O -Wall -I$(top_builddir) -I$(top_srcdir)/src/include -I$(top_builddir)/doc'
175 AC_SUBST(SWIG_COMMAND)
176 SWIG_IFACE='$(top_srcdir)/bindings/freej.i'
177 AC_SUBST(SWIG_IFACE)
178
179 ENABLE_SWIG_PYTHON
180 ENABLE_SWIG_RUBY
181 ENABLE_SWIG_JAVA
182 ENABLE_SWIG_PERL
183
184 if test x$enable_perl = xyes; then
185 AC_CHECK_FUNCS([strtoul])
186 AC_FUNC_STRTOD
187 fi
188fi
189
190AM_CONDITIONAL([BUILD_SWIG_PYTHON], [test x$enable_python = xyes])
191AM_CONDITIONAL([BUILD_SWIG_RUBY], [test x$enable_ruby = xyes])
192AM_CONDITIONAL([BUILD_SWIG_JAVA], [test x$enable_java = xyes])
193AM_CONDITIONAL([BUILD_SWIG_PERL], [test x$enable_perl = xyes])
194
195dnl swig not found but bindings requested is fatal
196if test x$have_swig = xno && {
197 test x$enable_python = xyes ||
198 test x$enable_java = xyes ||
199 test x$enable_ruby = xyes ||
200 test x$enable_perl = xyes
201 }; then
202 AC_MSG_ERROR([*** bindings requested but swig not found!])
203fi
204
205if test x$enable_python = xyes; then
206 AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen])
207 if test -z "$DOXYGEN"; then
208 AC_MSG_ERROR([*** Doxygen is required to build python docstrings.])
209 fi
210fi
211
212dnl ==============================================================
213dnl Add the local include path and some flags
214dnl ==============================================================
215dnl -freg-struct-return is to compile an host compatible with freeframe dso
216GLOBAL_CFLAGS="$GLOBAL_CFLAGS -pipe -D_REENTRANT -freg-struct-return -fPIC"
217if test x$have_darwin = xyes; then
218 dnl add the fink default path to find headers
219 GLOBAL_CFLAGS="$GLOBAL_CFLAGS -I/sw/include"
220fi
221
222dnl ==============================================================
223dnl Check for slang
224dnl ==============================================================
225PKG_CHECK_MODULES([SLANG], [slang], [have_slang=yes], [have_slang=no])
226if test x$have_slang = xno; then
227 SLANG_CFLAGS="-I/usr/include/slang"
228 SLANG_LIBS="-lslang"
229 FREEJ_SAVE_FLAGS
230 CFLAGS="$SLANG_CFLAGS"
231 CPPFLAGS="$SLANG_CFLAGS"
232 LDFLAGS=""
233 FREEJ_CHECK_LIB_HEADER([slang], [SLang_getkey], [slang.h],
234 [have_slang=yes], [have_slang=no])
235 FREEJ_RESTORE_FLAGS
236fi
237if test x$have_slang = xno; then
238 AC_MSG_ERROR([*** SLANG development files not found!])
239fi
240
241dnl Check for GD
242GD_LIBS=""
243FREEJ_CHECK_LIB_HEADER([gd], [gdImageCreateTrueColor], [gd.h],
244 [have_gd=yes], [have_gd=no])
245if test x$have_gd = xyes; then
246 GD_LIBS="-lgd"
247 AC_DEFINE(WITH_GD,1,[define if compiling with GD to support screenshot taking])
248 AC_SUBST([GD_LIBS])
249fi
250
251dnl ==============================================================
252dnl Check for SDL
253dnl ==============================================================
254PKG_CHECK_MODULES(SDL, sdl > 1.2, :,
255 AC_MSG_ERROR([*** SDL development files not found!]))
256
257
258dnl ==============================================================
259dnl Check OGG VORBIS THEORA
260dnl ==============================================================
261PKG_CHECK_MODULES(OGG, ogg >= 1.1, :,
262 AC_MSG_ERROR([*** Ogg >=1.1 development files not found!]))
263PKG_CHECK_MODULES(VORBIS, vorbis, :,
264 AC_MSG_ERROR([*** Vorbis development files not found!]))
265PKG_CHECK_MODULES(VORBISENC, vorbisenc, :,
266 AC_MSG_ERROR([*** Vorbisenc development files not found!]))
267PKG_CHECK_MODULES(THEORA, theora, :,
268 AC_MSG_ERROR([*** Theora development files not found!]))
269XIPH_CFLAGS="$OGG_CFLAGS $VORBIS_CFLAGS $VORBISENC_CFLAGS $THEORA_CFLAGS"
270XIPH_LIBS="$OGG_LIBS $VORBIS_LIBS $VORBISENC_LIBS $THEORA_LIBS"
271AC_SUBST([XIPH_CFLAGS])
272AC_SUBST([XIPH_LIBS])
273
274dnl TODO(shammash): heritage from conditional build, still used somewhere.
275AC_DEFINE(WITH_OGGTHEORA,1,[define if compiling with Ogg/Theora encoding])
276
277
278dnl ==============================================================
279dnl FFMPEG DYNAMIC
280dnl ==============================================================
281PKG_CHECK_MODULES(AVCODEC, libavcodec, :,
282 AC_MSG_ERROR([*** Libavcodec development files not found!]))
283PKG_CHECK_MODULES(AVFORMAT, libavformat, :,
284 AC_MSG_ERROR([*** Libavformat development files not found!]))
285PKG_CHECK_MODULES(AVUTIL, libavutil, :,
286 AC_MSG_ERROR([*** Libavutil development files not found!]))
287PKG_CHECK_MODULES(SWSCALE, libswscale, :,
288 AC_MSG_ERROR([*** Libswscale development files not found!]))
289FFMPEG_CFLAGS="$AVCODEC_CFLAGS $AVFORMAT_CFLAGS $AVUTIL_CFLAGS $SWSCALE_CFLAGS"
290FFMPEG_LIBS="$AVCODEC_LIBS $AVFORMAT_LIBS $AVUTIL_LIBS $SWSCALE_LIBS"
291AC_SUBST([FFMPEG_CFLAGS])
292AC_SUBST([FFMPEG_LIBS])
293
294dnl FFmpeg changed include path policy, let's check which one is in use.
295FREEJ_SAVE_FLAGS
296CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS"
297CFLAGS="$CFLAGS $FFMPEG_CFLAGS"
298AC_CHECK_HEADERS(libavcodec/avcodec.h ffmpeg/avcodec.h)
299AC_CHECK_HEADERS(libavformat/avformat.h ffmpeg/avformat.h)
300AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avutil.h)
301AC_CHECK_HEADERS(libswscale/swscale.h ffmpeg/swscale.h)
302FREEJ_RESTORE_FLAGS
303dnl Then in sources we have to include in the following way:
304dnl #ifdef HAVE_LIBAVCODEC_AVCODEC_H
305dnl # include <libavcodec/avcodec.h>
306dnl #elif defined(HAVE_FFMPEG_AVCODEC_H)
307dnl # include <ffmpeg/avcodec.h>
308dnl #else
309dnl # include <avcodec.h>
310dnl #endif
311
312dnl TODO(shammash): heritage from conditional build, still used somewhere.
313AC_DEFINE(WITH_FFMPEG,1, [define if compiling movie layer linking to ffmpeg libavcodec])
314AC_DEFINE(WITH_SWSCALE,1, [define if using new swscale library from ffmpeg])
315
316
317dnl ==============================================================
318dnl LIBLO
319dnl ==============================================================
320PKG_CHECK_MODULES([LIBLO], [liblo], [:],
321 AC_MSG_ERROR([*** Liblo development files not found!]))
322
323
324dnl ==============================================================
325dnl shout lib
326dnl ==============================================================
327PKG_CHECK_MODULES([SHOUT], [shout], [:],
328 AC_MSG_ERROR([*** Libshout development files not found!]))
329
330
331dnl ==============================================================
332dnl Font handling (text layer)
333dnl ==============================================================
334PKG_CHECK_MODULES(FT2, freetype2,
335 have_freetype2=yes, have_freetype2=no)
336PKG_CHECK_MODULES(FC, fontconfig,
337 have_fontconfig=yes, have_fontconfig=no)
338if test x$have_freetype2 = xyes && test x$have_fontconfig = xyes; then
339 have_textlayer=yes
340 AC_DEFINE(WITH_TEXTLAYER,1,[define if having fontconfig and freetype])
341fi
342
343
344dnl ==============================================================
345dnl Check X11 for xgrab
346dnl ==============================================================
347PKG_CHECK_MODULES(X11, x11, have_xgrab=yes, have_xgrab=no)
348if test x$have_xgrab = xyes; then
349 AC_DEFINE(WITH_XGRAB,1,[define if using xgrab layer])
350 AC_DEFINE(WITH_XSCREENSAVER,1,[define if using xscreensaver layer])
351fi
352
353
354dnl ==============================================================
355dnl ENABLE LIBFLASH
356dnl ==============================================================
357AC_ARG_ENABLE(flash,
358 AS_HELP_STRING([--enable-flash],[compile with Flash animation layer (yes)]),
359 [have_flash=$enableval],
360 [have_flash=yes])
361AC_MSG_CHECKING([flash - v3 animation only - layer])
362if test x$have_flash = xyes; then
363 AC_MSG_RESULT(yes)
364 AC_CHECK_FUNCS([sqrt])
365 AC_DEFINE(WITH_FLASH,1,[define if compiling flash layer])
366 FLASH_LIBS="\$(top_builddir)/lib/flash/libflash.la"
367 FLASH_CFLAGS="-I\$(top_srcdir)/lib/flash"
368else
369 AC_MSG_RESULT(no)
370fi
371AM_CONDITIONAL(BUILD_FLASH, [test x$have_flash = xyes])
372AC_SUBST(FLASH_LIBS)
373AC_SUBST(FLASH_CFLAGS)
374
375
376dnl ==============================================================
377dnl CHECK if there is CWIID
378dnl ==============================================================
379PKG_CHECK_MODULES(CWIID, cwiid, have_cwiid=yes, have_cwiid=no)
380if test x$have_cwiid = xno; then
381 FREEJ_CHECK_LIB_HEADER([cwiid], [cwiid_open], [cwiid.h],
382 [have_cwiid=yes], [have_cwiid=no])
383fi
384if test x$have_cwiid = xyes; then
385 CWIID_CFLAGS=""
386 CWIID_LIBS="-lcwiid"
387 AC_DEFINE(WITH_CWIID,1,[define if compiling cwiid WiiMote controller])
388fi
389
390
391dnl ==============================================================
392dnl CHECK if there is VIDEO4LINUX
393dnl ==============================================================
394AC_CHECK_HEADERS([linux/videodev.h], [have_videodev=yes], [have_videodev=no])
395AC_ARG_ENABLE(v4l,
396 AS_HELP_STRING([--enable-v4l],[compile with Video4Linux Layer (autodetect)]),
397 [enable_v4l=$enableval],
398 [enable_v4l=autodetect])
399
400if test x$have_videodev = xno && test x$enable_v4l = xyes; then
401 AC_MSG_ERROR([*** v4l enabled but header videodev.h not found!])
402fi
403
404if test x$have_videodev = xyes && {
405 test x$enable_v4l = xyes ||
406 test x$enable_v4l = xautodetect
407 }; then
408 AC_DEFINE(WITH_V4L,1,[define if compiling video4linux layer])
409fi
410
411dnl ==============================================================
412dnl compile with full warnings and debugging symbols
413dnl ==============================================================
414AC_ARG_ENABLE(debug,
415 AS_HELP_STRING([--enable-debug],[compile with debug symbols (no)]),
416 [enable_debug=$enableval],
417 [enable_debug=no])
418
419if test x$enable_debug = xyes; then
420 GLOBAL_CFLAGS="$GLOBAL_CFLAGS -Wall -g -ggdb"
421fi
422
423
424dnl ==============================================================================
425dnl CHECK to use profiling flags when compiling, for execution analysis with gprof
426dnl ==============================================================================
427AC_ARG_ENABLE(profiling,
428 AS_HELP_STRING([--enable-profiling],[compile using gprof flags for execution analysis (no)]),
429 [enable_profiling=$enableval],
430 [enable_profiling=no])
431
432if test x$enable_profiling = xyes; then
433 GLOBAL_CFLAGS="$GLOBAL_CFLAGS -pg"
434fi
435
436
437dnl ==============================================================
438dnl CHECK to use processor specific optimizations to compile
439dnl ==============================================================
440AC_ARG_ENABLE(cpuflags,
441 AS_HELP_STRING([--enable-cpuflags],[compile with advanced cpu instructions (yes)]),
442 [enable_cpuflags=$enableval],
443 [enable_cpuflags=yes])
444
445if test x$enable_cpuflags = xyes; then
446 if test x$have_linux = xyes; then
447 if grep "^flags.* mmx" /proc/cpuinfo > /dev/null; then
448 have_mmx=yes
449 AC_DEFINE(HAVE_MMX,1,[define if enabling MMX acceleration])
450 fi
451 if grep "^flags.* sse" /proc/cpuinfo > /dev/null; then
452 have_sse=yes
453 AC_DEFINE(HAVE_SSE,1,[define if enabling SSE acceleration])
454 fi
455 if grep "^flags.* sse2" /proc/cpuinfo > /dev/null; then
456 have_sse=yes
457 AC_DEFINE(HAVE_SSE2,1,[define if enabling SSE2 acceleration])
458 fi
459 if grep "^flags.* ssse3" /proc/cpuinfo > /dev/null; then
460 have_ssse3=yes
461 AC_DEFINE(HAVE_SSSE3,1,[define if enabling SSSE3 acceleration])
462 fi
463 fi
464 if test x$have_freebsd = xyes; then
465 if sysctl -n hw.instruction_sse; then
466 dnl XXX(godog) is this MMX or SSE?
467 have_mmx=yes
468 AC_DEFINE(HAVE_MMX,1,[define if enabling MMX acceleration])
469 fi
470 fi
471fi
472
473AC_ARG_ENABLE(lubrication,
474 AS_HELP_STRING([--enable-lubrication],[compile using processor lubricants (yes)]),
475 [enable_lubrication=$enableval],
476 [enable_lubrication=yes])
477
478dnl XXX(godog) integrate with AX_GCC_ARCHFLAG
479if test x$enable_lubrication = xyes; then
480 if test x$enable_profiling = xyes || test x$enable_debug = xyes; then
481 AC_MSG_WARN([cannot lubricate code if debug or profiling are enabled])
482 enable_lubrication=no
483 else
484 if test x$have_darwin = xyes; then
485 if test x$have_ppc = xyes; then
486 dnl use optimization flags for darwin
487 GLOBAL_CFLAGS="$GLOBAL_CFLAGS -O2 -mabi=altivec -maltivec -mpowerpc-gfxopt"
488 else
489 GLOBAL_CFLAGS="$GLOBAL_CFLAGS -O2 -mfpmath=sse -mtune=pentium4"
490 fi
491 dnl adding these provoke 'illegal instruction' errors in some
492 dnl ppc/gcc combinations: -mpowerpc-gfxopt -faltivec"
493 elif test x$have_ppc = xyes; then
494 GLOBAL_CFLAGS="$GLOBAL_CFLAGS -O2 -fomit-frame-pointer -ffast-math -mabi=altivec -maltivec -mpowerpc-gfxopt"
495 elif test x$have_x86_64 = xyes; then
496 dnl should complete this with all 64bit CPUs (AMD too)
497 if test x$have_ssse3 = xyes; then
498 dnl multiple core cpu
499 GLOBAL_CFLAGS="$GLOBAL_CFLAGS -O2 -mfpmath=sse -mtune=core2"
500 else
501 dnl single core 64bit cpu
502 GLOBAL_CFLAGS="$GLOBAL_CFLAGS -O2 -mfpmath=sse -mtune=nocona"
503 fi
504 else
505 dnl any other platform optimizations
506 AC_MSG_WARN([no special optimisation flags found for your cpu])
507 AC_MSG_WARN([please suggest some on our mailinglist if you know better!])
508 GLOBAL_CFLAGS="$GLOBAL_CFLAGS -O2"
509 fi
510 fi
511else
512 if test x$enable_profiling = xno && test x$enable_debug = xno; then
513 AC_MSG_NOTICE([enabling generic compiler optimizations])
514 GLOBAL_CFLAGS="$GLOBAL_CFLAGS -O2"
515 fi
516fi
517
518dnl ==============================================================
519dnl CHECK if we have aalib
520dnl ==============================================================
521FREEJ_CHECK_LIB_HEADER([aa], [aa_init], [aalib.h], [have_aa=yes], [have_aa=no])
522if test x$have_aa = xyes; then
523 AC_DEFINE(WITH_AALIB,1,[define if to compile aalib ascii screen])
524 AA_CFLAGS=""
525 AA_LIBS="-laa"
526fi
527AC_SUBST(AA_CFLAGS)
528AC_SUBST(AA_LIBS)
529
530
531
532dnl ==============================================================
533dnl CHECK TO USE OPENGL VIDEO OUTPUT
534dnl ==============================================================
535AC_ARG_ENABLE(opengl,
536 AS_HELP_STRING([--enable-opengl],[experimental opengl rendering (no)]),
537 [enable_opengl=$enableval],
538 [enable_opengl=no])
539
540if test x$enable_opengl = xyes; then
541 dnl note: checking for GLU only, this brings in also GL
542 PKG_CHECK_MODULES(GLU, glu,
543 have_glu=yes, have_glu=no)
544
545 dnl pkg-config failed, try headers
546 if test x$have_glu = xno; then
547 FREEJ_CHECK_LIB_HEADER([GLU], [gluNewQuadric], [GL/glu.h],
548 [have_glu=yes], [have_glu=no])
549 if test x$have_glu = xyes; then
550 GLU_LIBS="-lGL -lGLU"
551 GLU_CFLAGS=""
552 fi
553 fi
554
555 if test x$have_glu = xno; then
556 AC_MSG_ERROR([*** opengl requested but not found!])
557 else
558 AC_DEFINE(WITH_OPENGL,1,[define if using experimental opengl rendering])
559 fi
560fi
561
562
563dnl ==============================================================
564dnl Audio
565dnl ==============================================================
566PKG_CHECK_MODULES(ALSA, alsa,
567 AC_DEFINE(WITH_MIDI,1,[define if compiling midi controller])
568 have_midi=yes,
569 have_midi=no)
570
571dnl TODO(shammash): before this refactoring we were enabling jack
572dnl only if alsa was present, check inconsistencies in the code.
573PKG_CHECK_MODULES(JACK, jack, :,
574 AC_MSG_ERROR([*** Jack development files not found!]))
575
576PKG_CHECK_MODULES(FFTW, fftw3, :,
577 AC_MSG_ERROR([*** Fftw3 development files not found!]))
578
579PKG_CHECK_MODULES(SAMPLERATE, samplerate, :,
580 AC_MSG_ERROR([*** Samplerate development files not found!]))
581
582AC_DEFINE(WITH_AUDIO,1,[define if compiling audio system])
583
584## goom removed because gives compilation problems
585## replicated on Niels ubuntu 7.10
586#if test 1 = 0; then
587# enable_goom=yes
588# AM_PROG_LEX
589# AC_PROG_YACC
590# AC_CHECK_HEADERS([stddef.h libintl.h malloc.h])
591# AC_FUNC_ALLOCA
592# AC_CHECK_FUNCS([strtol])
593#
594# AC_DEFINE(WITH_GOOM,1,[define if goom is enabled])
595# GOOM_LIBS="\$(top_builddir)/lib/goom/libgoom2.a"
596# GOOM_CFLAGS="-I\$(top_srcdir)/lib/goom"
597# if test x$have_ppc = xyes; then
598# GOOM_PPC_FILES="ppc_zoom_ultimate.s ppc_drawings.s"
599# fi
600#else
601# enable_goom=no
602#fi
603#AC_SUBST(GOOM_LIBS)
604#AC_SUBST(GOOM_CFLAGS)
605#AC_SUBST(GOOM_PPC_FILES)
606
607enable_goom=no
608AM_CONDITIONAL([BUILD_GOOM], [test x$enable_goom = xyes])
609
610
611dnl ==============================================================
612dnl compile including the javascript interpreter
613dnl ==============================================================
614
615AC_MSG_NOTICE([checking if mozilla-js is ok])
616PKG_CHECK_MODULES([MOZJS_JS],
617 [mozilla-js >= 1.9],
618 [have_mozjs_js=yes], [have_mozjs_js=no])
619if test x$have_mozjs_js = xyes; then
620 FREEJ_SAVE_FLAGS
621 CFLAGS="$MOZJS_JS_CFLAGS"
622 CPPFLAGS="$MOZJS_JS_CFLAGS"
623 LDFLAGS="$MOZJS_JS_LIBS"
624 FREEJ_CHECK_LIB_HEADER([mozjs], [JS_NewContext], [jsapi.h],
625 [have_mozjs_js=yes], [have_mozjs_js=no])
626 FREEJ_RESTORE_FLAGS
627fi
628if test x$have_mozjs_js = xyes; then
629 AC_MSG_NOTICE([using mozilla-js])
630 MOZJS_CFLAGS="$MOZJS_JS_CFLAGS"
631 MOZJS_LIBS="$MOZJS_JS_LIBS"
632 have_mozjs=yes
633else
634 AC_MSG_NOTICE([NOT using mozilla-js])
635 have_mozjs=no
636fi
637
638if test x$have_mozjs = xno; then
639 AC_MSG_NOTICE([checking if mozilla-js && libxul-embedding-stable are ok])
640 dnl test if https://bugzilla.mozilla.org/show_bug.cgi?id=500645 has been closed
641 PKG_CHECK_MODULES([MOZJS_STABLE],
642 [mozilla-js >= 1.9 libxul-embedding-stable >= 1.9],
643 [have_mozjs_stable=yes], [have_mozjs_stable=no])
644 if test x$have_mozjs_stable = xyes; then
645 FREEJ_SAVE_FLAGS
646 CFLAGS="$MOZJS_STABLE_CFLAGS"
647 CPPFLAGS="$MOZJS_STABLE_CFLAGS"
648 LDFLAGS="$MOZJS_STABLE_LIBS"
649 FREEJ_CHECK_LIB_HEADER([mozjs], [JS_NewContext], [jsapi.h],
650 [have_mozjs_stable=yes], [have_mozjs_stable=no])
651 FREEJ_RESTORE_FLAGS
652 fi
653 if test x$have_mozjs_stable = xyes; then
654 AC_MSG_NOTICE([using mozilla-js && libxul-embedding-stable])
655 MOZJS_CFLAGS="$MOZJS_STABLE_CFLAGS"
656 MOZJS_LIBS="$MOZJS_STABLE_LIBS"
657 have_mozjs=yes
658 else
659 AC_MSG_NOTICE([NOT using mozilla-js && libxul-embedding-stable])
660 have_mozjs=no
661 fi
662fi
663
664if test x$have_mozjs = xno; then
665 dnl test if adding unstable is enough
666 AC_MSG_NOTICE([checking if mozilla-js && libxul-embedding-unstable are ok])
667 PKG_CHECK_MODULES([MOZJS_UNSTABLE],
668 [mozilla-js >= 1.9 libxul-embedding-unstable >= 1.9],
669 [have_mozjs_unstable=yes], [have_mozjs_unstable=no])
670 if test x$have_mozjs_unstable = xyes; then
671 FREEJ_SAVE_FLAGS
672 CFLAGS="$MOZJS_UNSTABLE_CFLAGS"
673 CPPFLAGS="$MOZJS_UNSTABLE_CFLAGS"
674 LDFLAGS="$MOZJS_UNSTABLE_LIBS"
675 FREEJ_CHECK_LIB_HEADER([mozjs], [JS_NewContext], [jsapi.h],
676 [have_mozjs_unstable=yes], [have_mozjs_unstable=no])
677 FREEJ_RESTORE_FLAGS
678 fi
679 if test x$have_mozjs_unstable = xyes; then
680 AC_MSG_NOTICE([using mozilla-js && libxul-embedding-unstable])
681 MOZJS_CFLAGS="$MOZJS_UNSTABLE_CFLAGS"
682 MOZJS_LIBS="$MOZJS_UNSTABLE_LIBS"
683 have_mozjs=yes
684 else
685 AC_MSG_NOTICE([NOT using mozilla-js && libxul-embedding-unstable])
686 have_mozjs=no
687 fi
688fi
689
690if test x$have_mozjs = xyes; then
691 AC_DEFINE(JS_THREADSAFE,1,[define if compiling with threadsafe libjs])
692 AC_MSG_CHECKING([if libmozjs is in linker search path])
693
694 FREEJ_SAVE_FLAGS
695 CFLAGS="$MOZJS_CFLAGS"
696 CPPFLAGS="$MOZJS_CFLAGS"
697 dnl strip -L<arg> from MOZJS_LIBS
698 LDFLAGS=`echo $MOZJS_LIBS | sed 's/-L \?[^ ]*//g'`
699 AC_RUN_IFELSE([
700#include <jsapi.h>
701int main() {
702 JSRuntime *jsr = JS_NewRuntime(8L * 1024L * 1024L);
703return 0;
704}],
705 [have_mozjs_linkable=yes], [have_mozjs_linkable=no],
706 [have_mozjs_linkable=no]) dnl action if cross-compiling
707 FREEJ_RESTORE_FLAGS
708
709 if test x$have_mozjs_linkable = xno; then
710 AC_MSG_RESULT([no, compiling static version])
711 have_mozjs=no
712 else
713 AC_MSG_RESULT([yes])
714 fi
715fi
716
717dnl this flag is supposed to be for users having problem with xulrunner
718dnl installed on the system and want to force a static linking with our shipped
719dnl xulrunner
720AC_ARG_ENABLE(static-mozjs,
721 AS_HELP_STRING([--enable-static-mozjs],[force use of shipped mozjs]),
722 [static_mozjs=$enableval],
723 [static_mozjs=no])
724if test x$have_mozjs = xno || test x$static_mozjs = xyes; then
725 AC_MSG_NOTICE([fallback to static mozjs])
726 MOZJS_CFLAGS="-I\$(top_srcdir)/lib/javascript -I\$(top_builddir)/lib/javascript"
727 dnl libs in top_srcdir instead of top_builddir because js is not under autotools
728 MOZJS_LIBS="\$(top_builddir)/lib/javascript/libmozjs.a"
729
730 dnl run lib/javascript/configure after freej's configure, building it static
731 dnl XXX config.cache can be shared between the two configures? is it safe?
732 AC_CONFIG_COMMANDS([lib/javascript/.xulrunner-subdir],
733 [
734 (cd lib/javascript &&
735 CXXFLAGS="$GLOBAL_CFLAGS $CXXFLAGS -fPIC" \
736 CFLAGS="$GLOBAL_CFLAGS $CFLAGS -fPIC" \
737 $ac_srcdir/configure --enable-static \
738 --enable-js-static-build --disable-jit) || exit $?
739 ])
740 have_mozjs=no
741fi
742
743if test x$enable_debug = xyes ; then
744 MOZJS_CFLAGS="$MOZJS_CFLAGS -DJS_GCMETER"
745fi
746
747# I don't think this is needed (shammash)
748#if test x$have_freebsd = xyes; then
749# MOZJS_CFLAGS="-I/usr/local/include -L/usr/local/lib -I../lib/javascript"
750# MOZJS_LIBS="-ljs"
751# AC_DEFINE(XP_UNIX,1,[Define use of UNIX types in javascript])
752#fi
753
754if test x$have_linux = xyes ; then
755 AC_DEFINE(XP_UNIX,1,[Define use of UNIX types in javascript])
756fi
757if test x$have_darwin = xyes ; then
758 AC_DEFINE(XP_MAC,1,[Define use of MAC types in javascript])
759fi
760
761AC_SUBST(MOZJS_CFLAGS)
762AC_SUBST(MOZJS_LIBS)
763
764AC_DEFINE(WITH_JAVASCRIPT,1,[Define if using libmozjs for spidermonkey javascript])
765
766AM_CONDITIONAL([BUILD_JAVASCRIPT], [test x$have_mozjs = xno])
767
768
769dnl ==============================================================
770dnl unicap lib
771dnl ==============================================================
772PKG_CHECK_MODULES(UNICAP, libunicap, have_unicap=yes, have_unicap=no)
773if test x$have_unicap = xyes; then
774 AC_DEFINE(WITH_UNICAP,1,[Define if to link libunicap for camera capture])
775fi
776
777dnl ==============================================================
778dnl opencv lib
779dnl ==============================================================
780PKG_CHECK_MODULES(OPENCV, opencv, have_opencv=yes, have_opencv=no)
781if test x$have_opencv = xyes; then
782 AC_DEFINE(WITH_OPENCV,1,[Define if to link opencv framework])
783fi
784
785
786dnl ==============================================================
787dnl SDL_gfx
788dnl ==============================================================
789PKG_CHECK_MODULES(SDLGFX, SDL_gfx, have_sdlgfx=yes, have_sdlgfx=no)
790if test x$have_sdlgfx = xno; then
791 SDLGFX_CFLAGS="$SDL_CFLAGS"
792 SDLGFX_LIBS="$SDL_LIBS -lSDL_gfx"
793 FREEJ_SAVE_FLAGS
794 CFLAGS="$SDLGFX_CFLAGS"
795 CPPFLAGS="$SDLGFX_CFLAGS"
796 LDFLAGS="$SDLGFX_LIBS"
797 FREEJ_CHECK_LIB_HEADER([SDL_gfx], [pixelColor], [SDL_gfxPrimitives.h],
798 [have_sdlgfx=yes], [have_sdlgfx=no])
799 FREEJ_RESTORE_FLAGS
800fi
801if test x$have_sdlgfx = xno; then
802 AC_MSG_NOTICE([Using freej version of SDLGFX])
803
804 AC_CHECK_FUNCS([pow])
805 SDLGFX_LIBS="\$(top_builddir)/lib/sdl_gfx/libsdl_gfx.la"
806 SDLGFX_CFLAGS="-I\$(top_srcdir)/lib/sdl_gfx"
807fi
808
809AM_CONDITIONAL([BUILD_SDLGFX], [test x$have_sdlgfx = xno])
810
811
812dnl ==============================================================
813dnl SDL_ttf
814dnl ==============================================================
815PKG_CHECK_MODULES([SDLTTF], [SDL_ttf], [have_sdlttf=yes], [have_sdlttf=no])
816if test x$have_sdlttf = xno; then
817 SDLTTF_CFLAGS="$SDL_CFLAGS"
818 SDLTTF_LIBS="$SDL_LIBS -lSDL_ttf"
819 FREEJ_SAVE_FLAGS
820 CFLAGS="$SDLTTF_CFLAGS"
821 CPPFLAGS="$SDLTTF_CFLAGS"
822 LDFLAGS="$SDLTTF_LIBS"
823 FREEJ_CHECK_LIB_HEADER([SDL_ttf], [TTF_Init], [SDL_ttf.h],
824 [have_sdlttf=yes], [have_sdlttf=no])
825 FREEJ_RESTORE_FLAGS
826fi
827if test x$have_sdlttf = xno; then
828 AC_MSG_NOTICE([Using freej version of SDLTTF])
829 SDLTTF_CFLAGS="-I\$(top_srcdir)/lib/sdl_ttf"
830 SDLTTF_LIBS="\$(top_builddir)/lib/sdl_ttf/libsdl_ttf.la"
831fi
832
833AM_CONDITIONAL([BUILD_SDLTTF], [test x$have_sdlttf = xno])
834
835
836dnl ==============================================================
837dnl SDL_image
838dnl ==============================================================
839PKG_CHECK_MODULES([SDLIMAGE], [SDL_image],
840 [have_sdlimage=yes],
841 [have_sdlimage=no])
842if test x$have_sdlimage = xno; then
843 SDLIMAGE_CFLAGS="$SDL_CFLAGS"
844 SDLIMAGE_LIBS="$SDL_LIBS -lSDL_image -ljpeg"
845 FREEJ_SAVE_FLAGS
846 CFLAGS="$SDLIMAGE_CFLAGS"
847 CPPFLAGS="$SDLIMAGE_CFLAGS"
848 LDFLAGS="$SDLIMAGE_LIBS"
849 FREEJ_CHECK_LIB_HEADER([SDL_image], [IMG_Load], [SDL_image.h],
850 [have_sdlimage=yes], [have_sdlimage=no])
851 FREEJ_RESTORE_FLAGS
852fi
853if test x$have_sdlimage = xno; then
854 FREEJ_CHECK_LIB_HEADER([jpeg], [jpeg_std_error], [jpeglib.h],
855 [have_libjpeg=yes], [have_libjpeg=no])
856 if test x$have_libjpeg = xno; then
857 AC_MSG_ERROR([*** Libjpeg development files are required to build static SDL_image])
858 fi
859 PKG_CHECK_MODULES(LIBPNG, libpng, have_libpng=yes, have_libpng=no)
860 if test x$have_libpng = xno; then
861 AC_MSG_ERROR([*** Libpng development files are required to build static SDL_image])
862 fi
863
864 SDLIMAGE_CFLAGS="-I\$(top_srcdir)/lib/sdl_image"
865 SDLIMAGE_LIBS="-lpng -ljpeg \$(top_builddir)/lib/sdl_image/libsdl_image.la"
866fi
867
868AM_CONDITIONAL([BUILD_SDLIMAGE], [test x$have_sdlimage = xno])
869
870
871dnl ==============================================================
872dnl frei0r plugins
873dnl ==============================================================
874#
875# frei0r should be supported in any case:
876# plugins will be detected runtime
877# frei0r.h header is redistributed (see LiViDO/frei0r spec.)
878# this is a normal behaviour for plugins
879# support should be compiled in even if plugins aren't present.
880# -jrml
881#
882#PKG_CHECK_MODULES(FREI0R, frei0r, have_frei0r=yes, have_frei0r=no)
883#if test x$have_frei0r = xyes; then
884# AC_DEFINE(WITH_FREI0R,1,[Define if using frei0r plugins])
885#fi
886AC_DEFINE(WITH_FREI0R,1,[Define as using frei0r plugins])
887
888
889dnl ==============================================================
890dnl freeframe plugins
891dnl ==============================================================
892#
893# freeframe should be supported in any case:
894# plugins will be detected runtime
895# freeframe.h header is redistributed
896# this is a normal behaviour for plugins
897# support should be compiled in even if plugins aren't present.
898# -xnt
899#
900AC_DEFINE(WITH_FREEFRAME,1,[Define as using freeframe plugins])
901
902dnl ==============================================================
903dnl Check Cairo 2d vector graphics library for VectorLayer
904dnl ==============================================================
905PKG_CHECK_MODULES(CAIRO, cairo, have_cairo=yes, have_cairo=no)
906if test x$have_cairo = xyes; then
907 AC_DEFINE(WITH_CAIRO,1,[define if using cairo vector library])
908fi
909
910
911
912dnl ==============================================================
913dnl link with memory debugging library dmalloc
914dnl ==============================================================
915AC_CHECK_HEADERS([dmalloc.h], [have_dmalloc=yes], [have_dmalloc=no])
916AC_ARG_WITH(dmalloc,
917 AS_HELP_STRING([--with-dmalloc],[use dmalloc, as in ftp://ftp.letters.com/src/dmalloc/dmalloc.tar.gz]),
918 [with_dmalloc=$withval],
919 [with_dmalloc=no])
920
921if test x$with_dmalloc = xyes; then
922 if test x$have_dmalloc = xyes; then
923 AC_DEFINE(WITH_DMALLOC,1,[Define if using the dmalloc debugging malloc package])
924 LIBS="$LIBS -ldmallocthcxx"
925 else
926 AC_MSG_ERROR([*** dmalloc requested but header not found!])
927 fi
928fi
929
930AC_PROG_PERL_MODULES([HTML::Template],
931 AM_CONDITIONAL(BUILD_JSAPIDOC, true),
932 AM_CONDITIONAL(BUILD_JSAPIDOC, false))
933
934dnl select CCVT CONVERSION TYPE
935CCVT_CONV="ccvt_c2.c"
936AC_SUBST(CCVT_CONV)
937
938CFLAGS="$GLOBAL_CFLAGS $CFLAGS"
939AC_SUBST(CFLAGS)
940
941CXXFLAGS="$GLOBAL_CFLAGS $CXXFLAGS"
942AC_SUBST(CXXFLAGS)
943
944dnl ==============================================================
945dnl freej specific flags, explanation:
946dnl STATIC_CFLAGS cflags regarding static libraries from lib/
947dnl CFLAGS ordinary cflags from shared libraries _plus static_cflags_
948dnl STATIC_LIBS libtool static libraries plus some optional ones
949dnl LIBS ordinary shared libraries used to link libfreej
950dnl ==============================================================
951FREEJ_STATIC_CFLAGS="-I\$(top_srcdir)/src/include \
952 -I\$(top_srcdir)/lib/ccvt \
953 -I\$(top_srcdir)/lib/slw \
954 \$(FLASH_CFLAGS) \
955 \$(GOOM_CFLAGS)"
956AC_SUBST(FREEJ_STATIC_CFLAGS)
957
958FREEJ_CFLAGS="\$(FREEJ_STATIC_CFLAGS) \
959 \$(AA_CFLAGS) \
960 \$(CWIID_CFLAGS) \
961 \$(FC_CFLAGS) \
962 \$(FFMPEG_CFLAGS) \
963 \$(FT2_CFLAGS) \
964 \$(GLU_CFLAGS) \
965 \$(LIBLO_CFLAGS) \
966 \$(MOZJS_CFLAGS) \
967 \$(OPENCV_CFLAGS) \
968 \$(SDL_CFLAGS) \
969 \$(SDLGFX_CFLAGS) \
970 \$(SDLIMAGE_CFLAGS) \
971 \$(SDLTTF_CFLAGS) \
972 \$(SHOUT_CFLAGS) \
973 \$(SLANG_CFLAGS) \
974 \$(UNICAP_CFLAGS) \
975 \$(CAIRO_CFLAGS) \
976 \$(XIPH_CFLAGS)"
977AC_SUBST(FREEJ_CFLAGS)
978
979FREEJ_STATIC_LIBS="\$(top_builddir)/lib/ccvt/libccvt.la \
980 \$(top_builddir)/lib/slw/libslw.la \
981 \$(FLASH_LIBS) \
982 \$(GOOM_LIBS)"
983AC_SUBST(FREEJ_STATIC_LIBS)
984
985FREEJ_LIBS="-lpthread -lm -lrt $DL_LIBS \
986 \$(AA_LIBS) \
987 \$(ALSA_LIBS) \
988 \$(BLUEZ_LIBS) \
989 \$(CWIID_LIBS) \
990 \$(FC_LIBS) \
991 \$(FFMPEG_LIBS) \
992 \$(FFTW_LIBS) \
993 \$(FT2_LIBS) \
994 \$(GLU_LIBS) \
995 \$(JACK_LIBS) \
996 \$(LIBLO_LIBS) \
997 \$(MOZJS_LIBS) \
998 \$(OPENCV_LIBS) \
999 \$(SAMPLERATE_LIBS) \
1000 \$(SDLGFX_LIBS) \
1001 \$(SDLIMAGE_LIBS) \
1002 \$(SDL_LIBS) \
1003 \$(SDLTTF_LIBS) \
1004 \$(SHOUT_LIBS) \
1005 \$(SLANG_LIBS) \
1006 \$(UNICAP_LIBS) \
1007 \$(X11_LIBS) \
1008 \$(CAIRO_LIBS) \
1009 \$(XIPH_LIBS) \
1010 \$(GD_LIBS)"
1011AC_SUBST(FREEJ_LIBS)
1012
1013dnl ###########################################################################
1014dnl ###### now about compile time paths
1015if test "x${prefix}" = "xNONE"; then
1016 prefix=${ac_default_prefix}
1017fi
1018PACKAGE_LIB_DIR='${prefix}/lib/freej'
1019AC_SUBST(PACKAGE_LIB_DIR)
1020PACKAGE_DATA_DIR='${prefix}/share/freej'
1021AC_SUBST(PACKAGE_DATA_DIR)
1022
1023dnl alphabetic order on dir/subdir, but Makefile sorts before everything
1024AC_CONFIG_FILES([
1025Makefile
1026freej.pc
1027bindings/Makefile
1028bindings/java/Makefile
1029bindings/perl/Makefile
1030bindings/python/Makefile
1031bindings/ruby/Makefile
1032doc/Makefile
1033doc/freej.dox
1034doc/scripting/Makefile
1035lib/Makefile
1036lib/ccvt/Makefile
1037lib/flash/Makefile
1038lib/sdl_gfx/Makefile
1039lib/sdl_image/Makefile
1040lib/sdl_ttf/Makefile
1041lib/slw/Makefile
1042lib/javascript/GNUmakefile
1043scripts/Makefile
1044src/Makefile
1045src/include/Makefile
1046tests/Makefile
1047])
1048AC_OUTPUT
1049
1050dnl function to print verbose configure options only if V=1 is passed to
1051dnl configure
1052AC_DEFUN([VRB],
1053 AS_IF([test x"$V" == x1], INFO([$1])))
1054
1055dnl autoconf < 2.63 compatibility
1056m4_ifndef([AS_VAR_APPEND],
1057 AC_DEFUN([AS_VAR_APPEND], $1=$$1$2))
1058
1059dnl convenience function so that INFO messages go to config.log and to stdout,
1060dnl useful when debugging user problems only config.log is needed
1061AC_DEFUN([INFO],
1062 AS_ECHO(["$1"]) >&AS_MESSAGE_LOG_FD
1063 AS_ECHO(["$1"]) >&AS_MESSAGE_FD)
1064
1065dnl as above, but no newline at the end
1066AC_DEFUN([INFO_N],
1067 AS_ECHO_N(["$1"]) >&AS_MESSAGE_LOG_FD
1068 AS_ECHO_N(["$1"]) >&AS_MESSAGE_FD)
1069
1070echo
1071echo
1072INFO([Compile $PACKAGE $VERSION for ${host}])
1073echo "configuration summary, pass V=1 to configure for verbose output"
1074
1075dnl mandatory libs, outputted only if verbose
1076VRB([= SDL])
1077VRB([ LIBS : $SDL_LIBS])
1078VRB([ CFLAGS : $SDL_CFLAGS])
1079
1080VRB([= ogg-theora (xiph.org)])
1081VRB([ LIBS : $XIPH_LIBS])
1082VRB([ CFLAGS: $XIPH_CFLAGS])
1083
1084VRB([= Jack])
1085VRB([ LIBS : $JACK_LIBS])
1086VRB([ CFLAGS: $JACK_CFLAGS])
1087
1088VRB([= Fftw / harmonics analysis])
1089VRB([ LIBS : $FFTW_LIBS])
1090VRB([ CFLAGS: $FFTW_CFLAGS])
1091
1092VRB([= Samplerate])
1093VRB([ LIBS : $SAMPLERATE_LIBS])
1094VRB([ CFLAGS: $SAMPLERATE_CFLAGS])
1095
1096VRB([= ffmpeg])
1097VRB([ CFLAGS: $FFMPEG_CFLAGS])
1098VRB([ LIBS : $FFMPEG_LIBS])
1099
1100VRB([= OSC controller (liblo)])
1101VRB([ LIBS : $LIBLO_LIBS])
1102VRB([ CFLAGS : $LIBLO_CFLAGS])
1103
1104VRB([= Shout library])
1105VRB([ LIBS : $SHOUT_LIBS])
1106VRB([ CFLAGS: $SHOUT_CFLAGS])
1107
1108dnl #### bindings
1109
1110enabled_bindings=""
1111disabled_bindings=""
1112
1113if test x$enable_python = xyes; then
1114AS_VAR_APPEND(enabled_bindings, " python")
1115VRB([= Python:])
1116VRB([ LIBS : $PYTHON_LDFLAGS])
1117VRB([ CFLAGS : $PYTHON_CPPFLAGS])
1118else
1119AS_VAR_APPEND(disabled_bindings, " python")
1120fi
1121
1122if test x$enable_ruby = xyes; then
1123AS_VAR_APPEND(enabled_bindings, " ruby")
1124VRB([= Ruby:])
1125VRB([ LIBS : $RUBY_LDFLAGS])
1126VRB([ CFLAGS : $RUBY_CPPFLAGS])
1127else
1128AS_VAR_APPEND(disabled_bindings, " ruby")
1129fi
1130
1131if test x$enable_java = xyes; then
1132AS_VAR_APPEND(enabled_bindings, " java")
1133VRB([= Java:])
1134VRB([ LIBS : $JAVA_LDFLAGS])
1135VRB([ CFLAGS : $JAVA_CFLAGS])
1136else
1137AS_VAR_APPEND(disabled_bindings, " java")
1138fi
1139
1140if test x$enable_perl = xyes; then
1141AS_VAR_APPEND(enabled_bindings, " perl")
1142VRB([= Perl:])
1143VRB([ LIBS : $PERL_LDFLAGS])
1144VRB([ CFLAGS : $PERL_CFLAGS])
1145else
1146AS_VAR_APPEND(disabled_bindings, " perl")
1147fi
1148
1149INFO([= Enabled language bindings : $enabled_bindings])
1150INFO([= Disabled language bindings : $disabled_bindings])
1151
1152
1153dnl #### shipped libraries, can be static or dynamic
1154
1155if test x$have_mozjs = xyes; then
1156INFO([= javascript interpreter (dynamic)])
1157else
1158INFO([= javascript interpreter (static)])
1159fi
1160VRB([ LIBS : $MOZJS_LIBS])
1161VRB([ CFLAGS: $MOZJS_CFLAGS])
1162
1163if test x$have_sdlgfx = xyes; then
1164INFO([= SDL_gfx (dynamic)])
1165else
1166INFO([= SDL_gfx (static)])
1167fi
1168VRB([ LIBS : $SDLGFX_LIBS])
1169VRB([ CFLAGS: $SDLGFX_CFLAGS])
1170
1171if test x$have_sdlttf = xyes; then
1172INFO([= SDL_ttf (dynamic)])
1173else
1174INFO([= SDL_ttf (static)])
1175fi
1176VRB([ LIBS : $SDLTTF_LIBS])
1177VRB([ CFLAGS: $SDLTTF_CFLAGS])
1178
1179if test x$have_sdlimage = xyes; then
1180INFO([= SDL_image (dynamic)])
1181else
1182INFO([= SDL_image (static)])
1183fi
1184VRB([ LIBS : $SDLIMAGE_LIBS])
1185VRB([ CFLAGS: $SDLIMAGE_CFLAGS])
1186
1187if test x$have_gd = xyes; then
1188INFO([= libGD (dynamic)])
1189VRB([ LIBS : $GD_LIBS])
1190fi
1191
1192dnl #### optional stuff
1193INFO_N([= AAlib : ])
1194if test x$have_aa = xyes; then
1195 INFO(yes)
1196VRB([ AA LIBS : $AA_LIBS])
1197else
1198 INFO(no)
1199fi
1200
1201INFO_N([= OpenGL : ])
1202if test x$enable_opengl = xyes; then
1203 INFO(yes)
1204VRB([ GLU LIBS : $GLU_LIBS])
1205VRB([ GLU CFLAGS : $GLU_CFLAGS])
1206else
1207 INFO(no)
1208fi
1209
1210INFO_N([= unicap library : ])
1211if test x$have_unicap = xyes; then
1212 INFO(yes)
1213VRB([ LIBS : $UNICAP_LIBS])
1214VRB([ CFLAGS: $UNICAP_CFLAGS])
1215else
1216 INFO(no)
1217fi
1218
1219
1220dnl #### layers
1221
1222INFO_N([= vector layer : ])
1223if test x$have_cairo = xyes; then
1224 INFO(yes)
1225VRB([= cairo])
1226VRB([ LIBS : $CAIRO_LIBS])
1227VRB([ CFLAGS: $CAIRO_CFLAGS])
1228else
1229 INFO(no)
1230fi
1231
1232
1233INFO_N([= text layer : ])
1234if test x$have_textlayer = xyes; then
1235 INFO(yes)
1236VRB([= freetype2])
1237VRB([ LIBS : $FT2_LIBS])
1238VRB([ CFLAGS: $FT2_CFLAGS])
1239VRB([= fontconfig])
1240VRB([ LIBS : $FC_LIBS])
1241VRB([ CFLAGS: $FC_CFLAGS])
1242else
1243 INFO(no)
1244fi
1245
1246INFO_N([= xgrab layer : ])
1247if test x$have_xgrab = xyes; then
1248 INFO(yes)
1249else
1250 INFO(no)
1251fi
1252
1253INFO_N([= Flash layer : ])
1254if test x$have_flash = xyes; then
1255 INFO([yes (v3 animations only)])
1256VRB([ LIBS : $FLASH_LIBS (static)])
1257else
1258 INFO(no)
1259fi
1260
1261INFO_N([= goom layer : ])
1262if test x$enable_goom = xyes; then
1263 INFO(yes)
1264else
1265 INFO(no)
1266fi
1267
1268INFO_N([= OpenCV cam layer : ])
1269if test x$have_opencv = xyes; then
1270 INFO(yes)
1271else
1272 INFO(no)
1273fi
1274
1275
1276dnl #### controllers
1277
1278INFO_N([= ALSA / MidiController : ])
1279if test x$have_midi = xyes; then
1280 INFO(yes)
1281VRB([ LIBS : $ALSA_LIBS])
1282VRB([ CFLAGS: $ALSA_CFLAGS])
1283else
1284 INFO(no)
1285fi
1286
1287INFO_N([= WiiMote controller (cwiid) : ])
1288if test x$have_cwiid = xyes; then
1289 INFO(yes)
1290VRB([ LIBS : $CWIID_LIBS])
1291VRB([ CFLAGS : $CWIID_CFLAGS])
1292else
1293 INFO(no)
1294fi
1295
1296
1297dnl #### misc stuff
1298
1299INFO_N([= Building binary with support for machine specific advanced instructions : ])
1300if test x$enable_cpuflags = xyes; then
1301 INFO(yes)
1302else
1303 INFO(no)
1304fi
1305
1306INFO_N([= Building machine specific lubricated binary : ])
1307if test x$enable_lubrication = xyes; then
1308 INFO(yes)
1309else
1310 INFO(no)
1311fi
1312
1313INFO_N([= Compiling with debugging symbols : ])
1314if test x$enable_debug = xyes; then
1315 INFO(yes)
1316else
1317 INFO(no)
1318fi
1319
1320INFO_N([= Including support for the GNU Profiler : ])
1321if test x$enable_profiling = xyes; then
1322 INFO(yes)
1323else
1324 INFO(no)
1325fi
1326
1327
1328INFO([= COMPILER FLAGS : $CFLAGS])
1329INFO([= LINKER FLAGS : $LDFLAGS])
1330INFO([= INSTALL PREFIX : $prefix])
1331echo "============================== now type make, may the source be with you!"
1332echo
1333
1334# vim:et:ts=3:sw=3
1335