1 AC_INIT(Cinelerra, 1.2.0)
5 # Test for minimal version of autoconf
9 AM_CONFIG_HEADER(config.h)
10 AM_GNU_GETTEXT([external])
11 AM_GNU_GETTEXT_VERSION(0.12.1)
21 # hack for libtool 1.5 -- this is ugly and probably wrong, but works
22 if test `libtool --version | grep ltmain.sh | cut -b 25-27` = "1.5"; then
24 LTCXX_FLAGS="--tag=CXX"
30 # hack for using nasm for .S files
31 CCAS="\$(top_srcdir)/admin/nasm"
35 dnl Check for Video4Linux2
36 AH_TEMPLATE(HAVE_VIDEO4LINUX2, [Define to 1 if Video4Linux2 is available.])
37 AC_CHECK_HEADER([linux/videodev2.h],
38 [AC_CHECK_MEMBER(struct v4l2_buffer.index, [AC_DEFINE(HAVE_VIDEO4LINUX2)], [],
39 [#include <linux/time.h>])],
40 [],[#include <linux/time.h>] )
42 ############## SPECIAL DIRECTORIES
43 AC_ARG_WITH(plugindir,
44 AC_HELP_STRING([--with-plugindir], [sets the directory where the plugins should be installed]),
45 [ plugindir=$withval ],
46 [ plugindir="\${exec_prefix}/lib/cinelerra" ])
50 AC_HELP_STRING([--with-fontsdir], [sets the directory where the fonts should be installed]),
51 [ fontsdir=$withval ],
52 [ fontsdir="\${plugindir}/fonts" ])
54 ############## END OF SPECIAL DIRECTORIES
57 LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
58 AC_CHECK_HEADERS(X11/Xlib.h)
59 AC_CHECK_LIB(X11, XOpenDisplay, ,[
60 echo "Xlib-dev was not found. In order to build Cinelerra,"
61 echo "xlib-dev must be installed. Please install xlib-dev and"
62 echo "run configure again."
65 ############## END XLIB
67 ############## MISC LIBRARIES
68 AC_CHECK_HEADERS(uuid/uuid.h)
69 AC_CHECK_LIB(uuid, uuid_clear, ,[AC_MSG_WARN([libuuid not found])
70 NOT_FOUND="$NOT_FOUND libuuid"])
73 ############## END OF MISC LIBRARIES
75 LARGEFILE_CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
76 CFLAGS="-D_REENTRANT -DHAVE_LIBXXF86VM $LARGEFILE_CFLAGS $CFLAGS"
77 CXXFLAGS="-D_REENTRANT -DHAVE_LIBXXF86VM $LARGEFILE_CFLAGS $CXXFLAGS"
80 AC_CHECK_HEADERS(a52dec/a52.h)
81 AC_CHECK_LIB(a52, a52_init, true ,[AC_MSG_WARN([a52dec not found])
82 NOT_FOUND="$NOT_FOUND a52dec"])
86 # Just test to see if we have lame installed.
87 AC_CHECK_HEADERS(lame/lame.h)
88 #AC_CHECK_LIB(mp3lame, lame_init, ,[AC_MSG_WARN([libmp3lame not found])
89 # NOT_FOUND="$NOT_FOUND libmp3lame"])
92 ############## LIBSNDFILE
93 # Use the provided libsndfile, which will be renamed to libsndfilehv
94 AC_CONFIG_SUBDIRS(libsndfile)
96 ############## LIBAVCODEC
97 AC_CHECK_HEADERS(ffmpeg/avcodec.h)
98 AC_CHECK_LIB(avcodec, avcodec_init, ,[AC_MSG_WARN([libavcodec not found])
99 NOT_FOUND="$NOT_FOUND libavcodec"])
102 ############## LIBFAAD
103 AC_CHECK_HEADERS(faad.h)
104 AC_CHECK_LIB(faad, faacDecInit, ,[AC_MSG_WARN([libfaad not found])
105 NOT_FOUND="$NOT_FOUND libfaad,2"])
108 ############## LIBXVIDCORE
109 AC_CHECK_HEADERS(xvid.h)
110 AC_CHECK_LIB(xvidcore, xvid_global, ,[AC_MSG_WARN([libxvidcore not found])
111 NOT_FOUND="$NOT_FOUND libxvidcore"])
114 ############## FIREWIRE
115 # firewire settings are propagated through FIREWIRE_CFLAGS and FIREWIRE_LDFLAGS
116 AC_ARG_ENABLE(firewire,
117 AC_HELP_STRING([--disable-firewire], [disable support for firewire (default=enabled)]),
118 [ enable_firewire=$enableval ],
119 [ enable_firewire=yes ])
121 if test "x$enable_firewire" = "xyes"; then
122 AC_CHECK_LIB(raw1394, raw1394_new_handle, ,[AC_MSG_WARN([libraw1394 not found])
123 NOT_FOUND="$NOT_FOUND libraw1394"
126 AC_CHECK_LIB(avc1394, avc1394_send_command, ,[AC_MSG_WARN([libavc1394 not found])
127 NOT_FOUND="$NOT_FOUND libavc1394"
130 AC_CHECK_LIB(rom1394, rom1394_get_bus_id, ,[AC_MSG_WARN([librom1394 not found])
131 NOT_FOUND="$NOT_FOUND librom1394"
134 if test "$FIREWIRE" = "no"; then
138 FIREWIRE_CFLAGS="-DHAVE_FIREWIRE"
139 # FIREWIRE_LDFLAGS="-lraw1394 -lavc1394 -lrom1394"
142 AC_SUBST(FIREWIRE_CFLAGS)
143 AC_SUBST(FIREWIRE_LDFLAGS)
144 ############## END OF FIREWIRE
146 ############## AVIFILE SUPPORT
147 dnl if test "x$enable_avifile" = "xyes"; then
148 dnl AM_PATH_AVIFILE(0.7.0)
149 dnl if test "x$HAVE_AVIFILE" = "xyes"; then
150 dnl AVIFILE_CXXFLAGS="-DUSE_AVIFILE $AVIFILE_CXXFLAGS"
153 dnl AC_ARG_ENABLE(avifile, [ --enable-avifile enable support for avifile [default=no]])
154 ############## END OF AVIFILE SUPPORT
156 ############# CSS SUPPORT IN LIBMPEG3
157 if test "x$enable_css" = "xyes"; then
158 CSS_CFLAGS="-DHAVE_CSS"
162 AC_HELP_STRING([--disable-css], [disable support for css in libmpeg3 (default=enabled)]),,
163 [ enable_css=$enableval ],
165 ############## END OF CSS SUPPORT IN LIBMPEG3
169 # the sound options are propagated by SOUND_CFLAGS and SOUND_LDFLAGS
171 AC_HELP_STRING([--disable-oss], [disable support for oss (default=enabled)]))
173 AC_HELP_STRING([--enable-alsa], [enable support for alsa (default=autodetect)]),
174 [ enable_alsa=$enableval ],
175 [ enable_alsa=default ])
177 AC_HELP_STRING([--disable-esound], [disable support for esound (default=enabled)]))
179 if test "x$enable_oss" = "xyes" || test "x$enable_oss" = "x"; then
180 SOUND_CFLAGS="-DHAVE_OSS $SOUND_CFLAGS"
182 if test "x$enable_alsa" = "xdefault" || test "x$enable_alsa" = "xyes"; then
184 [ SOUND_CFLAGS="$ALSA_CFLAGS -DHAVE_ALSA $SOUND_CFLAGS"
185 SOUND_LDFLAGS="$ALSA_LIBS $SOUND_LDFLAGS" ],
186 [ if test "x$enable_alsa" = "xyes"; then
187 AC_MSG_WARN([alsa library >= 0.9.0 not found])
188 NOT_FOUND="$NOT_FOUND alsa,library,>=,0.9.0"
192 if test "x$enable_esd" = "xyes" || test "x$enable_esd" = "x"; then
194 SOUND_CFLAGS="$ESD_CFLAGS -DHAVE_ESOUND $SOUND_CFLAGS"
195 SOUND_LDFLAGS="$ESD_LIBS $SOUND_LDFLAGS"
197 AC_SUBST(SOUND_CFLAGS)
198 AC_SUBST(SOUND_LDFLAGS)
199 ############### END OF SOUND
201 # MPEG2ENC declarations
207 ############## MMX / 3DNOW
210 AC_HELP_STRING([--enable-x86], [enables x86 specific features autodetection in libmpeg3 and mpeg2enc (default is disabled)]),
211 [ enable_x86=$enableval ],
214 AC_HELP_STRING([--enable-mmx], [enables support for mmx (default is disabled)]),
215 [ enable_mmx=$enableval ],
218 AC_HELP_STRING([--enable-3dnow], [enables support for 3dnow (default is disabled)]),
219 [ enable_3dnow=$enableval ],
221 if test "x$enable_x86" = "xyes"; then
222 CPU_CFLAGS="-DX86_CPU $CPU_CFLAGS"
226 if test "x$enable_mmx" = "xyes"; then
227 CPU_CFLAGS="-DHAVE_MMX -DMMX -DUSE_MMX $CPU_CFLAGS" # -D_MMX_ doesn't work
230 AM_CONDITIONAL(USEMMX, test "x$enable_mmx" = "xyes")
232 if test "x$enable_3dnow" = "xyes"; then
233 CPU_CFLAGS="-DHAVE_3Dnow $CPU_CFLAGS" # -DUSE_3DNOW --> don't use, not compiling
235 AM_CONDITIONAL(USE3DNOW, test "x$enable_3dnow" = "xyes")
236 AC_SUBST(LIBDECORE_LIBADD)
238 ############## END OF MMX / 3DNOW
240 ############## FFMPEG
241 dnl AM_CONDITIONAL(FFMPEG_AC3, true)
242 dnl AM_CONDITIONAL(FFMPEG_A52BIN, false)
243 dnl AM_CONDITIONAL(FFMPEG_MP3LAME, true)
244 dnl AM_CONDITIONAL(FFMPEG_VORBIS, true)
245 dnl AM_CONDITIONAL(FFMPEG_HAVE_MLIB, false)
246 dnl AM_CONDITIONAL(FFMPEG_TARGET_ARCH_ARMV4L, false)
247 dnl AM_CONDITIONAL(FFMPEG_TARGET_ARCH_ALPHA, false)
248 dnl AM_CONDITIONAL(FFMPEG_TARGET_ARCH_POWERPC, false)
249 dnl AM_CONDITIONAL(FFMPEG_TARGET_MMI, false)
250 dnl AM_CONDITIONAL(FFMPEG_TARGET_ALTIVEC, false)
252 LIBAVCODEC_CFLAGS=-I/usr/include/ffmpeg
253 LIBAVCODEC_LIBS=-lavcodec
254 AC_SUBST(LIBAVCODEC_CFLAGS)
255 AC_SUBST(LIBAVCODEC_LIBS)
257 ############## END OF FFMPEG
259 ############## .png TO .o CONVERSION
261 AC_CHECK_TOOL(OBJCOPY, objcopy)
262 if test "x$OBJCOPY" = "x"; then
263 AC_MSG_ERROR("objcopy from GNU binutils >= 2.11.90 not found")
265 AC_CHECK_TOOL(OBJDUMP, objdump)
266 dnl extract target and architecture if objdump was found
267 if test "x$OBJDUMP" = "x"; then :; else
268 AC_MSG_CHECKING(for object target)
269 octarget=`$OBJDUMP --info | sed -ne '2p'` # extract first target
270 AC_MSG_RESULT($octarget)
271 AC_MSG_CHECKING(for object architecture)
272 ocarch=`$OBJDUMP --info | sed -ne '4p'` # extract corresponding arch
273 AC_MSG_RESULT($ocarch)
275 AC_SUBST(OBJCOPYTARGET, $octarget)
276 AC_SUBST(OBJCOPYARCH, $ocarch)
278 ############## END of .png TO .o CONVERSION
280 AC_OUTPUT(Makefile cinelerra-cvs-current.spec po/Makefile.in \
282 libmpeg3/Makefile libmpeg3/video/Makefile libmpeg3/audio/Makefile \
284 quicktime/encore50/Makefile \
285 mpeg2enc/Makefile toolame-02l/Makefile \
286 guicast/Makefile cinelerra/Makefile \
287 cinelerra/data/Makefile \
288 mplexhi/Makefile mplexlo/Makefile \
289 plugins/defaulttheme/Makefile \
290 plugins/defaulttheme/data/Makefile \
291 plugins/bluedottheme/Makefile \
292 plugins/bluedottheme/data/Makefile \
293 plugins/microtheme/Makefile \
294 plugins/microtheme/data/Makefile \
295 plugins/colors/Makefile \
296 plugins/libfourier/Makefile \
297 plugins/libeffecttv/Makefile \
298 plugins/Makefile plugins/1080to480/Makefile \
299 plugins/histogram/Makefile \
300 plugins/720to480/Makefile \
301 plugins/denoisemjpeg/Makefile \
302 plugins/motion/Makefile \
303 plugins/bandslide/Makefile \
304 plugins/bandwipe/Makefile plugins/blur/Makefile plugins/brightness/Makefile \
305 plugins/burn/Makefile plugins/parametric/Makefile plugins/aging/Makefile \
306 plugins/cdripper/Makefile plugins/chromakey/Makefile plugins/colorbalance/Makefile \
307 plugins/compressor/Makefile \
308 plugins/crossfade/Makefile \
309 plugins/decimate/Makefile \
310 plugins/deinterlace/Makefile plugins/delayaudio/Makefile plugins/delayvideo/Makefile \
311 plugins/denoise/Makefile plugins/denoisefft/Makefile plugins/denoisevideo/Makefile \
312 plugins/despike/Makefile plugins/dissolve/Makefile plugins/dot/Makefile \
313 plugins/fieldframe/Makefile plugins/flip/Makefile plugins/framefield/Makefile \
314 plugins/freeverb/Makefile plugins/freezeframe/Makefile plugins/gain/Makefile \
315 plugins/holo/Makefile plugins/huesaturation/Makefile plugins/interpolateall/Makefile \
316 plugins/interpolateaudio/Makefile \
317 plugins/interpolatevideo/Makefile \
318 plugins/invertaudio/Makefile plugins/invertvideo/Makefile plugins/irissquare/Makefile \
319 plugins/ivtc/Makefile \
320 plugins/loopaudio/Makefile \
321 plugins/loopvideo/Makefile \
322 plugins/normalize/Makefile \
323 plugins/oilpainting/Makefile \
324 plugins/overlay/Makefile \
325 plugins/pitch/Makefile \
326 plugins/polar/Makefile \
327 plugins/reframe/Makefile plugins/resample/Makefile plugins/reverb/Makefile \
328 plugins/reverseaudio/Makefile plugins/reversevideo/Makefile plugins/rgb601/Makefile \
329 plugins/rotate/Makefile plugins/scale/Makefile plugins/sharpen/Makefile \
330 plugins/shiftinterlace/Makefile plugins/slide/Makefile plugins/spectrogram/Makefile \
331 plugins/swapchannels/Makefile plugins/synthesizer/Makefile plugins/timeavg/Makefile \
332 plugins/timestretch/Makefile plugins/titler/Makefile plugins/translate/Makefile \
333 plugins/videoscope/Makefile plugins/wave/Makefile plugins/whirl/Makefile \
334 plugins/wipe/Makefile \
335 plugins/yuv/Makefile \
336 plugins/downsample/Makefile plugins/flash/Makefile plugins/gradient/Makefile \
337 plugins/level/Makefile plugins/linearblur/Makefile \
338 plugins/perspective/Makefile plugins/radialblur/Makefile plugins/zoomblur/Makefile \
339 plugins/svg/Makefile \
340 plugins/diffkey/Makefile \
341 plugins/fonts/Makefile)
343 if test "$NOT_FOUND" = ""; then
344 AC_MSG_NOTICE([All required libraries were found.])
346 AC_MSG_WARN([The following libraries were not found:])
347 for i in $NOT_FOUND; do
348 l=`echo $i | sed -e 's/,/ /'`
351 AC_MSG_WARN([Compilation may fail!])