dnl Autoconf settings for vlc
-AC_INIT(include/main.h)
-AC_CONFIG_HEADER(include/defs.h)
+AC_INIT(configure.in)
+
+AC_PREREQ(2.50)
AC_CANONICAL_SYSTEM
CONFIGURE_LINE="$0 $*"
VERSION="0.5.0-cvs"
CODENAME="Natalya"
+AM_INIT_AUTOMAKE(${PACKAGE}, ${VERSION})
+AM_CONFIG_HEADER(config.h)
+
dnl
dnl Save *FLAGS
dnl
dnl
dnl Check for tools
dnl
-AC_PROG_MAKE_SET
AC_PROG_CC
AC_PROG_CPP
+AC_PROG_MAKE_SET
+AC_PROG_INSTALL
dnl Find the right ranlib, even when cross-compiling
AC_CHECK_TOOL(RANLIB, ranlib, :)
dnl Gettext stuff
ALL_LINGUAS="de en_GB fr ja no ru nl pl se"
-
-AC_DEFINE_UNQUOTED(VLC_PACKAGE, "${PACKAGE}", [Package name])
-AC_DEFINE_UNQUOTED(VLC_VERSION, "${VERSION}", [Package version])
+AM_GNU_GETTEXT_VERSION(0.10.40)
AM_GNU_GETTEXT
dnl AM_PROG_LIBTOOL
save_CFLAGS="${save_CFLAGS} -Wno-multichar -Wno-ctor-dtor-privacy -Woverloaded-virtual"; CFLAGS="${save_CFLAGS}"
vlc_LDFLAGS="${vlc_LDFLAGS} -lbe"
plugins_LDFLAGS="${plugins_LDFLAGS} -nostart"
- beos_LDFLAGS="${beos_LDFLAGS} -lbe -lgame -lroot -ltracker"
+ beos_LDFLAGS="${beos_LDFLAGS} -lbe -lgame -lroot -ltracker -lstdc++.r4"
ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind"
;;
x*)
http_LDFLAGS="${http_LDFLAGS} -lsocket"
)])
AC_CHECK_FUNC(gethostbyname,,[
- AC_CHECK_LIB(nsl,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lnsl")
-])
-AC_CHECK_FUNC(gethostbyname,,[
- AC_CHECK_LIB(bind,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind")
+ AC_CHECK_LIB(nsl,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lnsl",[
+ AC_CHECK_LIB(bind,gethostbyname,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lbind")])
])
have_nanosleep=0
AC_CHECK_FUNC(nanosleep,have_nanosleep=1,[
imdct3dn_LDFLAGS="${imdct3dn_LDFLAGS} -lm"
imdctsse_LDFLAGS="${imdctsse_LDFLAGS} -lm"
i420_rgb_LDFLAGS="${i420_rgb_LDFLAGS} -lm"
+ faad_LDFLAGS="${faad_LDFLAGS} -lm"
)
dnl Check for pthreads - borrowed from XMMS
x_libraries="/usr/X11R6/lib"
fi
+dnl Build the gtk_main plugin?
+NEED_GTK_MAIN=no
+
dnl Check for DPMS
if test "x${SYS}" != "xmingw32"
then
dnl default modules
dnl
BUILTINS="${BUILTINS}"
-PLUGINS="${PLUGINS} misc/dummy/dummy misc/null/null"
-PLUGINS="${PLUGINS} control/rc/rc misc/logger/logger access/file access/udp access/http misc/network/ipv4 misc/memcpy/memcpy"
+PLUGINS="${PLUGINS} misc/dummy/dummy misc/null"
+PLUGINS="${PLUGINS} control/rc/rc misc/logger/logger access/file misc/memcpy/memcpy"
PLUGINS="${PLUGINS} demux/mpeg/es demux/mpeg/audio demux/mpeg/mpeg_system demux/mpeg/ps demux/mpeg/ts"
-PLUGINS="${PLUGINS} codec/mpeg_video/idct/idct codec/mpeg_video/idct/idctclassic codec/mpeg_video/motion/motion codec/mpeg_video/mpeg_video codec/spudec/spudec codec/spdif"
-#PLUGINS="${PLUGINS} codec/a52old/imdct/imdct codec/a52old/downmix/downmix codec/mpeg_audio/mpeg_audio codec/a52old/a52old codec/lpcm/lpcm"
-PLUGINS="${PLUGINS} video_filter/deinterlace/deinterlace video_filter/invert video_filter/wall video_filter/transform video_filter/distort video_filter/clone video_filter/crop"
-PLUGINS="${PLUGINS} audio_filter/converter/float32tos16 audio_filter/converter/a52tospdif"
-PLUGINS="${PLUGINS} audio_filter/resampler/trivial"
+PLUGINS="${PLUGINS} codec/mpeg_video/idct/idct codec/mpeg_video/idct/idctclassic codec/mpeg_video/motion/motion codec/mpeg_video/mpeg_video codec/spudec/spudec codec/spdif codec/mpeg_audio/mpeg_audio"
+PLUGINS="${PLUGINS} codec/a52old/imdct/imdct codec/a52old/downmix/downmix codec/a52old/a52old"
+#PLUGINS="${PLUGINS} codec/lpcm/lpcm"
+PLUGINS="${PLUGINS} video_filter/deinterlace/deinterlace video_filter/invert video_filter/wall video_filter/transform video_filter/distort video_filter/clone video_filter/crop video_filter/motionblur"
+PLUGINS="${PLUGINS} audio_filter/converter/float32tos16 audio_filter/converter/float32tos8 audio_filter/converter/float32tou16 audio_filter/converter/float32tou8 audio_filter/converter/a52tospdif audio_filter/converter/fixed32tofloat32 audio_filter/converter/fixed32tos16 audio_filter/converter/s16tofloat32"
+PLUGINS="${PLUGINS} audio_filter/resampler/trivial audio_filter/resampler/ugly"
+PLUGINS="${PLUGINS} audio_filter/channel_mixer/trivial"
PLUGINS="${PLUGINS} audio_mixer/trivial audio_mixer/spdif"
PLUGINS="${PLUGINS} audio_output/file"
#PLUGINS="${PLUGINS} visualization/scope/scope"
PLUGINS="${PLUGINS} video_chroma/i420_rgb video_chroma/i420_yuy2 video_chroma/i422_yuy2 video_chroma/i420_ymga"
+PLUGINS="${PLUGINS} demux/util/id3"
+dnl
+dnl Network modules
+dnl
+NETWORK_MODULES="access/udp access/http access/rtp misc/network/ipv4"
dnl
dnl Accelerated modules
SSE_MODULES="codec/a52old/imdct/imdctsse codec/a52old/downmix/downmixsse"
ALTIVEC_MODULES="codec/mpeg_video/idct/idctaltivec codec/mpeg_video/motion/motionaltivec misc/memcpy/memcpyaltivec"
+if test x$SYS != xbeos
+then
+ PLUGINS="${PLUGINS} ${NETWORK_MODULES}"
+fi
+
AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
[ac_cv_mmx_inline],
[CFLAGS="${save_CFLAGS}"
CPPFLAGS="${save_CPPFLAGS} ${test_CFLAGS}"
AC_CHECK_HEADERS(dvdread/dvd_reader.h, [
AC_TRY_COMPILE([#include <dvdread/dvd_reader.h>],
- [void foo() { int i=DVD_VIDEO_LB_LEN; }],[
+ [int foo() { return DVD_VIDEO_LB_LEN; }],[
PLUGINS="${PLUGINS} access/dvdread/dvdread"
dvdread_LDFLAGS="${dvdread_LDFLAGS} ${test_LDFLAGS} -ldvdread"
dvdread_CFLAGS="${dvdread_CFLAGS} ${test_CFLAGS}"
fi
fi
+dnl
+dnl libid3tag support
+dnl
+AC_CHECK_HEADERS(id3tag.h, [
+ id3tag_LDFLAGS="${id3tag_LDFLAGS} -lz -lid3tag"
+ PLUGINS="${PLUGINS} demux/util/id3tag"])
+
dnl
dnl ffmpeg decoder plugin
dnl
dnl Use a custom libffmpeg
AC_MSG_RESULT(${real_ffmpeg_tree}/libavcodec/libavcodec.a)
BUILTINS="${BUILTINS} codec/ffmpeg/ffmpeg"
- ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} ${real_ffmpeg_tree}/libavcodec/libavcodec.a -lm"
+ ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} ${real_ffmpeg_tree}/libavcodec/libavcodec.a"
ffmpeg_CFLAGS="${ffmpeg_CFLAGS} -I${real_ffmpeg_tree}/libavcodec"
else
dnl The given libavcodec wasn't built
fi
else
CFLAGS="${save_CFLAGS} ${ffmpeg_CFLAGS}"
- LDFLAGS="${save_LDFLAGS} ${ffmpeg_LDFLAGS} -lm"
+ LDFLAGS="${save_LDFLAGS} ${ffmpeg_LDFLAGS}"
AC_CHECK_LIB(avcodec, avcodec_init, [
BUILTINS="${BUILTINS} codec/ffmpeg/ffmpeg"
- ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lavcodec -lm" ],
+ ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lavcodec" ],
[ AC_MSG_ERROR([Cannot find libavcodec library...]) ])
LDFLAGS="${save_LDFLAGS}"
CFLAGS="${save_CFLAGS}"
faad_CFLAGS="${faad_CFLAGS} -I${with_faad}/include"
faad_LDFLAGS="${faad_LDFLAGS} -L${with_faad}/lib"
fi
- faad_LDFLAGS="${faad_LDFLAGS} -lm"
+ faad_LDFLAGS="${faad_LDFLAGS}"
AC_ARG_WITH(faad-tree,
[ --with-faad-tree=PATH faad tree for static linking])
PLUGINS="${PLUGINS} video_output/mga/mga video_output/mga/xmga"
fi ])
+dnl
+dnl SVGAlib module
+dnl
+AC_ARG_ENABLE(svgalib,
+ [ --enable-svgalib SVGAlib support (default disabled)])
+if test "x${enable_svgalib}" = "xyes"
+then
+ PLUGINS="${PLUGINS} video_output/svgalib"
+ svgalib_LDFLAGS="${svgalib_LDFLAGS} -lvgagl -lvga"
+fi
+
dnl
dnl GGI module
dnl
AC_PATH_PROG(ESD_CONFIG, esd-config, no)
if test "x${ESD_CONFIG}" != "xno"
then
- #PLUGINS="${PLUGINS} audio_output/esd"
+ PLUGINS="${PLUGINS} audio_output/esd"
esd_CFLAGS="${esd_CFLAGS} `${ESD_CONFIG} --cflags`"
esd_LDFLAGS="${esd_LDFLAGS} `${ESD_CONFIG} --libs`"
fi
AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
if test "x${ARTS_CONFIG}" != "xno"
then
- #PLUGINS="${PLUGINS} audio_output/arts"
+ PLUGINS="${PLUGINS} audio_output/arts"
arts_CFLAGS="${arts_CFLAGS} `${ARTS_CONFIG} --cflags`"
arts_LDFLAGS="${arts_LDFLAGS} `${ARTS_CONFIG} --libs `"
fi
AC_CHECK_HEADER(alsa/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
if test "x${have_alsa}" = "xtrue"
then
- #PLUGINS="${PLUGINS} audio_output/alsa"
+ PLUGINS="${PLUGINS} audio_output/alsa"
alsa_LDFLAGS="${alsa_LDFLAGS} -lasound -lm -ldl"
fi
fi])
then
AC_MSG_ERROR([Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-gtk.])
fi
- gtk_CFLAGS="${gtk_CFLAGS} `${GTK_CONFIG} --cflags gtk`"
- gtk_LDFLAGS="${gtk_LDFLAGS} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
+ gtk_CFLAGS="${gtk_CFLAGS} `${GTK_CONFIG} --cflags gtk gthread`"
+ gtk_LDFLAGS="${gtk_LDFLAGS} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
# now look for the gtk.h header
CPPFLAGS="${save_CPPFLAGS} ${gtk_CFLAGS}"
ac_cv_gtk_headers=yes
if test "x${ac_cv_gtk_headers}" = "xyes"
then
PLUGINS="${PLUGINS} gui/gtk/gtk"
+ NEED_GTK_MAIN=yes
ALIASES="${ALIASES} gvlc"
fi
CPPFLAGS="${save_CPPFLAGS}"
then
AC_MSG_ERROR([Your development package for Gtk+ is too old, you need at least version 1.2.0. Please upgrade and try again. Alternatively you can also configure with --disable-familiar.])
fi
- familiar_CFLAGS="${familiar_CFLAGS} `${GTK_CONFIG} --cflags gtk`"
- familiar_LDFLAGS="${familiar_LDFLAGS} `${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
+ familiar_CFLAGS="${familiar_CFLAGS} `${GTK_CONFIG} --cflags gtk gthread`"
+ familiar_LDFLAGS="${familiar_LDFLAGS} `${GTK_CONFIG} --libs gtk gthread | sed 's,-rdynamic,,'`"
# now look for the gtk.h header
CPPFLAGS="${save_CPPFLAGS} ${familiar_CFLAGS}"
ac_cv_gtk_headers=yes
if test "x${ac_cv_gtk_headers}" = "xyes"
then
PLUGINS="${PLUGINS} gui/familiar/familiar"
+ NEED_GTK_MAIN=yes
fi
CPPFLAGS="${save_CPPFLAGS}"
fi
CPPFLAGS="${save_CPPFLAGS} ${gnome_CFLAGS}"
AC_CHECK_HEADERS(gnome.h, [
PLUGINS="${PLUGINS} gui/gtk/gnome"
+ NEED_GTK_MAIN=yes
ALIASES="${ALIASES} gnome-vlc"
],[
AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
if test "x${enable_xosd}" = "xyes"
then
AC_CHECK_HEADER(xosd.h, have_xosd="true", have_xosd="false")
+ AC_TRY_COMPILE([#include <xosd.h>],
+ [void foo() { xosd_init("foo","bar",12,XOSD_top,2,12,42); }],,
+ AC_DEFINE(HAVE_OLD_XOSD_H, 1, Define if <xosd.h> is pre-1.0.0))
if test "x${have_xosd}" = "xtrue"
then
PLUGINS="${PLUGINS} visualization/xosd/xosd"
fi
fi
+dnl
+dnl gtk_main plugin
+dnl
+if test "x${NEED_GTK_MAIN}" != "xno"
+then
+ PLUGINS="${PLUGINS} misc/gtk_main"
+ gtk_main_CFLAGS="${gtk_main_CFLAGS} ${gtk_CFLAGS} ${familiar_CFLAGS} ${gnome_CFLAGS}"
+ gtk_main_LDFLAGS="${gtk_main_LDFLAGS} ${gtk_LDFLAGS} ${familiar_LDFLAGS} ${gnome_LDFLAGS}"
+fi
+
dnl
dnl Plug-ins - this must be AT THE END
dnl
AC_SUBST(MOC)
AC_SUBST(WINDRES)
AC_SUBST(BCBUILDER)
-AC_SUBST(PACKAGE)
-AC_SUBST(VERSION)
AC_SUBST(NEED_GETOPT)
AC_SUBST(MOZILLA)
AC_SUBST(glide_CFLAGS)
AC_SUBST(gnome_CFLAGS)
AC_SUBST(gtk_CFLAGS)
+AC_SUBST(gtk_main_CFLAGS)
AC_SUBST(kde_CFLAGS)
AC_SUBST(idctaltivec_CFLAGS)
AC_SUBST(macosx_CFLAGS)
AC_SUBST(qt_CFLAGS)
AC_SUBST(qte_CFLAGS)
AC_SUBST(sdl_CFLAGS)
+AC_SUBST(svgalib_CFLAGS)
AC_SUBST(x11_CFLAGS)
AC_SUBST(xvideo_CFLAGS)
AC_SUBST(dvdread_LDFLAGS)
AC_SUBST(dvdplay_LDFLAGS)
AC_SUBST(ts_dvbpsi_LDFLAGS)
+AC_SUBST(audio_LDFLAGS)
AC_SUBST(esd_LDFLAGS)
AC_SUBST(familiar_LDFLAGS)
AC_SUBST(distort_LDFLAGS)
AC_SUBST(glide_LDFLAGS)
AC_SUBST(gnome_LDFLAGS)
AC_SUBST(gtk_LDFLAGS)
+AC_SUBST(gtk_main_LDFLAGS)
AC_SUBST(http_LDFLAGS)
AC_SUBST(idctaltivec_LDFLAGS)
AC_SUBST(imdct_LDFLAGS)
AC_SUBST(qte_LDFLAGS)
AC_SUBST(rc_LDFLAGS)
AC_SUBST(sdl_LDFLAGS)
+AC_SUBST(svgalib_LDFLAGS)
AC_SUBST(vcd_LDFLAGS)
AC_SUBST(vorbis_LDFLAGS)
AC_SUBST(waveout_LDFLAGS)
AC_SUBST(x11_LDFLAGS)
AC_SUBST(xvideo_LDFLAGS)
AC_SUBST(xosd_LDFLAGS)
-
-AC_OUTPUT([Makefile.config Makefile.opts po/Makefile.in vlc-config])
-chmod a+x vlc-config
+AC_SUBST(id3tag_LDFLAGS)
+
+AC_OUTPUT([
+ Makefile
+ Makefile.config
+ Makefile.opts
+ m4/Makefile
+ intl/Makefile
+ po/Makefile.in
+ vlc-config
+],[
+ chmod a+x vlc-config
+])
echo "
vlc configuration
release : ${RELEASE}
profiling : ${PROFILING}
need builtin getopt : ${NEED_GETOPT}
-built-in modules :${BUILTINS}
-plug-in modules :${PLUGINS}
+modules : (see Makefile.config)
mozilla plugin : ${MOZILLA}
vlc aliases :${ALIASES}
-You may now tune Makefile.opts at your convenience, for instance to choose
-which modules get compiled as plugins.
+You may now tune Makefile.config and Makefile.opts at your convenience, for
+instance to choose which modules get compiled as plugins, or tune CFLAGS.
To build vlc and its plugins, type \`${VLC_MAKE}'.
"