mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-04 09:11:33 +02:00
![Sam Hocevar](/assets/img/avatar_default.png)
libdvdcss. It will try to dlopen() libdvdcss at runtime, though, and will use the dummy functions only if it couldn't find a valid libdvdcss. This is probably only useful to package maintainers. * Tidied the snapshot-* Makefile rules. * Tidied the modules Makefiles. * Removed useless stuff in the debian/ directory. * Removed the "make all" kludge in the Makefile.opts rule. I hope this patch is harmless on all systems.
879 lines
22 KiB
Plaintext
879 lines
22 KiB
Plaintext
dnl Autoconf settings for vlc and libdvdcss
|
|
AC_INIT(include/common.h)
|
|
AC_CONFIG_HEADER(include/defs.h)
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
HAVE_VLC=0
|
|
if test -r src/interface/main.c; then
|
|
HAVE_VLC=1
|
|
VLC_VERSION=0.2.81
|
|
AC_SUBST(VLC_VERSION)
|
|
VLC_CODENAME=Ourumov
|
|
AC_SUBST(VLC_CODENAME)
|
|
fi
|
|
|
|
HAVE_LIBDVDCSS=0
|
|
if test -r extras/libdvdcss/libdvdcss.c; then
|
|
HAVE_LIBDVDCSS=1
|
|
LIBDVDCSS_VERSION=0.0.2
|
|
AC_SUBST(LIBDVDCSS_VERSION)
|
|
fi
|
|
|
|
dnl Save CFLAGS
|
|
save_CFLAGS="${CFLAGS}"
|
|
|
|
dnl Check for tools
|
|
AC_PROG_MAKE_SET
|
|
AC_PROG_CC
|
|
AC_PROG_CPP
|
|
AC_PROG_RANLIB
|
|
|
|
dnl AM_PROG_LIBTOOL
|
|
AC_PROG_INSTALL
|
|
|
|
dnl Check for endianness if not cross-compiling
|
|
if test x${cross_compiling} != xyes; then
|
|
AC_C_BIGENDIAN
|
|
fi
|
|
|
|
dnl Check for system libs needed
|
|
AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol)
|
|
AC_CHECK_FUNCS(setenv putenv)
|
|
AC_CHECK_FUNC(connect,,[
|
|
AC_CHECK_LIB(socket,connect,LIB="${LIB} -lsocket")
|
|
])
|
|
AC_CHECK_FUNC(gethostbyname,,[
|
|
AC_CHECK_LIB(nsl,gethostbyname,LIB="${LIB} -lnsl")
|
|
])
|
|
AC_CHECK_FUNC(nanosleep,,[
|
|
AC_CHECK_LIB(rt,nanosleep,LIB="${LIB} -lrt",[
|
|
AC_CHECK_LIB(posix4,nanosleep,LIB="${LIB} -lposix4")
|
|
])
|
|
])
|
|
AC_CHECK_FUNCS(usleep)
|
|
AC_CHECK_FUNC(inet_aton,,[
|
|
AC_CHECK_LIB(resolv,inet_aton,LIB="${LIB} -lresolv")
|
|
])
|
|
AC_CHECK_FUNCS(vasprintf)
|
|
AC_CHECK_FUNCS(swab)
|
|
|
|
AC_CHECK_FUNCS(sigrelse)
|
|
|
|
dnl Check for getopt
|
|
GETOPT=0
|
|
AC_CHECK_FUNC(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) LIB="${LIB} -lgnugetopt"],
|
|
[GETOPT=1])])
|
|
|
|
AC_FUNC_MMAP
|
|
AC_TYPE_SIGNAL
|
|
AC_CHECK_LIB(dl,dlopen,LIB="${LIB} -ldl")
|
|
AC_CHECK_LIB(m,pow,LIB_YUV="${LIB_YUV} -lm")
|
|
|
|
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
|
|
CFLAGS="${CFLAGS} -I/usr/local/include"
|
|
|
|
dnl Check for pthreads - borrowed from XMMS
|
|
PTHREAD_LIBS=error
|
|
AC_CHECK_LIB(pthread,pthread_attr_init,THREAD_LIB="-lpthread")
|
|
if test "x${THREAD_LIB}" = xerror; then
|
|
AC_CHECK_LIB(pthreads,pthread_attr_init,THREAD_LIB="-lpthreads")
|
|
fi
|
|
if test "x${THREAD_LIB}" = xerror; then
|
|
AC_CHECK_LIB(c_r,pthread_attr_init,THREAD_LIB="-lc_r")
|
|
fi
|
|
if test "x${THREAD_LIB}" = xerror; then
|
|
THREAD_LIBS=""
|
|
AC_CHECK_FUNC(pthread_attr_init)
|
|
fi
|
|
|
|
dnl Check for misc headers
|
|
AC_EGREP_HEADER(pthread_cond_t,pthread.h,[
|
|
AC_DEFINE(PTHREAD_COND_T_IN_PTHREAD_H, 1,
|
|
Define if <pthread.h> defines pthread_cond_t.)])
|
|
AC_EGREP_HEADER(strncasecmp,strings.h,[
|
|
AC_DEFINE(STRNCASECMP_IN_STRINGS_H, 1,
|
|
Define if <strings.h> defines strncasecmp.)])
|
|
|
|
dnl Check for headers
|
|
AC_CHECK_HEADERS(stddef.h getopt.h strings.h)
|
|
AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/time.h)
|
|
AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h)
|
|
AC_CHECK_HEADERS(dlfcn.h image.h)
|
|
AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
|
|
AC_CHECK_HEADERS(machine/param.h)
|
|
|
|
dnl Check for threads library
|
|
AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
|
|
|
|
dnl Check for ntohl, etc.
|
|
CFLAGS="${save_CFLAGS} -Wall -Werror"
|
|
AC_MSG_CHECKING([for ntohl in sys/param.h])
|
|
AC_TRY_COMPILE([#include <sys/param.h>
|
|
void foo() { int meuh; ntohl(meuh); }],,
|
|
AC_DEFINE(NTOHL_IN_SYS_PARAM_H, 1, Define if <sys/param.h> defines ntohl.)
|
|
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
|
|
|
|
dnl Check for inline function size limit
|
|
CFLAGS="${save_CFLAGS} -finline-limit=31337"
|
|
AC_MSG_CHECKING([if \$CC accepts -finline-limit])
|
|
AC_TRY_COMPILE([],,
|
|
save_CFLAGS="${save_CFLAGS} -finline-limit=31337"; AC_MSG_RESULT(yes),
|
|
AC_MSG_RESULT(no))
|
|
|
|
dnl Check for Darwin plugin linking flags
|
|
CFLAGS="${save_CFLAGS} -bundle -undefined suppress"
|
|
AC_MSG_CHECKING([if \$CC compiles plugins with -bundle -undefined suppress])
|
|
AC_TRY_COMPILE([],,
|
|
PLCFLAGS="${PLCFLAGS} -bundle -undefined suppress"; AC_MSG_RESULT(yes),
|
|
AC_MSG_RESULT(no))
|
|
|
|
dnl Check for standard plugin linking flags
|
|
CFLAGS="${save_CFLAGS} -shared"
|
|
AC_MSG_CHECKING([if \$CC compiles plugins with -shared])
|
|
AC_TRY_COMPILE([],,
|
|
PLCFLAGS="${PLCFLAGS} -shared"; AC_MSG_RESULT(yes),
|
|
AC_MSG_RESULT(no))
|
|
|
|
dnl End of the bizarre compilation tests
|
|
CFLAGS="${save_CFLAGS}"
|
|
|
|
dnl Check for boolean_t
|
|
AC_MSG_CHECKING([for boolean_t in sys/types.h])
|
|
AC_TRY_COMPILE([#include <sys/types.h>
|
|
void quux() { boolean_t foo; }],,
|
|
AC_DEFINE(BOOLEAN_T_IN_SYS_TYPES_H, 1, Define if <sys/types.h> defines boolean_t.)
|
|
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
|
|
AC_MSG_CHECKING([for boolean_t in pthread.h])
|
|
AC_TRY_COMPILE([#include <pthread.h>
|
|
void quux() { boolean_t foo; }],,
|
|
AC_DEFINE(BOOLEAN_T_IN_PTHREAD_H, 1, Define if <pthread.h> defines boolean_t.)
|
|
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
AC_C_CONST
|
|
AC_TYPE_SIZE_T
|
|
AC_HEADER_TIME
|
|
|
|
ARCH=${host_cpu}
|
|
|
|
dnl
|
|
dnl default modules
|
|
dnl
|
|
BUILTINS="${BUILTINS} es ps ts yuv idct idctclassic motion imdct downmix"
|
|
PLUGINS="${PLUGINS}"
|
|
|
|
dnl
|
|
dnl Accelerated modules
|
|
dnl
|
|
MMX_MODULES="yuvmmx idctmmx motionmmx"
|
|
MMXEXT_MODULES="idctmmxext motionmmxext imdct3dn imdctsse downmix3dn downmixsse"
|
|
|
|
AC_MSG_CHECKING([if \$CC groks MMX inline assembly])
|
|
AC_TRY_COMPILE([void quux(){void *p;asm("packuswb %%mm1,%%mm2"::"r"(p));}],,
|
|
ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
|
|
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
|
|
|
|
AC_MSG_CHECKING([if \$CC groks MMX EXT or SSE inline assembly])
|
|
AC_TRY_COMPILE([void quux(){void *p;asm("maskmovq %%mm1,%%mm2"::"r"(p));}],,
|
|
ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
|
|
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
|
|
|
|
dnl
|
|
dnl libdvdcss: check for DVD ioctls
|
|
dnl
|
|
|
|
dnl default is no
|
|
CAN_BUILD_LIBDVDCSS=0
|
|
|
|
dnl for windoze
|
|
AC_CHECK_HEADERS(winioctl.h,[
|
|
CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
|
|
])
|
|
|
|
dnl for Un*x and BeOS
|
|
AC_CHECK_HEADERS(sys/ioctl.h,[
|
|
CAN_BUILD_LIBDVDCSS="${HAVE_LIBDVDCSS}"
|
|
AC_CHECK_HEADERS(sys/cdio.h sys/dvdio.h linux/cdrom.h)
|
|
BSD_DVD_STRUCT=0
|
|
dnl
|
|
dnl Old FreeBSD: sys/cdio.h
|
|
dnl
|
|
AC_EGREP_HEADER(dvd_struct,sys/dvdio.h,[
|
|
AC_DEFINE(DVD_STRUCT_IN_SYS_DVDIO_H, 1,
|
|
Define if <sys/dvdio.h> defines dvd_struct.)
|
|
BSD_DVD_STRUCT=1
|
|
])
|
|
dnl
|
|
dnl Newer FreeBSD: sys/dvdio.h
|
|
dnl
|
|
AC_EGREP_HEADER(dvd_struct,sys/cdio.h,[
|
|
AC_DEFINE(DVD_STRUCT_IN_SYS_CDIO_H, 1,
|
|
Define if <sys/cdio.h> defines dvd_struct.)
|
|
BSD_DVD_STRUCT=1
|
|
])
|
|
if test x$BSD_DVD_STRUCT = x1; then
|
|
AC_DEFINE(HAVE_BSD_DVD_STRUCT, 1,
|
|
Define if BSD-like dvd_struct is defined.)
|
|
fi
|
|
dnl
|
|
dnl Linux: linux/cdrom.h
|
|
dnl
|
|
AC_EGREP_HEADER(dvd_struct,linux/cdrom.h,[
|
|
AC_DEFINE(DVD_STRUCT_IN_LINUX_CDROM_H, 1,
|
|
Define if <linux/cdrom.h> defines DVD_STRUCT.)
|
|
])
|
|
])
|
|
|
|
|
|
dnl
|
|
dnl Check the operating system
|
|
dnl
|
|
case ${host_os} in
|
|
darwin*)
|
|
SYS=darwin
|
|
;;
|
|
*)
|
|
SYS=${host_os}
|
|
;;
|
|
esac
|
|
|
|
dnl
|
|
dnl PentiumPro acceleration
|
|
dnl
|
|
AC_ARG_ENABLE(ppro,
|
|
[ --disable-ppro Disable PentiumPro optimizations (default enabled for x86)],
|
|
[ if test x$enableval = xyes; then ARCH="${ARCH} ppro"; fi ],
|
|
[ if test x${host_cpu} = xi686; then ARCH="${ARCH} ppro"; fi ])
|
|
|
|
dnl
|
|
dnl MMX acceleration
|
|
dnl
|
|
AC_ARG_ENABLE(mmx,
|
|
[ --disable-mmx Disable MMX optimizations (default enabled for x86)],
|
|
[ if test x$enableval = xyes; then ARCH="${ARCH} mmx";
|
|
BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ],
|
|
[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86 -o x${host_cpu} = xi386; then ARCH="${ARCH} mmx";
|
|
BUILTINS="${BUILTINS} ${ACCEL_MODULES}"; fi ])
|
|
|
|
dnl
|
|
dnl AltiVec acceleration
|
|
dnl
|
|
AC_ARG_ENABLE(altivec,
|
|
[ --enable-altivec Enable altivec optimizations (default disabled since it is broken)],
|
|
[ if test x$enableval = xyes; then ARCH="${ARCH} altivec"
|
|
BUILTINS="${BUILTINS} idctaltivec"
|
|
LIB_IDCTALTIVEC="-framework vecLib"
|
|
fi ])
|
|
#[ if test -d /System/Library/Frameworks/vecLib.framework; then ARCH="${ARCH} altivec"; PLUGINS="${PLUGINS} idctaltivec"; fi ])
|
|
|
|
dnl
|
|
dnl Debugging mode
|
|
dnl
|
|
DEBUG=0
|
|
AC_ARG_ENABLE(debug,
|
|
[ --enable-debug Enable debug mode (default disabled)],
|
|
[ if test x$enableval = xyes; then DEBUG=1; fi ])
|
|
|
|
dnl
|
|
dnl Enable/disable statistics
|
|
dnl
|
|
STATS=0
|
|
AC_ARG_ENABLE(stats,
|
|
[ --enable-stats Enable printing of statistics (default disabled)],
|
|
[ if test x$enableval = xyes; then STATS=1; fi ])
|
|
|
|
dnl
|
|
dnl Trace mode
|
|
dnl
|
|
TRACE=0
|
|
AC_ARG_ENABLE(trace,
|
|
[ --enable-trace Enable trace mode (default disabled)],
|
|
[ if test x$enableval = xyes; then TRACE=1; fi ])
|
|
|
|
dnl
|
|
dnl Trace mode
|
|
dnl
|
|
PROFILING=0
|
|
AC_ARG_ENABLE(profiling,
|
|
[ --enable-profiling Enable gprof profiling (default disabled)],
|
|
[ if test x$enableval = xyes; then PROFILING=1; fi ])
|
|
|
|
dnl
|
|
dnl Enable/disable optimizations
|
|
dnl
|
|
AC_ARG_ENABLE(optimizations,
|
|
[ --disable-optimizations Disable compiler optimizations (default enabled)],
|
|
[ if test x$enableval = xno; then OPTIMS=0; fi ],
|
|
[ OPTIMS=1 ])
|
|
|
|
dnl
|
|
dnl GNU portable threads
|
|
dnl
|
|
AC_ARG_ENABLE(pth,
|
|
[ --enable-pth Enable GNU Pth support (default disabled)],
|
|
[ if test x$enableval = xyes; then
|
|
AC_CHECK_LIB(pth,pth_init)
|
|
AC_EGREP_HEADER(pth_init,pth.h,[
|
|
AC_DEFINE(PTH_INIT_IN_PTH_H, 1,
|
|
Define if <pth.h> defines pth_init)
|
|
THREAD_LIB="-lpth"
|
|
fi])
|
|
])
|
|
|
|
LIB="${LIB} ${THREAD_LIB}"
|
|
|
|
dnl
|
|
dnl DVD module: check for installed libdvdcss or local libdvdcss
|
|
dnl
|
|
LOCAL_LIBDVDCSS=0
|
|
STATIC_LIBDVDCSS=0
|
|
DUMMY_LIBDVDCSS=0
|
|
AC_ARG_WITH(dvdcss,
|
|
[ --with-dvdcss[=name] way to use libdvdcss, either 'yes' or 'no', or 'local-static', 'local-shared', or a path to another libdvdcss such as '/usr/local' (default 'local-static')],
|
|
[ case "x${withval}" in
|
|
xlocal-static|xyes)
|
|
# local libdvdcss, statically linked
|
|
if test x${CAN_BUILD_LIBDVDCSS} = x1
|
|
then
|
|
LOCAL_LIBDVDCSS=1
|
|
STATIC_LIBDVDCSS=1
|
|
BUILTINS="${BUILTINS} dvd"
|
|
CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
|
|
LIB_DVD="${LIB_DVD} lib/libdvdcss.a"
|
|
LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a"
|
|
fi
|
|
;;
|
|
xlocal-shared)
|
|
# local libdvdcss, dynamically linked
|
|
if test x${CAN_BUILD_LIBDVDCSS} = x1
|
|
then
|
|
LOCAL_LIBDVDCSS=1
|
|
BUILTINS="${BUILTINS} dvd"
|
|
CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
|
|
LIB_DVD="${LIB_DVD} -Llib -ldvdcss"
|
|
LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L../../lib -ldvdcss"
|
|
fi
|
|
;;
|
|
xno)
|
|
# don't use libdvdcss at all, build a DVD module that can dlopen() it
|
|
DUMMY_LIBDVDCSS=1
|
|
BUILTINS="${BUILTINS} dvd"
|
|
OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
|
|
CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
|
|
LIB_DVD="${LIB_DVD} -ldl"
|
|
LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
|
|
;;
|
|
*)
|
|
# existing libdvdcss
|
|
BUILTINS="${BUILTINS} dvd"
|
|
if test "x$withval" != "xyes"
|
|
then
|
|
LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -L"$withval"/lib"
|
|
CFLAGS_DVD="${CFLAGS_DVD} -I"$withval"/include"
|
|
fi
|
|
LIB_DVD="${LIB_DVD} -ldvdcss"
|
|
LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldvdcss"
|
|
esac ],
|
|
# user didn't decide, we choose to use local libdvdcss and link statically
|
|
# if libdvdcss is in the archive, or to use the dummy replacement otherwise.
|
|
[ if test x${CAN_BUILD_LIBDVDCSS} = x1
|
|
then
|
|
LOCAL_LIBDVDCSS=1
|
|
STATIC_LIBDVDCSS=1
|
|
BUILTINS="${BUILTINS} dvd"
|
|
CFLAGS_DVD="${CFLAGS_DVD} -I../../extras/libdvdcss"
|
|
LIB_DVD="${LIB_DVD} lib/libdvdcss.a"
|
|
LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} ../../lib/libdvdcss.a"
|
|
else
|
|
# XXX: no check for libdl is done, don't try this at home !
|
|
DUMMY_LIBDVDCSS=1
|
|
BUILTINS="${BUILTINS} dvd"
|
|
OBJ_DVD="${OBJ_DVD} dummy_dvdcss.o"
|
|
CFLAGS_DVD="${CFLAGS_DVD} -DGOD_DAMN_DMCA"
|
|
LIB_DVD="${LIB_DVD} -ldl"
|
|
LIB_DVD_PLUGIN="${LIB_DVD_PLUGIN} -ldl"
|
|
fi ])
|
|
|
|
dnl
|
|
dnl dummy plugin
|
|
dnl
|
|
AC_ARG_ENABLE(dummy,
|
|
[ --disable-dummy dummy module (default enabled)])
|
|
|
|
if test x$enable_dummy != xno
|
|
then
|
|
BUILTINS="${BUILTINS} dummy"
|
|
fi
|
|
|
|
dnl
|
|
dnl null plugin
|
|
dnl
|
|
AC_ARG_ENABLE(null,
|
|
[ --disable-null Null module (default enabled)])
|
|
|
|
if test x$enable_null != xno
|
|
then
|
|
BUILTINS="${BUILTINS} null"
|
|
fi
|
|
|
|
dnl
|
|
dnl rc plugin
|
|
dnl
|
|
AC_ARG_ENABLE(rc,
|
|
[ --disable-rc rc module (default enabled)])
|
|
|
|
if test x$enable_rc != xno
|
|
then
|
|
BUILTINS="${BUILTINS} rc"
|
|
fi
|
|
|
|
dnl special case for BeOS
|
|
if test x$SYS = xbeos
|
|
then
|
|
BUILTINS="${BUILTINS} beos"
|
|
LIB_BEOS="-lbe -lgame -lroot -ltracker"
|
|
PLCFLAGS="${PLCFLAGS} -nostart"
|
|
|
|
dnl default case
|
|
else
|
|
|
|
dnl
|
|
dnl OSS /dev/dsp module
|
|
dnl
|
|
AC_ARG_ENABLE(dsp,
|
|
[ --disable-dsp Linux /dev/dsp support (default enabled)])
|
|
|
|
if test x$enable_dsp != xno
|
|
then
|
|
if test -c /dev/dsp
|
|
then
|
|
PLUGINS="${PLUGINS} dsp"
|
|
fi
|
|
fi
|
|
|
|
dnl
|
|
dnl Esound module
|
|
dnl
|
|
AC_ARG_ENABLE(esd,
|
|
[ --enable-esd Esound library support (default disabled)],
|
|
[if test x$enable_esd = xyes
|
|
then
|
|
AC_PATH_PROG(ESD_CONFIG, esd-config, no)
|
|
if test x${ESD_CONFIG} != xno
|
|
then
|
|
PLUGINS="${PLUGINS} esd"
|
|
LIB_ESD="`${ESD_CONFIG} --libs`"
|
|
fi
|
|
fi])
|
|
|
|
dnl
|
|
dnl Darwin module
|
|
dnl
|
|
AC_ARG_ENABLE(darwin,
|
|
[ --enable-darwin Darwin sound support (default disabled)],
|
|
[if test x$enable_darwin = xyes; then
|
|
PLUGINS="${PLUGINS} darwin"
|
|
LIB_DARWIN="-framework CoreAudio"
|
|
fi])
|
|
|
|
dnl
|
|
dnl MacOS X module
|
|
dnl
|
|
AC_ARG_ENABLE(macosx,
|
|
[ --enable-macosx Mac OS X interface support (default enabled in Mac OS X)],
|
|
[if test x$enable_macosx = xyes
|
|
then
|
|
BUILTINS="${BUILTINS} macosx"
|
|
LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
|
|
LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
|
|
LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
|
|
fi],
|
|
[AC_CHECK_HEADERS(Carbon/Carbon.h,
|
|
BUILTINS="${BUILTINS} macosx"
|
|
LIB_MACOSX="-framework CoreAudio -framework Carbon -framework AGL"
|
|
LIB_TS="${LIB_TS} -framework AGL -framework Carbon"
|
|
LIB_SDL="${LIB_SDL} -framework AGL -framework Carbon"
|
|
)])
|
|
|
|
dnl
|
|
dnl QNX RTOS module
|
|
dnl
|
|
AC_ARG_ENABLE(qnx,
|
|
[ --disable-qnx QNX RTOS support (default enabled in QNX RTOS)])
|
|
if test x$enable_qnx != xno
|
|
then
|
|
AC_CHECK_HEADERS(Ph.h, [
|
|
PLUGINS="${PLUGINS} qnx"
|
|
LIB_QNX="-lasound -lph"
|
|
])
|
|
fi
|
|
|
|
dnl
|
|
dnl Linux framebuffer module
|
|
dnl
|
|
AC_ARG_ENABLE(fb,
|
|
[ --enable-fb Linux framebuffer support (default disabled)],
|
|
[ if test x$enable_fb = xyes
|
|
then
|
|
PLUGINS="${PLUGINS} fb"
|
|
fi ])
|
|
|
|
dnl
|
|
dnl GGI module
|
|
dnl
|
|
AC_ARG_WITH(ggi,
|
|
[ --with-ggi[=name] GGI support (default disabled)],
|
|
[ if test "x$withval" != "xno"
|
|
then
|
|
PLUGINS="${PLUGINS} ggi"
|
|
if test "x$withval" != "xyes"
|
|
then
|
|
LIB_GGI="-l"$withval
|
|
else
|
|
LIB_GGI="-lggi"
|
|
fi
|
|
fi ])
|
|
|
|
dnl
|
|
dnl SDL module
|
|
dnl
|
|
AC_ARG_ENABLE(sdl,
|
|
[ --disable-sdl SDL support (default enabled)])
|
|
if test "x$enable_sdl" != "xno"
|
|
then
|
|
AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no)
|
|
SDL_CONFIG=${SDL12_CONFIG}
|
|
SDL_HEADER="SDL12/SDL.h"
|
|
if test x${SDL_CONFIG} = xno
|
|
then
|
|
AC_PATH_PROG(SDL11_CONFIG, sdl11-config, no)
|
|
SDL_CONFIG=${SDL11_CONFIG}
|
|
SDL_HEADER="SDL11/SDL.h"
|
|
fi
|
|
if test x${SDL_CONFIG} = xno
|
|
then
|
|
AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
|
|
SDL_HEADER="SDL/SDL.h"
|
|
fi
|
|
if test x${SDL_CONFIG} != xno
|
|
then
|
|
PLUGINS="${PLUGINS} sdl"
|
|
CFLAGS_SDL="`${SDL_CONFIG} --cflags`"
|
|
LIB_SDL="`${SDL_CONFIG} --libs | sed 's,-rdynamic,,'`"
|
|
save_CFLAGS=$CFLAGS
|
|
CFLAGS="$CFLAGS $CFLAGS_SDL"
|
|
AC_CHECK_HEADERS(${SDL_HEADER}, AC_DEFINE_UNQUOTED(SDL_INCLUDE_FILE,
|
|
<${SDL_HEADER}>, Indicate whether we should use SDL/SDL.h or SDL11/SDL.h),
|
|
[ echo "The development package for SDL is not installed. Please install it"
|
|
echo "and try again. Alternatively you can also configure with --disable-sdl."
|
|
exit 1 ])
|
|
CFLAGS=$save_CFLAGS
|
|
if expr 1.1.5 \> `$SDL_CONFIG --version` >/dev/null
|
|
then
|
|
echo "You need SDL version 1.1.5 or later. Install it and try again."
|
|
echo "Alternatively, you can also configure with --disable-sdl."
|
|
exit 1
|
|
fi
|
|
elif test "x$enable_sdl" = "xyes"
|
|
then
|
|
echo "I couldn't find the SDL package. You can download libSDL from"
|
|
echo "http://www.libsdl.org/, or configure with --disable-sdl. Have a"
|
|
echo "nice day."
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
dnl
|
|
dnl Windows DirectX module
|
|
dnl
|
|
AC_ARG_WITH(directx,
|
|
[ --with-directx[=name] Windows DirectX support (default enabled)],
|
|
[ if test "x$withval" != "xno"
|
|
then
|
|
PLUGINS="${PLUGINS} directx"
|
|
if test "x$withval" != "xyes"
|
|
then
|
|
LIB_DIRECTX="${LIB_DIRECTX} -L"$withval"/lib -lgdi32 -ldxguid"
|
|
INCLUDE="${INCLUDE} -I"$withval"/include"
|
|
else
|
|
AC_CHECK_HEADERS(directx.h, , [echo "Cannot find DirectX headers !"; exit])
|
|
LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"
|
|
fi
|
|
fi ])
|
|
if test "x$withval" = "x"
|
|
then
|
|
AC_CHECK_HEADERS(directx.h,
|
|
[PLUGINS="${PLUGINS} directx"
|
|
LIB_DIRECTX="${LIB_DIRECTX} -L/usr/lib -lgdi32 -ldxguid"])
|
|
fi
|
|
|
|
dnl
|
|
dnl Glide module
|
|
dnl
|
|
AC_ARG_WITH(glide,
|
|
[ --with-glide[=name] Glide (3dfx) support (default disabled)],
|
|
[ if test "x$withval" != "xno"
|
|
then
|
|
PLUGINS="${PLUGINS} glide"
|
|
if test "x$withval" != "xyes"
|
|
then
|
|
LIB_GLIDE="-l"$withval" -lm"
|
|
else
|
|
LIB_GLIDE="-lglide2x -lm"
|
|
fi
|
|
fi ])
|
|
|
|
dnl
|
|
dnl ncurses module
|
|
dnl
|
|
AC_ARG_ENABLE(ncurses,
|
|
[ --enable-ncurses ncurses interface support (default disabled)],
|
|
[if test x$enable_ncurses = xyes; then
|
|
PLUGINS="${PLUGINS} ncurses"
|
|
LIB_NCURSES="-lncurses"
|
|
fi])
|
|
|
|
dnl
|
|
dnl Qt module
|
|
dnl
|
|
AC_ARG_ENABLE(qt,
|
|
[ --enable-qt Qt interface support (default disabled)],
|
|
[if test x$enable_qt = xyes; then
|
|
PLUGINS="${PLUGINS} qt"
|
|
ALIASES="${ALIASES} qvlc"
|
|
LIB_QT="-lqt -L${QTDIR}/lib"
|
|
if test -x ${QTDIR}/bin/moc
|
|
then
|
|
MOC=${QTDIR}/bin/moc
|
|
else
|
|
MOC=moc
|
|
fi
|
|
fi])
|
|
|
|
dnl
|
|
dnl KDE module
|
|
dnl
|
|
AC_ARG_ENABLE(kde,
|
|
[ --enable-kde KDE interface support (default disabled)],
|
|
[if test x$enable_kde = xyes; then
|
|
PLUGINS="${PLUGINS} kde"
|
|
ALIASES="${ALIASES} kvlc"
|
|
LIB_KDE="-L${KDEDIR}/lib -lkfile"
|
|
if test -x ${QTDIR}/bin/moc
|
|
then
|
|
MOC=${QTDIR}/bin/moc
|
|
else
|
|
MOC=moc
|
|
fi
|
|
fi])
|
|
|
|
dnl
|
|
dnl Gnome module
|
|
dnl
|
|
AC_ARG_ENABLE(gnome,
|
|
[ --enable-gnome Gnome interface support (default disabled)],
|
|
[if test x$enable_gnome = xyes; then
|
|
PLUGINS="${PLUGINS} gnome"
|
|
ALIASES="${ALIASES} gnome-vlc"
|
|
LIB_GNOME="`gnome-config --libs gnomeui | sed 's,-rdynamic,,'`"
|
|
fi])
|
|
|
|
dnl
|
|
dnl Gtk+ module
|
|
dnl
|
|
AC_ARG_ENABLE(gtk,
|
|
[ --disable-gtk Gtk+ support (default enabled)])
|
|
if test x$enable_gtk != xno
|
|
then
|
|
# look for gtk-config
|
|
AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
|
|
if test -x ${GTK_CONFIG}
|
|
then
|
|
CFLAGS_GTK="`${GTK_CONFIG} --cflags gtk`"
|
|
LIB_GTK="`${GTK_CONFIG} --libs gtk | sed 's,-rdynamic,,'`"
|
|
fi
|
|
# now look for the gtk.h header
|
|
saved_CPPFLAGS=$CPPFLAGS
|
|
CPPFLAGS="$CPPFLAGS $CFLAGS_GTK"
|
|
AC_CHECK_HEADERS(gtk/gtk.h, [
|
|
PLUGINS="${PLUGINS} gtk"
|
|
ALIASES="${ALIASES} gvlc"
|
|
])
|
|
CPPFLAGS=$saved_CPPFLAGS
|
|
fi
|
|
|
|
dnl
|
|
dnl X11 module
|
|
dnl
|
|
AC_ARG_ENABLE(x11,
|
|
[ --disable-x11 X11 support (default enabled)])
|
|
if test x$enable_x11 != xno; then
|
|
if test x$x_includes = xNONE; then
|
|
x_includes=/usr/X11R6/include
|
|
fi
|
|
if test x$x_libraries = xNONE; then
|
|
x_libraries=/usr/X11R6/lib
|
|
fi
|
|
saved_CPPFLAGS=$CPPFLAGS
|
|
CPPFLAGS="$CPPFLAGS -I$x_includes"
|
|
AC_CHECK_HEADERS(X11/Xlib.h, [
|
|
PLUGINS="${PLUGINS} x11"
|
|
LIB_X11="-L$x_libraries -lX11 -lXext"
|
|
CFLAGS_X11="-I$x_includes"
|
|
]
|
|
CPPFLAGS=$saved_CPPFLAGS)
|
|
fi
|
|
|
|
dnl
|
|
dnl XVideo module
|
|
dnl
|
|
AC_ARG_ENABLE(xvideo,
|
|
[ --disable-xvideo XVideo support (default enabled)])
|
|
if test x$enable_xvideo != xno; then
|
|
if test x$x_includes = xNONE; then
|
|
x_includes=/usr/X11R6/include
|
|
fi
|
|
if test x$x_libraries = xNONE; then
|
|
x_libraries=/usr/X11R6/lib
|
|
fi
|
|
saved_CPPFLAGS=$CPPFLAGS
|
|
CPPFLAGS="$CPPFLAGS -I$x_includes"
|
|
AC_CHECK_HEADERS(X11/extensions/Xv.h, [
|
|
PLUGINS="${PLUGINS} xvideo"
|
|
LIB_XVIDEO="-L$x_libraries -lX11 -lXext -lXv"
|
|
CFLAGS_X11="-I$x_includes"
|
|
]
|
|
CPPFLAGS=$saved_CPPFLAGS)
|
|
fi
|
|
|
|
dnl
|
|
dnl ALSA module
|
|
dnl
|
|
AC_ARG_ENABLE(alsa,
|
|
[ --enable-alsa Alsa sound drivers support (Only for linux) (default disabled)],
|
|
[if test x$enable_alsa = xyes
|
|
then
|
|
AC_CHECK_HEADER(sys/asoundlib.h, AC_CHECK_LIB(asound, main, have_alsa="true", have_alsa="false"),have_alsa="false")
|
|
if test x$have_alsa = xtrue
|
|
then
|
|
PLUGINS="${PLUGINS} alsa"
|
|
LIB_ALSA="-lasound"
|
|
fi
|
|
fi])
|
|
|
|
dnl end of non-BeOS stuff
|
|
fi
|
|
|
|
dnl
|
|
dnl Configuration is finished
|
|
dnl
|
|
AC_SUBST(SYS)
|
|
AC_SUBST(ARCH)
|
|
AC_SUBST(PLUGINS)
|
|
AC_SUBST(BUILTINS)
|
|
AC_SUBST(ALIASES)
|
|
AC_SUBST(DEFINE)
|
|
AC_SUBST(INCLUDE)
|
|
AC_SUBST(DEBUG)
|
|
AC_SUBST(STATS)
|
|
AC_SUBST(ASM)
|
|
AC_SUBST(TRACE)
|
|
AC_SUBST(PROFILING)
|
|
AC_SUBST(OPTIMS)
|
|
AC_SUBST(GETOPT)
|
|
AC_SUBST(MOC)
|
|
AC_SUBST(WINDRES)
|
|
|
|
AC_SUBST(LCFLAGS)
|
|
AC_SUBST(PLCFLAGS)
|
|
AC_SUBST(LIB)
|
|
|
|
AC_SUBST(LIB_ALSA)
|
|
AC_SUBST(LIB_BEOS)
|
|
AC_SUBST(LIB_DARWIN)
|
|
AC_SUBST(LIB_DVD)
|
|
AC_SUBST(LIB_DVD_PLUGIN)
|
|
AC_SUBST(LIB_ESD)
|
|
AC_SUBST(LIB_GGI)
|
|
AC_SUBST(LIB_GLIDE)
|
|
AC_SUBST(LIB_GNOME)
|
|
AC_SUBST(LIB_GTK)
|
|
AC_SUBST(LIB_IDCTALTIVEC)
|
|
AC_SUBST(LIB_KDE)
|
|
AC_SUBST(LIB_MACOSX)
|
|
AC_SUBST(LIB_QNX)
|
|
AC_SUBST(LIB_NCURSES)
|
|
AC_SUBST(LIB_QT)
|
|
AC_SUBST(LIB_TS)
|
|
AC_SUBST(LIB_SDL)
|
|
AC_SUBST(LIB_DIRECTX)
|
|
AC_SUBST(LIB_X11)
|
|
AC_SUBST(LIB_XVIDEO)
|
|
AC_SUBST(LIB_YUV)
|
|
|
|
AC_SUBST(CFLAGS_VLC)
|
|
AC_SUBST(CFLAGS_DVD)
|
|
AC_SUBST(CFLAGS_GTK)
|
|
AC_SUBST(CFLAGS_SDL)
|
|
AC_SUBST(CFLAGS_X11)
|
|
|
|
AC_SUBST(OBJ_DVD)
|
|
|
|
AC_SUBST(LOCAL_LIBDVDCSS)
|
|
|
|
AC_OUTPUT([Makefile.opts include/config.h])
|
|
|
|
echo "
|
|
global configuration
|
|
--------------------
|
|
system : ${SYS}
|
|
architecture : ${ARCH}
|
|
optimizations : ${OPTIMS}"
|
|
|
|
if test x${HAVE_VLC} = x1
|
|
then
|
|
echo "
|
|
vlc configuration
|
|
-----------------
|
|
vlc version : ${VLC_VERSION}
|
|
debug mode : ${DEBUG}
|
|
statistics : ${STATS}
|
|
trace mode : ${TRACE}
|
|
profiling : ${PROFILING}
|
|
need builtin getopt : ${GETOPT}
|
|
built-in modules :${BUILTINS}
|
|
plugin modules :${PLUGINS}
|
|
vlc aliases :${ALIASES}"
|
|
fi
|
|
|
|
echo "
|
|
libdvdcss configuration
|
|
-----------------------
|
|
can be built : ${CAN_BUILD_LIBDVDCSS}
|
|
will be built : ${LOCAL_LIBDVDCSS}"
|
|
if test x${LOCAL_LIBDVDCSS} = x1
|
|
then
|
|
echo "link statically : ${STATIC_LIBDVDCSS}"
|
|
else
|
|
echo "use dummy replacement : ${DUMMY_LIBDVDCSS}"
|
|
fi
|
|
|
|
echo "
|
|
You may now tune Makefile.opts at your convenience, for instance to choose
|
|
which modules get compiled as plugins.
|
|
"
|
|
if test x${HAVE_VLC} = x1
|
|
then
|
|
echo "To build vlc and its plugins, type \`make vlc'."
|
|
fi
|
|
if test x${HAVE_LIBDVDCSS} = x1
|
|
then
|
|
echo "To build libdvdcss only, type \`make libdvdcss'."
|
|
fi
|
|
echo ""
|
|
|