dnl Autoconf settings for vlc
-AC_COPYRIGHT([Copyright 2002-2011 VLC authors and VideoLAN])
+AC_COPYRIGHT([Copyright 2002-2012 VLC authors and VideoLAN])
-AC_INIT(vlc, 1.3.0-git)
-VERSION_MAJOR=1
-VERSION_MINOR=3
+AC_INIT(vlc, 2.1.0-git)
+VERSION_MAJOR=2
+VERSION_MINOR=1
VERSION_REVISION=0
VERSION_EXTRA=0
VERSION_DEV=git
CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`"
CODENAME="Rincewind"
-COPYRIGHT_YEARS="1996-2011"
+COPYRIGHT_YEARS="1996-2012"
AC_CONFIG_SRCDIR(src/libvlc.c)
AC_CONFIG_AUX_DIR(autotools)
AC_DEFINE([_REENTRANT],, [Define to expose reentrant functions.])
AC_DEFINE([_THREAD_SAFE],, [Same as _REENTANT for some other OSes.])
AC_DEFINE([__LIBVLC__],, [Define within the LibVLC source code tree.])
+AC_DEFINE([WIN32_LEAN_AND_MEAN],, [Define to limit the scope of <windows.h>.])
AM_PROG_CC_C_O
AC_PROG_CXX
dnl Force gcc "-arch" flag
ARCH_flag=""
case "${host}" in
- i386*)
+ i?86*)
ARCH_flag="-arch i386"
;;
ppc64*)
VLC_ADD_CFLAGS([motion],[-fconstant-cfstrings])
VLC_ADD_LIBS([libvlccore],[-Wl,-framework,CoreFoundation])
+ dnl Allow binaries created on Lion to run on earlier releases
+ AC_EGREP_CPP(yes,
+ [#import <Cocoa/Cocoa.h>
+ #ifdef MAC_OS_X_VERSION_10_7
+ yes
+ #endif],
+ [AC_MSG_RESULT([yes])
+ AC_LIBOBJ([getdelim])
+ AC_LIBOBJ([strndup])
+ AC_LIBOBJ([strnlen])],)
+
dnl
dnl Check for Mac OS X SDK settings
dnl
AC_ARG_WITH(macosx-sdk,
[AS_HELP_STRING([--with-macosx-sdk=DIR],
[compile using the SDK in DIR])])
- test "${with_macosx_sdk}" = "" && with_macosx_sdk=/Developer/SDKs/MacOSX10.5.sdk
+ test "${with_macosx_sdk}" = "" && with_macosx_sdk=/Developer/SDKs/MacOSX10.6.sdk
! test -d "${with_macosx_sdk}" && AC_MSG_ERROR([SDK "${with_macosx_sdk}" not found])
- CPP="${CPP} -isysroot ${with_macosx_sdk}"
- CC="${CC} -isysroot ${with_macosx_sdk}"
- CXX="${CXX} -isysroot ${with_macosx_sdk}"
- OBJC="${OBJC} -isysroot ${with_macosx_sdk}"
- LD="${LD} -syslibroot ${with_macosx_sdk}"
AC_ARG_WITH(macosx-version-min,
[AS_HELP_STRING([--with-macosx-version-min=VERSION],
[compile for MacOS X VERSION and above])])
- if test "${with_macosx_version_min}" != "" ; then
- CPP="${CPP} -mmacosx-version-min=${with_macosx_version_min}"
- CC="${CC} -mmacosx-version-min=${with_macosx_version_min}"
- CXX="${CXX} -mmacosx-version-min=${with_macosx_version_min}"
- OBJC="${OBJC} -mmacosx-version-min=${with_macosx_version_min}"
- LD="${LD} -macosx_version_min=${with_macosx_version_min}"
- CFLAGS="${CFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
- CXXFLAGS="${CXXFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
- OBJCFLAGS="${OBJCFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
- MACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}
- export MACOSX_DEPLOYMENT_TARGET
+ if test "${with_macosx_version_min}" = "" ; then
+ with_macosx_version_min=10.5
fi
+ MACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}
+ CPP="${CPP} -isysroot ${with_macosx_sdk} -mmacosx-version-min=${with_macosx_version_min}"
+ CC="${CC} -isysroot ${with_macosx_sdk} -mmacosx-version-min=${with_macosx_version_min}"
+ CXX="${CXX} -isysroot ${with_macosx_sdk} -mmacosx-version-min=${with_macosx_version_min}"
+ OBJC="${OBJC} -isysroot ${with_macosx_sdk} -mmacosx-version-min=${with_macosx_version_min}"
+ LD="${LD} -syslibroot ${with_macosx_sdk} -mmacosx_version_min=${with_macosx_version_min}"
+ CFLAGS="${CFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
+ CXXFLAGS="${CXXFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
+ OBJCFLAGS="${OBJCFLAGS} -DMACOSX_DEPLOYMENT_TARGET=${with_macosx_version_min}"
+ export MACOSX_DEPLOYMENT_TARGET
;;
*mingw32* | *cygwin* | *wince* | *mingwce*)
AC_CHECK_TOOL(WINDRES, windres, :)
dnl Check for usual libc functions
AC_CHECK_DECLS([nanosleep],,,[#include <time.h>])
-AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r if_nameindex if_nametoindex isatty lstat memalign mmap openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp uselocale])
-AC_REPLACE_FUNCS([asprintf atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r inet_pton lldiv localtime_r nrand48 rewind setenv strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab tdestroy vasprintf])
+AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r if_nameindex if_nametoindex isatty lstat memalign mmap openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale])
+AC_REPLACE_FUNCS([atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r inet_pton lldiv localtime_r nrand48 poll rewind setenv strcasecmp strcasestr strdup strlcpy strncasecmp strndup strnlen strsep strtof strtok_r strtoll swab tdestroy])
AC_CHECK_FUNCS(fdatasync,,
[AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.])
])
+dnl mingw64 implements those as static inline, not functions with C linkage
+AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([#include <stdio.h>], [
+ char *c;
+ if (asprintf(&c, "%s %d", "string", 1) == -1)
+ c = NULL;
+ ])],[AC_DEFINE([HAVE_ASPRINTF],[1],[Define to 1 if you have asprintf function])],[AC_LIBOBJ([asprintf])])
+AC_LINK_IFELSE([
+ AC_LANG_PROGRAM([#include <stdio.h>], [
+ char *c;
+ va_list ap;
+ if (vasprintf(&c, "%s %d", ap) == -1)
+ c = NULL;
+ ])],[AC_DEFINE([HAVE_VASPRINTF],[1],[Define to 1 if you have asprintf function])],[AC_LIBOBJ([vasprintf])])
+
# Windows CE does not have strcoll()
AC_FUNC_STRCOLL
AH_BOTTOM([#include <vlc_fixups.h>])
-dnl Check for poll
-AC_SEARCH_LIBS(poll, [poll], [
- AC_DEFINE(HAVE_POLL, 1, [Define to 1 if the OS has poll().])
-], [
- AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "os2"], [
- AC_MSG_ERROR([poll() is required.])
- ])
-])
-
dnl Check for struct pollfd
AC_CHECK_TYPES([struct pollfd],,,
[#include <sys/types.h>
AC_SUBST(GNUGETOPT_LIBS)
AC_CHECK_LIB(m,cos,[
- VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain scene kate flac lua chorus_flanger freetype avcodec avformat access_avio swscale postproc i420_rgb faad twolame equalizer spatializer param_eq samplerate freetype mod mpc dmo quicktime realvideo qt4 compressor headphone_channel_mixer normvol audiobargraph_a speex mono colorthres extract ball access_imem hotkeys mosaic gaussianblur dbus x264 hqdn3d],[-lm])
+ VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain scene kate flac lua chorus_flanger freetype avcodec avformat access_avio swscale postproc i420_rgb faad twolame equalizer spatializer param_eq samplerate freetype mod mpc dmo mp4 quicktime realvideo qt4 compressor headphone_channel_mixer normvol audiobargraph_a speex mono colorthres extract ball access_imem hotkeys mosaic gaussianblur dbus x264 hqdn3d],[-lm])
LIBM="-lm"
], [
LIBM=""
])
fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
-dnl Check for misc headers
-AC_MSG_CHECKING(for strncasecmp in strings.h)
-AC_EGREP_HEADER(strncasecmp,strings.h,[
- AC_MSG_RESULT(yes)
- AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
- Define if <strings.h> defines strncasecmp.)],[
- AC_MSG_RESULT(no)])
-
dnl Check for headers
AC_CHECK_HEADERS([search.h])
-AC_CHECK_HEADERS(getopt.h strings.h locale.h xlocale.h)
-AC_CHECK_HEADERS(fcntl.h sys/time.h sys/ioctl.h sys/stat.h)
+AC_CHECK_HEADERS(getopt.h locale.h xlocale.h)
+AC_CHECK_HEADERS([sys/time.h sys/ioctl.h])
AC_CHECK_HEADERS([arpa/inet.h netinet/udplite.h sys/eventfd.h])
AC_CHECK_HEADERS([net/if.h], [], [],
[
])
CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_live555}"
- AC_CACHE_CHECK([for live555 version 1275091200 or later], [ac_cv_live555], [
+ AC_CACHE_CHECK([for live555 version 1324598400 or later], [ac_cv_live555], [
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
[#include <liveMedia_version.hh>
-#if !defined (LIVEMEDIA_LIBRARY_VERSION_INT) || (LIVEMEDIA_LIBRARY_VERSION_INT < 1275091200)
+#if !defined (LIVEMEDIA_LIBRARY_VERSION_INT) || (LIVEMEDIA_LIBRARY_VERSION_INT < 1324598400)
# error BOOM
#endif]])
], [
])
AS_IF([test "$ac_cv_live555" = "no"], [
AC_MSG_WARN([liveMedia is missing or its installed version is too old:
-Version 2010.05.29 or later is required to proceed.
+Version 2011.12.23 or later is required to proceed.
You can get an updated one from http://www.live555.com/liveMedia .])
AS_IF([test -n "${enable_live555}"], [
AC_MSG_ERROR([Update live555 or pass --disable-live555 to disable RTSP input support.])
])
- ac_cv_live555_usable=""
], [
- dnl Check that live555 is patched correctly.
- AC_CACHE_CHECK([for live555 usability], [ac_cv_live555_usable], [
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
-[#include <locale.h>
-#ifdef __APPLE__
-# include <xlocale.h>
-#endif
-#undef LC_ALL
-#define LC_ALL BOOM
-#ifdef LC_ALL_MASK
-#include <Locale.hh>
-#endif
-#include <GroupsockHelper.hh>]], [
-[struct in_addr addr;
-our_inet_ntoa(addr, NULL);]])
- ], [
- ac_cv_live555_usable="yes"
- ], [
- ac_cv_live555_usable="no"
- ])
- ])
- AS_IF([test "$ac_cv_live555_usable" = "no"], [
- AC_MSG_ERROR([liveMedia lacks patches and is not usable.
-Please apply our patches from the VLC contrib (contrib/src/live555/).
-You can also disable RTSP input with --disable-live555. You were warned.])
- ])
other_libs="-lgroupsock -lBasicUsageEnvironment -lUsageEnvironment"
other_libs_pic="-lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic"
AS_IF([test "${SYS}" = "mingw32"], [
dnl
dnl Blu-ray Disc Support with libbluray
dnl
-PKG_ENABLE_MODULES_VLC([BLURAY], [libbluray], [libbluray >= 0.2 libxml-2.0 >= 2.6 ], (libbluray for Blu-ray disc support ) )
+PKG_ENABLE_MODULES_VLC([BLURAY], [libbluray], [libbluray >= 0.2.1], (libbluray for Blu-ray disc support ) )
dnl
dnl OpenCV wrapper and example filters
dnl
dnl Video4Linux 2
dnl
-AC_ARG_ENABLE(libv4l2, [AS_HELP_STRING([--disable-libv4l2],
- [disable userspace V4L2 library (default auto)])])
+AC_ARG_ENABLE(v4l2, [AS_HELP_STRING([--disable-v4l2],
+ [disable Video4Linux version 2 (default auto)])])
AC_ARG_ENABLE(pvr, [AS_HELP_STRING([--enable-pvr],
[support PVR V4L2 cards (default disabled)])])
have_v4l2="no"
-AC_CHECK_HEADERS([linux/videodev2.h sys/videoio.h], [
- have_v4l2="yes"
+AS_IF([test "$enable_v4l2" != "no"], [
+ AC_CHECK_HEADERS([linux/videodev2.h sys/videoio.h], [
+ have_v4l2="yes"
+ ])
])
AS_IF([test "$have_v4l2" = "yes"], [
- AS_IF([test "${enable_libv4l2}" != "no"], [
- PKG_CHECK_MODULES(LIBV4L2, libv4l2, [
- AC_DEFINE(HAVE_LIBV4L2, 1, [Define to 1 if libv4l2 is available])
- ], [
- AC_MSG_WARN([${LIBV4L2_PKG_ERRORS}.])
- ])
+ PKG_CHECK_MODULES(LIBV4L2, libv4l2, [
+ AC_DEFINE(HAVE_LIBV4L2, 1, [Define to 1 if libv4l2 is available])
+ ], [
+ AC_MSG_WARN([${LIBV4L2_PKG_ERRORS}.])
])
AS_IF([test "${enable_pvr}" = "yes"], [
VLC_ADD_PLUGIN([pvr])
[ --enable-iomx iomx codec module (default disabled)])
if test "${enable_iomx}" = "yes"
then
- VLC_SAVE_FLAGS
- CPPFLAGS="${CPPFLAGS} -I${srcdir}/modules/codec/omxil" # For the OMX headers
- AC_LANG_PUSH([C++])
- AC_CHECK_HEADER(media/stagefright/OMXClient.h, [
- VLC_ADD_PLUGIN([iomx])
- VLC_ADD_CXXFLAGS([iomx], [-fno-exceptions -fno-rtti])
- VLC_ADD_LIBS([iomx], [-lstagefright -lmedia -lutils -lbinder])
- ], [
- AC_MSG_ERROR("Could not find IOMX headers")
- ])
- AC_LANG_POP([C++])
- VLC_RESTORE_FLAGS
+ VLC_ADD_PLUGIN([iomx])
fi
dnl
AS_IF([test "${enable_dxva2}" = "yes"],
[AC_MSG_ERROR([dxva2 is present but libavcodec/dxva2.h is missing])],
[AC_MSG_WARN([dxva2 is present but libavcodec/dxva2.h is missing ])])
- ])
+ ], [#undef _WIN32_WINNT
+ /* DXVA2 is only available in Vista and above */
+ #define _WIN32_WINNT 0x600])
],[
AS_IF([test "${enable_dxva2}" = "yes"],
[AC_MSG_ERROR([Could not find required dxva2api.h])],
PKG_CHECK_MODULES([SPEEXDSP], [speexdsp], [
have_speexdsp="yes"
], [
- AS_IF([test -n "${enable_speex}"], [
- AC_MSG_ERROR([${SPEEXDSP_PKG_ERRORS}.])
- ], [
- AC_MSG_WARN([${SPEEXDSP_PKG_ERRORS}.])
- ])
+ AC_MSG_WARN([${SPEEXDSP_PKG_ERRORS}.])
])
])
AM_CONDITIONAL([HAVE_SPEEXDSP], [test "$have_speexdsp" = "yes"])
EXTEND_HELP_STRING([Interface plugins:])
-dnl
-dnl Skins2 module
-dnl
-AC_ARG_ENABLE(skins2,
- [AS_HELP_STRING([--enable-skins2], [skins interface module (default auto)])])
-AS_IF([test "${enable_skins2}" != "no"], [
- have_skins_deps="yes"
-
- dnl Win32
- AS_IF([test "${SYS}" = "mingw32"], [
- VLC_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -Imodules/gui/skins2 -DWIN32_SKINS])
- VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
- VLC_ADD_LIBS([skins2],[-lgdi32 -lole32 -luuid -lmsimg32])
- dnl MacOS
- ], [test "${SYS}" = "darwin"], [
- VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -DMACOSX_SKINS])
- VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
- VLC_ADD_LIBS([skins2],[-Wl,-framework,Carbon])
- dnl Linux/Unix
- ], [
- PKG_CHECK_MODULES([XPM], [xpm],, [have_skins_deps="no"])
- PKG_CHECK_MODULES([XINERAMA], [xinerama],, [have_skins_deps="no"])
- PKG_CHECK_MODULES([XEXT], [xext],, [have_skins_deps="no"])
- VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 ${X_CFLAGS} ${XEXT_CFLAGS} ${XPM_CFLAGS} -DX11_SKINS])
- VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
- VLC_ADD_LIBS([skins2],[${X_LIBS} ${X_PRE_LIBS} ${XEXT_LIBS} ${XPM_LIBS} ${XINERAMA_LIBS} -lX11])
- ])
-
- dnl we need freetype
- AS_IF([test "${have_freetype}" != "yes"], [
- have_skins_deps="no"
- ])
-
- AS_IF([test "${have_skins_deps}" = "no"], [
- AS_IF([test "x${enable_skins2}" = "x"], [
- AC_MSG_WARN([Skins2 interface disabled due to missing dependencies.])
- ], [
- AC_MSG_ERROR([Skins2 interface requires FreeType, libxpm, libxext and libxinerama])
- ])
- enable_skins2="no"
- ], [
- VLC_ADD_PLUGIN([skins2])
- ALIASES="${ALIASES} svlc"
- enable_skins2="yes"
- ])
-])
-AM_CONDITIONAL(BUILD_SKINS, [test "${enable_skins2}" = "yes"])
-
-AC_ARG_ENABLE(libtar,
- [ --enable-libtar libtar support for skins2 (default auto)])
-AS_IF([test "${enable_skins2}" = "yes" && test "${enable_libtar}" != "no"], [
- AC_CHECK_HEADERS(libtar.h, [
- VLC_ADD_LIBS([skins2],[-ltar])
- ])
-])
-
dnl
dnl Hildon UI
dnl
dnl
dnl Simple test for skins2 dependency
dnl
-AS_IF([test "${enable_skins2}" != "no" && test "x$enable_qt4" = "xno"], [
- AC_MSG_ERROR([The skins2 module depends on a the Qt4 development package. Without it you will not be able to open any dialog box from the interface, which makes the skins2 interface rather useless. Install the Qt4 development package or alternatively you can also configure with: --disable-qt4 --disable-skins2.])
+AS_IF([test "x$enable_qt4" = "xno"], [
+ AS_IF([test "${enable_skins2}" = "yes"], [
+ AC_MSG_ERROR([The skins2 module depends on the Qt4 interface. Without it you will not be able to open any dialog box from the interface, which makes the skins2 interface rather useless. Install the Qt4 development package or alternatively you can also configure with: --disable-qt4 --disable-skins2.])
+ ], [
+ enable_skins2="no"
+ AC_MSG_WARN([The skins2 module depends on the Qt4 interface, Qt4 is not built so skins2 is disabled.])
+ ])
+])
+
+dnl
+dnl Skins2 module
+dnl
+AC_ARG_ENABLE(skins2,
+ [AS_HELP_STRING([--enable-skins2], [skins interface module (default auto)])])
+AS_IF([test "${enable_skins2}" != "no"], [
+ have_skins_deps="yes"
+
+ dnl Win32
+ AS_IF([test "${SYS}" = "mingw32"], [
+ VLC_ADD_CPPFLAGS([skins2],[-U_OFF_T_ -U_off_t -Imodules/gui/skins2 -DWIN32_SKINS])
+ VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
+ VLC_ADD_LIBS([skins2],[-lgdi32 -lole32 -luuid -lmsimg32])
+ dnl MacOS
+ ], [test "${SYS}" = "darwin"], [
+ VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -DMACOSX_SKINS])
+ VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
+ VLC_ADD_LIBS([skins2],[-Wl,-framework,Carbon])
+ dnl Linux/Unix
+ ], [
+ PKG_CHECK_MODULES([XPM], [xpm],, [have_skins_deps="no"])
+ PKG_CHECK_MODULES([XINERAMA], [xinerama],, [have_skins_deps="no"])
+ PKG_CHECK_MODULES([XEXT], [xext],, [have_skins_deps="no"])
+ VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 ${X_CFLAGS} ${XEXT_CFLAGS} ${XPM_CFLAGS} -DX11_SKINS])
+ VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
+ VLC_ADD_LIBS([skins2],[${X_LIBS} ${X_PRE_LIBS} ${XEXT_LIBS} ${XPM_LIBS} ${XINERAMA_LIBS} -lX11])
+ ])
+
+ dnl we need freetype
+ AS_IF([test "${have_freetype}" != "yes"], [
+ have_skins_deps="no"
+ ])
+
+ AS_IF([test "${have_skins_deps}" = "no"], [
+ AS_IF([test "x${enable_skins2}" = "x"], [
+ AC_MSG_WARN([Skins2 interface disabled due to missing dependencies.])
+ ], [
+ AC_MSG_ERROR([Skins2 interface requires FreeType, libxpm, libxext and libxinerama])
+ ])
+ enable_skins2="no"
+ ], [
+ VLC_ADD_PLUGIN([skins2])
+ ALIASES="${ALIASES} svlc"
+ enable_skins2="yes"
+ ])
+])
+AM_CONDITIONAL(BUILD_SKINS, [test "${enable_skins2}" = "yes"])
+
+AC_ARG_ENABLE(libtar,
+ [ --enable-libtar libtar support for skins2 (default auto)])
+AS_IF([test "${enable_skins2}" = "yes" && test "${enable_libtar}" != "no"], [
+ AC_CHECK_HEADERS(libtar.h, [
+ VLC_ADD_LIBS([skins2],[-ltar])
+ ])
])
dnl
VLC_ADD_LIBS([macosx], [-Wl,-framework,QTKit -Wl,-framework,IOKit -Wl,-framework,AddressBook -Wl,-framework,WebKit])
- VLC_SAVE_FLAGS
- CFLAGS="-I${CONTRIB_DIR}/Sparkle.framework/Headers ${CFLAGS}"
- AC_CHECK_HEADERS(Sparkle.h, [
- VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR} -Wl,-framework,Sparkle])
- VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}])
- ], VLC_RESTORE_FLAGS)
+ if ! test -d ${CONTRIB_DIR}/Sparkle.framework
+ then
+ AC_MSG_ERROR([Sparkle framework is required and was not found in ${CONTRIB_DIR}])
+ fi
+ VLC_ADD_LIBS([macosx], [-F${CONTRIB_DIR} -Wl,-framework,Sparkle])
+ VLC_ADD_OBJCFLAGS([macosx], [-F${CONTRIB_DIR}])
if ! test -d ${CONTRIB_DIR}/BGHUDAppKit.framework
then
dnl ncurses module
dnl
AC_ARG_ENABLE(ncurses,
- [ --disable-ncurses ncurses interface support (default disabled)],
- [if test "${enable_ncurses}" != "no"; then
- AC_CHECK_HEADER(ncurses.h,
- [AC_CHECK_LIB(ncursesw, mvprintw,
- [VLC_ADD_PLUGIN([ncurses])
- VLC_ADD_LIBS([ncurses],[-lncursesw])
+[AS_HELP_STRING([--disable-ncurses],[ncurses text-based interface (default auto)])])
+if test "${enable_ncurses}" != "no"; then
+ VLC_SAVE_FLAGS
+ LIBS=""
+ AC_CHECK_HEADER(ncurses.h, [
+ AC_CHECK_LIB(ncursesw, mvprintw, [
+ AC_SEARCH_LIBS([tgetent], [ncursesw tinfow tinfo], [
+ VLC_ADD_PLUGIN([ncurses])
ALIASES="${ALIASES} nvlc"
- AC_CHECK_LIB(ncursesw, tgetent, [],
- AC_CHECK_LIB(tinfow, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfow])],
- [AC_CHECK_LIB(tinfo, tgetent, [VLC_ADD_LIBS([ncurses],[-ltinfo])],
- [AS_IF([test "${enable_ncurses}" = "yes"],
- [AC_MSG_ERROR([tgetent not found in ncursesw tinfow tinfo]
- )])])
- ]
- )
- )
- ],
- [AS_IF([test "${enable_ncurses}" = "yes"], [
- AC_MSG_ERROR([libncursesw not found])])]
- )],
- [AS_IF([test "${enable_ncurses}" = "yes"], [
- AC_MSG_ERROR([ncurses.h not found])])]
- )
- fi]
-)
+ VLC_ADD_LIBS([ncurses],[-lncursesw ${LIBS}])
+ ], [
+ AS_IF([test "${enable_ncurses}" = "yes"], [AC_MSG_ERROR([tgetent not found])])
+ ])
+ ], [
+ AS_IF([test "${enable_ncurses}" = "yes"], [AC_MSG_ERROR([libncursesw not found])])
+ ])
+ ], [
+ AS_IF([test "${enable_ncurses}" = "yes"], [AC_MSG_ERROR([ncurses.h not found])])
+ ])
+ VLC_RESTORE_FLAGS
+fi
dnl
dnl XOSD plugin
then
AC_CHECK_HEADERS(xosd.h,
AC_CHECK_LIB(xosd, xosd_set_horizontal_offset, [
- VLC_ADD_PLUGIN([xosd])
- VLC_ADD_LIBS([xosd],[-lxosd])
+ AS_IF([test "${no_x}" != "yes"], [
+ VLC_ADD_PLUGIN([xosd])
+ VLC_ADD_LIBS([xosd],[-lxosd ${X_LIBS} ${X_PRE_LIBS} -lX11])
+ VLC_ADD_CFLAGS([xosd],[${X_CFLAGS}])
+ ],[
+ AC_MSG_ERROR([Xlib is required with xosd.])
+ ])
])
)
fi
AS_HELP_STRING([--with-kde-solid=PATH],
[KDE Solid actions directory (auto)]),, [
-if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ; then
+if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "darwin" ; then
with_kde_solid="yes"
fi
])
AC_OUTPUT
dnl Do we have to use make or gmake ?
-USE_MAKE_OR_GMAKE=`case "${SYS}" in openbsd*) echo "gmake";; *) echo "make";; esac`
+if make --version 2>&1|grep -q GNU
+then
+ # GNU make, all seems good
+ MAKE=make
+else
+ # Known GNU make alias (on BSD)
+ MAKE=gmake
+fi
dnl Shortcut to nice compile message
-rm -f compile
if test -n $SHELL; then
SHELL=${CONFIG_SHELL-/bin/sh}
fi
-echo '#! '$SHELL >compile
-echo rm -f .error\$\$ >>compile
-echo ERROR=0 >>compile
-echo export PATH=$PATH LANG=C >>compile
-echo "($USE_MAKE_OR_GMAKE V=1 \$@ 2>&1 || touch .error\$\$)| \\" >>compile
-echo '`sed -ne "s/^top_srcdir *= *//p" < Makefile`/extras/buildsystem/make.pl' >>compile
-echo test -f .error\$\$ \&\& ERROR=1 >>compile
-echo rm -f .error\$\$ >>compile
-echo exit \$ERROR >>compile
+rm -f compile
+echo "#! $SHELL
+rm -f .error\$\$
+ERROR=0
+export PATH=\"$PATH\" LANG=C
+($MAKE V=1 \$@ 2>&1 || touch .error\$\$)| `sed -ne "s/^top_srcdir *= *//p" < Makefile`/extras/buildsystem/make.pl
+test -f .error\$\$ && ERROR=1
+rm -f .error\$\$
+exit \$ERROR" >compile
chmod a+x compile
echo "
echo "build vlc executable : no"
fi
echo "
-To build vlc and its plugins, type \`./compile' or \`$USE_MAKE_OR_GMAKE'."
+To build vlc and its plugins, type \`$MAKE', or \`./compile' if you like nice colors."