1 AC_INIT(Cinelerra, 1.1.7)
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.11.5)
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,"])
79 ############## END OF MISC LIBRARIES
81 LARGEFILE_CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
82 CFLAGS="-D_REENTRANT -DHAVE_LIBXXF86VM $LARGEFILE_CFLAGS $CFLAGS"
83 CXXFLAGS="-D_REENTRANT -DHAVE_LIBXXF86VM $LARGEFILE_CFLAGS $CXXFLAGS"
86 AC_CHECK_HEADERS(a52dec/a52.h)
87 AC_CHECK_LIB(a52, a52_init, true ,[AC_MSG_NOTICE([a52dec not found])
88 NOT_FOUND="$NOT_FOUND a52dec,"])
92 # Just test to see if we have lame installed.
93 AC_CHECK_HEADERS(lame/lame.h)
94 #AC_CHECK_LIB(-lmp3lame, lame_init, ,[AC_MSG_NOTICE([libmp3lame not found])
95 # NOT_FOUND="$NOT_FOUND libmp3lame,"])
98 ############## LIBSNDFILE
99 # Check the version of libsndfile and
100 # set the compile flags accordingly
101 AC_CHECK_HEADER(sndfile.h, [ sndfile_found=yes ])
103 if test "x$sndfile_found" = "xyes"
105 AC_CHECK_LIB(sndfile, sf_open_read, [sndfile_old=yes])
106 if test "x$sndfile_old" = "xyes"
108 AC_MSG_NOTICE([Found old (< 1.0.0) version of libsndfile])
109 CXXFLAGS="$CXXFLAGS -DHAVE_LIBSNDFILE_0"
111 AC_MSG_NOTICE([Found new (>= 1.0.0) version of libsndfile])
114 AC_MSG_NOTICE([libsndfile not found])
115 NOT_FOUND="$NOT_FOUND libsndfile,"
119 ############## LIBAVCODEC
120 AC_CHECK_HEADERS(ffmpeg/avcodec.h)
121 AC_CHECK_LIB(avcodec, avcodec_init,[AC_MSG_NOTICE([libavcodec found])] ,[AC_MSG_NOTICE([libavcodec not found])
122 NOT_FOUND="$NOT_FOUND libavcodec"])
125 ############## LIBXVIDCORE
126 AC_CHECK_HEADERS(xvid.h)
127 AC_CHECK_LIB(xvidcore, xvid_init, ,[AC_MSG_NOTICE([libxvidcore not found])
128 NOT_FOUND="$NOT_FOUND libxvidcore,"])
131 ############## FIREWIRE
132 # firewire settings are propagated through FIREWIRE_CFLAGS and FIREWIRE_LDFLAGS
133 AC_ARG_ENABLE(firewire,
134 AC_HELP_STRING([--disable-firewire], [disable support for firewire (default=enabled)]),
135 [ enable_firewire=$enableval ],
136 [ enable_firewire=yes ])
138 if test "x$enable_firewire" = "xyes"; then
139 AC_CHECK_LIB(raw1394, raw1394_new_handle, ,[AC_MSG_NOTICE([libraw1394 not found])
140 NOT_FOUND="$NOT_FOUND libraw1394,"
143 AC_CHECK_LIB(avc1394, avc1394_send_command, ,[AC_MSG_NOTICE([libavc1394 not found])
144 NOT_FOUND="$NOT_FOUND libavc1394,"
147 AC_CHECK_LIB(rom1394, rom1394_get_bus_id, ,[AC_MSG_NOTICE([librom1394 not found])
148 NOT_FOUND="$NOT_FOUND librom1394,"
151 if test "$FIREWIRE" = "no"; then
155 FIREWIRE_CFLAGS="-DHAVE_FIREWIRE -I/usr/include/libavc1394 -I/usr/include/libraw1394"
156 FIREWIRE_LDFLAGS="-lraw1394 -lavc1394 -lrom1394"
159 AC_SUBST(FIREWIRE_CFLAGS)
160 AC_SUBST(FIREWIRE_LDFLAGS)
161 ############## END OF FIREWIRE
163 ############## AVIFILE SUPPORT
164 dnl if test "x$enable_avifile" = "xyes"; then
165 dnl AM_PATH_AVIFILE(0.7.0)
166 dnl if test "x$HAVE_AVIFILE" = "xyes"; then
167 dnl AVIFILE_CXXFLAGS="-DUSE_AVIFILE $AVIFILE_CXXFLAGS"
170 dnl AC_ARG_ENABLE(avifile, [ --enable-avifile enable support for avifile [default=no]])
171 ############## END OF AVIFILE SUPPORT
173 ############# CSS SUPPORT IN LIBMPEG3
174 if test "x$enable_css" = "xyes"; then
175 CSS_CFLAGS="-DHAVE_CSS"
179 AC_HELP_STRING([--disable-css], [disable support for css in libmpeg3 (default=enabled)]),,
180 [ enable_css=$enableval ],
182 ############## END OF CSS SUPPORT IN LIBMPEG3
186 # the sound options are propagated by SOUND_CFLAGS and SOUND_LDFLAGS
188 AC_HELP_STRING([--disable-oss], [disable support for oss (default=enabled)]))
190 AC_HELP_STRING([--enable-alsa], [enable support for alsa (default=autodetect)]),
191 [ enable_alsa=$enableval ],
192 [ enable_alsa=default ])
194 AC_HELP_STRING([--disable-esound], [disable support for esound (default=enabled)]))
196 if test "x$enable_oss" = "xyes" || test "x$enable_oss" = "x"; then
197 SOUND_CFLAGS="-DHAVE_OSS $SOUND_CFLAGS"
199 if test "x$enable_alsa" = "xdefault" || test "x$enable_alsa" = "xyes"; then
201 [ SOUND_CFLAGS="$ALSA_CFLAGS -DHAVE_ALSA $SOUND_CFLAGS"
202 SOUND_LDFLAGS="$ALSA_LIBS $SOUND_LDFLAGS" ],
203 [ if test "x$enable_alsa" = "xyes"; then
204 AC_MSG_NOTICE( [ alsa library >= 0.9.0 not found ] )
205 NOT_FOUND="$NOT_FOUND alsa library >= 0.9.0,"
209 if test "x$enable_esd" = "xyes" || test "x$enable_esd" = "x"; then
211 SOUND_CFLAGS="$ESD_CFLAGS -DHAVE_ESOUND $SOUND_CFLAGS"
212 SOUND_LDFLAGS="$ESD_LIBS $SOUND_LDFLAGS"
214 AC_SUBST(SOUND_CFLAGS)
215 AC_SUBST(SOUND_LDFLAGS)
216 ############### END OF SOUND
218 # MPEG2ENC declarations
224 ############## MMX / 3DNOW
227 AC_HELP_STRING([--enable-x86], [enables x86 specific features autodetection in libmpeg3 and mpeg2enc (default is disabled)]),
228 [ enable_x86=$enableval ],
231 AC_HELP_STRING([--enable-mmx], [enables support for mmx (default is disabled)]),
232 [ enable_mmx=$enableval ],
235 AC_HELP_STRING([--enable-3dnow], [enables support for 3dnow (default is disabled)]),
236 [ enable_3dnow=$enableval ],
238 if test "x$enable_x86" = "xyes"; then
239 CPU_CFLAGS="-DX86_CPU $CPU_CFLAGS"
243 if test "x$enable_mmx" = "xyes"; then
244 CPU_CFLAGS="-DHAVE_MMX -DMMX -DUSE_MMX $CPU_CFLAGS" # -D_MMX_ doesn't work
247 AM_CONDITIONAL(USEMMX, test "x$enable_mmx" = "xyes")
249 if test "x$enable_3dnow" = "xyes"; then
250 CPU_CFLAGS="-DHAVE_3Dnow $CPU_CFLAGS" # -DUSE_3DNOW --> don't use, not compiling
252 AM_CONDITIONAL(USE3DNOW, test "x$enable_3dnow" = "xyes")
253 AC_SUBST(LIBDECORE_LIBADD)
255 ############## END OF MMX / 3DNOW
257 ############## FFMPEG
258 dnl AM_CONDITIONAL(FFMPEG_AC3, true)
259 dnl AM_CONDITIONAL(FFMPEG_A52BIN, false)
260 dnl AM_CONDITIONAL(FFMPEG_MP3LAME, true)
261 dnl AM_CONDITIONAL(FFMPEG_VORBIS, true)
262 dnl AM_CONDITIONAL(FFMPEG_HAVE_MLIB, false)
263 dnl AM_CONDITIONAL(FFMPEG_TARGET_ARCH_ARMV4L, false)
264 dnl AM_CONDITIONAL(FFMPEG_TARGET_ARCH_ALPHA, false)
265 dnl AM_CONDITIONAL(FFMPEG_TARGET_ARCH_POWERPC, false)
266 dnl AM_CONDITIONAL(FFMPEG_TARGET_MMI, false)
267 dnl AM_CONDITIONAL(FFMPEG_TARGET_ALTIVEC, false)
269 LIBAVCODEC_CFLAGS=-I/usr/include/ffmpeg
270 LIBAVCODEC_LIBS=-lavcodec
271 AC_SUBST(LIBAVCODEC_CFLAGS)
272 AC_SUBST(LIBAVCODEC_LIBS)
274 ############## END OF FFMPEG
276 AC_OUTPUT(Makefile po/Makefile.in \
277 libmpeg3/Makefile libmpeg3/video/Makefile libmpeg3/audio/Makefile \
278 quicktime/Makefile quicktime/encore50/Makefile quicktime/decore50/Makefile \
279 mpeg2enc/Makefile toolame-02l/Makefile\
280 guicast/Makefile cinelerra/Makefile \
281 mplexhi/Makefile mplexlo/Makefile \
282 plugins/Makefile plugins/1080to480/Makefile \
283 plugins/histogram/Makefile \
284 plugins/720to480/Makefile \
285 plugins/denoisemjpeg/Makefile \
286 plugins/motion/Makefile \
287 plugins/bandslide/Makefile \
288 plugins/libcolors/Makefile \
289 plugins/libfourier/Makefile \
290 plugins/libeffecttv/Makefile \
291 plugins/bandwipe/Makefile plugins/blur/Makefile plugins/brightness/Makefile \
292 plugins/burn/Makefile plugins/parametric/Makefile plugins/aging/Makefile \
293 plugins/cdripper/Makefile plugins/chromakey/Makefile plugins/colorbalance/Makefile \
294 plugins/compressor/Makefile plugins/crossfade/Makefile plugins/defaulttheme/Makefile \
295 plugins/deinterlace/Makefile plugins/delayaudio/Makefile plugins/delayvideo/Makefile \
296 plugins/denoise/Makefile plugins/denoisefft/Makefile plugins/denoisevideo/Makefile \
297 plugins/despike/Makefile plugins/dissolve/Makefile plugins/dot/Makefile \
298 plugins/fieldframe/Makefile plugins/flip/Makefile plugins/framefield/Makefile \
299 plugins/freeverb/Makefile plugins/freezeframe/Makefile plugins/gain/Makefile \
300 plugins/holo/Makefile plugins/huesaturation/Makefile plugins/interpolateall/Makefile \
301 plugins/invertaudio/Makefile plugins/invertvideo/Makefile plugins/irissquare/Makefile \
302 plugins/ivtc/Makefile plugins/normalize/Makefile \
303 plugins/oilpainting/Makefile plugins/pitch/Makefile plugins/polar/Makefile \
304 plugins/reframe/Makefile plugins/resample/Makefile plugins/reverb/Makefile \
305 plugins/reverseaudio/Makefile plugins/reversevideo/Makefile plugins/rgb601/Makefile \
306 plugins/rotate/Makefile plugins/scale/Makefile plugins/sharpen/Makefile \
307 plugins/shiftinterlace/Makefile plugins/slide/Makefile plugins/spectrogram/Makefile \
308 plugins/swapchannels/Makefile plugins/synthesizer/Makefile plugins/timeavg/Makefile \
309 plugins/timestretch/Makefile plugins/titler/Makefile plugins/translate/Makefile \
310 plugins/videoscope/Makefile plugins/wave/Makefile plugins/whirl/Makefile \
311 plugins/wipe/Makefile plugins/yuv/Makefile plugins/microtheme/Makefile \
312 plugins/downsample/Makefile plugins/flash/Makefile plugins/gradient/Makefile \
313 plugins/level/Makefile plugins/linearblur/Makefile \
314 plugins/perspective/Makefile plugins/radialblur/Makefile plugins/zoomblur/Makefile \
315 plugins/svg/Makefile plugins/fonts/Makefile)
317 if test "$NOT_FOUND" = ""; then
318 AC_MSG_NOTICE([Configure found all libraries successfully.])
320 AC_MSG_NOTICE([Configure could not find$NOT_FOUND compilation may fail!])