[AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
])
-dnl Check for Linux system calls
-AC_CHECK_FUNCS([vmsplice])
+dnl Check for non-standard system calls
+AC_CHECK_FUNCS([vmsplice fstatfs])
AH_BOTTOM([#include <vlc_fixups.h>])
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
fi
+SOCKET_LIBS=""
AC_CHECK_FUNCS(connect,,[
AC_CHECK_LIB(socket,connect,[
VLC_ADD_LIBS([libvlccore cdda cddax],-lsocket)
- LIBS_socket="-lsocket"
+ SOCKET_LIBS="-lsocket"
])
])
+AC_SUBST(SOCKET_LIBS)
AC_CHECK_FUNCS(send,,[
AC_CHECK_LIB(socket,send,[
dnl we purposedly make the test fail on Windows
LIBS_save="${LIBS}"
AH_TEMPLATE(HAVE_GETADDRINFO, [Define to 1 if you have the `getaddrinfo' function.])
-AC_SEARCH_LIBS([getaddrinfo], [nsl], [AC_DEFINE(HAVE_GETADDRINFO)],, [${LIBS_socket}])
+AC_SEARCH_LIBS([getaddrinfo], [nsl], [AC_DEFINE(HAVE_GETADDRINFO)],, [${SOCKET_LIBS}])
dnl NOTE: we assume getaddrinfo will be present if getnameinfo or gai_strerro
dnl are
VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain scene],[-lm])
])
AC_CHECK_LIB(m,pow,[
- VLC_ADD_LIBS([avcodec avformat swscale postproc ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer spatializer param_eq libvlccore freetype mod mpc dmo quicktime realaudio realvideo galaktos opengl],[-lm])
+ VLC_ADD_LIBS([avcodec avformat swscale postproc ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer spatializer param_eq libvlccore freetype mod mpc dmo quicktime realaudio realvideo opengl],[-lm])
])
AC_CHECK_LIB(m,sqrt,[
VLC_ADD_LIBS([headphone_channel_mixer normvol speex mono colorthres extract],[-lm])
dnl
dnl gnomeVFS access module
dnl
-PKG_ENABLE_MODULES_VLC([GNOMEVFS], [], [gnome-vfs-2.0], [GnomeVFS access module], [auto])
+PKG_ENABLE_MODULES_VLC([GNOMEVFS], [access_gnomevfs], [gnome-vfs-2.0], [GnomeVFS access module], [auto])
dnl Need to test libcdio and libvcdinfo for a number of things. Do it now.
AS_IF([test "x${enable_dts}" != "x"], [
AC_MSG_ERROR([--enable-dts is obsolete. Please use libdca and --enable-dca.])
])
-AS_IF([test "x${with_dts_tree}" != "x"], [
- AC_MSG_ERROR([--with-dts-tree is obsolete. Please use libdca and --with-dca-tree.])
-])
-
-AC_ARG_ENABLE(dca,
- AS_HELP_STRING([--enable-dca],[DTS Coherent Acoustics support with libdca
- (default enabled)]))
-AS_IF([test "${enable_dca}" != "no"], [
- AC_ARG_WITH(dca-tree,
- [ --with-dca-tree=PATH libdca tree for static linking],,
- [with_dca_tree="no"])
- AS_IF([test "${with_dca_tree}" != "no"], [
- real_dca_tree="`cd ${with_dca_tree} 2>/dev/null && pwd`"
- AS_IF([test -z "${real_dca_tree}"], [
- dnl The given directory can't be found
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([${with_dca_tree} directory doesn't exist])
- ])
- dnl Use a custom libdca
- AC_MSG_CHECKING(for libdca in ${real_dca_tree})
- AS_IF([test -f "${real_dca_tree}/libdca/.libs/libdca.a"], [
- AC_MSG_RESULT(yes)
- VLC_ADD_LIBS([dtstofloat32],[${real_dca_tree}/libdca/.libs/libdca.a])
- AS_IF([test -f "${real_dca_tree}/include/dca.h"], [
- VLC_ADD_CPPFLAGS([dtstofloat32],[-I${real_dca_tree}/include])
- ], [
- VLC_ADD_CPPFLAGS([dtstofloat32],[-I${real_dca_tree}/../include])
- ])
- ], [
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([the specified tree doesn't have libdca/.libs/libdca.a])
- ])
- ], [
- PKG_CHECK_MODULES([DCA], [libdca >= 0.0.5], [
- VLC_ADD_PLUGIN([dtstofloat32])
- VLC_ADD_CPPFLAGS([dtstofloat32], [${DCA_CFLAGS}])
- VLC_ADD_LIBS([dtstofloat32], [${DCA_LIBS}])
- ], [
- AS_IF([test "x${enable_dca}" != "x"], [
- AC_MSG_ERROR([${DCA_PKG_ERRORS}])
- ])
- ])
- ])
-])
+PKG_ENABLE_MODULES_VLC([DCA], [dtstofloat32], [libdca >= 0.0.5], [DTS Coherent Acoustics support with libdca], [auto])
dnl
dnl Flac plugin
dnl
dnl libxml2 module
dnl
-AC_ARG_ENABLE(libxml2,
- [ --enable-libxml2 libxml2 support (default enabled)])
-AS_IF([test "${enable_libxml2}" != "no"], [
- PKG_CHECK_MODULES([XML2], [libxml-2.0 >= 2.5], [
- VLC_ADD_CPPFLAGS([xml],[${XML2_CFLAGS}])
- VLC_ADD_LIBS([xml],[${XML2_LIBS}])
- VLC_ADD_PLUGIN([xml])
- ], [
- AS_IF([test "x${enable_xml2}" != "x"], [
- AC_MSG_ERROR([Could not find libxml version 2.5 or higher])
- ])
- ])
-])
+PKG_ENABLE_MODULES_VLC([libxml2], [], [libxml-2.0 >= 2.5], [libxml2 support],[auto])
dnl
dnl SVG module
dnl
dnl libcaca plugin
dnl
-AC_ARG_ENABLE(caca,
- [ --enable-caca libcaca output (default disabled)])
-if test "${enable_caca}" = "yes"
-then
- CACA_PATH="${PATH}"
- AC_ARG_WITH(caca-config-path,
- [ --with-caca-config-path=PATH caca-config path (default search in \$PATH)],
- [ if test "${with_caca_config_path}" != "no"
- then
- CACA_PATH="${with_caca_config_path}:${PATH}"
- fi ])
- AC_PATH_PROG(CACA_CONFIG, caca-config, no, ${CACA_PATH})
- if test "${CACA_CONFIG}" != "no"
- then
- VLC_ADD_PLUGIN([caca])
- VLC_ADD_CFLAGS([caca],[`${CACA_CONFIG} --cflags`])
- VLC_ADD_LIBS([caca],[`${CACA_CONFIG} --plugin-libs`])
- AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([[#include <caca.h>
- caca_event_t ev;]],
- [[ev.type = 0;]]
- )],
- [],
- [AC_DEFINE(CACA_EVENT_OPAQUE, [1], ["Define if struct caca_event is opaque and must not be accessed directly"])]
- )
- fi
-fi
+PKG_ENABLE_MODULES_VLC([caca], [], [caca >= 0.99.beta1], [libcaca output],[auto])
dnl
dnl win32 GDI plugin
dnl
dnl Portaudio module
dnl
-AC_ARG_ENABLE(portaudio,
- [ --enable-portaudio Portaudio library support (default disabled)],
- [if test "${enable_portaudio}" = "yes"
- then
- VLC_ADD_PLUGIN([portaudio])
- VLC_ADD_CXXFLAGS([portaudio],[])
- if test "${SYS}" = "mingw32"; then
- VLC_ADD_LIBS([portaudio],[-lportaudio -lwinmm -lole32])
- else
- VLC_ADD_LIBS([portaudio],[-lportaudio])
- fi
- fi])
+PKG_ENABLE_MODULES_VLC([PORTAUDIO], [], [portaudio-2.0], [Portaudio library support], [auto])
dnl
dnl ALSA module
dnl
dnl JACK modules
dnl
-AC_ARG_ENABLE(jack,
- [ --enable-jack JACK audio I/O modules (default disabled)],,
- [enable_jack="no"])
+PKG_ENABLE_MODULES_VLC([JACK], [jack], [jack], [JACK audio I/O modules],[auto])
+PKG_ENABLE_MODULES_VLC([JACK], [access_jack], [jack], [JACK audio I/O modules],[auto])
-AS_IF([test "${enable_jack}" != "no"], [
- AC_CHECK_HEADERS(jack/jack.h, [
- VLC_ADD_PLUGIN([access_jack])
- VLC_ADD_PLUGIN([jack])
- VLC_ADD_LIBS([access_jack jack],[-ljack])
- ],[AC_MSG_ERROR([cannot find JACK headers])])
-])
dnl
dnl CyberLink for C++ UPnP stack
VLC_ADD_PLUGIN([visual])
fi
-dnl
-dnl OpenGL visualisation plugin
-dnl
-AC_ARG_ENABLE(galaktos,
- [ --enable-galaktos OpenGL visualisation plugin (default disabled)])
-if test "${enable_galaktos}" = "yes"
-then
- AC_CHECK_HEADERS(GL/gl.h GL/glu.h, [
- VLC_ADD_PLUGIN([galaktos])
- if test "${SYS}" != "mingw32"; then
- VLC_ADD_LIBS([galaktos],[${X_LIBS} -lGL -lGLU])
- else
- VLC_ADD_LIBS([galaktos],[-lopengl32])
- fi
- ])
-fi
-
dnl
dnl goom visualization plugin
dnl
modules/video_output/x11/Makefile
modules/visualization/Makefile
modules/visualization/visual/Makefile
- modules/visualization/galaktos/Makefile
])
dnl Generate makefiles