VERSION_REVISION="0"
VERSION_EXTRA="svn"
-CONFIGURE_LINE="$0 $ac_configure_args"
+CONFIGURE_LINE="`echo "$0 $ac_configure_args" | sed -e 's/\\\/\\\\\\\/g'`"
CODENAME="Grishenko"
-AC_PREREQ(2.59)
+AC_PREREQ(2.59) dnl this really should be 2.59c
AC_CONFIG_SRCDIR(src/libvlc.c)
AC_CONFIG_AUX_DIR(autotools)
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
-AM_INIT_AUTOMAKE([1.7 check-news dist-bzip2])
+AM_INIT_AUTOMAKE([1.9 check-news dist-bzip2 no-dist-gzip -Wall])
AM_CONFIG_HEADER(config.h)
dnl Too many people are not aware of maintainer mode:
AS_IF([test "x${enable_maintainer_mode}" != "xno"],
[enable_maintainer_mode="yes"])
-
-dnl HA! HA!
AM_MAINTAINER_MODE
dnl
CFLAGS_save="${CFLAGS_save} -no-cpp-precomp -D_INTL_REDIRECT_MACROS"; CFLAGS="${CFLAGS_save}"
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 -std=gnu99"; OBJCFLAGS="${OBJCFLAGS_save}"
- VLC_ADD_LDFLAGS([vlc ffmpeg ffmpegaltivec],[-all_load])
+ VLC_ADD_LDFLAGS([libvlc ffmpeg ffmpegaltivec],[-all_load])
VLC_ADD_LDFLAGS([mkv mp4], [-framework IOKit -framework CoreFoundation])
- VLC_ADD_CFLAGS([libvlc],[-x objective-c])
- VLC_ADD_CFLAGS([vlc],[-x objective-c])
- VLC_ADD_LDFLAGS([vlc],[-Wl,-m -Wl,-multiply_defined -Wl,suppress])
+ VLC_ADD_CFLAGS([libvlc vlc],[-x objective-c])
+ VLC_ADD_LDFLAGS([libvlc vlc],[-Wl,-m -Wl,-multiply_defined -Wl,suppress])
;;
darwin*)
SYS=darwin
OBJCFLAGS_save="${OBJCFLAGS_save} -D_INTL_REDIRECT_MACROS -std=gnu99"; OBJCFLAGS="${OBJCFLAGS_save}"
VLC_ADD_LDFLAGS([mp4], [-framework IOKit -framework CoreFoundation])
VLC_ADD_LDFLAGS([mkv mp4], [-framework IOKit -framework CoreFoundation])
- VLC_ADD_CFLAGS([libvlc],[-x objective-c])
- VLC_ADD_CFLAGS([vlc],[-x objective-c])
+ VLC_ADD_CFLAGS([libvlc vlc],[-x objective-c])
+ VLC_ADD_LDFLAGS([vlc],[-undefined dynamic_lookup])
;;
*mingw32* | *cygwin* | *wince* | *mingwce* | *pe*)
AC_CHECK_TOOL(WINDRES, windres, :)
if test "${SYS}" = "mingw32"; then
# add ws2_32 for closesocket, select, recv
CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"; CPPFLAGS="${CPPFLAGS_save}"
- VLC_ADD_LDFLAGS([vlc],[-lws2_32 -lnetapi32 -lwinmm -mwindows])
+ VLC_ADD_LDFLAGS([libvlc],[-lws2_32 -lnetapi32 -lwinmm -mwindows])
VLC_ADD_LDFLAGS([cdda vcdx cddax],[-lwinmm])
- VLC_ADD_LDFLAGS([access_http access_mms access_udp access_tcp access_ftp access_output_udp sap slp http stream_out_standard stream_out_rtp vod_rtsp telnet netsync growl],[-lws2_32])
+ VLC_ADD_LDFLAGS([access_http access_mms access_udp access_tcp access_ftp access_output_udp sap slp http stream_out_standard stream_out_rtp vod_rtsp access_realrtsp telnet rc netsync growl flac ts audioscrobbler],[-lws2_32])
fi
if test "${SYS}" = "mingwce"; then
# add ws2 for closesocket, select, recv
CPPFLAGS_save="${CPPFLAGS_save} -D_OFF_T_ -D_off_t=long"; CPPFLAGS="${CPPFLAGS_save}"
- VLC_ADD_CPPFLAGS([vlc],[-Dmain(a,b)=maince(a,b)])
- VLC_ADD_LDFLAGS([vlc],[-lws2 -e WinMainCRTStartup])
+ VLC_ADD_CPPFLAGS([libvlc vlc],[-Dmain(a,b)=maince(a,b)])
+ VLC_ADD_LDFLAGS([libvlc vlc],[-lws2 -e WinMainCRTStartup])
VLC_ADD_LDFLAGS([access_http access_mms access_udp access_tcp access_ftp access_output_udp sap http netsync],[-lws2])
fi
;;
CFLAGS_save="${CFLAGS_save} -Wno-multichar"; CFLAGS="${CFLAGS_save}"
CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar"; CXXFLAGS="${CXXFLAGS_save}"
VLC_ADD_CXXFLAGS([beos],[])
- VLC_ADD_LDFLAGS([vlc logger],[-lbe])
+ VLC_ADD_LDFLAGS([vlc libvlc logger],[-lbe])
VLC_ADD_LDFLAGS([beos],[-lbe -lmedia -ltranslation -ltracker -lgame])
VLC_ADD_LDFLAGS([dvdnav dvdread],[-ldl])
VLC_ADD_LDFLAGS([access_file],[-lpoll])
LDFLAGS_save="${LDFLAGS_save} -lintl"; LDFLAGS="${LDFLAGS_save}"
dnl Check for BONE
if test -f /boot/beos/system/lib/libbind.so; then
- VLC_ADD_LDFLAGS([access_file access_ftp access_mms access_output_udp telnet netsync sap vlc growl],[-lbind -lsocket])
+ VLC_ADD_LDFLAGS([access_file access_ftp access_mms access_output_udp telnet netsync sap libvlc growl],[-lbind -lsocket])
else
- VLC_ADD_LDFLAGS([access_file access_ftp access_mms access_output_udp telnet netsync sap vlc growl],[-lnet])
+ VLC_ADD_LDFLAGS([access_file access_ftp access_mms access_output_udp telnet netsync sap libvlc growl],[-lnet])
fi
dnl Ugly check for Zeta
AC_PROG_LIBTOOL
AC_ARG_ENABLE(libtool,
- [ --enable-libtool use libtool (default disabled)])
+ [ --enable-libtool use libtool (default enabled)])
AM_CONDITIONAL(USE_LIBTOOL, [test "x${enable_libtool}" != "xno"])
dnl
dnl Gettext stuff
dnl
-ALL_LINGUAS="af ar bn ca co cs da de el en_GB es eu fr fur gl he hi hu it ja ka ko lt lv ms my nb ne nl nn no oc pa pl ps pt_BR pt_PT ro ru sk sl sq sv tet th tl tr zh_CN zh_TW"
+ALL_LINGUAS="af ar bn ca co cs da de el en_GB es eu fr fur gl he hi hu it ja ka ko lt lv ms my ne nl no oc pa pl ps pt_BR pt_PT ro ru sk sl sq sv tet th tl tr zh_CN zh_TW"
AM_GNU_GETTEXT_VERSION(0.11.5)
AM_GNU_GETTEXT
AS_IF([test "${nls_cv_force_use_gnu_gettext}" = "yes"], [
])
], [
AS_IF([test "${enable_libtool}" != "no"], [
- VLC_ADD_LDFLAGS([vlc], [${LTLIBINTL}])
+ VLC_ADD_LDFLAGS([libvlc vlc], [${LTLIBINTL}])
], [
- VLC_ADD_LDFLAGS([vlc], [${LIBINTL}])
+ VLC_ADD_LDFLAGS([libvlc vlc], [${LIBINTL}])
])
])
AC_SUBST(INCLUDED_LIBINTL)
AS_IF([test "$am_cv_func_iconv" != "yes"],
[AC_MSG_ERROR([libiconv is needed for VLC to work properly])])
fi
-VLC_ADD_CFLAGS([vlc],[${INCICONV}])
+VLC_ADD_CFLAGS([libvlc],[${INCICONV}])
AS_IF([test "${enable_libtool}" != "no"], [
- VLC_ADD_LDFLAGS([vlc],[${LIBICONV}])
+ VLC_ADD_LDFLAGS([libvlc vlc],[${LIBICONV}])
],[
- VLC_ADD_LDFLAGS([vlc],[${LTLIBICONV}])
+ VLC_ADD_LDFLAGS([libvlc vlc],[${LTLIBICONV}])
])
dnl Check for the need to include the mingwex lib for mingw32
if test "${SYS}" = "mingw32"
then
AC_CHECK_LIB(mingwex,opendir,
- AC_CHECK_LIB(mingw32,opendir,VLC_ADD_LDFLAGS([vlc],[]),
- [VLC_ADD_LDFLAGS([vlc gtk],[-lmingwex])])
+ AC_CHECK_LIB(mingw32,opendir,VLC_ADD_LDFLAGS([libvlc],[]),
+ [VLC_ADD_LDFLAGS([libvlc gtk],[-lmingwex])])
)
fi
AC_CHECK_FUNCS(connect,,[
AC_CHECK_LIB(socket,connect,[
- VLC_ADD_LDFLAGS([vlc cdda cddax],-lsocket)
+ VLC_ADD_LDFLAGS([libvlc cdda cddax],-lsocket)
LIBS_socket="-lsocket"
])
])
AC_CHECK_FUNCS(gethostbyname,,[
AC_CHECK_LIB(nsl,gethostbyname,[
- VLC_ADD_LDFLAGS([cdda cddax vlc],[-lnsl])
+ VLC_ADD_LDFLAGS([cdda cddax libvlc],[-lnsl])
],[
AC_CHECK_LIB(bind,gethostbyname,[
VLC_ADD_LDFLAGS([access_mms],[-lbind])
AC_CHECK_FUNCS(inet_aton,,[
AC_CHECK_LIB(resolv,inet_aton,[
- VLC_ADD_LDFLAGS([vlc],[-lresolv])
+ VLC_ADD_LDFLAGS([libvlc],[-lresolv])
])
])
[ # FreeBSD has a gnugetopt library for this:
AC_CHECK_LIB([gnugetopt],[getopt_long],
[AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support)
- VLC_ADD_LDFLAGS([vlc],[-lgnugetopt])],
+ VLC_ADD_LDFLAGS([libvlc],[-lgnugetopt])],
[need_getopt=:])])
fi
AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
VLC_ADD_LDFLAGS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise],[-lm])
])
AC_CHECK_LIB(m,pow,[
- VLC_ADD_LDFLAGS([ffmpeg ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer param_eq vlc vorbis freetype mod mpc dmo quicktime realaudio galaktos opengl],[-lm])
+ VLC_ADD_LDFLAGS([ffmpeg ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer param_eq libvlc vorbis freetype mod mpc dmo quicktime realaudio galaktos opengl],[-lm])
])
AC_CHECK_LIB(m,sqrt,[
- VLC_ADD_LDFLAGS([headphone_channel_mixer normvol speex mono colorthres],[-lm])
+ VLC_ADD_LDFLAGS([headphone_channel_mixer normvol speex mono colorthres extract],[-lm])
])
AC_CHECK_LIB(m,ceil,[
VLC_ADD_LDFLAGS([mosaic],[-lm])
[ac_cv_my_have_shl_load=yes,
AC_CHECK_LIB(dld, shl_load,
[ac_cv_my_have_shl_load=yes
- VLC_ADD_LDFLAGS([vlc],[-ldld])])])
+ VLC_ADD_LDFLAGS([libvlc],[-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
# Whatever style
if test "${ac_cv_have_plugins}" = "no"; then
AC_CHECK_LIB(dld, dld_link,
- [VLC_ADD_LDFLAGS([vlc],[-ldld])
+ [VLC_ADD_LDFLAGS([libvlc],[-ldld])
AC_DEFINE(HAVE_DL_DLD_LINK, 1, [Define if you have the GNU dld library])
ac_cv_have_plugins=yes])
fi
if test "${ac_cv_have_plugins}" = "no"; then
if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
AC_CHECK_LIB(kernel32, main,
- [VLC_ADD_LDFLAGS([vlc],[-lkernel32])
+ [VLC_ADD_LDFLAGS([libvlc],[-lkernel32])
AC_DEFINE(HAVE_DL_WINDOWS, 1, [Define if you have Windows' LoadLibrary])
ac_cv_have_plugins=yes])
fi
ac_cv_my_have_dlopen=yes,
AC_CHECK_LIB(dl, dlopen,
ac_cv_my_have_dlopen=yes
- VLC_ADD_LDFLAGS([vlc],[-ldl]),
+ VLC_ADD_LDFLAGS([libvlc],[-ldl]),
AC_CHECK_LIB(svld, dlopen,
ac_cv_my_have_dlopen=yes
- VLC_ADD_LDFLAGS([vlc],[-lsvld]))))
+ VLC_ADD_LDFLAGS([libvlc],[-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
])
-VLC_ADD_LDFLAGS([vlc plugin],[${THREAD_LIB}])
+VLC_ADD_LDFLAGS([libvlc plugin],[${THREAD_LIB}])
dnl Don't link with rt when using GNU-pth
if test "${THREAD_LIB}" != "-lpth" && test "${THREAD_LIB}" != "-lst"; then
AC_CHECK_LIB(rt, clock_nanosleep, [
- VLC_ADD_LDFLAGS([vlc],[-lrt])
+ VLC_ADD_LDFLAGS([libvlc],[-lrt])
AC_DEFINE(HAVE_CLOCK_NANOSLEEP, 1, [Define to 1 if you have clock_nanosleep.])
], [
dnl HP/UX port
- AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LDFLAGS([vlc],[-lrt])])
+ AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LDFLAGS([libvlc],[-lrt])])
])
have_nanosleep=false
AC_CHECK_FUNCS(nanosleep,have_nanosleep=:,[
AC_CHECK_LIB(rt,nanosleep,
- [VLC_ADD_LDFLAGS([vlc],[-lrt]) have_nanosleep=:],
+ [VLC_ADD_LDFLAGS([libvlc],[-lrt]) have_nanosleep=:],
[AC_CHECK_LIB(posix4,nanosleep,
- [VLC_ADD_LDFLAGS([vlc],[-lposix4]) have_nanosleep=:])]
+ [VLC_ADD_LDFLAGS([libvlc],[-lposix4]) have_nanosleep=:])]
)
])
if ${have_nanosleep}; then
dnl Check for headers
AC_CHECK_HEADERS(signal.h time.h errno.h stdint.h stdbool.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(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
+AC_CHECK_HEADERS([arpa/inet.h net/if.h netinet/in.h sys/socket.h netinet/udplite.h])
if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
AC_CHECK_HEADERS(machine/param.h sys/shm.h)
AC_CHECK_HEADERS(linux/version.h)
[ AC_DEFINE( HAVE_HAL_1, [] , [Define if you have the new HAL library API])
AC_DEFINE( HAVE_HAL, [], [Define if you have the HAL library] )
VLC_ADD_PLUGINS([hal probe_hal])
- VLC_ADD_LDFLAGS([vlc hal probe_hal],[$HAL_LIBS])
- VLC_ADD_CFLAGS([vlc hal probe_hal],[$HAL_CFLAGS])],
+ VLC_ADD_LDFLAGS([libvlc hal probe_hal],[$HAL_LIBS])
+ VLC_ADD_CFLAGS([libvlc hal probe_hal],[$HAL_CFLAGS])],
dnl No hal 0.5 Test for 0.2
[ PKG_CHECK_MODULES( HAL, hal >= 0.2.97,
[AC_DEFINE(HAVE_HAL, [], [Define if you have the HAL library])
VLC_ADD_PLUGINS([hal])
- VLC_ADD_LDFLAGS([vlc hal],[$HAL_LIBS])
- VLC_ADD_CFLAGS([vlc hal],[$HAL_CFLAGS])],
+ VLC_ADD_LDFLAGS([libvlc hal],[$HAL_LIBS])
+ VLC_ADD_CFLAGS([libvlc hal],[$HAL_CFLAGS])],
[AC_MSG_WARN(HAL library not found)])
]
)
dnl Check for dbus
AC_ARG_ENABLE(dbus,
[ --enable-dbus Linux D-BUS message bus system (default enabled)])
-
-if test "${enable_dbus}" != "no"
+
+if test "${enable_dbus}" != "no" -a "${SYS}" = "linux"
then
dnl api stable dbus
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0.0,
AC_DEFINE( HAVE_DBUS_2, 1, [Define if you have the D-BUS library API >= 0.92] )
AC_DEFINE( HAVE_DBUS_1, 1, [Define if you have the D-BUS library API >= 0.30] )
AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] )
- VLC_ADD_LDFLAGS([screensaver vlc],[$DBUS_LIBS])
- VLC_ADD_CFLAGS([screensaver vlc],[$DBUS_CFLAGS])
+ VLC_ADD_LDFLAGS([screensaver libvlc],[$DBUS_LIBS])
+ VLC_ADD_CFLAGS([screensaver libvlc],[$DBUS_CFLAGS])
dnl Check for dbus control interface
AC_ARG_ENABLE(dbus-control, [ --enable-dbus-control D-BUS control interface (default disabled)])
if test "${enable_dbus_control}" = "yes"
VLC_ADD_LDFLAGS([dbus],[$DBUS_LIBS])
VLC_ADD_CFLAGS([dbus],[$DBUS_CFLAGS])
fi],
- dnl not too old dbus
- [ PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.92,
- [ AC_DEFINE( HAVE_DBUS_2, 1, [Define if you have the D-BUS library API >= 0.92] )
- AC_DEFINE( HAVE_DBUS_1, 1, [Define if you have the D-BUS library API >= 0.30] )
- AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] )
- VLC_ADD_LDFLAGS([screensaver],[$DBUS_LIBS])
- VLC_ADD_CFLAGS([screensaver],[$DBUS_CFLAGS])],
- dnl older dbus
- [ PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.30,
- [ AC_DEFINE( HAVE_DBUS_1, 1, [Define if you have the D-BUS library API >= 0.30 ] )
- AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] )
- VLC_ADD_LDFLAGS([screensaver],[$DBUS_LIBS])
- VLC_ADD_CFLAGS([screensaver],[$DBUS_CFLAGS])],
- dnl much older dbus
- [ PKG_CHECK_MODULES( DBUS, dbus-1,
- [AC_DEFINE(HAVE_DBUS, 1, [Define if you have the D-BUS library])
+
+ if ${PKG_CONFIG} --exists dbus-1
+ then
+ [AC_ARG_ENABLE(old-dbus,
+ [ --enable-old-dbus Deprecated D-Bus support (default disabled)])]
+
+ if test "${enable_old_dbus}" != "yes"
+ then
+ echo ""
+ echo "****** WARNING **** WARNING ***** WARNING *************"
+ echo "*** Your D-Bus version is < 1.0.0"
+ echo "*** You are using old and buggy software and so"
+ echo "*** D-Bus support has been disabled."
+ echo "*** Please upgrade D-Bus : http://dbus.freedesktop.org"
+ echo "*** Alternatively you can force the use of your old and"
+ echo "*** buggy D-Bus version by specifying --enable-old-dbus"
+ echo "*******************************************************"
+ echo ""
+ else
+ dnl not too old dbus
+ [ PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.92,
+ [ AC_DEFINE( HAVE_DBUS_2, 1, [Define if you have the D-BUS library API >= 0.92] )
+ AC_DEFINE( HAVE_DBUS_1, 1, [Define if you have the D-BUS library API >= 0.30] )
+ AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] )
VLC_ADD_LDFLAGS([screensaver],[$DBUS_LIBS])
VLC_ADD_CFLAGS([screensaver],[$DBUS_CFLAGS])],
- [AC_MSG_WARN(DBUS library not found)])
- ]
- )]
- )]
+ dnl older dbus
+ [ PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.30,
+ [ AC_DEFINE( HAVE_DBUS_1, 1, [Define if you have the D-BUS library API >= 0.30 ] )
+ AC_DEFINE( HAVE_DBUS, 1, [Define if you have the D-BUS library] )
+ VLC_ADD_LDFLAGS([screensaver],[$DBUS_LIBS])
+ VLC_ADD_CFLAGS([screensaver],[$DBUS_CFLAGS])],
+ dnl much older dbus
+ [ PKG_CHECK_MODULES( DBUS, dbus-1,
+ [AC_DEFINE(HAVE_DBUS, 1, [Define if you have the D-BUS library])
+ VLC_ADD_LDFLAGS([screensaver],[$DBUS_LIBS])
+ VLC_ADD_CFLAGS([screensaver],[$DBUS_CFLAGS])],
+ [AC_MSG_WARN(DBUS library not found)])
+ ]
+ )]
+ )]
+ fi
+ fi
)
fi
dnl This helps detect broken plugins with undefined symbols
dnl Better fail loudly at build-time than silenty at run-time.
-RDC_PROG_LINK_FLAGS_IFELSE([-Wl,-z,defs], [
- VLC_ADD_LDFLAGS([plugin],[-Wl,-z,defs])
-])
+dnl Unfortunately, this sucks on FreeBSD (won't even link with -lc)
+dnl RDC_PROG_LINK_FLAGS_IFELSE([-Wl,-z,defs], [
+dnl VLC_ADD_LDFLAGS([plugin],[-Wl,-z,defs])
+dnl ])
dnl Check for various optimization flags
AC_CACHE_CHECK([if \$CC accepts -Os],
VLC_ADD_CFLAGS([i420_yuy2_mmx],[-fomit-frame-pointer])
fi
+dnl Check for -fvisibility=hidden
+AC_CACHE_CHECK([if \$CC accepts -fvisibility=hidden],
+ [ac_cv_c_visibility_hidden],
+ [CFLAGS="${CFLAGS_save} -fvisibility=hidden"
+ AC_TRY_COMPILE([],,ac_cv_c_visibility_hidden=yes, ac_cv_c_visibility_hidden=no)])
+if test "${ac_cv_c_visibility_hidden}" != "no"; then
+ VLC_ADD_CFLAGS([libvlc plugin],[-fvisibility=hidden])
+fi
+
+dnl Check for -fvisibility-inlines-hidden (breaks x86_64 linkers)
+dnl AC_LANG_PUSH(C++)
+dnl AC_CACHE_CHECK([if \$CXX accepts -fvisibility-inlines-hidden],
+dnl [ac_cv_c_visibility_inlines_hidden],
+dnl [CXXFLAGS="${CXXFLAGS_save} -fvisibility-inlines-hidden"
+dnl AC_TRY_COMPILE([],,ac_cv_c_visibility_inlines_hidden=yes, ac_cv_c_visibility_inlines_hidden=no)])
+dnl if test "${ac_cv_c_visibility_inlines_hidden}" != "no"; then
+dnl VLC_ADD_CXXFLAGS([libvlc plugin],[-fvisibility-inlines-hidden])
+dnl fi
+dnl CXXFLAGS="${CXXFLAGS_save}"
+dnl AC_LANG_POP(C++)
+
dnl Check for -mdynamic-no-pic
AC_CACHE_CHECK([if \$CC accepts -mdynamic-no-pic],
[ac_cv_c_dynamic_no_pic],
AC_DEFINE(HAVE_ATTRIBUTE_FORMAT, 1, Support for __attribute__((format())) with function pointers)
fi
-dnl Check for __attribute__(())
+dnl Check for __attribute__((packed))
AC_CACHE_CHECK([for __attribute__((packed))],
[ac_cv_c_attribute_packed],
[ac_cv_c_attribute_packed=no
AC_DEFINE(HAVE_ATTRIBUTE_PACKED, 1, Support for __attribute__((packed)) for structs)
fi
+dnl Check for __attribute__((visibility()))
+AC_CACHE_CHECK([for __attribute__((visibility()))],
+ [ac_cv_c_attribute_visibility],
+ [ac_cv_c_attribute_visibility=no
+ AC_TRY_COMPILE(, [extern __attribute__((visibility("default"))) int foo(int);],
+ [ac_cv_c_attribute_visibility=yes])])
+if test "${ac_cv_c_attribute_visibility}" != "no"; then
+ AC_DEFINE(HAVE_ATTRIBUTE_VISIBILITY, 1, Support for __attribute__((visibility())) for exporting symbols)
+fi
+
dnl
dnl Check the CPU
dnl
dnl default modules
dnl
VLC_ADD_PLUGINS([dummy logger memcpy])
-VLC_ADD_PLUGINS([mpgv mpga m4v m4a h264 ps pva avi asf mp4 rawdv nsv real aiff mjpeg demuxdump flacsys tta])
-VLC_ADD_PLUGINS([cvdsub svcdsub spudec subsdec dvbsub mpeg_audio lpcm a52 dts cinepak flac])
-VLC_ADD_PLUGINS([deinterlace invert adjust transform wave ripple psychedelic gradient motionblur rv32 rotate noise])
-VLC_ADD_PLUGINS([fixed32tos16 s16tofixed32 u8tofixed32 mono])
+VLC_ADD_PLUGINS([mpgv mpga m4v m4a h264 vc1 ps pva avi asf mp4 rawdv nsv real aiff mjpeg demuxdump flacsys tta])
+VLC_ADD_PLUGINS([cvdsub svcdsub spudec telx subsdec dvbsub mpeg_audio lpcm a52 dts cinepak flac])
+VLC_ADD_PLUGINS([deinterlace invert adjust transform wave ripple psychedelic gradient motionblur rv32 rotate noise extract sharpen])
+VLC_ADD_PLUGINS([converter_fixed mono])
VLC_ADD_PLUGINS([trivial_resampler ugly_resampler])
VLC_ADD_PLUGINS([trivial_channel_mixer trivial_mixer])
VLC_ADD_PLUGINS([playlist export sgimb nsc xtag])
VLC_ADD_PLUGINS([access_http access_mms access_ftp])
VLC_ADD_PLUGINS([packetizer_mpegvideo packetizer_h264])
VLC_ADD_PLUGINS([packetizer_mpeg4video packetizer_mpeg4audio])
+VLC_ADD_PLUGINS([packetizer_vc1])
if test "${SYS}" != "mingwce"; then
VLC_ADD_PLUGINS([aout_file linear_resampler bandlimited_resampler])
VLC_ADD_PLUGINS([float32_mixer spdif_mixer simple_channel_mixer])
VLC_ADD_PLUGINS([dolby_surround_decoder headphone_channel_mixer normvol equalizer param_eq])
- VLC_ADD_PLUGINS([fixed32tofloat32 float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif dtstospdif s16tofloat32 s16tofloat32swab s8tofloat32 u8tofloat32 audio_format])
+ VLC_ADD_PLUGINS([converter_float a52tospdif dtstospdif audio_format])
fi
dnl
VLC_ADD_CFLAGS([motionaltivec],[${ac_cv_altivec_inline}])
VLC_ADD_CFLAGS([memcpyaltivec],[${ac_cv_altivec_inline}])
VLC_ADD_CFLAGS([i420_yuy2_altivec],[${ac_cv_altivec_inline}])
- VLC_ADD_CFLAGS([vlc],[${ac_cv_altivec_inline}])
+ VLC_ADD_CFLAGS([libvlc],[${ac_cv_altivec_inline}])
fi
ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
fi
if test "${ac_cv_c_altivec}" != "no"; then
CPPFLAGS="${CPPFLAGS_save} ${ac_cv_c_altivec}"
fi
-AC_CHECK_HEADERS(altivec.h)
-CPPFLAGS="${CPPFLAGS_save}"
-if test "${ac_cv_c_altivec}" != "no"; then
- AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
- VLC_ADD_CFLAGS([vlc],[${ac_cv_c_altivec}])
- VLC_ADD_CFLAGS([idctaltivec motionaltivec],[${ac_cv_c_altivec}])
- VLC_ADD_CFLAGS([i420_yuy2_altivec memcpyaltivec deinterlace],[${ac_cv_c_altivec} ${ac_cv_c_altivec_abi}])
- if test "${ac_cv_altivec_inline}" = "no"; then
- ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
+AS_IF( test "${enable_altivec}" != "no",
+[
+ AC_CHECK_HEADERS(altivec.h)
+ CPPFLAGS="${CPPFLAGS_save}"
+
+ if test "${ac_cv_c_altivec}" != "no"; then
+ AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
+ VLC_ADD_CFLAGS([libvlc],[${ac_cv_c_altivec}])
+ VLC_ADD_CFLAGS([idctaltivec motionaltivec],[${ac_cv_c_altivec}])
+ VLC_ADD_CFLAGS([i420_yuy2_altivec memcpyaltivec deinterlace],[${ac_cv_c_altivec} ${ac_cv_c_altivec_abi}])
+ if test "${ac_cv_altivec_inline}" = "no"; then
+ ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
+ fi
fi
-fi
+],[
+ CPPFLAGS="${CPPFLAGS_save}"
+])
AC_CACHE_CHECK([if linker needs -framework vecLib],
[ac_cv_ld_altivec],
LDFLAGS="${LDFLAGS_save}"
])
if test "${ac_cv_ld_altivec}" != "no"; then
- VLC_ADD_LDFLAGS([vlc idctaltivec motionaltivec memcpyaltivec],[-framework vecLib])
+ VLC_ADD_LDFLAGS([libvlc idctaltivec motionaltivec memcpyaltivec],[-framework vecLib])
fi
fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
dnl
dnl x86 accelerations
dnl
-if test "${host_cpu}" = "i686" -o "${host_cpu}" = "i586" -o "${host_cpu}" = "x86" -o "${host_cpu}" = "i386" -o "${host_cpu}" = "x86_64"
+if test "${host_cpu}" = "i686" -o "${host_cpu}" = "i586" -o "${host_cpu}" = "x86" -o "${host_cpu}" = "i386" -o "${host_cpu}"="i486" -o "${host_cpu}" = "x86_64"
then
ARCH="${ARCH} mmx"
VLC_ADD_BUILTINS([${ACCEL_MODULES}])
[ --enable-release activate extra optimizations (default disabled)])
test "${enable_release}" != "yes" && enable_release="no"
-dnl
-dnl Is the shared libvlc forced ?
-dnl
-AC_ARG_ENABLE(shared-libvlc,
- [ --enable-shared-libvlc Win32 libvlc.dll build (default disabled)])
-AS_IF([test "${enable_libtool}" != "no" && test "${enable_shared_libvlc}"], [
- AC_MSG_ERROR([--enable-shared-libvlc and --enable-libtool are mutually exclusive])
-])
-
dnl
dnl Stream output
dnl
VLC_ADD_PLUGINS([packetizer_copy])
VLC_ADD_PLUGINS([stream_out_dummy stream_out_standard stream_out_es stream_out_rtp stream_out_description vod_rtsp])
- VLC_ADD_PLUGINS([stream_out_duplicate stream_out_gather stream_out_display stream_out_transcode stream_out_bridge stream_out_mosaic_bridge stream_out_autodel])
+ VLC_ADD_PLUGINS([stream_out_duplicate stream_out_display stream_out_transcode stream_out_bridge stream_out_mosaic_bridge stream_out_autodel])
+ VLC_ADD_PLUGINS([stream_out_gather])
# VLC_ADD_PLUGINS([stream_out_transrate])
# VLC_ADD_PLUGINS([rtcp])
VLC_ADD_PLUGINS([profile_parser])
dnl
AC_ARG_ENABLE(audioscrobbler,
- [ --enable-audioscrobbler Last.fm submission plugin (default disabled)])
-AS_IF([test "${enable_audioscrobbler}" = "yes"], [
+ [ --disable-audioscrobbler Last.fm submission plugin (default enabled)])
+AS_IF([test "${enable_audioscrobbler}" != "no"], [
VLC_ADD_PLUGINS([audioscrobbler])
])
AC_MSG_WARN(--with-livedotcom-tree is deprecated. Use --with-live555-tree instead.)
with_live555_tree="${with_livedotcom_tree}"
fi
-
+
if test -z "${with_live555_tree}" -a "${CXX}" != ""; then
AC_LANG_PUSH(C++)
CPPFLAGS_save="${CPPFLAGS}"
fi
fi
+dnl
+dnl special access module for dc1394 input
+dnl
+AC_ARG_ENABLE(dc1394,
+ [ --enable-dc1394 dc1394 access module (default disabled)])
+if test "${enable_dc1394}" = "yes"
+then
+ AC_CHECK_HEADERS(libraw1394/raw1394.h, [
+ AC_CHECK_LIB( raw1394, raw1394_get_nodecount, [
+ AC_CHECK_HEADERS(libdc1394/dc1394_control.h , [
+dnl AC_CHECK_LIB( dc1394_control, dc1394_setup_capture, [
+ VLC_ADD_PLUGINS([dc1394])
+ VLC_ADD_LDFLAGS([dc1394],[-ldc1394_control -lraw1394])
+dnl ],
+dnl [
+dnl AC_MSG_ERROR([libdc1394 is mandatory for the dc1394 input module. try --disable-dc1394 or install this library])
+dnl ])
+ ],
+ [
+ AC_MSG_ERROR([libdc1394 is mandatory for the dc1394 input module. try --disable-dc1394 or install this library])
+ ])
+ ],
+ [
+ AC_MSG_ERROR([libraw1394 is mandatory for the dc1394 input module. try --disable-dc1394 or install this library])
+ ])
+ ],
+ [
+ AC_MSG_ERROR([libraw1394 is mandatory for the dc1394 input module. try --disable-dc1394 or install this library])
+ ])
+fi
+
dnl
dnl dv module: digital video module check for libraw1394
dnl
dnl gnomeVFS access module
dnl
AC_ARG_ENABLE(gnomevfs,
- [ --enable-gnomevfs GnomeVFS access module (default enabled)])
-if test "${enable_gnomevfs}" != "no"
+ [ --enable-gnomevfs GnomeVFS access module (default disabled)])
+if test "${enable_gnomevfs}" = "yes"
then
PKG_CHECK_MODULES(GNOMEVFS, gnome-vfs-2.0,
VLC_ADD_LDFLAGS([access_gnomevfs],[$GNOMEVFS_LIBS])
CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}"
AC_CHECK_HEADERS(X11/Xlib.h, [
VLC_ADD_PLUGINS([screen])
- VLC_ADD_LDFLAGS([screen],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext])
+ VLC_ADD_LDFLAGS([screen],[${X_LIBS} ${X_PRE_LIBS} -lX11])
VLC_ADD_CPPFLAGS([screen],[${X_CFLAGS}])
])
CPPFLAGS="${CPPFLAGS_save}"
AS_IF([test "${have_ipv6}" = "yes"], [
AC_DEFINE(HAVE_INET_PTON, 1, [Define to 1 if you have inet_pton().])])
+
+AC_CHECK_FUNCS(inet_ntop,[
+ AC_DEFINE(HAVE_INET_NTOP, 1, [Define to 1 if you have inet_ntop().])])
+
+
dnl
dnl ogg demux plugin
dnl
if test "${SYS}" = "darwin"; then
VLC_ADD_CXXFLAGS([mkv],[-O1])
fi
- AC_CHECK_LIB(ebml, main, [
+ AC_CHECK_LIB(ebml_pic, main, [
VLC_ADD_PLUGINS([mkv])
- VLC_ADD_LDFLAGS([mkv],[-lmatroska -lebml])
- ])
+ VLC_ADD_LDFLAGS([mkv],[-lmatroska -lebml_pic])
+ ],
+ AC_CHECK_LIB(ebml, main, [
+ VLC_ADD_PLUGINS([mkv])
+ VLC_ADD_LDFLAGS([mkv],[-lmatroska -lebml])
+ ])
+ )
],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([Your libmatroska is too old: you may get a more recent one from http://dl.matroska.org/downloads/libmatroska/. Alternatively you can use --disable-mkv to disable the matroska plugin.])
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg}"
AC_CHECK_HEADERS(ffmpeg/avcodec.h, [], [AC_MSG_ERROR([Missing header file ffmpeg/avcodec.h.])] )
AC_CHECK_HEADERS(ffmpeg/avformat.h)
- AC_CHECK_HEADERS(ffmpeg/swscale.h)
AC_CHECK_HEADERS(ffmpeg/avutil.h)
AC_CHECK_HEADERS(postproc/postprocess.h, [], [AC_MSG_ERROR([Missing header file postproc/postprocess.h.])] )
CPPFLAGS="${CPPFLAGS_save}"
AC_CHECK_LIB(swscale, sws_getContext, [
+ AC_CHECK_HEADERS(ffmpeg/swscale.h)
VLC_ADD_LDFLAGS([ffmpeg],[-lswscale]) ], [], [-lavcodec $LDAVUTIL])
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
AC_MSG_RESULT(no)
AC_MSG_ERROR([cannot cd to ${with_twolame_tree}])
fi
- if test -f "${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a"
+ if test -f "${real_twolame_tree}/libtwolame/.libs/libtwolame.a"
then
dnl Use a custom twolame
- AC_MSG_RESULT(${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a)
+ AC_MSG_RESULT(${real_twolame_tree}/libtwolame/.libs/libtwolame.a)
VLC_ADD_BUILTINS([twolame])
- VLC_ADD_LDFLAGS([twolame],[${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a])
- VLC_ADD_CPPFLAGS([twolame],[-I${real_twolame_tree}/src/libtwolame])
+ VLC_ADD_LDFLAGS([twolame],[${real_twolame_tree}/libtwolame/.libs/libtwolame.a])
+ VLC_ADD_CPPFLAGS([twolame],[-I${real_twolame_tree}/libtwolame -DLIBTWOLAME_STATIC])
else
dnl The given libtwolame wasn't built
AC_MSG_RESULT(no)
- AC_MSG_ERROR([cannot find ${real_twolame_tree}/src/libtwolame/.libs/libtwolame.a, make sure you compiled libtwolame in ${with_twolame_tree}])
+ AC_MSG_ERROR([cannot find ${real_twolame_tree}/libtwolame/.libs/libtwolame.a, make sure you compiled libtwolame in ${with_twolame_tree}])
fi
else
- CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_twolame}"
+ CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_twolame} -DLIBTWOLAME_STATIC"
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_twolame}"
AC_CHECK_HEADERS(twolame.h, ,
[ AC_MSG_ERROR([Cannot find development header for libtwolame...]) ])
AC_CHECK_LIB(twolame, twolame_init, [
VLC_ADD_PLUGINS([twolame])
+ VLC_ADD_CPPFLAGS([twolame],[-DLIBTWOLAME_STATIC])
VLC_ADD_LDFLAGS([twolame],[-ltwolame]) ],
[ AC_MSG_ERROR([Cannot find libtwolame library...]) ])
LDFLAGS="${LDFLAGS_save}"
dnl
dnl skins2 module
dnl
-AC_CHECK_HEADERS(libtar.h, [
- VLC_ADD_LDFLAGS([skins2],[-ltar])
-] )
+AC_ARG_ENABLE(libtar,
+ [ --enable libtar support for skins2 (default enabled)])
+AS_IF([test "${enable_libtar}" != "no"],[
+ AC_CHECK_HEADERS(libtar.h, [
+ VLC_ADD_LDFLAGS([skins2],[-ltar])
+ ] )
+])
dnl
test "${enable_x11}" = "yes"); then
CPPFLAGS="${CPPFLAGS_save} ${X_FLAGS}"
AC_CHECK_HEADERS(X11/Xlib.h, [
- VLC_ADD_PLUGINS([x11 panoramix])
- VLC_ADD_LDFLAGS([x11 panoramix],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext])
- VLC_ADD_CPPFLAGS([x11 panoramix],[${X_CFLAGS}])
+ VLC_ADD_PLUGINS([panoramix])
+ VLC_ADD_LDFLAGS([panoramix],[${X_LIBS} ${X_PRE_LIBS} -lX11])
+ VLC_ADD_CPPFLAGS([panoramix],[${X_CFLAGS}])
+ AC_CHECK_LIB(Xext, XShmAttach, [
+ VLC_ADD_PLUGINS([x11])
+ VLC_ADD_LDFLAGS([x11],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext])
+ VLC_ADD_CPPFLAGS([x11],[${X_CFLAGS}])
+ ])
])
CPPFLAGS="${CPPFLAGS_save}"
fi
(test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" ||
test "${enable_glx}" = "yes"); then
CPPFLAGS="${CPPFLAGS_save} ${X_CFLAGS}"
- AC_CHECK_HEADERS(X11/Xlib.h GL/glu.h GL/glx.h, [
+ AC_CHECK_HEADERS(X11/Xlib.h GL/glu.h GL/glx.h)
+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM(
+ [[#if !defined(HAVE_X11_XLIB_H) || !defined(HAVE_GL_GLU_H) || !defined(HAVE_GL_GLX_H)
+ choke me
+ #endif]]),
+ [
VLC_ADD_PLUGINS([glx])
VLC_ADD_LDFLAGS([glx],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lGL -lGLU])
VLC_ADD_CPPFLAGS([glx],[${X_CFLAGS}])
- ],[AC_MSG_ERROR([Please install GL development package. Alternatively you can also configure with --disable-glx.])])
+ ],[AC_MSG_ERROR([Please install GL development package. Alternatively you can also configure with --disable-glx.])])
CPPFLAGS="${CPPFLAGS_save}"
fi
dnl
AC_ARG_ENABLE(sdl,
[ --enable-sdl SDL support (default enabled)])
+AC_ARG_ENABLE(sdl-image,
+ [ --enable-sdl-image SDL image support (default enabled)])
if test "${enable_sdl}" != "no"
then
SDL_PATH="${PATH}"
Please install it and try again. Alternatively you can also configure with
--disable-sdl.])
])])
- AC_CHECK_HEADERS(${SDL_IMAGE}, [AC_DEFINE_UNQUOTED(SDL_IMAGE_INCLUDE_FILE,
- <${SDL_IMAGE}>, Indicate the path of SDL_image.h)
- VLC_ADD_PLUGINS([sdl_image])
- AC_CHECK_LIB(png, png_set_rows,
- [VLC_ADD_LDFLAGS([sdl_image],[-lpng -lz])],[],[-lz])
- AC_CHECK_LIB(jpeg, jpeg_start_decompress,
- [VLC_ADD_LDFLAGS([sdl_image],[-ljpeg])])
- AC_CHECK_LIB(tiff, TIFFClientOpen,
- [VLC_ADD_LDFLAGS([sdl_image],[-ltiff])])
- VLC_ADD_LDFLAGS([sdl_image], [-lSDL_image])],
- [ AC_CHECK_HEADERS(SDL_image.h, AC_DEFINE(SDL_IMAGE_INCLUDE_FILE, <SDL_image.h>,
- As a last resort we also test for SDL_image.h presence),
- [ AC_MSG_WARN([The development package for SDL_image is not installed.
-You should install it alongside your SDL package.])
- ])])
+ AS_IF([ test "${enable_sdl_image}" != "no"],[
+ AC_CHECK_HEADERS(${SDL_IMAGE}, [AC_DEFINE_UNQUOTED(SDL_IMAGE_INCLUDE_FILE,
+ <${SDL_IMAGE}>, Indicate the path of SDL_image.h)
+ VLC_ADD_PLUGINS([sdl_image])
+ AC_CHECK_LIB(png, png_set_rows,
+ [VLC_ADD_LDFLAGS([sdl_image],[-lpng -lz])],[],[-lz])
+ AC_CHECK_LIB(jpeg, jpeg_start_decompress,
+ [VLC_ADD_LDFLAGS([sdl_image],[-ljpeg])])
+ AC_CHECK_LIB(tiff, TIFFClientOpen,
+ [VLC_ADD_LDFLAGS([sdl_image],[-ltiff])])
+ VLC_ADD_LDFLAGS([sdl_image], [-lSDL_image])],
+ [ AC_CHECK_HEADERS(SDL_image.h, AC_DEFINE(SDL_IMAGE_INCLUDE_FILE, <SDL_image.h>,
+ As a last resort we also test for SDL_image.h presence),
+ [ AC_MSG_WARN([The development package for SDL_image is not installed.
+ You should install it alongside your SDL package.])
+ ])])
+ ])
CPPFLAGS="${CPPFLAGS_save}"
if expr 1.1.5 \> `${SDL_CONFIG} --version` >/dev/null
then
])
AC_CHECK_HEADERS(d3d9.h,
[ VLC_ADD_PLUGINS([direct3d])
- VLC_ADD_LDFLAGS([direct3d],[-ld3d9 -lgdi32])
+ VLC_ADD_LDFLAGS([direct3d],[-lgdi32])
])
else
AC_MSG_CHECKING(for directX headers in ${with_directx})
dnl Skins2 module
dnl
AC_ARG_ENABLE(skins2,
- [ --enable-skins2 Skins2 interface module (experimental)])
+ [ --enable-skins2 Skins2 interface module (default disabled)])
if test "${enable_skins2}" = "yes" ||
(test "${SYS}" != "darwin" && test "${SYS}" != "beos" &&
test "${SYS}" != "mingwce" && test "${enable_skins2}" != "no"); then
VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
VLC_ADD_LDFLAGS([skins2],[-loleaut32 -lwinspool -lwinmm -lshell32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -lcomdlg32 -lole32 -luuid -lcomctl32])
+ else if test "${skins2_missing_lib}" = "no" && (test "${SYS}" = "darwin"); then
+ VLC_ADD_PLUGINS([skins2])
+ ALIASES="${ALIASES} svlc"
+ VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 -DMACOSX_SKINS])
+ VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
+ VLC_ADD_LDFLAGS([skins2],[-framework Carbon])
+
else if test "${skins2_missing_lib}" = "no"; then
VLC_ADD_PLUGINS([skins2])
ALIASES="${ALIASES} svlc"
VLC_ADD_CPPFLAGS([skins2],[-Imodules/gui/skins2 ${X_CFLAGS} -DX11_SKINS])
VLC_ADD_CXXFLAGS([skins2],[-O2 -fno-rtti])
VLC_ADD_LDFLAGS([skins2],[${X_LIBS} ${X_PRE_LIBS} -lXext -lX11])
- fi fi
+ fi fi fi
fi
dnl wxWidgets module
dnl
AC_ARG_ENABLE(wxwidgets,
- [ --enable-wxwidgets wxWidgets support (default enabled)])
-if test "${enable_wxwindows}"
-then
- AC_MSG_WARN(--{en|dis}able-wxwindows is deprecated. Use --{en|dis}able-wxwidgets instead.)
-fi
+ [ --enable-wxwidgets wxWidgets support (default disabled)])
-if test "${enable_wxwindows}" = "no"
-then
- enable_wxwidgets="no"
-fi
-if test "${enable_wxwidgets}" != "no"
+if test "${enable_wxwidgets}" = "yes"
then
+ AC_MSG_WARN([wxWidgets support is deprecated and will be removed. Consider using Qt4 instead.])
WXWIDGETS_PATH="${PATH}"
AC_ARG_WITH(wx-config-path,
[ --with-wx-config-path=PATH wx-config path (default search in \$PATH)],
then
if expr 2.6.0 \> `${WX_CONFIG} --version` >/dev/null || expr 2.7.0 \<= `${WX_CONFIG} --version` >/dev/null
then
- AC_MSG_ERROR([You need wxWidgets of the 2.6 branch. Please upgrade and try again. Alternatively you can also configure with --disable-wxwidgets.])
+ AC_MSG_ERROR([You need wxWidgets of the 2.6 branch. Please upgrade/downgrade and try again. Better yet, you can configure with --disable-wxwidgets.])
fi
AC_LANG_PUSH(C++)
# Turn this error:
# wxwidgets should provide the following flags but does not
# the following is required to compile for win32
VLC_ADD_CXXFLAGS([wxwidgets],[-D_UNICODE -DUNICODE])
+ else
+ AC_MSG_ERROR([You need a unicode build of wxWidgets. Please fix that and try again. Better yet, you can configure with --disable-wxwidgets.])
fi
if test "$have_libcdio" = "yes"
then
dnl
enableqt4=false
AC_ARG_ENABLE(qt4,
- [ --enable-qt4 QT 4 support (default disabled) ],
- [if test "${enable_qt4}" = "yes"; then
- PKG_CHECK_MODULES(QT4, QtCore QtGui,
- [ VLC_ADD_PLUGINS([qt4])
- ALIASES="${ALIASES} qvlc"
- enableqt4=true
- VLC_ADD_LDFLAGS([qt4],[$QT4_LIBS])
- VLC_ADD_CXXFLAGS([qt4],[$QT4_CFLAGS])
- MOC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/moc
- RCC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/rcc
- UIC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/uic],
- [AC_MSG_WARN(QT4 library not found)])
- fi])
+ [ --enable-qt4 QT 4 support (default enabled) ])
+AS_IF([test "${enable_qt4}" != "no" &&
+ (test "${SYS}" != "darwin" || test "${enable_qt4}" = "yes")], [
+ PKG_CHECK_MODULES(QT4, QtCore QtGui,
+ [ VLC_ADD_PLUGINS([qt4])
+ ALIASES="${ALIASES} qvlc"
+ enableqt4=true
+ VLC_ADD_LDFLAGS([qt4],[$QT4_LIBS])
+ VLC_ADD_CXXFLAGS([qt4],[$QT4_CFLAGS])
+ MOC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/moc
+ RCC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/rcc
+ UIC=`$PKG_CONFIG --variable=exec_prefix QtCore`/bin/uic],
+ AS_IF([test "${enable_qt4}" = "yes"],[
+ AC_MSG_ERROR(QT4 library not found)
+ ],[
+ AC_MSG_WARN(QT4 library not found)
+ ])
+ )
+])
AM_CONDITIONAL(ENABLE_QT4, test "$enableqt4" = "true")
dnl
[ --enable-macosx MacOS X support (default enabled on MacOS X)],
[if test "${enable_macosx}" = "yes"
then
- VLC_ADD_BUILTINS([macosx])
- VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL])
+ VLC_ADD_PLUGINS([access_eyetv])
+ VLC_ADD_LDFLAGS([access_eyetv], [-framework CoreFoundation])
+ VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL -framework QTKit])
VLC_ADD_OBJCFLAGS( [macosx],[-fobjc-exceptions] )
fi],
[AC_CHECK_HEADERS(Cocoa/Cocoa.h,
+ VLC_ADD_PLUGINS([access_eyetv])
+ VLC_ADD_LDFLAGS([access_eyetv], [-framework CoreFoundation])
VLC_ADD_BUILTINS([macosx])
- VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL])
+ VLC_ADD_LDFLAGS([macosx],[-framework IOKit -framework Cocoa -framework Carbon -framework QuickTime -lobjc -ObjC -framework OpenGL -framework AGL -framework QTKit])
VLC_ADD_OBJCFLAGS( [macosx],[-fobjc-exceptions] )
)])
CFLAGS=$ORIGCFLAGS
])
])
+AM_PATH_LIBGCRYPT([1:1.1.94], [have_libgcrypt="yes"], [have_libgcrypt="no"])
+AM_CONDITIONAL([HAVE_LIBGCRYPT], [test "${have_libgcrypt}" = "yes"])
+
dnl
dnl Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
AM_CONDITIONAL(LOADER, [test "${enable_loader}" = "yes"])
AS_IF([test "${enable_loader}" = "yes"],
[ VLC_ADD_PLUGINS([dmo])
- VLC_ADD_CPPFLAGS([dmo],[-I../../../@top_srcdir@/loader])
- VLC_ADD_LDFLAGS([dmo],[../../../loader/libloader.la -lpthread])
- VLC_ADD_CPPFLAGS([quicktime],[-I../../@top_srcdir@/loader])
- VLC_ADD_LDFLAGS([quicktime],[../../loader/libloader.la -lpthread])
- VLC_ADD_CPPFLAGS([realaudio],[-I../../@top_srcdir@/loader -DLOADER])
- VLC_ADD_LDFLAGS([realaudio],[../../loader/libloader.la -ldl -lpthread])
+ VLC_ADD_CPPFLAGS([dmo],[-I../../../@top_srcdir@/libs/loader])
+ VLC_ADD_LDFLAGS([dmo],[../../../libs/loader/libloader.la -lpthread])
+ VLC_ADD_CPPFLAGS([quicktime],[-I../../@top_srcdir@/libs/loader])
+ VLC_ADD_LDFLAGS([quicktime],[../../libs/loader/libloader.la -lpthread])
+ VLC_ADD_CPPFLAGS([realaudio],[-I../../@top_srcdir@/libs/loader -DLOADER])
+ VLC_ADD_LDFLAGS([realaudio],[../../libs/loader/libloader.la -ldl -lpthread])
])
dnl
WIDL=no
fi
AC_LANG_PUSH(C++)
- AC_CHECK_HEADERS(ole2.h olectl.h,
- [ VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
- VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid -lshlwapi])
- AC_CHECK_HEADERS(objsafe.h,
- VLC_ADD_CXXFLAGS([activex],[-DHAVE_OBJSAFE_HEADER]),,
- [#if HAVE_OLE2_H
- # include <ole2.h>
- #endif]
- )
- activex=:
- ],
+ AC_CHECK_HEADERS(ole2.h,
+ [AC_CHECK_HEADERS(olectl.h,
+ [ VLC_ADD_CPPFLAGS([activex],[-DUNICODE -D_UNICODE -D_MIDL_USE_GUIDDEF_])
+ VLC_ADD_CXXFLAGS([activex],[-fno-exceptions])
+ VLC_ADD_LDFLAGS([activex],[-lole32 -loleaut32 -luuid -lshlwapi])
+ AC_CHECK_HEADERS(objsafe.h,
+ VLC_ADD_CXXFLAGS([activex],[-DHAVE_OBJSAFE_HEADER]),,
+ [
+ #if HAVE_OLE2_H
+ # include <ole2.h>
+ #endif
+ ]
+ )
+ activex=:
+ PLUGINS_BINDINGS="${PLUGINS_BINDINGS} activex"
+ ],
+ [ AC_MSG_ERROR([required OLE headers are missing from your system]) ]
+ )],
[ AC_MSG_ERROR([required OLE headers are missing from your system]) ]
)
AC_LANG_POP(C++)
dnl
mozilla=false
AC_ARG_ENABLE(mozilla,
- [ --enable-mozilla build a vlc-based Mozilla plugin (default disabled)])
+ [ --enable-mozilla build a vlc-based Firefox/Mozilla plugin (default disabled)])
AC_ARG_WITH(mozilla-sdk-path,
[ --with-mozilla-sdk-path=PATH path to mozilla sdk])
AC_LANG_PUSH(C++)
then
dnl currently vlc plugin only needs headers, no xpcom support apis are actually used
need_xpcom_libs=false
+
if test "${with_mozilla_sdk_path}" = "" -o "${with_mozilla_sdk_path}" = "no"
then
- AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
- if test "${MOZILLA_CONFIG}" = "no"
- then
- AC_PATH_PROG(SEAMONKEY_CONFIG, seamonkey-config, no)
- if test "${SEAMONKEY_CONFIG}" = "no"
- then
- AC_PATH_PROG(XULRUNNER_CONFIG, xulrunner-config, no)
- if test "${XULRUNNER_CONFIG}" = "no"
- then
- AC_MSG_ERROR([Please install the Mozilla development tools, mozilla-config was not found.])
+ dnl New firefox-1.5 SDK api
+ PKG_CHECK_MODULES([FIREFOX], [firefox-plugin],
+ [
+ PKG_CHECK_MODULES([MOZILLA_NSPR], [mozilla-nspr],
+ [],
+ [
+ PKG_CHECK_MODULES([NSPR], [nspr],
+ [],
+ [
+ AC_MSG_ERROR([Please install the nspr development tools.])
+ ]
+ )
+ ]
+ )
+ CPPFLAGS="${CPPFLAGS_save} ${FIREFOX_CFLAGS} ${MOZILLA_NSPR_CFLAGS} ${NSPR_CFLAGS} ${MOZILLA_CPPFLAGS}"
+ MOZILLA_REQUIRED_HEADERS=1
+ AC_CHECK_HEADERS(mozilla-config.h,,MOZILLA_REQUIRED_HEADERS=0)
+ AC_CHECK_HEADERS(npapi.h,,MOZILLA_REQUIRED_HEADERS=0)
+ AC_CHECK_HEADERS(npruntime.h,,MOZILLA_REQUIRED_HEADERS=0,
+ [#if HAVE_NPAPI_H
+ # include <npapi.h>
+ #endif
+ ])
+ if test "${MOZILLA_REQUIRED_HEADERS}" = "0"; then
+ AC_MSG_ERROR([Please install the Firefox development tools; mozilla-config.h, plugin/npapi.h and plugin/npruntime.h were not found.])
+ fi
+ MOZILLA_REQUIRED_HEADERS=
+ mozilla=:
+ firefox_include=`pkg-config --variable=includedir firefox-plugin`
+ if test -f "${firefox_include}/mozilla-config.h" -a -f "${firefox_include}/mozilla-config32.h"; then
+ MOZILLA_CONFIG_H="${firefox_include}/mozilla-config32.h"
+ elif test -f "${firefox_include}/mozilla-config.h" -a -f "${firefox_include}/mozilla-config64.h"; then
+ MOZILLA_CONFIG_H="${firefox_include}/mozilla-config64.h"
else
- have_xul=true
- MOZILLA_CONFIG="${XULRUNNER_CONFIG}"
+ MOZILLA_CONFIG_H="${firefox_include}/mozilla-config.h"
fi
- else
- MOZILLA_CONFIG="${SEAMONKEY_CONFIG}"
+ if grep '^#define MOZ_X11 1' ${MOZILLA_CONFIG_H} 2>&1 > /dev/null ; then
+ VLC_ADD_LDFLAGS([mozilla], [${X_LIBS} ${X_PRE_LIBS} -lX11 -lXt])
+ fi
+ VLC_ADD_CPPFLAGS([mozilla],[${CPPFLAGS}])
+ VLC_ADD_LDFLAGS([mozilla],[${FIREFOX_LIBS} ${MOZILLA_NSPR_LIS} ${NSPR_LIBS} ${MOZILLA_LDFLAGS}])
+ VLC_ADD_PLUGINS([mozilla])
+ MOZILLA_CONFIG=
+ CPPFLAGS="${CPPFLAGS_save}"
+ ],
+ [
+ AC_PATH_PROG(MOZILLA_CONFIG, mozilla-config, no)
+ if test "${MOZILLA_CONFIG}" = "no"
+ then
+ AC_PATH_PROG(SEAMONKEY_CONFIG, seamonkey-config, no)
+ if test "${SEAMONKEY_CONFIG}" = "no"
+ then
+ AC_PATH_PROG(XULRUNNER_CONFIG, xulrunner-config, no)
+ if test "${XULRUNNER_CONFIG}" = "no"
+ then
+ AC_MSG_ERROR([Please install the Mozilla development tools, mozilla-config was not found.])
+ else
+ have_xul=true
+ MOZILLA_CONFIG="${XULRUNNER_CONFIG}"
+ fi
+ else
+ MOZILLA_CONFIG="${SEAMONKEY_CONFIG}"
+ fi
+ fi
+ ]
+ )
+ if test ! -z "${MOZILLA_CONFIG}"
+ then
+ if ${MOZILLA_CONFIG} --defines | grep -q 'MOZ_X11=1'; then
+ LDFLAGS="${LDFLAGS_save} ${X_LIBS} ${X_PRE_LIBS}"
+ AC_CHECK_LIB(Xt,XtStrings,
+ [
+ VLC_ADD_CPPFLAGS([mozilla],[${X_CFLAGS}])
+ VLC_ADD_LDFLAGS([mozilla],[${X_LIBS} ${X_PRE_LIBS} -lXt -lX11 -lSM -lICE])
+ ],
+ [],
+ [[${X_LIBS} ${X_PRE_LIBS} -lX11 -lSM -lICE]
+ ])
+ LDFLAGS="${LDFLAGS_save}"
fi
- fi
-
- if ${MOZILLA_CONFIG} --defines | grep -q 'MOZ_X11=1'; then
- LDFLAGS="${LDFLAGS_save} ${X_LIBS} ${X_PRE_LIBS}"
- AC_CHECK_LIB(Xt,XtStrings,
- [
- VLC_ADD_CPPFLAGS([mozilla],[${X_CFLAGS}])
- VLC_ADD_LDFLAGS([mozilla],[${X_LIBS} ${X_PRE_LIBS} -lXt -lX11 -lSM -lICE])
-],
- [],
- [[${X_LIBS} ${X_PRE_LIBS} -lX11 -lSM -lICE]
- ])
- LDFLAGS="${LDFLAGS_save}"
- fi
-
+
mozilla=:
+ PLUGINS_BINDINGS="${PLUGINS_BINDINGS} mozilla"
dnl Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=150490
VLC_ADD_CPPFLAGS([mozilla],[[`${MOZILLA_CONFIG} --cflags plugin xpcom java | sed 's,-I\([^ ]*\)/mozilla/\([^ ]*\),-I\1/\2 -I\1/mozilla/\2,g' | xargs`]])
if ${need_xpcom_libs}; then
MOZILLA_REQUIRED_HEADERS=
CPPFLAGS="${CPPFLAGS_save}"
MOZILLA_SDK_PATH="`${MOZILLA_CONFIG} --prefix`"
+ fi
dnl End of moz_sdk = ""
else
dnl special case for mingw32
mozilla_sdk_xpcom="/xpcom"
fi
fi
-
+
real_mozilla_sdk="`cd ${with_mozilla_sdk_path} 2>/dev/null && pwd`"
CPPFLAGS="${CPPFLAGS_save} -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include"
MOZILLA_REQUIRED_HEADERS=1
fi
MOZILLA_REQUIRED_HEADERS=
mozilla=:
+ PLUGINS_BINDINGS="${PLUGINS_BINDINGS} mozilla"
VLC_ADD_CPPFLAGS([mozilla],[-DXPCOM_GLUE -DHAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX -I${real_mozilla_sdk} -I${real_mozilla_sdk}/include -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])
if ${need_xpcom_libs}; then
VLC_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 -L${real_mozilla_sdk}/lib -lnspr4 -lplds4 -lplc4 -lxpcomglue])
if test "${SYS}" = "mingw32"; then
- dnl latest gecko sdk does not have embedstring
- if test -d "${real_mozilla_sdk}/embedstring/bin"
- then
- VLC_ADD_LDFLAGS([mozilla],[-lembedstring -Wl,--kill-at])
- fi
- fi
+ dnl latest gecko sdk does not have embedstring
+ if test -d "${real_mozilla_sdk}/embedstring/bin"
+ then
+ VLC_ADD_LDFLAGS([mozilla],[-lembedstring -Wl,--kill-at])
+ fi
+ fi
fi
MOZILLA_SDK_PATH="${real_mozilla_sdk}"
-
+
if test -n "${CYGPATH}"; then
real_mozilla_sdk="`${CYGPATH} -w ${real_mozilla_sdk}`"
fi
AC_ARG_ENABLE(python-bindings,
[ --enable-python-bindings Enable Python bindings (default disabled)])
dnl TODO: look for python dev headers
+AS_IF([test "${enable_python_bindings}" = "yes"],
+ PLUGINS_BINDINGS="${PLUGINS_BINDINGS} python"
+ )
+
AM_CONDITIONAL(BUILD_PYTHON, [test "${enable_python_bindings}" = "yes"])
dnl
[AC_MSG_ERROR([Please set the JAVA_HOME variable to your JDK environment])])
AC_PROG_JAVAC
AC_PROG_JAVA
+ PLUGINS_BINDINGS="${PLUGINS_BINDINGS} java"
fi
AM_CONDITIONAL(BUILD_JAVA, [test "${enable_java_bindings}" = "yes"])
if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
then
AC_CHECK_LIB(unicows, LoadUnicowsSymbol, [
- VLC_ADD_LDFLAGS([vlc],[-Wl,--exclude-libs,libunicows.a -lunicows])
+ VLC_ADD_LDFLAGS([vlc libvlc],[-Wl,--exclude-libs,libunicows.a -lunicows])
])
fi
dnl
dnl Pic and shared libvlc stuff
dnl
-AS_IF([test "x${enable_shared_libvlc}" = "x"], [enable_shared_libvlc=no])
-AM_CONDITIONAL(BUILD_SHARED, [test "${enable_shared_libvlc}" != "no"])
-AS_IF([test "${enable_shared_libvlc}" != "no" || test "${enable_libtool}" != "no"], [
+AS_IF([test "${SYS}" = "mingw32" || test "${enable_libtool}" != "no"], [
AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.])
- FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"
VLC_ADD_PLUGINS([${BUILTINS}])
+ AS_IF([test "${SYS}" = "mingw32"], [
+ FILE_LIBVLC_DLL="!define LIBVLC_DLL libvlc.dll"
+ VLC_ADD_CPPFLAGS([libvlc],[-DDLL_EXPORT])
+ ])
BUILTINS=""
], [
+ LDFLAGS_vlc="${LDFLAGS_vlc} ${LDFLAGS_libvlc}"
FILE_LIBVLC_DLL=""
])
dnl Stuff used by the program
dnl
AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION} ${CODENAME}", [Simple version string])
-AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VLC media player - version ${VERSION} ${CODENAME} - (c) 1996-2006 the VideoLAN team", [Copyright string])
+AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "VLC media player - version ${VERSION} ${CODENAME} - (c) 1996-2007 the VideoLAN team", [Copyright string])
AC_DEFINE_UNQUOTED(CONFIGURE_LINE, "${CONFIGURE_LINE}", [The ./configure command line])
AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MAJOR,"${VERSION_MAJOR}", [version major number])
AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MINOR,"${VERSION_MINOR}", [version minor number])
dnl AC_DEFINE_UNQUOTED(MODULE_SYMBOL, ${VLC_SYMBOL}, [Symbol suffix for module functions])
dnl New definitions with value matching 0.9.0 release
-module_symbol="0_9_0a"
+module_symbol="0_9_0b"
AC_DEFINE_UNQUOTED(MODULE_SUFFIX, "__${module_symbol}", [String suffix for module functions])
AC_DEFINE_UNQUOTED(MODULE_SYMBOL, $module_symbol, [Symbol suffix for module functions])
VLC_ENTRY="vlc_entry__${module_symbol}"
dnl
dnl Create the vlc-config script
dnl
-LDFLAGS_libvlc="${LDFLAGS_vlc} ${LDFLAGS_builtin}"
-for i in `echo "${BUILTINS}" | sed -e 's@[^ ]*/@@g'` ; do LDFLAGS_libvlc="${LDFLAGS_libvlc} ${libdir}/vlc/${i}.a `eval echo '$'{LDFLAGS_${i}}`" ; done
+LDFLAGS_libvlc="${LDFLAGS_libvlc} ${LDFLAGS_builtin}"
dnl
dnl Configuration is finished
doc/Makefile
intl/Makefile
ipkg/Makefile
- loader/Makefile
+ libs/loader/Makefile
+ libs/srtp/Makefile
modules/Makefile
mozilla/Makefile
m4/Makefile
test "${enable_release}" = "yes" && printf "release " || printf "devel "
echo "
vlc aliases :${ALIASES}
+plugins/bindings :${PLUGINS_BINDINGS}
You can tune the compiler flags in vlc-config.
To build vlc and its plugins, type \`./compile' or \`make'.