1 AC_INIT(Cinelerra, 1.1.9)
5 # Test for minimal version of autoconf
8 # Test for minimal versions of and automake
10 if test `automake --version | grep "automake (GNU automake)" | cut -b 25-27` = "1.7"; then
11 echo "Checking for automake 1.7 ... found"
13 echo "Checking for automake 1.7 ... not found"
14 echo "You are using a version of automake older than 1.7. That will not work."
15 echo " See README.BUILD for further instructions"
20 AM_CONFIG_HEADER(config.h)
21 AM_GNU_GETTEXT([external])
22 AM_GNU_GETTEXT_VERSION(0.12.1)
32 # hack for libtool 1.5 -- this is ugly and probably wrong, but works
33 if test `libtool --version | grep ltmain.sh | cut -b 25-27` = "1.5"; then
35 LTCXX_FLAGS="--tag=CXX"
41 # hack for using nasm for .S files
42 CCAS="\$(top_srcdir)/admin/nasm"
47 ############## SPECIAL DIRECTORIES
48 AC_ARG_WITH(plugindir,
49 AC_HELP_STRING([--with-plugindir], [sets the directory where the plugins should be installed]),
50 [ plugindir=$withval ],
51 [ plugindir="\${exec_prefix}/lib/cinelerra" ])
55 AC_HELP_STRING([--with-fontsdir], [sets the directory where the fonts should be installed]),
56 [ fontsdir=$withval ],
57 [ fontsdir="\${plugindir}/fonts" ])
59 ############## END OF SPECIAL DIRECTORIES
62 LDFLAGS="$LDFLAGS -L/usr/X11R6/lib"
63 AC_CHECK_HEADERS(X11/Xlib.h)
64 AC_CHECK_LIB(X11, XOpenDisplay, ,[
65 echo "Xlib-dev was not found. In order to build Cinelerra,"
66 echo "xlib-dev must be installed. Please install xlib-dev and"
67 echo "run configure again."
70 ############## END XLIB
72 ############## MISC LIBRARIES
73 AC_CHECK_HEADERS(uuid/uuid.h)
74 AC_CHECK_LIB(uuid, uuid_clear, ,[AC_MSG_NOTICE([libuuid not found])
75 NOT_FOUND="$NOT_FOUND libuuid,"])
78 ############## END OF MISC LIBRARIES
80 LARGEFILE_CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
81 CFLAGS="-D_REENTRANT -DHAVE_LIBXXF86VM $LARGEFILE_CFLAGS $CFLAGS"
82 CXXFLAGS="-D_REENTRANT -DHAVE_LIBXXF86VM $LARGEFILE_CFLAGS $CXXFLAGS"
85 AC_CHECK_HEADERS(a52dec/a52.h)
86 AC_CHECK_LIB(a52, a52_init, true ,[AC_MSG_NOTICE([a52dec not found])
87 NOT_FOUND="$NOT_FOUND a52dec,"])
91 # Just test to see if we have lame installed.
92 AC_CHECK_HEADERS(lame/lame.h)
93 #AC_CHECK_LIB(-lmp3lame, lame_init, ,[AC_MSG_NOTICE([libmp3lame not found])
94 # NOT_FOUND="$NOT_FOUND libmp3lame,"])
97 ############## LIBSNDFILE
98 # Use the provided libsndfile, which will be renamed to libsndfilehv
99 AC_CONFIG_SUBDIRS(libsndfile)
101 ############## LIBAVCODEC
102 AC_CHECK_HEADERS(ffmpeg/avcodec.h)
103 AC_CHECK_LIB(avcodec, avcodec_init,[AC_MSG_NOTICE([libavcodec found])] ,[AC_MSG_NOTICE([libavcodec not found])
104 NOT_FOUND="$NOT_FOUND libavcodec"])
107 ############## LIBXVIDCORE
108 AC_CHECK_HEADERS(xvid.h)
109 AC_CHECK_LIB(xvidcore, xvid_init, ,[AC_MSG_NOTICE([libxvidcore not found])
110 NOT_FOUND="$NOT_FOUND libxvidcore,"])
113 ############## FIREWIRE
114 # firewire settings are propagated through FIREWIRE_CFLAGS and FIREWIRE_LDFLAGS
115 AC_ARG_ENABLE(firewire,
116 AC_HELP_STRING([--disable-firewire], [disable support for firewire (default=enabled)]),
117 [ enable_firewire=$enableval ],
118 [ enable_firewire=yes ])
120 if test "x$enable_firewire" = "xyes"; then
121 AC_CHECK_LIB(raw1394, raw1394_new_handle, ,[AC_MSG_NOTICE([libraw1394 not found])
122 NOT_FOUND="$NOT_FOUND libraw1394,"
125 AC_CHECK_LIB(avc1394, avc1394_send_command, ,[AC_MSG_NOTICE([libavc1394 not found])
126 NOT_FOUND="$NOT_FOUND libavc1394,"
129 AC_CHECK_LIB(rom1394, rom1394_get_bus_id, ,[AC_MSG_NOTICE([librom1394 not found])
130 NOT_FOUND="$NOT_FOUND librom1394,"
133 if test "$FIREWIRE" = "no"; then
137 FIREWIRE_CFLAGS="-DHAVE_FIREWIRE"
138 # FIREWIRE_LDFLAGS="-lraw1394 -lavc1394 -lrom1394"
141 AC_SUBST(FIREWIRE_CFLAGS)
142 AC_SUBST(FIREWIRE_LDFLAGS)
143 ############## END OF FIREWIRE
145 ############## AVIFILE SUPPORT
146 dnl if test "x$enable_avifile" = "xyes"; then
147 dnl AM_PATH_AVIFILE(0.7.0)
148 dnl if test "x$HAVE_AVIFILE" = "xyes"; then
149 dnl AVIFILE_CXXFLAGS="-DUSE_AVIFILE $AVIFILE_CXXFLAGS"
152 dnl AC_ARG_ENABLE(avifile, [ --enable-avifile enable support for avifile [default=no]])
153 ############## END OF AVIFILE SUPPORT
155 ############# CSS SUPPORT IN LIBMPEG3
156 if test "x$enable_css" = "xyes"; then
157 CSS_CFLAGS="-DHAVE_CSS"
161 AC_HELP_STRING([--disable-css], [disable support for css in libmpeg3 (default=enabled)]),,
162 [ enable_css=$enableval ],
164 ############## END OF CSS SUPPORT IN LIBMPEG3
168 # the sound options are propagated by SOUND_CFLAGS and SOUND_LDFLAGS
170 AC_HELP_STRING([--disable-oss], [disable support for oss (default=enabled)]))
172 AC_HELP_STRING([--enable-alsa], [enable support for alsa (default=autodetect)]),
173 [ enable_alsa=$enableval ],
174 [ enable_alsa=default ])
176 AC_HELP_STRING([--disable-esound], [disable support for esound (default=enabled)]))
178 if test "x$enable_oss" = "xyes" || test "x$enable_oss" = "x"; then
179 SOUND_CFLAGS="-DHAVE_OSS $SOUND_CFLAGS"
181 if test "x$enable_alsa" = "xdefault" || test "x$enable_alsa" = "xyes"; then
183 [ SOUND_CFLAGS="$ALSA_CFLAGS -DHAVE_ALSA $SOUND_CFLAGS"
184 SOUND_LDFLAGS="$ALSA_LIBS $SOUND_LDFLAGS" ],
185 [ if test "x$enable_alsa" = "xyes"; then
186 AC_MSG_NOTICE( [ alsa library >= 0.9.0 not found ] )
187 NOT_FOUND="$NOT_FOUND alsa library >= 0.9.0,"
191 if test "x$enable_esd" = "xyes" || test "x$enable_esd" = "x"; then
193 SOUND_CFLAGS="$ESD_CFLAGS -DHAVE_ESOUND $SOUND_CFLAGS"
194 SOUND_LDFLAGS="$ESD_LIBS $SOUND_LDFLAGS"
196 AC_SUBST(SOUND_CFLAGS)
197 AC_SUBST(SOUND_LDFLAGS)
198 ############### END OF SOUND
200 # MPEG2ENC declarations
206 ############## MMX / 3DNOW
209 AC_HELP_STRING([--enable-x86], [enables x86 specific features autodetection in libmpeg3 and mpeg2enc (default is disabled)]),
210 [ enable_x86=$enableval ],
213 AC_HELP_STRING([--enable-mmx], [enables support for mmx (default is disabled)]),
214 [ enable_mmx=$enableval ],
217 AC_HELP_STRING([--enable-3dnow], [enables support for 3dnow (default is disabled)]),
218 [ enable_3dnow=$enableval ],
220 if test "x$enable_x86" = "xyes"; then
221 CPU_CFLAGS="-DX86_CPU $CPU_CFLAGS"
225 if test "x$enable_mmx" = "xyes"; then
226 CPU_CFLAGS="-DHAVE_MMX -DMMX -DUSE_MMX $CPU_CFLAGS" # -D_MMX_ doesn't work
229 AM_CONDITIONAL(USEMMX, test "x$enable_mmx" = "xyes")
231 if test "x$enable_3dnow" = "xyes"; then
232 CPU_CFLAGS="-DHAVE_3Dnow $CPU_CFLAGS" # -DUSE_3DNOW --> don't use, not compiling
234 AM_CONDITIONAL(USE3DNOW, test "x$enable_3dnow" = "xyes")
235 AC_SUBST(LIBDECORE_LIBADD)
237 ############## END OF MMX / 3DNOW
239 ############## FFMPEG
240 dnl AM_CONDITIONAL(FFMPEG_AC3, true)
241 dnl AM_CONDITIONAL(FFMPEG_A52BIN, false)
242 dnl AM_CONDITIONAL(FFMPEG_MP3LAME, true)
243 dnl AM_CONDITIONAL(FFMPEG_VORBIS, true)
244 dnl AM_CONDITIONAL(FFMPEG_HAVE_MLIB, false)
245 dnl AM_CONDITIONAL(FFMPEG_TARGET_ARCH_ARMV4L, false)
246 dnl AM_CONDITIONAL(FFMPEG_TARGET_ARCH_ALPHA, false)
247 dnl AM_CONDITIONAL(FFMPEG_TARGET_ARCH_POWERPC, false)
248 dnl AM_CONDITIONAL(FFMPEG_TARGET_MMI, false)
249 dnl AM_CONDITIONAL(FFMPEG_TARGET_ALTIVEC, false)
251 LIBAVCODEC_CFLAGS=-I/usr/include/ffmpeg
252 LIBAVCODEC_LIBS=-lavcodec
253 AC_SUBST(LIBAVCODEC_CFLAGS)
254 AC_SUBST(LIBAVCODEC_LIBS)
256 ############## END OF FFMPEG
258 ############## .png TO .o CONVERSION
260 AC_CHECK_TOOL(OBJCOPY, objcopy)
261 if test "x$OBJCOPY" = "x"; then
262 AC_MSG_ERROR("objcopy from GNU binutils >= 2.11.90 not found")
264 AC_MSG_CHECKING(for object target)
265 dnl extract target and architecture
266 octarget=`objcopy --info | head -2 | tail -1`
267 AC_MSG_RESULT($octarget)
268 AC_MSG_CHECKING(for object architecture)
269 ocarch=`objcopy --info | grep '^ ' | head -1`
270 AC_MSG_RESULT($ocarch)
271 AC_SUBST(OBJCOPYTARGET, $octarget)
272 AC_SUBST(OBJCOPYARCH, $ocarch)
274 ############## END of .png TO .o CONVERSION
276 AC_OUTPUT(Makefile po/Makefile.in \
278 libmpeg3/Makefile libmpeg3/video/Makefile libmpeg3/audio/Makefile \
280 quicktime/encore50/Makefile \
281 mpeg2enc/Makefile toolame-02l/Makefile\
282 guicast/Makefile cinelerra/Makefile \
283 cinelerra/data/Makefile \
284 mplexhi/Makefile mplexlo/Makefile \
285 plugins/defaulttheme/Makefile \
286 plugins/defaulttheme/data/Makefile \
287 plugins/microtheme/Makefile \
288 plugins/microtheme/data/Makefile \
289 plugins/colors/Makefile \
290 plugins/libfourier/Makefile \
291 plugins/libeffecttv/Makefile \
292 plugins/Makefile plugins/1080to480/Makefile \
293 plugins/histogram/Makefile \
294 plugins/720to480/Makefile \
295 plugins/denoisemjpeg/Makefile \
296 plugins/motion/Makefile \
297 plugins/bandslide/Makefile \
298 plugins/bandwipe/Makefile plugins/blur/Makefile plugins/brightness/Makefile \
299 plugins/burn/Makefile plugins/parametric/Makefile plugins/aging/Makefile \
300 plugins/cdripper/Makefile plugins/chromakey/Makefile plugins/colorbalance/Makefile \
301 plugins/compressor/Makefile \
302 plugins/crossfade/Makefile \
303 plugins/decimate/Makefile \
304 plugins/deinterlace/Makefile plugins/delayaudio/Makefile plugins/delayvideo/Makefile \
305 plugins/denoise/Makefile plugins/denoisefft/Makefile plugins/denoisevideo/Makefile \
306 plugins/despike/Makefile plugins/dissolve/Makefile plugins/dot/Makefile \
307 plugins/fieldframe/Makefile plugins/flip/Makefile plugins/framefield/Makefile \
308 plugins/freeverb/Makefile plugins/freezeframe/Makefile plugins/gain/Makefile \
309 plugins/holo/Makefile plugins/huesaturation/Makefile plugins/interpolateall/Makefile \
310 plugins/invertaudio/Makefile plugins/invertvideo/Makefile plugins/irissquare/Makefile \
311 plugins/ivtc/Makefile \
312 plugins/loopaudio/Makefile \
313 plugins/loopvideo/Makefile \
314 plugins/normalize/Makefile \
315 plugins/oilpainting/Makefile \
316 plugins/overlay/Makefile \
317 plugins/pitch/Makefile \
318 plugins/polar/Makefile \
319 plugins/reframe/Makefile plugins/resample/Makefile plugins/reverb/Makefile \
320 plugins/reverseaudio/Makefile plugins/reversevideo/Makefile plugins/rgb601/Makefile \
321 plugins/rotate/Makefile plugins/scale/Makefile plugins/sharpen/Makefile \
322 plugins/shiftinterlace/Makefile plugins/slide/Makefile plugins/spectrogram/Makefile \
323 plugins/swapchannels/Makefile plugins/synthesizer/Makefile plugins/timeavg/Makefile \
324 plugins/timestretch/Makefile plugins/titler/Makefile plugins/translate/Makefile \
325 plugins/videoscope/Makefile plugins/wave/Makefile plugins/whirl/Makefile \
326 plugins/wipe/Makefile \
327 plugins/yuv/Makefile \
328 plugins/downsample/Makefile plugins/flash/Makefile plugins/gradient/Makefile \
329 plugins/level/Makefile plugins/linearblur/Makefile \
330 plugins/perspective/Makefile plugins/radialblur/Makefile plugins/zoomblur/Makefile \
331 plugins/svg/Makefile \
332 plugins/diffkey/Makefile \
333 plugins/fonts/Makefile)
335 if test "$NOT_FOUND" = ""; then
336 AC_MSG_NOTICE([Configure found all libraries successfully.])
338 AC_MSG_NOTICE([Configure could not find$NOT_FOUND compilation may fail!])