dnl Autoconf settings for vlc
-dnl $Id: configure.ac,v 1.64 2003/08/21 16:59:35 hartman Exp $
+dnl $Id: configure.ac,v 1.87 2003/10/07 21:13:01 sam Exp $
AC_INIT(vlc,0.6.3-cvs)
bsdi*)
SYS=bsdi
CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
- AX_ADD_LDFLAGS([dvd dvdcss vcd cdda],[-ldvd])
+ AX_ADD_LDFLAGS([dvd dvdcss vcd cdda vcdx cddax],[-ldvd])
;;
*bsd*)
SYS="${target_os}"
CFLAGS_save="${CFLAGS_save} -Wno-multichar"; CFLAGS="${CFLAGS_save}"
CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar"; CXXFLAGS="${CXXFLAGS_save}"
AX_ADD_LDFLAGS([vlc beos],[-lbe])
- AX_ADD_CXXFLAGS([beos],[])
AX_ADD_LDFLAGS([beos],[-lmedia -ltranslation -ltracker -lgame])
dnl Check for BONE presence
AC_CHECK_LIB(socket, connect,
AX_ADD_LDFLAGS([vlc access_mms ipv4 httpd],[-lsocket -lbind]))
- dnl Check for Zeta
- AC_CHECK_LIB(zeta, find_directory_r, AX_ADD_LDFLAGS([vlc beos],[-lzeta]))
+ dnl Kludgy check for Zeta
+ if test -f /boot/beos/system/lib/libzeta.so; then
+ AX_ADD_LDFLAGS([beos],[-lzeta])
+ fi
;;
*)
SYS="${target_os}"
AC_CHECK_FUNCS(strcasecmp,,[AC_CHECK_FUNCS(stricmp)])
AC_CHECK_FUNCS(strncasecmp,,[AC_CHECK_FUNCS(strnicmp)])
+dnl Check for setlocal and langinfo
+AC_CHECK_FUNCS(setlocale)
+AC_CHECK_HEADERS(langinfo.h)
+AC_CHECK_FUNCS(nl_langinfo)
+
+AC_CACHE_CHECK([for nl_langinfo and CODESET], ac_cv_langinfo_codeset,
+ [AC_TRY_LINK([#include <langinfo.h>],
+ [char* cs = nl_langinfo(CODESET);],
+ ac_cv_langinfo_codeset=yes,
+ ac_cv_langinfo_codeset=no)
+ ])
+if test ${ac_cv_langinfo_codeset} = yes; then
+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+fi
+
AC_CHECK_FUNCS(connect,,[
AC_CHECK_LIB(socket,connect,[
AX_ADD_LDFLAGS([vlc ipv4],-lsocket)
if test "${SYS}" != "mingw32"; then
AC_TYPE_SIGNAL
-AC_CHECK_LIB(dl,dlopen,[
- AX_ADD_LDFLAGS([vlc],[-ldl])
-])
AC_CHECK_LIB(m,cos,[
- AX_ADD_LDFLAGS([imdct adjust distort a52tofloat32],[-lm])
+ AX_ADD_LDFLAGS([adjust distort a52tofloat32],[-lm])
])
AC_CHECK_LIB(m,pow,[
- AX_ADD_LDFLAGS([ffmpeg stream_out_transcode imdct imdct3dn imdctsse i420_rgb faad],[-lm])
+ AX_ADD_LDFLAGS([ffmpeg stream_out_transcode i420_rgb faad],[-lm])
])
AC_CHECK_LIB(m,sqrt,[
AX_ADD_LDFLAGS([headphone_channel_mixer],[-lm])
])
fi # end "${SYS}" != "mingw32"
+dnl Check for dynamic plugins
+ac_cv_have_plugins=no
+
+# OS X style
+AC_CHECK_HEADERS(mach-o/dyld.h,
+ [AC_CHECK_FUNCS(NSLinkModule,
+ [AC_DEFINE(HAVE_DL_DYLD, 1, [Define if you have the Darwin dyld API])
+ ac_cv_have_plugins=yes])])
+
+# HP-UX style
+if test "${ac_cv_have_plugins}" = "no"; then
+ AC_CHECK_HEADERS(dl.h)
+ ac_cv_my_have_shl_load=no
+ AC_CHECK_FUNC(shl_load,
+ [ac_cv_my_have_shl_load=yes,
+ AC_CHECK_LIB(dld, shl_load,
+ [ac_cv_my_have_shl_load=yes
+ AX_ADD_LDFLAGS([vlc],[-ldld])])])
+ if test "${ac_cv_my_have_shl_load}" = "yes"; then
+ AC_DEFINE(HAVE_DL_SHL_LOAD, 1, [Define if you have the shl_load API])
+ ac_cv_have_plugins=yes
+ fi
+fi
+
+# Whatever style
+if test "${ac_cv_have_plugins}" = "no"; then
+ AC_CHECK_LIB(dld, dld_link,
+ [AX_ADD_LDFLAGS([vlc],[-ldld])
+ AC_DEFINE(HAVE_DL_DLD_LINK, 1, [Define if you have the GNU dld library])
+ ac_cv_have_plugins=yes])
+fi
+
+# Win32 style
+if test "${ac_cv_have_plugins}" = "no"; then
+ if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
+ AC_CHECK_LIB(kernel32, main,
+ [AX_ADD_LDFLAGS([vlc],[-lkernel32])
+ AC_DEFINE(HAVE_DL_WINDOWS, 1, [Define if you have Windows' LoadLibrary])
+ ac_cv_have_plugins=yes])
+ fi
+fi
+
+# BeOS style
+if test "${ac_cv_have_plugins}" = "no"; then
+ AC_CHECK_HEADERS(image.h)
+ AC_CHECK_FUNCS(load_add_on,
+ [AC_DEFINE(HAVE_DL_BEOS, 1, [Define if you have the BeOS dl])
+ ac_cv_have_plugins=yes])
+fi
+
+# Only test for dlopen() if the others didn't work
+if test "${ac_cv_have_plugins}" = "no"; then
+ AC_CHECK_HEADERS(dlfcn.h sys/dl.h)
+ ac_cv_my_have_dlopen=no
+ AC_CHECK_FUNC(dlopen,
+ ac_cv_my_have_dlopen=yes,
+ AC_CHECK_LIB(dl, dlopen,
+ ac_cv_my_have_dlopen=yes
+ AX_ADD_LDFLAGS([vlc],[-ldl]),
+ AC_CHECK_LIB(svld, dlopen,
+ ac_cv_my_have_dlopen=yes
+ AX_ADD_LDFLAGS([vlc],[-lsvld]))))
+ if test "${ac_cv_my_have_dlopen}" = "yes"; then
+ AC_DEFINE(HAVE_DL_DLOPEN, 1, [Define if you have the dlopen API])
+ ac_cv_have_plugins=yes
+ fi
+fi
+
if test "${SYS}" != "mingw32"; then
dnl Check for pthreads - borrowed from XMMS
THREAD_LIB=error
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 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)
if test "${SYS}" != "mingw32"; then
AC_CHECK_HEADERS(machine/param.h sys/shm.h)
;;
esac
-case "${ARCH}" in
- hppa64)
- AX_ADD_CFLAGS([mpeg_video_old],[-ffunction-sections])
- ;;
-esac
-
dnl
dnl Enable profiling
dnl
dnl
dnl default modules
dnl
-#AX_ADD_BUILTINS([mpeg_video_old idct idctclassic motion])
AX_ADD_PLUGINS([dummy rc logger gestures memcpy])
AX_ADD_PLUGINS([es mpga m4v mpeg_system ps ts avi asf aac mp4 rawdv])
AX_ADD_PLUGINS([spudec mpeg_audio lpcm a52 dts cinepak])
if test "${enable_sout}" != "no"
then
AX_ADD_PLUGINS([access_output_dummy access_output_udp access_output_file access_output_http])
- AX_ADD_PLUGINS([mux_ts mux_ps mux_avi mux_mp4 mux_dummy])
- AX_ADD_PLUGINS([packetizer_mpegaudio packetizer_mpegvideo packetizer_a52])
+ AX_ADD_PLUGINS([mux_ts mux_ps mux_avi mux_mp4 mux_asf mux_dummy])
+ AX_ADD_PLUGINS([packetizer_mpegaudio packetizer_mpegvideo])
AX_ADD_PLUGINS([packetizer_mpeg4video packetizer_mpeg4audio])
AX_ADD_PLUGINS([packetizer_copy])
AX_ADD_PLUGINS([stream_out_dummy stream_out_standard stream_out_es])
- AX_ADD_PLUGINS([stream_out_duplicate stream_out_display])
+ AX_ADD_PLUGINS([stream_out_duplicate stream_out_display stream_out_gather])
dnl Ogg and vorbis are handled in their respective section
fi
fi
fi
+dnl
+dnl Windows DirectShow access module
+dnl
+AC_ARG_ENABLE(dshow,
+ [ --enable-dshow Win32 DirectShow support (default enabled on Win32)])
+if test "${enable_dshow}" != "no"
+then
+ if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
+ then
+ AC_CHECK_HEADERS(dshow.h,
+ [ AX_ADD_PLUGINS([dshow])
+ AX_ADD_CXXFLAGS([dshow],[])
+ AX_ADD_LDFLAGS([dshow],[-lole32 -loleaut32]) ])
+ fi
+fi
+
dnl
dnl libdvbpsi ts demux/mux
dnl
fi
fi
+dnl
+dnl VCDX and CDX modules
+dnl
+AC_ARG_ENABLE(vcdx,
+ [ --enable-vcdx VCD support with Navigation for Linux and Win32 (default enabled)])
+
+if test "${enable_vcdx}" != "no"
+then
+ PKG_CHECK_MODULES(LIBCDIO, libcdio >= 0.63,
+ [enable_cdda="no"
+ AX_ADD_LDFLAGS([cddax],[$LIBCDIO_LIBS])
+ AX_ADD_CFLAGS([cddax],[$LIBCDIO_CFLAGS])
+ AX_ADD_PLUGINS([cddax])],
+ [AC_MSG_WARN(libcdio library not found)])
+
+ PKG_CHECK_MODULES(VCDINFO, libvcdinfo >= 0.7.18-cdio,
+ [enable_vcd="no"
+ AX_ADD_LDFLAGS([vcdx],[$VCDINFO_LIBS])
+ AX_ADD_CFLAGS([vcdx],[$VCDINFO_CFLAGS])
+ AX_ADD_PLUGINS([vcdx])],
+ [AC_MSG_WARN(vcdinfo library not found)])
+fi
+
dnl
dnl Satellite input module
dnl
then
AX_ADD_CFLAGS([dvb],[-I${with_dvb}/include])
fi
-
- CPPFLAGS="${CPPFLAGS_save} ${CFLAGS_dvb}"
+ CPPFLAGS="${CPPFLAGS_save} -I${with_dvb}/include"
AC_CHECK_HEADERS(linux/dvb/version.h linux/dvb/frontend.h, [
AX_ADD_PLUGINS([dvb])
],[])
AX_ADD_LDFLAGS([stream_out_transcode],[])
AX_ADD_LDFLAGS([ffmpeg],[-lmp3lame]) ])
+ AC_ARG_WITH(ffmpeg-faac,
+ [ --with-ffmpeg-faac if ffmpeg has been compiled with faac support],
+ [
+ dnl XXX: we don't link with -lavcodec a 2nd time because the OS X
+ dnl linker would miserably barf on multiple definitions.
+ AX_ADD_LDFLAGS([stream_out_transcode],[])
+ AX_ADD_LDFLAGS([ffmpeg],[-lfaac]) ])
+
AC_ARG_WITH(ffmpeg-tree,
[ --with-ffmpeg-tree=PATH ffmpeg tree for static linking])
fi
fi
- dnl Duplicate the ffmpeg CPPFLAGS and LDFLAGS for the encoder
- 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_have_vorbis_headers=yes
AC_CHECK_HEADERS(vorbis/vorbisenc.h vorbis/codec.h,,
ac_have_vorbis_headers=no)
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
fi
-
- dnl Duplicate the xvid CPPFLAGS and LDFLAGS for the encoder
- AX_ADD_LDFLAGS([encoder_xvid],[${LDFLAGS_xvid}])
- AX_ADD_CPPFLAGS([encoder_xvid],[${CPPFLAGS_xvid}])
fi
dnl
then
AC_CHECK_HEADERS(vorbis/codec.h, [
AX_ADD_PLUGINS([vorbis])
- AX_ADD_LDFLAGS([vorbis],[-lvorbis -logg])
- if test "${enable_sout}" != "no"; then
- AX_ADD_PLUGINS([packetizer_vorbis])
- AX_ADD_LDFLAGS([packetizer_vorbis],[-lvorbis -logg])
- fi ],[])
+ AX_ADD_LDFLAGS([vorbis],[-lvorbis -logg]) ],[])
fi
dnl
fi
dnl
-dnl Gtk+2 module ! Disabled for know as it is unuseable and confuses users
+dnl Gtk+2 module ! Disabled for now as it is unusable and confuses users
dnl
dnl AC_ARG_ENABLE(gtk2,
dnl [ --enable-gtk2 Gtk2 support (default disabled)])
dnl PDA Gtk+2 module
dnl
AC_ARG_ENABLE(pda,
- [ --enable-pda PDA interface needs Gtk2 suport (default disabled)])
+ [ --enable-pda PDA interface needs Gtk2 support (default disabled)])
if test "x${enable_pda}" = "xyes"
then
PKG_CHECK_MODULES(GTK2, [gtk+-2.0 >= 2.0.0, gthread-2.0])
AX_ADD_PLUGINS([visual])
fi
+dnl
+dnl goom visualization plugin
+dnl
+AC_ARG_ENABLE(goom,
+[ --enable-goom goom visualisation plugin (default disabled)])
+if test "${enable_goom}" = "yes"
+then
+ AC_ARG_WITH(goom-tree,
+ [ --with-goom-tree=PATH goom tree for static linking (required)])
+
+ dnl
+ dnl test for --with-goom-tree
+ dnl
+ if test "${with_goom_tree}" != "no" -a -n "${with_goom_tree}";then
+ AC_MSG_CHECKING(for libgoom.a in ${with_goom_tree})
+ real_goom_tree="`cd ${with_goom_tree} 2>/dev/null && pwd`"
+ if test -z "${real_goom_tree}"; then
+ dnl The given directory can't be found
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([cannot cd to ${with_goom_tree}])
+ fi
+ if test -f "${real_goom_tree}/libgoom.a"; then
+ AC_MSG_RESULT(${real_goom_tree}/libgoom.a)
+ AX_ADD_BUILTINS([goom])
+ AX_ADD_LDFLAGS([goom],[-L${real_goom_tree} -lgoom])
+ AX_ADD_CPPFLAGS([goom],[-I${real_goom_tree}])
+ else
+ dnl The given libgoom wasn't built
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([cannot find ${real_goom_tree}/libgoom.a, make sure you compiled goom in ${with_goom_tree}])
+ fi
+ else
+ dnl The --with-goom-tree isn't specified wasn't built
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([You have to specify a tree with --with-goom-tree])
+ fi
+fi
+
dnl
dnl SLP access plugin
dnl
mozilla=false
AC_ARG_ENABLE(mozilla,
[ --enable-mozilla build a vlc-based Mozilla plugin (default disabled)])
-if test "${enable_mozilla}" = "yes"
+if test "${enable_mozilla}" = "yes" -a "${SYS}" != "mingw32"
then
AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
if test "${MOZILLA_CONFIG}" = "no"
dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
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 -z "${XPIDL}" -o ! -x "${XPIDL}"
- then
- XPIDL="/usr/lib/mozilla/xpidl"
- fi
fi
+
+dnl special case for mingw32
+elif test "${enable_mozilla}" = "yes"
+then
+ AC_ARG_WITH(mozilla-sdk-path,
+ [ --with-mozilla-sdk-path=PATH path to win32 mozilla sdk], [
+ AC_MSG_CHECKING(for mozilla-config.h in ${with_mozilla_sdk_path})
+ real_mozilla_sdk="`cd ${with_mozilla_sdk_path} 2>/dev/null && pwd`"
+ if test -z "${real_mozilla_sdk}"; then
+ dnl The given directory can't be found
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([cannot cd to ${with_mozilla_sdk_path}])
+ fi
+ if test -f "${real_mozilla_sdk}/mozilla-config.h"; then
+ AC_MSG_RESULT(${real_mozilla_sdk}/mozilla-config.h)
+ mozilla=:
+ AX_ADD_CPPFLAGS([mozilla],[-DXPCOM_GLUE -I${real_mozilla_sdk} -I${real_mozilla_sdk}/embedstring/include -I${real_mozilla_sdk}/xpcom/include -I${real_mozilla_sdk}/nspr/include -I${real_mozilla_sdk}/string/include -I${real_mozilla_sdk}/plugin/include -I${real_mozilla_sdk}/java/include])
+ AX_ADD_LDFLAGS([mozilla],[-L${real_mozilla_sdk}/embedstring/bin -L${real_mozilla_sdk}/xpcom/bin -L${real_mozilla_sdk}/nspr/bin -L${real_mozilla_sdk}/string/bin -lnspr4 -lplds4 -lplc4 -lembedstring -lxpcomglue -Wl,--kill-at])
+ XPIDL_INCL="-I${real_mozilla_sdk}/xpcom/idl"
+ else
+ dnl The given path is incorrect
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR([cannot find ${real_mozilla_sdk}/mozilla-config.h])
+ fi
+ ])
+fi
+
+dnl Not necessarily in ${PATH}
+if test -z "${XPIDL}" -o ! -x "${XPIDL}"; then
+ XPIDL="/usr/lib/mozilla/xpidl"
fi
AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
if test "${NEED_GTK_MAIN}" != "no"
then
AX_ADD_PLUGINS([gtk_main])
- AX_ADD_CFLAGS([gtk pda],[-DNEED_GTK_MAIN])
- AX_ADD_CFLAGS([gtk_main],[${CFLAGS_gtk} ${CFLAGS_pda}])
- AX_ADD_LDFLAGS([gtk_main],[${LDFLAGS_gtk} ${LDFLAGS_pda}])
+ AX_ADD_CFLAGS([gtk_main],[${CFLAGS_gtk}])
+ AX_ADD_LDFLAGS([gtk_main],[${LDFLAGS_gtk}])
fi
if test "${NEED_GNOME_MAIN}" != "no"
then
AX_ADD_PLUGINS([gtk2_main])
AX_ADD_CFLAGS([gtk2],[-DNEED_GTK2_MAIN])
- AX_ADD_CFLAGS([gtk2_main],[${CFLAGS_gtk2}])
- AX_ADD_LDFLAGS([gtk2_main],[${LDFLAGS_gtk2}])
+ AX_ADD_CFLAGS([pda],[-DNEED_GTK2_MAIN])
+ AX_ADD_CFLAGS([gtk2_main],[${CFLAGS_gtk2} ${CFLAGS_pda}])
+ AX_ADD_LDFLAGS([gtk2_main],[${LDFLAGS_gtk2} ${LDFLAGS_pda}])
fi
if test "${NEED_GNOME2_MAIN}" != "no"
dnl Automagically disable plugins if there is no system support for
dnl dynamically loadable files (.so, .dll, .dylib).
dnl don't forget vlc-win32 still can load .dll as plugins
-if test "${ac_cv_header_dlfcn_h}" = "no" -a "${ac_cv_header_image_h}" = "no" -a "${SYS}" != "mingw32"
+if test "${ac_cv_have_plugins}" = "no"
then
echo "*** Your system doesn't have plugin support. All plugins will be built"
echo "statically."
AC_SUBST(MOC)
AC_SUBST(WINDRES)
AC_SUBST(XPIDL)
+AC_SUBST(XPIDL_INCL)
AC_SUBST(LIBEXT)
AC_SUBST(INCLUDES)
AC_SUBST(ALL_LINGUAS)
src/Makefile
modules/access/Makefile
+ modules/access/dshow/Makefile
modules/access/dvb/Makefile
modules/access/dvd/Makefile
modules/access/dvdplay/Makefile
modules/access/satellite/Makefile
modules/access/v4l/Makefile
modules/access/vcd/Makefile
+ modules/access/vcdx/Makefile
modules/access_output/Makefile
modules/audio_filter/Makefile
modules/audio_filter/channel_mixer/Makefile
modules/audio_mixer/Makefile
modules/audio_output/Makefile
modules/codec/Makefile
- modules/codec/a52old/Makefile
- modules/codec/a52old/downmix/Makefile
- modules/codec/a52old/imdct/Makefile
- modules/codec/cinepak/Makefile
modules/codec/faad/Makefile
modules/codec/ffmpeg/Makefile
modules/codec/ffmpeg/postprocessing/Makefile
- modules/codec/mpeg_audio/Makefile
- modules/codec/mpeg_video/Makefile
- modules/codec/mpeg_video/idct/Makefile
- modules/codec/mpeg_video/motion/Makefile
modules/codec/spudec/Makefile
- modules/codec/subsdec/Makefile
modules/control/Makefile
modules/control/corba/Makefile
modules/control/lirc/Makefile
modules/demux/mp4/Makefile
modules/demux/mpeg/Makefile
modules/demux/util/Makefile
- modules/encoder/Makefile
- modules/encoder/ffmpeg/Makefile
modules/gui/Makefile
modules/gui/beos/Makefile
modules/gui/pda/Makefile