dnl Autoconf settings for vlc
+dnl $Id: configure.ac,v 1.23 2003/07/03 19:25:51 garf Exp $
AC_INIT(vlc,0.6.0)
CXXFLAGS_save="${CXXFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; CXXFLAGS="${CXXFLAGS_save}"
OBJCFLAGS_save="${OBJCFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; OBJCFLAGS="${OBJCFLAGS_save}"
AX_ADD_LDFLAGS([vlc ffmpeg],[-all_load])
+ AX_ADD_LDFLAGS([vlc],[-Wl,-multiply_defined,suppress])
LIBEXT=".dylib"
;;
*mingw32* | *cygwin*)
AM_GNU_GETTEXT
if test "${nls_cv_force_use_gnu_gettext}" = "yes"; then
AC_DEFINE(HAVE_INCLUDED_GETTEXT, 1, Define if we use the local libintl)
- INCLUDES="${INCLUDES} -I\\\$(top_srcdir)/intl"
+ INCLUDES="${INCLUDES} -I\$(top_builddir)/intl"
else
AC_CHECK_FUNCS(textdomain,,[
AC_CHECK_LIB(intl,textdomain,
AC_MSG_RESULT(no)])
dnl Check for headers
-AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h getopt.h strings.h inttypes.h sys/int_types.h)
+AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h getopt.h strings.h inttypes.h sys/int_types.h wchar.h)
AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h sys/ioctl.h sys/stat.h)
AC_CHECK_HEADERS(dlfcn.h image.h)
AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
AC_DEFINE(HAVE_ATTRIBUTE_FORMAT, 1, Support for __attribute__((format())) with function pointers)
fi
+dnl Check for __attribute__(())
+AC_CACHE_CHECK([for __attribute__((packed))],
+ [ac_cv_c_attribute_packed],
+ [ac_cv_c_attribute_packed=no
+ AC_TRY_COMPILE(, [struct __attribute__((__packed__)) foo { int a; } b;],
+ [ac_cv_c_attribute_packed=yes])])
+if test "${ac_cv_c_attribute_packed}" != "no"; then
+ AC_DEFINE(HAVE_ATTRIBUTE_PACKED, 1, Support for __attribute__((packed)) for structs)
+fi
+
dnl
dnl Check the CPU
dnl
AC_ARG_WITH(tuning,
[ --with-tuning=ARCH enable special tuning for an architecture
(default i686 on IA-32 and 750 on PPC)])
-if test "${with_tuning}" != ""; then
+if test -n "${with_tuning}"; then
if test "${target_cpu}" = "powerpc"; then
CFLAGS_TUNING="-mtune=${with_tuning}"
else
[ --with-dvdcss-tree=PATH libdvdcss tree for static linking])
case "${with_dvdcss}" in
""|yes)
- if test "${with_dvdcss_tree}" = ""
+ if test -z "${with_dvdcss_tree}"
then
AC_CHECK_HEADERS(dvdcss/dvdcss.h,
[ AX_ADD_PLUGINS([dvd])
else
AC_MSG_CHECKING(for libdvdcss.a in ${with_dvdcss_tree})
real_dvdcss_tree="`cd ${with_dvdcss_tree} 2>/dev/null && pwd`"
- if test "${real_dvdcss_tree}" = ""
+ if test -z "${real_dvdcss_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
[ --with-dvdread=PATH libdvdread headers and libraries])
AC_ARG_WITH(dvdread-tree,
[ --with-dvdread-tree=PATH libdvdread tree for static linking])
- if test "${with_dvdread}" = ""
+ if test -z "${with_dvdread}"
then
- if test "${with_dvdread_tree}" = ""
+ if test -z "${with_dvdread_tree}"
then
AC_CHECK_HEADERS(dvdread/dvd_reader.h,
[ AX_ADD_PLUGINS([dvdread])
AX_ADD_LDFLAGS([dvdread],[-ldvdread ${LDFLAGS_dvdcss}])
],[
- if test "${enable_dvdread}" != ""
+ if test -n "${enable_dvdread}"
then
AC_MSG_WARN([Please get libdvdread from http://www.dtek.chalmers.se/groups/dvd/downloads.shtml])
AC_MSG_ERROR([cannot find libdvdread headers])
else
AC_MSG_CHECKING(for libdvdread.a in ${with_dvdread_tree})
real_dvdread_tree="`cd ${with_dvdread_tree} 2>/dev/null && pwd`"
- if test "${real_dvdread_tree}" = ""
+ if test -z "${real_dvdread_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
[ --with-dvdplay=PATH libdvdplay headers and libraries])
AC_ARG_WITH(dvdplay-tree,
[ --with-dvdplay-tree=PATH libdvdplay tree for static linking])
- if test "${with_dvdplay}" = ""
+ if test -z "${with_dvdplay}"
then
- if test "${with_dvdplay_tree}" = ""
+ if test -z "${with_dvdplay_tree}"
then
AC_CHECK_HEADERS(dvdplay/dvdplay.h,[
AX_ADD_PLUGINS([dvdplay])
AX_ADD_LDFLAGS([dvdplay],[-ldvdplay ${LDFLAGS_dvdread} ${LDFLAGS_dvdcss}])
AX_ADD_CPPFLAGS([dvdplay],[${CPPFLAGS_dvdread}])
],[
- if test "${enable_dvdplay}" != ""
+ if test -n "${enable_dvdplay}"
then
AC_MSG_WARN([Please get libdvdplay from http://www.videolan.org/.])
AC_MSG_ERROR([cannot find libdvdplay headers])
else
AC_MSG_CHECKING(for libdvdplay.a in ${with_dvdplay_tree})
real_dvdplay_tree="`cd ${with_dvdplay_tree} 2>/dev/null && pwd`"
- if test "${real_dvdplay_tree}" = ""
+ if test -z "${real_dvdplay_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
[ --with-dvbpsi-tree=PATH libdvbpsi tree for static linking])
case "${with_dvbpsi}" in
""|yes)
- if test "${with_dvbpsi_tree}" = ""
+ if test -z "${with_dvbpsi_tree}"
then
AC_CHECK_HEADERS(dvbpsi/dr.h,
[ AX_ADD_PLUGINS([ts_dvbpsi mux_ts_dvbpsi])
else
AC_MSG_CHECKING(for libdvbpsi.a in ${with_dvbpsi_tree})
real_dvbpsi_tree="`cd ${with_dvbpsi_tree} 2>/dev/null && pwd`"
- if test "${real_dvbpsi_tree}" = ""
+ if test -z "${real_dvbpsi_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
;;
*)
AC_MSG_CHECKING(for dvbpsi headers in ${with_dvbpsi})
- if test "${with_dvbpsi}" = ""
+ if test -z "${with_dvbpsi}"
then
LDFLAGS_test=""
CPPFLAGS_test=""
AX_ADD_LDFLAGS([ts_dvbpsi mux_ts_dvbpsi],[${LDFLAGS_test} -ldvbpsi])
],[
- if test "${enable_dvbpsi}" != ""
+ if test -n "${enable_dvbpsi}"
then
AC_MSG_ERROR([Could not find libdvbpsi on your system: you may get it from www.videolan.org, you'll need at least version 0.1.1])
fi
[ --enable-v4l Video4Linux input support (default disabled)])
if test "${enable_v4l}" = "yes"
then
+ AC_ARG_WITH(v4l,
+ [ --with-v4l=PATH path to a v4l-enabled kernel tree],[],[])
+ if test "${with_v4l}" != "no" -a -n "${with_v4l}"
+ then
+ AX_ADD_CPPFLAGS([v4l],[-I${with_v4l}/include])
+ fi
+
+ CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_v4l}"
AC_CHECK_HEADERS(linux/videodev.h, [
AX_ADD_PLUGINS([v4l])
- ],[])
+ ],[])
+ CPPFLAGS="${CPPFLAGS_save}"
fi
dnl
then
AC_LANG_PUSH(C++)
dnl matroska headers include ebml headers directly... pouah that stinks
- CPPFLAGS="${CPPFLAGS_save} -I/usr/include/ebml -I/usr/include/matroska"
- AC_CHECK_HEADERS(EbmlVersion.h KaxVersion.h, [
+ CPPFLAGS="${CPPFLAGS_save} -I/usr/local/include/ebml -I/usr/include/ebml"
+ AC_CHECK_HEADERS(EbmlVersion.h matroska/KaxVersion.h, [
AX_ADD_PLUGINS([mkv])
- AX_ADD_CXXFLAGS([mkv],[-I/usr/include/ebml -I/usr/include/matroska])
- AX_ADD_LDFLAGS([mkv],[-lmatroska -lebml])
+ AX_ADD_CXXFLAGS([mkv],[-I/usr/local/include/ebml -I/usr/include/ebml])
+ AC_CHECK_LIB(ebml_pic,main,[
+ # We have ebml_pic, that's good, we can build an mkv.so plugin !
+ AX_ADD_LDFLAGS([mkv],[-lmatroska_pic -lebml_pic])
+ ],[
+ AX_ADD_LDFLAGS([mkv],[-lmatroska -lebml])
+ ])
],[
AC_MSG_ERROR([libebml or libmatroska include files not found])
])
then
AC_ARG_WITH(mad,
[ --with-mad=PATH path to libmad],[],[])
- if test "${with_mad}" != "no" -a "${with_mad}" != ""
+ if test "${with_mad}" != "no" -a -n "${with_mad}"
then
AX_ADD_CPPFLAGS([mpgatofixed32],[-I${with_mad}/include])
AX_ADD_LDFLAGS([mpgatofixed32],[-L${with_mad}/lib])
AC_ARG_WITH(mad-tree,
[ --with-mad-tree=PATH mad tree for static linking],[],[])
- if test "${with_mad_tree}" != "no" -a "${with_mad_tree}" != ""
+ if test "${with_mad_tree}" != "no" -a -n "${with_mad_tree}"
then
real_mad_tree="`cd ${with_mad_tree} 2>/dev/null && pwd`"
- if test "${real_mad_tree}" = ""
+ if test -z "${real_mad_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
dnl
dnl test for !(--with-ffmpeg-tree)
dnl
- if test "${with_ffmpeg_tree}" == "no" -o "${with_ffmpeg_tree}" == "";then
+ if test "${with_ffmpeg_tree}" = "no" -o -z "${with_ffmpeg_tree}";then
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
AC_CHECK_HEADERS(ffmpeg/avcodec.h postproc/postprocess.h)
dnl
dnl test for --with-ffmpeg-tree
dnl
- if test "${with_ffmpeg_tree}" != "no" -a "${with_ffmpeg_tree}" != "";then
+ if test "${with_ffmpeg_tree}" != "no" -a -n "${with_ffmpeg_tree}";then
AC_MSG_CHECKING(for libavcodec.a in ${with_ffmpeg_tree})
real_ffmpeg_tree="`cd ${with_ffmpeg_tree} 2>/dev/null && pwd`"
- if test "${real_ffmpeg_tree}" = ""; then
+ if test -z "${real_ffmpeg_tree}"; then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_ffmpeg_tree}])
AX_ADD_CPPFLAGS([encoder_ffmpeg],[${CPPFLAGS_ffmpeg}])
dnl XXX: we don't link with -lavcodec blah blah blah
dnl AX_ADD_LDFLAGS([encoder_ffmpeg],[${LDFLAGS_ffmpeg}])
+
+ AC_CHECK_HEADERS(vorbis/vorbisenc.h vorbis/codec.h,
+ AX_ADD_LDFLAGS([stream_out_transcode],[-lvorbisenc -lvorbis -logg]) )
fi
dnl
then
AC_ARG_WITH(faad-tree,
[ --with-faad-tree=PATH faad tree for static linking])
- if test "${with_faad_tree}" != ""
+ if test -n "${with_faad_tree}"
then
AC_MSG_CHECKING(for libfaad.a in ${with_faad_tree})
real_faad_tree="`cd ${with_faad_tree} 2>/dev/null && pwd`"
- if test "${real_faad_tree}" = ""
+ if test -z "${real_faad_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
then
AC_ARG_WITH(xvid,
[ --with-xvid=PATH path to xvid installation],[],[])
- if test "${with_xvid}" != "no" -a "${with_xvid}" != ""
+ if test "${with_xvid}" != "no" -a -n "${with_xvid}"
then
AX_ADD_CPPFLAGS([xvid],[-I${with_xvid}/include])
AX_ADD_LDFLAGS([xvid],[-L${with_xvid}/lib])
AC_ARG_WITH(xvid-tree,
[ --with-xvid-tree=PATH xvid tree for static linking])
- if test "${with_xvid_tree}" != ""
+ if test -n "${with_xvid_tree}"
then
AC_MSG_CHECKING(for libxvidcore.a in ${with_xvid_tree})
real_xvid_tree="`cd ${with_xvid_tree} 2>/dev/null && pwd`"
- if test "${real_xvid_tree}" = ""
+ if test -z "${real_xvid_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
[ --with-a52=PATH a52 headers and libraries])
AC_ARG_WITH(a52-tree,
[ --with-a52-tree=PATH a52dec tree for static linking ],[],[])
- if test "${with_a52_tree}" != "no" -a "${with_a52_tree}" != ""
+ if test "${with_a52_tree}" != "no" -a -n "${with_a52_tree}"
then
real_a52_tree="`cd ${with_a52_tree} 2>/dev/null && pwd`"
- if test "${real_a52_tree}" = ""
+ if test -z "${real_a52_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
AC_MSG_ERROR([the specified tree doesn't have a52.h])
fi
else
- if test "${with_a52}" = ""
+ if test -z "${with_a52}"
then
LDFLAGS_test=""
CPPFLAGS_test=""
then
AC_ARG_WITH(libmpeg2-tree,
[ --with-libmpeg2-tree=PATH libmpeg2 tree for static linking])
- if test "${with_libmpeg2_tree}" != ""
+ if test -n "${with_libmpeg2_tree}"
then
AC_MSG_CHECKING(for libmpeg2.a in ${with_libmpeg2_tree})
real_libmpeg2_tree="`cd ${with_libmpeg2_tree} 2>/dev/null && pwd`"
- if test "${real_libmpeg2_tree}" = ""
+ if test -z "${real_libmpeg2_tree}"
then
dnl The given directory can't be found
AC_MSG_RESULT(no)
then
AC_ARG_WITH(tarkin-tree,
[ --with-tarkin-tree=PATH tarkin tree for static linking])
- if test "${with_tarkin_tree}" != ""
+ if test -n "${with_tarkin_tree}"
then
AC_MSG_CHECKING(for tarkin.o in ${with_tarkin_tree})
real_tarkin_tree="`cd ${with_tarkin_tree} 2>/dev/null && pwd`"
])
fi
+dnl
+dnl Video Filters
+dnl
+
+dnl
+dnl png
+dnl
+AC_CHECK_HEADERS(png.h, [
+ AX_ADD_LDFLAGS([logo],[-lpng])
+ AX_ADD_PLUGINS([logo])])
+
dnl
dnl Video plugins
dnl
[ --with-sdl-prefix=PATH path to libsdl (needed for cross-compiling),
e.g use as:
--with-sdl-prefix=/usr/local/arm/2.95.3/arm-linux/usr)],[],[])
- if test "${with_sdl_prefix}" != "no" -a "${with_sdl_prefix}" != ""
+ if test "${with_sdl_prefix}" != "no" -a -n "${with_sdl_prefix}"
then
SDL_PREFIX="--prefix=${with_sdl_prefix}"
fi
then
AC_ARG_WITH(qte,
[ --with-qte=PATH Qt Embedded headers and libraries])
- if test "${with_qte}" != "no" -a "${with_qte}" != ""
+ if test "${with_qte}" != "no" -a -n "${with_qte}"
then
AX_ADD_LDFLAGS([qte],[-L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte])
AX_ADD_CXXFLAGS([qte],[-I${with_qte}/include `echo -I${with_qte}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti])
then
AC_ARG_WITH(directx,
[ --with-directx=PATH Win32 DirectX headers])
- if test "${with_directx}" = ""
+ if test -z "${with_directx}"
then
AC_CHECK_HEADERS(ddraw.h,
[ AX_ADD_PLUGINS([vout_directx aout_directx])
AX_ADD_LDFLAGS([ggi],[-lggi])
AC_ARG_WITH(ggi,
[ --with-ggi=PATH path to libggi],
- [ if test "${with_ggi}" != "no" -a "${with_ggi}" != ""
+ [ if test "${with_ggi}" != "no" -a -n "${with_ggi}"
then
AX_ADD_CPPFLAGS([ggi],[-I${with_ggi}/include])
AX_ADD_LDFLAGS([ggi],[-L${with_ggi}/lib])
AX_ADD_CPPFLAGS([glide],[-I/usr/include/glide])
AC_ARG_WITH(glide,
[ --with-glide=PATH path to libglide],
- [ if test "${with_glide}" != "no" -a "${with_glide}" != ""
+ [ if test "${with_glide}" != "no" -a -n "${with_glide}"
then
AX_ADD_CPPFLAGS([glide],[-I${with_glide}/include])
AX_ADD_LDFLAGS([glide],[-L${with_glide}/lib])
[ --with-gtk-prefix=PATH path to libgtk (needed for cross-compiling),
e.g use as:
--with-gtk-prefix=/usr/local/arm/2.95.3/arm-linux/usr)],[],[])
- if test "${with_gtk_prefix}" != "no" -a "${with_gtk_prefix}" != ""
+ if test "${with_gtk_prefix}" != "no" -a -n "${with_gtk_prefix}"
then
GTK_PREFIX="--prefix=${with_gtk_prefix}"
fi
# now look for gpe support
AC_ARG_WITH(gpe-prefix,
[ --with-gpe-prefix=PATH gpe installation path prefix (default search in \$PATH)],[],[])
- if test "${with_gpe_prefix}" != "no" -a "${with_gpe_prefix}" != ""
+ if test "${with_gpe_prefix}" != "no" -a -n "${with_gpe_prefix}"
then
AX_ADD_CFLAGS([gpe],[-I${with_gpe_prefix}/include])
AX_ADD_LDFLAGS([gpe],[-lXi -lgdk_pixbuf -L${with_gpe_prefix}/lib -lgpewidget])
[if test "${enable_opie}" = "yes"; then
AC_ARG_WITH(qte,
[ --with-qte=PATH Qt Embedded headers and libraries])
- if test "${with_qte}" != "no" -a "${with_qte}" != ""
+ if test "${with_qte}" != "no" -a -n "${with_qte}"
then
AX_ADD_LDFLAGS([qte],[-L${with_qte}/lib `echo -L${with_qte}/lib | sed 's,opt/QtPalmtop,usr,'` -ljpeg -lqte])
AX_ADD_CXXFLAGS([qte],[-I${with_qte}/include `echo -I${with_qte}/include | sed 's,opt/QtPalmtop,usr,'` -DQT_QWS_IPAQ -DQWS -fno-exceptions -fno-rtti])
NEED_QTE_MAIN=yes
AX_ADD_LDFLAGS([opie],[-lqpe ${LDFLAGS_qte}])
AX_ADD_CXXFLAGS([opie],[${CXXFLAGS_qte}])
- if test "${with_qte}" != "no" -a "${with_qte}" != ""
+ if test "${with_qte}" != "no" -a -n "${with_qte}"
then
MOC=${with_qte}/bin/moc
else
then
AC_ARG_WITH(slp,
[ --with-slp=PATH libslp headers and libraries])
- if test "${with_slp}" = ""
+ if test -z "${with_slp}"
then
AC_CHECK_HEADER(slp.h, have_slp="true", have_slp="false")
if test "${have_slp}" = "true"
AX_ADD_CPPFLAGS([mozilla],[[`${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`]])
AX_ADD_LDFLAGS([mozilla],[`${MOZILLA_CONFIG} --libs plugin xpcom`])
dnl Not necessarily in ${PATH}
- if test "${XPIDL}" = "" -o ! -x "${XPIDL}"
+ if test -z "${XPIDL}" -o ! -x "${XPIDL}"
then
XPIDL="/usr/lib/mozilla/xpidl"
fi
dnl
dnl Handle substvars that use $(top_srcdir)
dnl
-VLC_CONFIG="\$(top_srcdir)/vlc-config"
+VLC_CONFIG="\$(top_builddir)/vlc-config"
AC_SUBST(VLC_CONFIG)
CPPFLAGS_save="${CPPFLAGS_save} -I\$(top_srcdir)/include"