Commit 163b655b authored by Sam Hocevar's avatar Sam Hocevar

* m4/vlc.m4 configure.ac:

    + Moved the shared object suffix detection to vlc.m4.
    + Replaced AX_* macros with VLC_* macros.
parent dbca5ca7
$Id: HACKING,v 1.10 2003/07/07 17:01:16 sam Exp $
$Id$
Hacking vlc
===========
......@@ -66,6 +66,6 @@ To add a module to the repository, just add its sources to a Modules.am
file. If you create a new Modules.am, do not forget to add a corresponding
Makefile line at the end of configure.ac.
To have the module built, you need to add a call to AX_ADD_PLUGINS or
AX_ADD_BUILTINS to configure.ac with your new module name as argument.
To have the module built, you need to add a call to VLC_ADD_PLUGINS or
VLC_ADD_BUILTINS to configure.ac with your new module name as argument.
......@@ -133,20 +133,20 @@ fi
rm -f m4/private.m4-tmp1 && cat > m4/private.m4-tmp1 << EOF
dnl The required AM_CONDITIONAL calls
dnl XXX: too many conditionals make the build very slow, disabled them
AC_DEFUN([AX_VLC_CONDITIONALS], [
AC_DEFUN([VLC_CONDITIONALS], [
EOF
rm -f m4/private.m4-tmp2 && cat > m4/private.m4-tmp2 << EOF
dnl The required AC_SUBST calls
AC_DEFUN([AX_VLC_SUBSTS], [
AC_DEFUN([VLC_SUBSTS], [
EOF
rm -f m4/private.m4-tmp3 && cat > m4/private.m4-tmp3 << EOF
dnl The required AC_OUTPUT calls
dnl XXX: this feature is only supported starting from automake-1.7
AC_DEFUN([AX_VLC_MAKEFILES], [AC_OUTPUT([
AC_DEFUN([VLC_MAKEFILES], [AC_OUTPUT([
EOF
rm -f m4/private.m4-tmp4 && cat > m4/private.m4-tmp4 << EOF
dnl Helper macro for vlc-config generation
AC_DEFUN([AX_VLC_CONFIG_HELPER], [
AC_DEFUN([VLC_CONFIG_HELPER], [
cat >> vlc-config.in << BLAH
EOF
......
......@@ -19,7 +19,7 @@ AM_CONFIG_HEADER(config.h)
dnl
dnl Save *FLAGS
dnl
AX_SAVE_FLAGS
VLC_SAVE_FLAGS
dnl
dnl Check for tools
......@@ -93,7 +93,6 @@ dnl
dnl Set default values
dnl
LDFLAGS_vlc="${LDFLAGS}"
LIBEXT=".so"
dnl
dnl Check the operating system
......@@ -108,7 +107,7 @@ case "${target_os}" in
bsdi*)
SYS=bsdi
CFLAGS_save="${CFLAGS_save} -pthread"; CFLAGS="${CFLAGS_save}"
AX_ADD_LDFLAGS([dvd dvdcss vcd cdda vcdx cddax],[-ldvd])
VLC_ADD_LDFLAGS([dvd dvdcss vcd cdda vcdx cddax],[-ldvd])
;;
*bsd*)
SYS="${target_os}"
......@@ -119,14 +118,12 @@ case "${target_os}" in
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"; OBJCFLAGS="${OBJCFLAGS_save}"
AX_ADD_LDFLAGS([vlc ffmpeg],[-all_load])
AX_ADD_LDFLAGS([mp4], [-framework IOKit -framework CoreFoundation])
AX_ADD_LDFLAGS([vlc],[-Wl,-multiply_defined,suppress])
LIBEXT=".dylib"
VLC_ADD_LDFLAGS([vlc ffmpeg],[-all_load])
VLC_ADD_LDFLAGS([mp4], [-framework IOKit -framework CoreFoundation])
VLC_ADD_LDFLAGS([vlc],[-Wl,-multiply_defined,suppress])
;;
*mingw32* | *cygwin*)
AC_CHECK_TOOL(WINDRES, windres, :)
LIBEXT=".dll"
case "${target_os}" in
*mingw32*)
......@@ -146,14 +143,14 @@ case "${target_os}" in
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}"
AX_ADD_LDFLAGS([vlc],[-lws2_32 -lnetapi32 -lwinmm -mwindows])
AX_ADD_LDFLAGS([vcdx cddax],[-lwinmm])
AX_ADD_LDFLAGS([ipv4 ipv6 access_http access_mms access_udp access_tcp access_ftp access_output_udp sap slp http stream_out_standard telnet netsync],[-lws2_32])
VLC_ADD_LDFLAGS([vlc],[-lws2_32 -lnetapi32 -lwinmm -mwindows])
VLC_ADD_LDFLAGS([vcdx cddax],[-lwinmm])
VLC_ADD_LDFLAGS([ipv4 ipv6 access_http access_mms access_udp access_tcp access_ftp access_output_udp sap slp http stream_out_standard telnet netsync],[-lws2_32])
fi
;;
*nto*)
SYS=nto
AX_ADD_LDFLAGS([x11 xvideo],[-lsocket])
VLC_ADD_LDFLAGS([x11 xvideo],[-lsocket])
;;
solaris*)
SYS=solaris
......@@ -163,19 +160,18 @@ case "${target_os}" in
;;
hpux*)
SYS=hpux
LIBEXT=".sl"
;;
beos)
SYS=beos
CFLAGS_save="${CFLAGS_save} -Wno-multichar"; CFLAGS="${CFLAGS_save}"
CXXFLAGS_save="${CXXFLAGS_save} -Wno-multichar"; CXXFLAGS="${CXXFLAGS_save}"
AX_ADD_CXXFLAGS([beos],[])
AX_ADD_LDFLAGS([vlc beos],[-lbe])
AX_ADD_LDFLAGS([beos],[-lmedia -ltranslation -ltracker -lgame])
VLC_ADD_CXXFLAGS([beos],[])
VLC_ADD_LDFLAGS([vlc beos],[-lbe])
VLC_ADD_LDFLAGS([beos],[-lmedia -ltranslation -ltracker -lgame])
dnl Ugly check for Zeta
if test -f /boot/beos/system/lib/libzeta.so; then
AX_ADD_LDFLAGS([beos],[-lzeta])
VLC_ADD_LDFLAGS([beos],[-lzeta])
fi
;;
*)
......@@ -198,7 +194,7 @@ if test "${nls_cv_force_use_gnu_gettext}" = "yes"; then
else
AC_CHECK_FUNCS(textdomain,,[
AC_CHECK_LIB(intl,textdomain,
AX_ADD_LDFLAGS([vlc],[${LIBINTL}]),,
VLC_ADD_LDFLAGS([vlc],[${LIBINTL}]),,
${LIBINTL}
)
])
......@@ -214,15 +210,12 @@ then
Define if you want utf8 support)
fi
AC_MSG_CHECKING(for suffix of libraries)
AC_MSG_RESULT(${LIBEXT})
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,AX_ADD_LDFLAGS([vlc],[]),
[AX_ADD_LDFLAGS([vlc gtk],[-lmingwex])])
AC_CHECK_LIB(mingw32,opendir,VLC_ADD_LDFLAGS([vlc],[]),
[VLC_ADD_LDFLAGS([vlc gtk],[-lmingwex])])
)
fi
......@@ -267,18 +260,21 @@ AC_LANG_PUSH(C++)
AC_LANG_POP(C++)
fi
dnl Flags for plugin compilation
dnl Plugin compilation stuff
VLC_LIBRARY_SUFFIX
case "${SYS}" in
mingw32|cygwin)
AX_ADD_CFLAGS([pic plugin mozilla],[${CFLAGS_mingw32_special}])
AX_ADD_CXXFLAGS([pic plugin mozilla],[${CFLAGS_mingw32_special} ${CXXFLAGS_mingw32_special}])
AX_ADD_OBJCFLAGS([pic plugin mozilla],[${CFLAGS_mingw32_special}])
VLC_ADD_CFLAGS([pic plugin mozilla],[${CFLAGS_mingw32_special}])
VLC_ADD_CXXFLAGS([pic plugin mozilla],[${CFLAGS_mingw32_special} ${CXXFLAGS_mingw32_special}])
VLC_ADD_OBJCFLAGS([pic plugin mozilla],[${CFLAGS_mingw32_special}])
;;
*)
AX_ADD_CFLAGS([pic plugin mozilla],[-fpic -fPIC])
AX_ADD_CXXFLAGS([pic plugin mozilla],[-fpic -fPIC])
AX_ADD_OBJCFLAGS([pic plugin mozilla],[-fpic -fPIC])
AX_ADD_LDFLAGS([plugin mozilla],[-fpic -fPIC])
VLC_ADD_CFLAGS([pic plugin mozilla],[-fpic -fPIC])
VLC_ADD_CXXFLAGS([pic plugin mozilla],[-fpic -fPIC])
VLC_ADD_OBJCFLAGS([pic plugin mozilla],[-fpic -fPIC])
VLC_ADD_LDFLAGS([plugin mozilla],[-fpic -fPIC])
;;
esac
......@@ -314,22 +310,22 @@ fi
AC_CHECK_FUNCS(connect,,[
AC_CHECK_LIB(socket,connect,[
AX_ADD_LDFLAGS([vlc ipv4 cddax],-lsocket)
VLC_ADD_LDFLAGS([vlc ipv4 cddax],-lsocket)
])
])
AC_CHECK_FUNCS(send,,[
AC_CHECK_LIB(socket,send,[
AX_ADD_LDFLAGS([access_http access_mms access_udp access_tcp access_ftp sap access_output_udp stream_out_standard],[-lsocket])
VLC_ADD_LDFLAGS([access_http access_mms access_udp access_tcp access_ftp sap access_output_udp stream_out_standard],[-lsocket])
])
])
AC_CHECK_FUNCS(gethostbyname,,[
AC_CHECK_LIB(nsl,gethostbyname,[
AX_ADD_LDFLAGS([cddax ipv4 vlc],[-lnsl])
VLC_ADD_LDFLAGS([cddax ipv4 vlc],[-lnsl])
],[
AC_CHECK_LIB(bind,gethostbyname,[
AX_ADD_LDFLAGS([ipv4 access_mms],[-lbind])
VLC_ADD_LDFLAGS([ipv4 access_mms],[-lbind])
])
])
])
......@@ -368,7 +364,7 @@ fi
AC_CHECK_FUNCS(inet_aton,,[
AC_CHECK_LIB(resolv,inet_aton,[
AX_ADD_LDFLAGS([ipv4 vlc],[-lresolv])
VLC_ADD_LDFLAGS([ipv4 vlc],[-lresolv])
])
])
......@@ -381,7 +377,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)
AX_ADD_LDFLAGS([vlc],[-lgnugetopt])],
VLC_ADD_LDFLAGS([vlc],[-lgnugetopt])],
[need_getopt=:])])
fi
AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
......@@ -389,13 +385,13 @@ AM_CONDITIONAL(BUILD_GETOPT, ${need_getopt})
if test "${SYS}" != "mingw32"; then
AC_TYPE_SIGNAL
AC_CHECK_LIB(m,cos,[
AX_ADD_LDFLAGS([adjust distort a52tofloat32 dtstofloat32],[-lm])
VLC_ADD_LDFLAGS([adjust distort a52tofloat32 dtstofloat32],[-lm])
])
AC_CHECK_LIB(m,pow,[
AX_ADD_LDFLAGS([ffmpeg stream_out_transcode stream_out_transrate i420_rgb faad vlc],[-lm])
VLC_ADD_LDFLAGS([ffmpeg stream_out_transcode stream_out_transrate i420_rgb faad vlc],[-lm])
])
AC_CHECK_LIB(m,sqrt,[
AX_ADD_LDFLAGS([headphone_channel_mixer],[-lm])
VLC_ADD_LDFLAGS([headphone_channel_mixer],[-lm])
])
fi # end "${SYS}" != "mingw32"
......@@ -416,7 +412,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
AX_ADD_LDFLAGS([vlc],[-ldld])])])
VLC_ADD_LDFLAGS([vlc],[-ldld])])])
if test "${ac_cv_my_have_shl_load}" = "yes"; then
AC_DEFINE(HAVE_DL_SHL_LOAD, 1, [Define if you have the shl_load API])
ac_cv_have_plugins=yes
......@@ -426,7 +422,7 @@ fi
# Whatever style
if test "${ac_cv_have_plugins}" = "no"; then
AC_CHECK_LIB(dld, dld_link,
[AX_ADD_LDFLAGS([vlc],[-ldld])
[VLC_ADD_LDFLAGS([vlc],[-ldld])
AC_DEFINE(HAVE_DL_DLD_LINK, 1, [Define if you have the GNU dld library])
ac_cv_have_plugins=yes])
fi
......@@ -435,7 +431,7 @@ fi
if test "${ac_cv_have_plugins}" = "no"; then
if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"; then
AC_CHECK_LIB(kernel32, main,
[AX_ADD_LDFLAGS([vlc],[-lkernel32])
[VLC_ADD_LDFLAGS([vlc],[-lkernel32])
AC_DEFINE(HAVE_DL_WINDOWS, 1, [Define if you have Windows' LoadLibrary])
ac_cv_have_plugins=yes])
fi
......@@ -457,10 +453,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
AX_ADD_LDFLAGS([vlc],[-ldl]),
VLC_ADD_LDFLAGS([vlc],[-ldl]),
AC_CHECK_LIB(svld, dlopen,
ac_cv_my_have_dlopen=yes
AX_ADD_LDFLAGS([vlc],[-lsvld]))))
VLC_ADD_LDFLAGS([vlc],[-lsvld]))))
if test "${ac_cv_my_have_dlopen}" = "yes"; then
AC_DEFINE(HAVE_DL_DLOPEN, 1, [Define if you have the dlopen API])
ac_cv_have_plugins=yes
......@@ -525,19 +521,19 @@ AC_ARG_ENABLE(st,
fi
])
AX_ADD_LDFLAGS([vlc plugin],[${THREAD_LIB}])
VLC_ADD_LDFLAGS([vlc plugin],[${THREAD_LIB}])
dnl Don't link with rt when using GNU-pth
if test "${THREAD_LIB}" != "-lpth" && test "${THREAD_LIB}" != "-lst"; then
dnl HP/UX port
AC_CHECK_LIB(rt,sem_init, [AX_ADD_LDFLAGS([vlc],[-lrt])])
AC_CHECK_LIB(rt,sem_init, [VLC_ADD_LDFLAGS([vlc],[-lrt])])
have_nanosleep=false
AC_CHECK_FUNCS(nanosleep,have_nanosleep=:,[
AC_CHECK_LIB(rt,nanosleep,
[AX_ADD_LDFLAGS([vlc],[-lrt]) have_nanosleep=:],
[VLC_ADD_LDFLAGS([vlc],[-lrt]) have_nanosleep=:],
[AC_CHECK_LIB(posix4,nanosleep,
[AX_ADD_LDFLAGS([vlc],[-lposix4]) have_nanosleep=:])]
[VLC_ADD_LDFLAGS([vlc],[-lposix4]) have_nanosleep=:])]
)
])
if ${have_nanosleep}; then
......@@ -778,7 +774,7 @@ AC_CACHE_CHECK([if \$CC accepts -fomit-frame-pointer],
if test "${ac_cv_c_omit_frame_pointer}" != "no"; then
CFLAGS_OPTIM_NODEBUG="${CFLAGS_OPTIM_NODEBUG} -fomit-frame-pointer"
# this plugin does not compile without -fomit-frame-pointer, damn gcc!
AX_ADD_CFLAGS([i420_yuy2_mmx],[-fomit-frame-pointer])
VLC_ADD_CFLAGS([i420_yuy2_mmx],[-fomit-frame-pointer])
fi
dnl Check for -mdynamic-no-pic
......@@ -787,8 +783,8 @@ AC_CACHE_CHECK([if \$CC accepts -mdynamic-no-pic],
[CFLAGS="${CFLAGS_save} -mdynamic-no-pic"
AC_TRY_COMPILE([],,ac_cv_c_dynamic_no_pic=yes, ac_cv_c_dynamic_no_pic=no)])
if test "${ac_cv_c_dynamic_no_pic}" != "no"; then
AX_ADD_CFLAGS([builtin],[-mdynamic-no-pic])
AX_ADD_CFLAGS([libvlc],[-mdynamic-no-pic])
VLC_ADD_CFLAGS([builtin],[-mdynamic-no-pic])
VLC_ADD_CFLAGS([libvlc],[-mdynamic-no-pic])
fi
dnl Check for Darwin plugin linking flags
......@@ -797,20 +793,20 @@ AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error -lcc_dynamic],
[CFLAGS="${CFLAGS_save} -bundle -undefined error -lcc_dynamic"
AC_TRY_COMPILE([],,ac_cv_ld_darwin=yes, ac_cv_ld_darwin=no)])
if test "${ac_cv_ld_darwin}" != "no"; then
AX_ADD_LDFLAGS([plugin],[-bundle -undefined error -lcc_dynamic])
VLC_ADD_LDFLAGS([plugin],[-bundle -undefined error -lcc_dynamic])
fi
dnl Check for standard plugin linking flags
dnl BeOS' gcc needs -nostart instead of -shared, even if -shared isn't harmful (just a warning)
if test "${SYS}" = "beos"; then
AX_ADD_LDFLAGS([plugin mozilla],[-nostart])
VLC_ADD_LDFLAGS([plugin mozilla],[-nostart])
else
AC_CACHE_CHECK([if \$CC accepts -shared],
[ac_cv_ld_plugins],
[CFLAGS="${CFLAGS_save} -shared"
AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
if test "${ac_cv_ld_plugins}" != "no"; then
AX_ADD_LDFLAGS([plugin mozilla],[-shared])
VLC_ADD_LDFLAGS([plugin mozilla],[-shared])
fi
fi
......@@ -892,21 +888,21 @@ test "${enable_cprof}" != "yes" && enable_cprof="no"
dnl
dnl default modules
dnl
AX_ADD_PLUGINS([dummy rc telnet logger gestures memcpy hotkeys netsync])
AX_ADD_PLUGINS([mpgv mpga m4v h264 ps pva avi asf aac mp4 rawdv nsv real aiff mjpeg])
AX_ADD_PLUGINS([cvdsub svcdsub spudec dvbsub mpeg_audio lpcm a52 dts cinepak])
AX_ADD_PLUGINS([deinterlace invert adjust wall transform distort clone crop motionblur])
AX_ADD_PLUGINS([float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif dtstospdif fixed32tofloat32 fixed32tos16 s16tofixed32 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofixed32 u8tofloat32])
AX_ADD_PLUGINS([trivial_resampler ugly_resampler linear_resampler bandlimited_resampler])
AX_ADD_PLUGINS([trivial_channel_mixer headphone_channel_mixer])
AX_ADD_PLUGINS([trivial_mixer spdif_mixer float32_mixer])
AX_ADD_PLUGINS([aout_file])
AX_ADD_PLUGINS([i420_rgb i420_yuy2 i422_yuy2 i420_ymga])
AX_ADD_PLUGINS([m3u playlist export sgimb])
AX_ADD_PLUGINS([rawvideo])
AX_ADD_PLUGINS([wav araw demuxsub adpcm a52sys dtssys au])
AX_ADD_PLUGINS([access_file access_udp access_tcp access_http ipv4 access_mms])
AX_ADD_PLUGINS([access_ftp access_directory sap http])
VLC_ADD_PLUGINS([dummy rc telnet logger gestures memcpy hotkeys netsync])
VLC_ADD_PLUGINS([mpgv mpga m4v h264 ps pva avi asf aac mp4 rawdv nsv real aiff mjpeg])
VLC_ADD_PLUGINS([cvdsub svcdsub spudec dvbsub mpeg_audio lpcm a52 dts cinepak])
VLC_ADD_PLUGINS([deinterlace invert adjust wall transform distort clone crop motionblur])
VLC_ADD_PLUGINS([float32tos16 float32tos8 float32tou16 float32tou8 a52tospdif dtstospdif fixed32tofloat32 fixed32tos16 s16tofixed32 s16tofloat32 s16tofloat32swab s8tofloat32 u8tofixed32 u8tofloat32])
VLC_ADD_PLUGINS([trivial_resampler ugly_resampler linear_resampler bandlimited_resampler])
VLC_ADD_PLUGINS([trivial_channel_mixer headphone_channel_mixer])
VLC_ADD_PLUGINS([trivial_mixer spdif_mixer float32_mixer])
VLC_ADD_PLUGINS([aout_file])
VLC_ADD_PLUGINS([i420_rgb i420_yuy2 i422_yuy2 i420_ymga])
VLC_ADD_PLUGINS([m3u playlist export sgimb])
VLC_ADD_PLUGINS([rawvideo])
VLC_ADD_PLUGINS([wav araw demuxsub adpcm a52sys dtssys au])
VLC_ADD_PLUGINS([access_file access_udp access_tcp access_http ipv4 access_mms])
VLC_ADD_PLUGINS([access_ftp access_directory sap http])
dnl
dnl Switch to enable a version of VLC where most modules will be builtin
......@@ -914,7 +910,7 @@ dnl
AC_ARG_ENABLE(mostly-builtin,
[ --enable-mostly-builtin most modules will be built-in (default disabled)])
if test "${enable_mostly_builtin}" = "yes"; then
AX_ADD_BUILTINS([${PLUGINS}])
VLC_ADD_BUILTINS([${PLUGINS}])
PLUGINS=""
fi
......@@ -922,9 +918,9 @@ dnl
dnl Some plugins aren't useful on some platforms
dnl
if test "${SYS}" != "mingw32"; then
AX_ADD_PLUGINS([screensaver])
VLC_ADD_PLUGINS([screensaver])
else
AX_ADD_PLUGINS([ntservice])
VLC_ADD_PLUGINS([ntservice])
fi
dnl
......@@ -998,11 +994,11 @@ AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly],
if test "${ac_cv_altivec_inline}" != "no"; then
AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks AltiVec inline assembly.)
if test "${ac_cv_altivec_inline}" != "yes"; then
AX_ADD_CFLAGS([idctaltivec],[${ac_cv_altivec_inline}])
AX_ADD_CFLAGS([motionaltivec],[${ac_cv_altivec_inline}])
AX_ADD_CFLAGS([memcpyaltivec],[${ac_cv_altivec_inline}])
AX_ADD_CFLAGS([i420_yuy2_altivec],[${ac_cv_altivec_inline}])
AX_ADD_CFLAGS([vlc],[${ac_cv_altivec_inline}])
VLC_ADD_CFLAGS([idctaltivec],[${ac_cv_altivec_inline}])
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}])
fi
ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
fi
......@@ -1034,7 +1030,7 @@ AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
CFLAGS="${CFLAGS_save}"])
if test "${ac_cv_c_altivec}" != "no"; then
AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
AX_ADD_CFLAGS([vlc idctaltivec motionaltivec memcpyaltivec deinterlace i420_yuy2_altivec],[${ac_cv_c_altivec}])
VLC_ADD_CFLAGS([vlc idctaltivec motionaltivec memcpyaltivec deinterlace i420_yuy2_altivec],[${ac_cv_c_altivec}])
ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
fi
......@@ -1045,7 +1041,7 @@ AC_CACHE_CHECK([if linker needs -framework vecLib],
LDFLAGS="${LDFLAGS_save}"
])
if test "${ac_cv_ld_altivec}" != "no"; then
AX_ADD_LDFLAGS([vlc idctaltivec motionaltivec memcpyaltivec],[-framework vecLib])
VLC_ADD_LDFLAGS([vlc idctaltivec motionaltivec memcpyaltivec],[-framework vecLib])
fi
fi # end "${SYS}" != "mingw32"
......@@ -1078,7 +1074,7 @@ dnl
if test "${target_cpu}" = "i686" -o "${target_cpu}" = "i586" -o "${target_cpu}" = "x86" -o "${target_cpu}" = "i386"
then
ARCH="${ARCH} mmx"
AX_ADD_BUILTINS([${ACCEL_MODULES}])
VLC_ADD_BUILTINS([${ACCEL_MODULES}])
fi
dnl
......@@ -1094,9 +1090,9 @@ dnl
AC_ARG_ENABLE(altivec,
[ --disable-altivec disable AltiVec optimizations (default enabled on PPC)],
[ if test "${enable_altivec}" = "yes"; then ARCH="${ARCH} altivec";
AX_ADD_BUILTINS([${ACCEL_MODULES}]) fi ],
VLC_ADD_BUILTINS([${ACCEL_MODULES}]) fi ],
[ if test "${target_cpu}" = "powerpc"; then ARCH="${ARCH} altivec";
AX_ADD_BUILTINS([${ACCEL_MODULES}]) fi ])
VLC_ADD_BUILTINS([${ACCEL_MODULES}]) fi ])
dnl
dnl Debugging mode
......@@ -1119,15 +1115,15 @@ AC_ARG_ENABLE(sout,
[ --enable-sout Stream output modules (default enabled)])
if test "${enable_sout}" != "no"
then
AX_ADD_PLUGINS([access_output_dummy access_output_udp access_output_file access_output_http])
AX_ADD_PLUGINS([mux_ps mux_avi mux_mp4 mux_asf mux_dummy])
AX_ADD_PLUGINS([packetizer_mpegvideo packetizer_h264])
AX_ADD_PLUGINS([packetizer_mpeg4video packetizer_mpeg4audio])
AX_ADD_PLUGINS([packetizer_copy])
VLC_ADD_PLUGINS([access_output_dummy access_output_udp access_output_file access_output_http])
VLC_ADD_PLUGINS([mux_ps mux_avi mux_mp4 mux_asf mux_dummy])
VLC_ADD_PLUGINS([packetizer_mpegvideo packetizer_h264])
VLC_ADD_PLUGINS([packetizer_mpeg4video packetizer_mpeg4audio])
VLC_ADD_PLUGINS([packetizer_copy])
AX_ADD_PLUGINS([stream_out_dummy stream_out_standard stream_out_es stream_out_rtp])
AX_ADD_PLUGINS([stream_out_duplicate stream_out_gather])
# AX_ADD_PLUGINS([stream_out_transrate stream_out_display])
VLC_ADD_PLUGINS([stream_out_dummy stream_out_standard stream_out_es stream_out_rtp])
VLC_ADD_PLUGINS([stream_out_duplicate stream_out_gather])
# VLC_ADD_PLUGINS([stream_out_transrate stream_out_display])
dnl Ogg and vorbis are handled in their respective section
fi
......@@ -1157,21 +1153,21 @@ if test "${enable_livedotcom}" = "yes"; then
CPPFLAGS_livedotcom="-I/usr/include/liveMedia -I/usr/include/groupsock -I/usr/include/BasicUsageEnvironment -I/usr/include/UsageEnvironment"
CPPFLAGS="${CPPFLAGS} ${CPPFLAGS_livedotcom}"
AC_CHECK_HEADERS(liveMedia.hh, [
AX_ADD_CXXFLAGS([livedotcom], [${CPPFLAGS_livedotcom}])
VLC_ADD_CXXFLAGS([livedotcom], [${CPPFLAGS_livedotcom}])
AC_CHECK_LIB(liveMedia_pic, main, [
# We have -lliveMedia_pic, build plugins
AX_ADD_PLUGINS([livedotcom])
AX_ADD_LDFLAGS([livedotcom], [-lliveMedia_pic -lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic])
VLC_ADD_PLUGINS([livedotcom])
VLC_ADD_LDFLAGS([livedotcom], [-lliveMedia_pic -lgroupsock_pic -lBasicUsageEnvironment_pic -lUsageEnvironment_pic])
], [
AC_CHECK_LIB(liveMedia, main, [
# We only have -lliveMedia, do builtins
AX_ADD_BUILTINS([livedotcom])
AX_ADD_LDFLAGS([livedotcom], [-lliveMedia -lgroupsock -lBasicUsageEnvironment -lUsageEnvironment])
VLC_ADD_BUILTINS([livedotcom])
VLC_ADD_LDFLAGS([livedotcom], [-lliveMedia -lgroupsock -lBasicUsageEnvironment -lUsageEnvironment])
])
])
if test "${SYS}" = "mingw32"; then
# add ws2_32 for closesocket, select, recv
AX_ADD_LDFLAGS([livedotcom],[-lws2_32])
VLC_ADD_LDFLAGS([livedotcom],[-lws2_32])
fi
])
CPPFLAGS="${CPPFLAGS_save}"
......@@ -1187,22 +1183,22 @@ if test "${enable_livedotcom}" = "yes"; then
if test -f "${real_livedotcom_tree}/liveMedia/libliveMedia.a"; then
AC_MSG_RESULT(${real_livedotcom_tree}/liveMedia/libliveMedia.a)
AX_ADD_BUILTINS([livedotcom])
VLC_ADD_BUILTINS([livedotcom])
if test "${SYS}" = "mingw32"; then
# add ws2_32 for closesocket, select, recv
AX_ADD_LDFLAGS([livedotcom],[-lws2_32])
VLC_ADD_LDFLAGS([livedotcom],[-lws2_32])
fi
AX_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/liveMedia -lliveMedia])
AX_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/BasicUsageEnvironment -lBasicUsageEnvironment])
AX_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/groupsock -lgroupsock])
AX_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/UsageEnvironment -lUsageEnvironment])
VLC_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/liveMedia -lliveMedia])
VLC_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/BasicUsageEnvironment -lBasicUsageEnvironment])
VLC_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/groupsock -lgroupsock])
VLC_ADD_LDFLAGS([livedotcom],[-L${real_livedotcom_tree}/UsageEnvironment -lUsageEnvironment])
AX_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/BasicUsageEnvironment/include])
AX_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/groupsock/include])
AX_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/liveMedia/include])
AX_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/UsageEnvironment/include ])
VLC_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/BasicUsageEnvironment/include])
VLC_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/groupsock/include])
VLC_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/liveMedia/include])
VLC_ADD_CXXFLAGS([livedotcom],[-I${real_livedotcom_tree}/UsageEnvironment/include ])
else
dnl The given live.com wasn't built
AC_MSG_RESULT(no)
......@@ -1228,8 +1224,8 @@ then
if test -z "${with_dvdread_tree}"
then
AC_CHECK_HEADERS(dvdread/dvd_reader.h,
[ AX_ADD_PLUGINS([dvdread])
AX_ADD_LDFLAGS([dvdread],[-ldvdread ${LDFLAGS_dvdcss}])
[ VLC_ADD_PLUGINS([dvdread])
VLC_ADD_LDFLAGS([dvdread],[-ldvdread ${LDFLAGS_dvdcss}])
],[
if test -n "${enable_dvdread}"
then
......@@ -1250,9 +1246,9 @@ then
then
dnl Use a custom libdvdread
AC_MSG_RESULT(${real_dvdread_tree}/dvdread/.libs/libdvdread.a)
AX_ADD_BUILTINS([dvdread])
AX_ADD_LDFLAGS([dvdread],[-L${real_dvdread_tree}/dvdread/.libs -ldvdread ${LDFLAGS_dvdcss}])
AX_ADD_CPPFLAGS([dvdread],[-I${real_dvdread_tree}])
VLC_ADD_BUILTINS([dvdread])
VLC_ADD_LDFLAGS([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
AC_MSG_RESULT(no)
......@@ -1265,9 +1261,9 @@ then
then
dnl Use ${with_dvdread}/include/dvdread/dvd_reader.h
AC_MSG_RESULT(yes)
AX_ADD_PLUGINS([dvdread])
AX_ADD_LDFLAGS([dvdread],[-L${with_dvdread}/lib -ldvdread ${LDFLAGS_dvdcss}])
AX_ADD_CPPFLAGS([dvdread],[-I${with_dvdread}/include])
VLC_ADD_PLUGINS([dvdread])
VLC_ADD_LDFLAGS([dvdread],[-L${with_dvdread}/lib -ldvdread ${LDFLAGS_dvdcss}])
VLC_ADD_CPPFLAGS([dvdread],[-I${with_dvdread}/include])
else
dnl No libdvdread could be found, sorry
AC_MSG_RESULT(no)
......@@ -1293,9 +1289,9 @@ then
AC_PATH_PROG(DVDNAV_CONFIG, dvdnav-config, no, ${DVDNAV_PATH})
if test "${DVDNAV_CONFIG}" != "no"
then
AX_ADD_PLUGINS([dvdnav])
AX_ADD_CFLAGS([dvdnav],[`${DVDNAV_CONFIG} --cflags`])
AX_ADD_LDFLAGS([dvdnav],[`${DVDNAV_CONFIG} --libs`])
VLC_ADD_PLUGINS([dvdnav])
VLC_ADD_CFLAGS([dvdnav],[`${DVDNAV_CONFIG} --cflags`])
VLC_ADD_LDFLAGS([dvdnav],[`${DVDNAV_CONFIG} --libs`])
fi
fi
......@@ -1309,9 +1305,9 @@ then
if test "${SYS}" = "mingw32" -o "${SYS}" = "cygwin"
then
AC_CHECK_HEADERS(dshow.h,
[ AX_ADD_PLUGINS([dshow])
AX_ADD_CXXFLAGS([dshow],[])
AX_ADD_LDFLAGS([dshow],[-lole32 -loleaut32]) ])
[ VLC_ADD_PLUGINS([dshow])
VLC_ADD_CXXFLAGS([dshow],[])
VLC_ADD_LDFLAGS([dshow],[-lole32 -loleaut32]) ])
fi
fi
......@@ -1331,8 +1327,8 @@ then
if test -z "${with_dvbpsi_tree}"
then
AC_CHECK_HEADERS(dvbpsi/dr.h,
[ AX_ADD_PLUGINS([mux_ts ts])
AX_ADD_LDFLAGS([mux_ts ts],[-ldvbpsi]) ],
[ VLC_ADD_PLUGINS([mux_ts ts])
VLC_ADD_LDFLAGS([mux_ts ts],[-ldvbpsi]) ],
[ AC_MSG_WARN([cannot find libdvbpsi headers]) ],
[#if defined( HAVE_STDINT_H )
# include <stdint.h>
......@@ -1356,9 +1352,9 @@ then
then
dnl Use a custom libdvbpsi
AC_MSG_RESULT(${real_dvbpsi_tree}/src/.libs/libdvbpsi.a)
AX_ADD_BUILTINS([mux_ts ts])
AX_ADD_CPPFLAGS([mux_ts ts],[-I${real_dvbpsi_tree}/src])
AX_ADD_LDFLAGS([mux_ts ts],[-L${real_dvbpsi_tree}/src/.libs -ldvbpsi])
VLC_ADD_BUILTINS([mux_ts ts])
VLC_ADD_CPPFLAGS([mux_ts ts],[-I${real_dvbpsi_tree}/src])
VLC_ADD_LDFLAGS([mux_ts ts],[-L${real_dvbpsi_tree}/src/.libs -ldvbpsi])
else
dnl The given libdvbpsi wasn't built
AC_MSG_RESULT(no)
......@@ -1381,9 +1377,9 @@ then
fi
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_test}"
AC_CHECK_HEADERS([dvbpsi/dr.h],[
AX_ADD_PLUGINS([mux_ts ts])
AX_ADD_CPPFLAGS([mux_ts ts],[${CPPFLAGS_test}])
AX_ADD_LDFLAGS([mux_ts ts],[${LDFLAGS_test} -ldvbpsi])
VLC_ADD_PLUGINS([mux_ts ts])
VLC_ADD_CPPFLAGS([mux_ts ts],[${CPPFLAGS_test}])
VLC_ADD_LDFLAGS([mux_ts ts],[${LDFLAGS_test} -ldvbpsi])
],[
if test -n "${enable_dvbpsi}"
......@@ -1407,12 +1403,12 @@ then
[ --with-v4l=PATH path to a v4l-enabled kernel tree],[],[])
if test "${with_v4l}" != "no" -a -n "${with_v4l}"
then
AX_ADD_CPPFLAGS([v4l],[-I${with_v4l}/include])
VLC_ADD_CPPFLAGS([v4l],[-I${with_v4l}/include])
fi
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_v4l}"
AC_CHECK_HEADERS(linux/videodev.h, [
AX_ADD_PLUGINS([v4l])
VLC_ADD_PLUGINS([v4l])
],[])
CPPFLAGS="${CPPFLAGS_save}"
fi
......@@ -1424,7 +1420,7 @@ AC_ARG_ENABLE(pvr,
[ --enable-pvr PVR cards access module (default disabled)])
if test "${enable_pvr}" = "yes"
then
AX_ADD_PLUGINS([pvr])
VLC_ADD_PLUGINS([pvr])
fi
dnl dnl
......@@ -1450,18 +1446,18 @@ dnl then
dnl PKG_CHECK_MODULES(LIBCDIO, libcdio >= 0.65,
dnl [enable_cddax="no"
dnl AC_DEFINE(HAVE_CDDAX, [], [Define for the CD-DA plugin using libcdio])
dnl AX_ADD_LDFLAGS([cddax],[$LIBCDIO_LIBS])
dnl AX_ADD_CFLAGS([cddax],[$LIBCDIO_CFLAGS])
dnl AX_ADD_PLUGINS([cddax])],
dnl VLC_ADD_LDFLAGS([cddax],[$LIBCDIO_LIBS])
dnl VLC_ADD_CFLAGS([cddax],[$LIBCDIO_CFLAGS])
dnl VLC_ADD_PLUGINS([cddax])],
dnl [AC_MSG_WARN(libcdio library not found)
dnl HAVE_CDDAX=no])
dnl
dnl if test x$enable_libcddb != no; then
dnl if test "$enable_libcddb" != "no"; then
dnl PKG_CHECK_MODULES(LIBCDDB, libcddb >= 0.9.4, [
dnl HAVE_LIBCDDB=yes
dnl AC_DEFINE(HAVE_LIBCDDB, [], [Define this if you have libcddb installed])
dnl AX_ADD_LDFLAGS([cddax],[$LIBCDDB_LIBS])
dnl AX_ADD_CFLAGS([cddax],[$LIBCDDB_CFLAGS])
dnl VLC_ADD_LDFLAGS([cddax],[$LIBCDDB_LIBS])
dnl VLC_ADD_CFLAGS([cddax],[$LIBCDDB_CFLAGS])
dnl ],
dnl [AC_MSG_WARN(new enough libcddb not found. CDDB access disabled)
dnl HAVE_LIBCDDB=no])
......@@ -1473,9 +1469,9 @@ dnl PKG_CHECK_MODULES(VCDINFO, libvcdinfo >= 0.7.20,
dnl [enable_vcd="no"
dnl AC_DEFINE(HAVE_VCDX, [],
dnl [Define for the VCD plugin using libcdio/libvcdinfo])
dnl AX_ADD_LDFLAGS([vcdx],[$VCDINFO_LIBS])
dnl AX_ADD_CFLAGS([vcdx],[$VCDINFO_CFLAGS])
dnl AX_ADD_PLUGINS([vcdx])],
dnl VLC_ADD_LDFLAGS([vcdx],[$VCDINFO_LIBS])
dnl VLC_ADD_CFLAGS([vcdx],[$VCDINFO_CFLAGS])
dnl VLC_ADD_PLUGINS([vcdx])],
dnl [AC_MSG_WARN(vcdinfo library not found)
dnl HAVE_VCDX=no])
dnl fi
......@@ -1492,7 +1488,7 @@ then
AC_MSG_CHECKING(for cdrom_msf0 in linux/cdrom.h)
AC_EGREP_HEADER(cdrom_msf0,linux/cdrom.h,[
AC_MSG_RESULT(yes)
AX_ADD_PLUGINS([vcd cdda])
VLC_ADD_PLUGINS([vcd cdda])
],[
AC_MSG_RESULT(no)
])
......@@ -1500,7 +1496,7 @@ then
AC_MSG_CHECKING(for scsireq in sys/scsiio.h)
AC_EGREP_HEADER(scsireq,sys/scsiio.h,[
AC_MSG_RESULT(yes)
AX_ADD_PLUGINS([vcd cdda])
VLC_ADD_PLUGINS([vcd cdda])
AC_DEFINE(HAVE_SCSIREQ_IN_SYS_SCSIIO_H, 1, For NetBSD VCD support)
],[
AC_MSG_RESULT(no)
......@@ -1509,7 +1505,7 @@ then
AC_MSG_CHECKING(for ioc_toc_header in sys/cdio.h)
AC_EGREP_HEADER(ioc_toc_header ,sys/cdio.h,[
AC_MSG_RESULT(yes)
AX_ADD_PLUGINS([vcd cdda])
VLC_ADD_PLUGINS([vcd cdda])
AC_DEFINE(HAVE_IOC_TOC_HEADER_IN_SYS_CDIO_H, 1, For FreeBSD VCD support)
],[
AC_MSG_RESULT(no)
......@@ -1517,13 +1513,13 @@ then
if test "${SYS}" = "bsdi" -o "${SYS}" = "mingw32"
then
AX_ADD_PLUGINS([vcd cdda])
VLC_ADD_PLUGINS([vcd cdda])
fi
if test "${SYS}" = "darwin"
then
AX_ADD_PLUGINS([vcd cdda])
AX_ADD_LDFLAGS([vcd vcdx cdda],[-framework IOKit -framework CoreFoundation])
VLC_ADD_PLUGINS([vcd cdda])
VLC_ADD_LDFLAGS([vcd vcdx cdda],[-framework IOKit -framework CoreFoundation])
fi
fi
......@@ -1536,7 +1532,7 @@ AC_ARG_ENABLE(satellite,
then
AC_DEFINE(HAVE_SATELLITE, [],
[Define for the VCD plugin using libcdio/libvcdinfo])
AX_ADD_PLUGINS([satellite])
VLC_ADD_PLUGINS([satellite])
fi])
dnl
......@@ -1551,11 +1547,11 @@ then
[ --with-dvb=PATH path to a dvb- and v4l2-enabled kernel tree],[],[])
if test "${with_dvb}" != "no" -a -n "${with_dvb}"