Commit 68f91047 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Use VLC_ADD_LIBS where seemingly appropriate

parent f49c97cd
......@@ -150,7 +150,7 @@ case "${host_os}" in
bsdi*)
SYS=bsdi
CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
VLC_ADD_LDFLAGS([dvd dvdcss vcd cdda vcdx cddax],[-ldvd])
VLC_ADD_LIBS([dvd dvdcss vcd cdda vcdx cddax],[-ldvd])
;;
*bsd*)
SYS="${host_os}"
......@@ -241,22 +241,22 @@ case "${host_os}" in
if test "${SYS}" = "mingw32"; then
# add ws2_32 for closesocket, select, recv
VLC_ADD_LDFLAGS([libvlc],[-lws2_32 -lnetapi32 -lwinmm])
VLC_ADD_LIBS([libvlc],[-lws2_32 -lnetapi32 -lwinmm])
VLC_ADD_LDFLAGS([vlc],[-mwindows])
VLC_ADD_LDFLAGS([activex mozilla],[-lgdi32])
VLC_ADD_LDFLAGS([cdda vcdx cddax sdl_image],[-lwinmm])
VLC_ADD_LDFLAGS([access_http access_mms access_udp access_tcp access_ftp access_output_udp access_output_shout sap slp http stream_out_standard stream_out_rtp vod_rtsp access_realrtsp telnet rc netsync gnutls growl flac ts audioscrobbler],[-lws2_32])
VLC_ADD_LIBS([activex mozilla],[-lgdi32])
VLC_ADD_LIBS([cdda vcdx cddax sdl_image],[-lwinmm])
VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_output_udp access_output_shout sap slp http stream_out_standard stream_out_rtp vod_rtsp access_realrtsp telnet rc netsync gnutls growl flac ts audioscrobbler],[-lws2_32])
fi
if test "${SYS}" = "mingwce"; then
# add ws2 for closesocket, select, recv
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])
VLC_ADD_LDFLAGS([libvlc vlc],[-e WinMainCRTStartup])
VLC_ADD_LIBS([libvlc access_http access_mms access_udp access_tcp access_ftp access_output_udp sap http netsync],[-lws2])
fi
;;
*nto*)
SYS=nto
VLC_ADD_LDFLAGS([x11 xvideo],[-lsocket])
VLC_ADD_LIBS([x11 xvideo],[-lsocket])
;;
solaris*)
SYS=solaris
......@@ -272,21 +272,21 @@ case "${host_os}" in
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 libvlc logger],[-lbe])
VLC_ADD_LDFLAGS([beos],[-lbe -lmedia -ltranslation -ltracker -lgame])
VLC_ADD_LDFLAGS([dvdnav dvdread],[-ldl])
VLC_ADD_LDFLAGS([access_file],[-lpoll])
VLC_ADD_LIBS([vlc libvlc logger],[-lbe])
VLC_ADD_LIBS([beos],[-lbe -lmedia -ltranslation -ltracker -lgame])
VLC_ADD_LIBS([dvdnav dvdread],[-ldl])
VLC_ADD_LIBS([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 libvlc growl],[-lbind -lsocket])
VLC_ADD_LIBS([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 libvlc growl],[-lnet])
VLC_ADD_LIBS([access_file access_ftp access_mms access_output_udp telnet netsync sap libvlc growl],[-lnet])
fi
dnl Ugly check for Zeta
if test -f /boot/beos/system/lib/libzeta.so; then
VLC_ADD_LDFLAGS([beos],[-lzeta])
VLC_ADD_LIBS([beos],[-lzeta])
fi
;;
*)
......@@ -362,7 +362,7 @@ AS_IF([test "${nls_cv_force_use_gnu_gettext}" = "yes"], [
AC_DEFINE(HAVE_INCLUDED_GETTEXT, 1, [Define if we use the local libintl])
AM_CPPFLAGS="${AM_CPPFLAGS} -I\$(top_builddir)/intl"
], [
VLC_ADD_LDFLAGS([libvlc vlc], [${LTLIBINTL}])
VLC_ADD_LIBS([libvlc vlc], [${LTLIBINTL}])
])
dnl
......@@ -371,14 +371,14 @@ dnl
AS_IF([test "$am_cv_func_iconv" != "yes"],
[AC_MSG_ERROR([libiconv is needed for VLC to work properly])])
VLC_ADD_CFLAGS([libvlc],[${INCICONV}])
VLC_ADD_LDFLAGS([libvlc],[${LTLIBICONV}])
VLC_ADD_LIBS([libvlc],[${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([libvlc],[]),
[VLC_ADD_LDFLAGS([libvlc gtk],[-lmingwex])])
AC_CHECK_LIB(mingw32,opendir,,
[VLC_ADD_LIBS([libvlc gtk],[-lmingwex])])
)
fi
......@@ -466,23 +466,23 @@ fi
AC_CHECK_FUNCS(connect,,[
AC_CHECK_LIB(socket,connect,[
VLC_ADD_LDFLAGS([libvlc cdda cddax],-lsocket)
VLC_ADD_LIBS([libvlc cdda cddax],-lsocket)
LIBS_socket="-lsocket"
])
])
AC_CHECK_FUNCS(send,,[
AC_CHECK_LIB(socket,send,[
VLC_ADD_LDFLAGS([access_http access_mms access_udp access_tcp access_ftp sap access_output_udp stream_out_standard growl],[-lsocket])
VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp sap access_output_udp stream_out_standard growl],[-lsocket])
])
])
AC_CHECK_FUNCS(gethostbyname,,[
AC_CHECK_LIB(nsl,gethostbyname,[
VLC_ADD_LDFLAGS([cdda cddax libvlc],[-lnsl])
VLC_ADD_LIBS([cdda cddax libvlc],[-lnsl])
],[
AC_CHECK_LIB(bind,gethostbyname,[
VLC_ADD_LDFLAGS([access_mms],[-lbind])
VLC_ADD_LIBS([access_mms],[-lbind])
])
])
])
......@@ -567,7 +567,7 @@ fi
AC_CHECK_FUNCS(inet_aton,,[
AC_CHECK_LIB(resolv,inet_aton,[
VLC_ADD_LDFLAGS([libvlc],[-lresolv])
VLC_ADD_LIBS([libvlc],[-lresolv])
])
])
......@@ -580,7 +580,7 @@ AC_CHECK_FUNCS(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
[ # FreeBSD has a gnugetopt library for this:
AC_CHECK_LIB([gnugetopt],[getopt_long],
[AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support)
VLC_ADD_LDFLAGS([libvlc],[-lgnugetopt])],
VLC_ADD_LIBS([libvlc],[-lgnugetopt])],
[need_getopt=:])])
fi
AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
......@@ -588,22 +588,22 @@ AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
AC_TYPE_SIGNAL
AC_CHECK_LIB(m,cos,[
VLC_ADD_LDFLAGS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain],[-lm])
VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain],[-lm])
])
AC_CHECK_LIB(m,pow,[
VLC_ADD_LDFLAGS([ffmpeg ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer spatializer param_eq libvlc vorbis freetype mod mpc dmo quicktime realaudio galaktos opengl],[-lm])
VLC_ADD_LIBS([ffmpeg ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer spatializer 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 extract],[-lm])
VLC_ADD_LIBS([headphone_channel_mixer normvol speex mono colorthres extract],[-lm])
])
AC_CHECK_LIB(m,ceil,[
VLC_ADD_LDFLAGS([mosaic],[-lm])
VLC_ADD_LIBS([mosaic],[-lm])
])
AC_CHECK_LIB(m,exp,[
VLC_ADD_LDFLAGS([gaussianblur],[-lm])
VLC_ADD_LIBS([gaussianblur],[-lm])
])
AC_CHECK_LIB(mx,sqrtf,[
VLC_ADD_LDFLAGS([x264],[-lmx])
VLC_ADD_LIBS([x264],[-lmx])
])
fi # end "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
......@@ -624,7 +624,7 @@ if test "${ac_cv_have_plugins}" = "no"; then
[ac_cv_my_have_shl_load=yes,
AC_CHECK_LIB(dld, shl_load,
[ac_cv_my_have_shl_load=yes
VLC_ADD_LDFLAGS([libvlc],[-ldld])])])
VLC_ADD_LIBS([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
......@@ -634,7 +634,7 @@ fi
# Whatever style
if test "${ac_cv_have_plugins}" = "no"; then
AC_CHECK_LIB(dld, dld_link,
[VLC_ADD_LDFLAGS([libvlc],[-ldld])
[VLC_ADD_LIBS([libvlc],[-ldld])
AC_DEFINE(HAVE_DL_DLD_LINK, 1, [Define if you have the GNU dld library])
ac_cv_have_plugins=yes])
fi
......@@ -643,7 +643,7 @@ 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([libvlc],[-lkernel32])
[VLC_ADD_LIBS([libvlc],[-lkernel32])
AC_DEFINE(HAVE_DL_WINDOWS, 1, [Define if you have Windows' LoadLibrary])
ac_cv_have_plugins=yes])
fi
......@@ -673,10 +673,10 @@ if test "${ac_cv_have_plugins}" = "no"; then
ac_cv_my_have_dlopen=yes,
AC_CHECK_LIB(dl, dlopen,
ac_cv_my_have_dlopen=yes
VLC_ADD_LDFLAGS([libvlc],[-ldl]),
VLC_ADD_LIBS([libvlc],[-ldl]),
AC_CHECK_LIB(svld, dlopen,
ac_cv_my_have_dlopen=yes
VLC_ADD_LDFLAGS([libvlc],[-lsvld]))))
VLC_ADD_LIBS([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
......@@ -741,24 +741,24 @@ AC_ARG_ENABLE(st,
fi
])
VLC_ADD_LDFLAGS([libvlc plugin],[${THREAD_LIB}])
VLC_ADD_LIBS([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([libvlc],[-lrt])
VLC_ADD_LIBS([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([libvlc],[-lrt])])
AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LIBS([libvlc],[-lrt])])
])
have_nanosleep=false
AC_CHECK_FUNCS(nanosleep,have_nanosleep=:,[
AC_CHECK_LIB(rt,nanosleep,
[VLC_ADD_LDFLAGS([libvlc],[-lrt]) have_nanosleep=:],
[VLC_ADD_LIBS([libvlc],[-lrt]) have_nanosleep=:],
[AC_CHECK_LIB(posix4,nanosleep,
[VLC_ADD_LDFLAGS([libvlc],[-lposix4]) have_nanosleep=:])]
[VLC_ADD_LIBS([libvlc],[-lposix4]) have_nanosleep=:])]
)
])
if ${have_nanosleep}; then
......@@ -854,13 +854,13 @@ then
[ 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([libvlc hal probe_hal],[$HAL_LIBS])
VLC_ADD_LIBS([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([libvlc hal],[$HAL_LIBS])
VLC_ADD_LIBS([libvlc hal],[$HAL_LIBS])
VLC_ADD_CFLAGS([libvlc hal],[$HAL_CFLAGS])],
[AC_MSG_WARN(HAL library not found)])
]
......@@ -880,21 +880,21 @@ then
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 libvlc],[$DBUS_LIBS])
VLC_ADD_LIBS([screensaver libvlc],[$DBUS_LIBS])
VLC_ADD_CFLAGS([screensaver libvlc],[$DBUS_CFLAGS])
dnl Check for dbus control interface
AC_ARG_ENABLE(dbus-control, [ --disable-dbus-control D-BUS control interface (default enabled)])
if test "${enable_dbus_control}" != "no"
then
VLC_ADD_PLUGINS([dbus])
VLC_ADD_LDFLAGS([dbus],[$DBUS_LIBS])
VLC_ADD_LIBS([dbus],[$DBUS_LIBS])
VLC_ADD_CFLAGS([dbus],[$DBUS_CFLAGS])
fi
dnl Check for Telepathy
AC_ARG_ENABLE(telepathy, [ --enable-telepathy Telepathy Presence plugin through DBus(default enabled)])
if test "${enable_telepathy}" != "no"; then
VLC_ADD_PLUGINS([telepathy])
VLC_ADD_LDFLAGS([telepathy],[$DBUS_LIBS])
VLC_ADD_LIBS([telepathy],[$DBUS_LIBS])
VLC_ADD_CFLAGS([telepathy],[$DBUS_CFLAGS])
fi],
......@@ -921,18 +921,18 @@ then
[ 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_LIBS([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_LIBS([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_LIBS([screensaver],[$DBUS_LIBS])
VLC_ADD_CFLAGS([screensaver],[$DBUS_CFLAGS])],
[AC_MSG_WARN(DBUS library not found)])
]
......@@ -1239,7 +1239,7 @@ if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"; then
VLC_ADD_PLUGINS([screensaver motion])
elif test "${SYS}" != "mingwce"; then
VLC_ADD_PLUGINS([ntservice access_smb dmo msn])
VLC_ADD_LDFLAGS([dmo],[-lole32 -luuid])
VLC_ADD_LIBS([dmo],[-lole32 -luuid])
else
VLC_ADD_PLUGINS([win32text])
fi
......@@ -1615,7 +1615,7 @@ if test "${enable_shout}" = "yes"; then
PKG_CHECK_MODULES(SHOUT, shout >= 2.1,
[AC_DEFINE(HAVE_SHOUT, [], [Define if you have the libshout library])
VLC_ADD_PLUGINS([access_output_shout])
VLC_ADD_LDFLAGS([access_output_shout],[$SHOUT_LIBS])
VLC_ADD_LIBS([access_output_shout],[$SHOUT_LIBS])
VLC_ADD_CFLAGS([access_output_shout],[$SHOUT_CFLAGS])],
[AC_MSG_WARN(libshout library not found)])
fi
......@@ -1652,7 +1652,7 @@ then
if test "x${have_lua}" = "xyes" ; then
AC_DEFINE(HAVE_LUA, [], [Define if you have the lua library])
VLC_ADD_PLUGINS([lua])
VLC_ADD_LDFLAGS([lua],[$LUA_LIBS])
VLC_ADD_LIBS([lua],[$LUA_LIBS])
VLC_ADD_CFLAGS([lua],[$LUA_CFLAGS])
fi
fi
......@@ -1699,7 +1699,7 @@ AS_IF([test "${enable_notify}" != "no" -a "${SYS}" != "mingw32"], [
[
VLC_ADD_PLUGINS([notify])
VLC_ADD_CFLAGS(notify, [$NOTIFY_CFLAGS])
VLC_ADD_LDFLAGS(notify, [$NOTIFY_LIBS])
VLC_ADD_LIBS(notify, [$NOTIFY_LIBS])
],[
AS_IF([test "${enable_notify}" = "yes"],[
AC_MSG_WARN( libnotify not found) ])
......@@ -1724,7 +1724,7 @@ AC_ARG_ENABLE(musicbrainz,
AS_IF([test "${enable_musicbrainz}" = "yes"],[
PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz,
[ VLC_ADD_PLUGINS([musicbrainz])
VLC_ADD_LDFLAGS([musicbrainz],[$MUSICBRAINZ_LIBS])
VLC_ADD_LIBS([musicbrainz],[$MUSICBRAINZ_LIBS])
VLC_ADD_CFLAGS([musicbrainz],[$MUSICBRAINZ_CFLAGS]) ],
[AC_MSG_WARN(MusicBrainz library not found)])
])
......@@ -1739,7 +1739,7 @@ AC_ARG_ENABLE(taglib,
PKG_CHECK_MODULES(TAGLIB, taglib,
[ AC_DEFINE( HAVE_TAGLIB, 1, [Define if you have taglib plugin built] )
VLC_ADD_PLUGINS([taglib])
VLC_ADD_LDFLAGS([taglib],[$TAGLIB_LIBS -lz])
VLC_ADD_LIBS([taglib],[$TAGLIB_LIBS -lz])
VLC_ADD_CXXFLAGS([taglib],[$TAGLIB_CFLAGS]) ],
[AC_MSG_WARN(TagLib library not found)])
])
......@@ -1790,17 +1790,17 @@ if test "${enable_live555}" != "no"; then
AC_CHECK_LIB(liveMedia_pic, main, [
# We have -lliveMedia_pic, build plugins
VLC_ADD_PLUGINS([live555])
VLC_ADD_LDFLAGS([live555], [-lliveMedia_pic -lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic])
VLC_ADD_LIBS([live555], [-lliveMedia_pic -lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic])
], [
AC_CHECK_LIB(liveMedia, main, [
# We only have -lliveMedia, do builtins
VLC_ADD_BUILTINS([live555])
VLC_ADD_LDFLAGS([live555], [-lliveMedia -lgroupsock -lBasicUsageEnvironment -lUsageEnvironment])
VLC_ADD_LIBS([live555], [-lliveMedia -lgroupsock -lBasicUsageEnvironment -lUsageEnvironment])
])
])
if test "${SYS}" = "mingw32"; then
# add ws2_32 for closesocket, select, recv
VLC_ADD_LDFLAGS([live555],[-lws2_32])
VLC_ADD_LIBS([live555],[-lws2_32])
fi
])
CPPFLAGS="${CPPFLAGS_save}"
......@@ -1820,13 +1820,13 @@ if test "${enable_live555}" != "no"; then
if test "${SYS}" = "mingw32"; then
# add ws2_32 for closesocket, select, recv
VLC_ADD_LDFLAGS([live555],[-lws2_32])
VLC_ADD_LIBS([live555],[-lws2_32])
fi
VLC_ADD_LDFLAGS([live555],[-L${real_live555_tree}/liveMedia -lliveMedia])
VLC_ADD_LDFLAGS([live555],[-L${real_live555_tree}/BasicUsageEnvironment -lBasicUsageEnvironment])
VLC_ADD_LDFLAGS([live555],[-L${real_live555_tree}/groupsock -lgroupsock])
VLC_ADD_LDFLAGS([live555],[-L${real_live555_tree}/UsageEnvironment -lUsageEnvironment])
VLC_ADD_LIBS([live555],[-L${real_live555_tree}/liveMedia -lliveMedia])
VLC_ADD_LIBS([live555],[-L${real_live555_tree}/BasicUsageEnvironment -lBasicUsageEnvironment])
VLC_ADD_LIBS([live555],[-L${real_live555_tree}/groupsock -lgroupsock])
VLC_ADD_LIBS([live555],[-L${real_live555_tree}/UsageEnvironment -lUsageEnvironment])
VLC_ADD_CXXFLAGS([live555],[-I${real_live555_tree}/BasicUsageEnvironment/include])
VLC_ADD_CXXFLAGS([live555],[-I${real_live555_tree}/groupsock/include])
......@@ -1857,7 +1857,7 @@ then
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])
VLC_ADD_LIBS([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])
......@@ -1896,7 +1896,7 @@ then
dnl Use ${with_dv_raw1394}/include/libraw1394/raw1394.h
AC_MSG_RESULT(yes)
VLC_ADD_PLUGINS([access_dv])
VLC_ADD_LDFLAGS([access_dv],[-L${with_dv_raw1394}/lib -lraw1394 -lpthread])
VLC_ADD_LIBS([access_dv],[-L${with_dv_raw1394}/lib -lraw1394 -lpthread])
VLC_ADD_CPPFLAGS([access_dv],[-I${with_dv_raw1394}/include])
else
dnl No libraw1394 could be found, sorry
......@@ -1906,7 +1906,7 @@ then
else
AC_CHECK_HEADERS(libraw1394/raw1394.h,
[ VLC_ADD_PLUGINS([access_dv])
VLC_ADD_LDFLAGS([access_dv],[-lraw1394 -lavc1394])
VLC_ADD_LIBS([access_dv],[-lraw1394 -lavc1394])
],[
if test -n "${enable_dv}"
then
......@@ -1931,7 +1931,7 @@ then
dnl Use a custom libraw1394
AC_MSG_RESULT(${real_dv_raw1394_tree}/src/.libs/libraw1394.a)
VLC_ADD_BUILTINS([access_dv])
VLC_ADD_LDFLAGS([access_dv],[-L${real_dv_raw1394_tree}/src/.libs -lraw1394])
VLC_ADD_LIBS([access_dv],[-L${real_dv_raw1394_tree}/src/.libs -lraw1394])
VLC_ADD_CPPFLAGS([access_dv],[-I${real_dv_raw1394_tree}])
else
dnl The given libraw1394 wasn't built
......@@ -1956,7 +1956,7 @@ then
then
dnl Use ${with_dv_avc1394}/include/libavc1394/avc1394.h
AC_MSG_RESULT(yes)
VLC_ADD_LDFLAGS([access_dv],[-L${with_dv_avc1394}/lib -lavc1394 -lrom1394 -lpthread])
VLC_ADD_LIBS([access_dv],[-L${with_dv_avc1394}/lib -lavc1394 -lrom1394 -lpthread])
VLC_ADD_CPPFLAGS([access_dv],[-I${with_avc1394}/include])
else
dnl No libavc1394 could be found, sorry
......@@ -1965,7 +1965,7 @@ then
fi
else
AC_CHECK_HEADERS(libavc1394/avc1394.h,
[ VLC_ADD_LDFLAGS([access_dv],[-lavc1394 -lrom1394 -lpthread])
[ VLC_ADD_LIBS([access_dv],[-lavc1394 -lrom1394 -lpthread])
],[
if test -n "${enable_dv}"
then
......@@ -1989,7 +1989,7 @@ then
then
dnl Use a custom libavc1394
AC_MSG_RESULT(${real_dv_avc1394_tree}/src/.libs/libavc1394.a)
VLC_ADD_LDFLAGS([access_dv],[-L${real_dv_avc1394_tree}/src/.libs -lavc1394 -lrom1394 -lpthread])
VLC_ADD_LIBS([access_dv],[-L${real_dv_avc1394_tree}/src/.libs -lavc1394 -lrom1394 -lpthread])
VLC_ADD_CPPFLAGS([access_dv],[-I${real_dv_avc1394_tree}])
else
dnl The given libavc1394 wasn't built
......@@ -2013,7 +2013,7 @@ then
dnl Temporary hack (yeah, sure ;)
if test "${SYS}" = "mingw32" || test "${SYS}" = "darwin" || test "${SYS}" = "beos" ; then
VLC_ADD_LDFLAGS([dvdread],[-ldvdcss])
VLC_ADD_LIBS([dvdread],[-ldvdcss])
fi
if test -z "${with_dvdread}"
......@@ -2022,7 +2022,7 @@ then
then
AC_CHECK_HEADERS(dvdread/dvd_reader.h,
[ VLC_ADD_PLUGINS([dvdread])
VLC_ADD_LDFLAGS([dvdread],[-ldvdread ${LDFLAGS_dvdcss}])
VLC_ADD_LIBS([dvdread],[-ldvdread ${LDFLAGS_dvdcss}])
],[
if test -n "${enable_dvdread}"
then
......@@ -2043,7 +2043,7 @@ then
dnl Use a custom libdvdread
AC_MSG_RESULT(${real_dvdread_tree}/dvdread/.libs/libdvdread.a)
VLC_ADD_BUILTINS([dvdread])
VLC_ADD_LDFLAGS([dvdread],[-L${real_dvdread_tree}/dvdread/.libs -ldvdread ${LDFLAGS_dvdcss}])
VLC_ADD_LIBS([dvdread],[-L${real_dvdread_tree}/dvdread/.libs -ldvdread ${LDFLAGS_dvdcss}])
VLC_ADD_CPPFLAGS([dvdread],[-I${real_dvdread_tree}])
else
dnl The given libdvdread wasn't built
......@@ -2058,7 +2058,7 @@ then
dnl Use ${with_dvdread}/include/dvdread/dvd_reader.h
AC_MSG_RESULT(yes)
VLC_ADD_PLUGINS([dvdread])
VLC_ADD_LDFLAGS([dvdread],[-L${with_dvdread}/lib -ldvdread ${LDFLAGS_dvdcss}])
VLC_ADD_LIBS([dvdread],[-L${with_dvdread}/lib -ldvdread ${LDFLAGS_dvdcss}])
VLC_ADD_CPPFLAGS([dvdread],[-I${with_dvdread}/include])
else
dnl No libdvdread could be found, sorry
......@@ -2077,7 +2077,7 @@ if test "${enable_dvdnav}" != "no"
then
dnl Same hack than dvdread
if test "${SYS}" = "mingw32" || test "${SYS}" = "darwin" || test "${SYS}" = "beos" ; then
VLC_ADD_LDFLAGS([dvdnav],[-ldvdcss])
VLC_ADD_LIBS([dvdnav],[-ldvdcss])
fi
DVDNAV_PATH="${PATH}"
......@@ -2092,7 +2092,7 @@ then
then
VLC_ADD_PLUGINS([dvdnav])
VLC_ADD_CFLAGS([dvdnav],[`${DVDNAV_CONFIG} --cflags`])
VLC_ADD_LDFLAGS([dvdnav],[`${DVDNAV_CONFIG} --libs`])
VLC_ADD_LIBS([dvdnav],[`${DVDNAV_CONFIG} --libs`])
fi
fi
......@@ -2109,7 +2109,7 @@ then
AC_CHECK_HEADERS(dshow.h,
[ VLC_ADD_PLUGINS([dshow])
VLC_ADD_CXXFLAGS([dshow],[])
VLC_ADD_LDFLAGS([dshow],[-lole32 -loleaut32 -luuid]) ])
VLC_ADD_LIBS([dshow],[-lole32 -loleaut32 -luuid]) ])
AC_LANG_POP(C++)
fi
fi
......@@ -2126,7 +2126,7 @@ then
AC_CHECK_HEADERS(dshow.h,
[ VLC_ADD_PLUGINS([bda])
VLC_ADD_CXXFLAGS([bda],[])
VLC_ADD_LDFLAGS([bda],[-lstrmiids -lole32 -loleaut32 -luuid]) ])
VLC_ADD_LIBS([bda],[-lstrmiids -lole32 -loleaut32 -luuid]) ])
fi
fi
......@@ -2150,11 +2150,11 @@ then
then
AC_MSG_RESULT(yes)
VLC_ADD_PLUGINS([opencv_wrapper])
VLC_ADD_LDFLAGS([opencv_wrapper],[-L${with_opencv_tree}/lib -lcv -lcxcore -lcvaux -lhighgui])
VLC_ADD_LIBS([opencv_wrapper],[-L${with_opencv_tree}/lib -lcv -lcxcore -lcvaux -lhighgui])
VLC_ADD_CFLAGS([opencv_wrapper],[-I${with_opencv_tree}/cv/include -I${with_opencv_tree}/cxcore/include -I${with_opencv_tree}/cvaux/include -I${with_opencv_tree}/otherlibs/highgui])
AC_LANG_PUSH(C++)
VLC_ADD_PLUGINS([opencv_example])
VLC_ADD_LDFLAGS([opencv_example],[-L${with_opencv_tree}/lib -lcv -lcxcore -lcvaux -lhighgui])
VLC_ADD_LIBS([opencv_example],[-L${with_opencv_tree}/lib -lcv -lcxcore -lcvaux -lhighgui])
VLC_ADD_CXXFLAGS([opencv_example],[-I${with_opencv_tree}/cv/include -I${with_opencv_tree}/cxcore/include -I${with_opencv_tree}/cvaux/include -I${with_opencv_tree}/otherlibs/highgui])
AC_LANG_POP(C++)
else
......@@ -2177,7 +2177,7 @@ AC_ARG_ENABLE(smb,
if test "${enable_smb}" != "no"; then
AC_CHECK_HEADERS(libsmbclient.h,
[ VLC_ADD_PLUGINS([access_smb])
VLC_ADD_LDFLAGS([access_smb],[-lsmbclient]) ],
VLC_ADD_LIBS([access_smb],[-lsmbclient]) ],
[ if test -n "${enable_smb}"; then
AC_MSG_ERROR([cannot find libsmbclient headers])
fi ])
......@@ -2206,7 +2206,7 @@ then
if test "${enable_sout}" != "no"; then
VLC_ADD_PLUGINS([mux_ts])
fi
VLC_ADD_LDFLAGS([mux_ts ts dvb],[-ldvbpsi]) ],
VLC_ADD_LIBS([mux_ts ts dvb],[-ldvbpsi]) ],
[ AC_MSG_WARN([cannot find libdvbpsi headers]) ],
[#if defined( HAVE_STDINT_H )
# include <stdint.h>
......@@ -2235,7 +2235,7 @@ then
VLC_ADD_BUILTINS([mux_ts])
fi
VLC_ADD_CPPFLAGS([mux_ts ts dvb],[-I${real_dvbpsi_tree}/src])
VLC_ADD_LDFLAGS([mux_ts ts dvb],[${real_dvbpsi_tree}/src/.libs/libdvbpsi.a])
VLC_ADD_LIBS([mux_ts ts dvb],[${real_dvbpsi_tree}/src/.libs/libdvbpsi.a])
else
dnl The given libdvbpsi wasn't built
AC_MSG_RESULT(no)
......@@ -2263,7 +2263,7 @@ then
VLC_ADD_PLUGINS([mux_ts])
fi
VLC_ADD_CPPFLAGS([mux_ts ts dvb],[${CPPFLAGS_test}])
VLC_ADD_LDFLAGS([mux_ts ts dvb],[${LDFLAGS_test} -ldvbpsi])
VLC_ADD_LIBS([mux_ts ts dvb],[${LDFLAGS_test} -ldvbpsi])
],[
if test -n "${enable_dvbpsi}"
......@@ -2365,7 +2365,7 @@ AC_ARG_ENABLE(gnomevfs,
if test "${enable_gnomevfs}" = "yes"
then
PKG_CHECK_MODULES(GNOMEVFS, gnome-vfs-2.0,
VLC_ADD_LDFLAGS([access_gnomevfs],[$GNOMEVFS_LIBS])
VLC_ADD_LIBS([access_gnomevfs],[$GNOMEVFS_LIBS])
VLC_ADD_CPPFLAGS([access_gnomevfs],[$GNOMEVFS_CPPFLAGS])
VLC_ADD_CFLAGS([access_gnomevfs],[$GNOMEVFS_CFLAGS])
VLC_ADD_PLUGINS([access_gnomevfs]),
......@@ -2408,11 +2408,11 @@ then
if test "$have_libcdio" = "yes"
then
AC_DEFINE(HAVE_CDDAX, [], [Define for the audio CD plugin using libcdio])
VLC_ADD_LDFLAGS([cddax],[$LIBCDIO_LIBS])
VLC_ADD_LIBS([cddax],[$LIBCDIO_LIBS])
VLC_ADD_CFLAGS([cddax],[$LIBCDIO_CFLAGS])
VLC_ADD_PLUGINS([cddax])
PKG_CHECK_MODULES(LIBCDIO_PARANOIA, libcdio_paranoia >= 0.72, [
VLC_ADD_LDFLAGS([cddax],[$LIBCDIO_CDDA_LIBS $LIBCDIO_CDDA_LIBS $LIBCDIO_PARANOIA_LIBS])],
VLC_ADD_LIBS([cddax],[$LIBCDIO_CDDA_LIBS $LIBCDIO_CDDA_LIBS $LIBCDIO_PARANOIA_LIBS])],
AC_MSG_WARN([CD Paranoia support disabled because no libcdio >= 0.72 found]))
else
AC_MSG_WARN([cddax plugin disabled because ok libcdio library not found or disabled])
......@@ -2423,7 +2423,7 @@ then
PKG_CHECK_MODULES(LIBCDDB, libcddb >= 0.9.5, [
HAVE_LIBCDDB=yes
AC_DEFINE(HAVE_LIBCDDB, [], [Define this if you have libcddb installed])
VLC_ADD_LDFLAGS([cddax],[$LIBCDDB_LIBS])
VLC_ADD_LIBS([cddax],[$LIBCDDB_LIBS])
VLC_ADD_CFLAGS([cddax],[$LIBCDDB_CFLAGS])
],
[AC_MSG_WARN(new enough libcddb not found. CDDB access disabled)
......@@ -2439,7 +2439,7 @@ if test "${enable_vcdx}" = "yes"
then
if test "${have_libvcdinfo}" = "yes"
then
VLC_ADD_LDFLAGS([vcdx],[$VCDINFO_LIBS])
VLC_ADD_LIBS([vcdx],[$VCDINFO_LIBS])
VLC_ADD_CFLAGS([vcdx],[$VCDINFO_CFLAGS])
else
AC_MSG_WARN([vcdx plugin disabled because ok libvcdinfo library not found or disabled])
......@@ -2447,7 +2447,7 @@ then
fi
PKG_CHECK_MODULES(LIBCDIO, libiso9660 >= 0.72,
[VLC_ADD_LDFLAGS([vcdx],[$LIBISO9660_LIBS])
[VLC_ADD_LIBS([vcdx],[$LIBISO9660_LIBS])
VLC_ADD_CFLAGS([vcdx],[$LIBISO9660_CFLAGS])],
[AC_MSG_WARN([vcdx plugin disabled because ok libiso9660 library not found])
HAVE_VCDX=no])
......@@ -2456,7 +2456,7 @@ then
then
AC_DEFINE(HAVE_VCDX, [],
[Define for the VCD plugin using libcdio/libvcdinfo])
VLC_ADD_LDFLAGS([vcdx],[$VCDINFO_LIBS])
VLC_ADD_LIBS([vcdx],[$VCDINFO_LIBS])
VLC_ADD_CFLAGS([vcdx],[$VCDINFO_CFLAGS])
VLC_ADD_PLUGINS([vcdx])
else
......@@ -2511,14 +2511,14 @@ then
then
VLC_ADD_PLUGINS([vcd cdda])
VLC_ADD_LDFLAGS([vcd vcdx cdda cddax],[-Wl,-framework,IOKit,-framework,CoreFoundation])
VLC_ADD_LDFLAGS([vcdx cddax cdda],[-liconv])
VLC_ADD_LIBS([vcdx cddax cdda],[-liconv])
fi
if test "$enable_libcddb" != "no"; then
PKG_CHECK_MODULES(LIBCDDB, libcddb >= 0.9.5, [
HAVE_LIBCDDB=yes
AC_DEFINE(HAVE_LIBCDDB, [], [Define this if you have libcddb installed])
VLC_ADD_LDFLAGS([cdda],[$LIBCDDB_LIBS])
VLC_ADD_LIBS([cdda],[$LIBCDDB_LIBS])
VLC_ADD_CFLAGS([cdda],[$LIBCDDB_CFLAGS])
],:
[AC_MSG_WARN(new enough libcddb not found. CDDB access disabled)
......@@ -2565,18 +2565,18 @@ if test "${enable_screen}" != "no"; then
])
elif test "${SYS}" = "mingw32"; then
VLC_ADD_PLUGINS([screen])
VLC_ADD_LDFLAGS([screen],[-lgdi32])
VLC_ADD_LIBS([screen],[-lgdi32])
elif test "${SYS}" = "mingwce"; then
CPPFLAGS="${CPPFLAGS_save}"
elif test "${SYS}" = "beos"; then
VLC_ADD_PLUGINS([screen])
VLC_ADD_CXXFLAGS([screen],[])
VLC_ADD_LDFLAGS([screen],[-lbe])
VLC_ADD_LIBS([screen],[-lbe])
else
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])
VLC_ADD_LIBS([screen],[${X_LIBS} ${X_PRE_LIBS} -lX11])
VLC_ADD_CPPFLAGS([screen],[${X_CFLAGS}])
])
CPPFLAGS="${CPPFLAGS_save}"
......@@ -2626,7 +2626,7 @@ then
if test "${enable_sout}" != "no"; then
VLC_ADD_PLUGINS([mux_ogg])
fi
VLC_ADD_LDFLAGS([ogg mux_ogg speex vorbis],[${real_ogg_tree}/src/.libs/libogg.a])
VLC_ADD_LIBS([ogg mux_ogg speex vorbis],[${real_ogg_tree}/src/.libs/libogg.a])
VLC_ADD_CFLAGS([ogg mux_ogg speex vorbis],[-I${real_ogg_tree}/include])
else
dnl The given ogg wasn't built
......@@ -2640,7 +2640,7 @@ then
if test "${enable_sout}" != "no"; then
VLC_ADD_PLUGINS([mux_ogg])
fi
VLC_ADD_LDFLAGS([ogg mux_ogg],[-logg])])
VLC_ADD_LIBS([ogg mux_ogg],[-logg])])
],[])
fi
fi
......@@ -2679,11 +2679,11 @@ if test "${enable_mkv}" != "no" -a "${CXX}" != ""; then
fi
AC_CHECK_LIB(ebml_pic, main, [
VLC_ADD_PLUGINS([mkv])
VLC_ADD_LDFLAGS([mkv],[-lmatroska -lebml_pic])
VLC_ADD_LIBS([mkv],[-lmatroska -lebml_pic])
],
AC_CHECK_LIB(ebml, main, [
VLC_ADD_PLUGINS([mkv])