mirror of
https://github.com/videolan/vlc.git
synced 2024-11-25 19:04:12 +08:00
4a5e3b56ce
* Fixed XVideo plugin linking.
465 lines
12 KiB
Plaintext
465 lines
12 KiB
Plaintext
dnl Autoconf settings for vlc
|
|
AC_INIT(src/interface/main.c)
|
|
AC_CONFIG_HEADER(include/defs.h)
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
VLC_VERSION=0.2.71
|
|
AC_SUBST(VLC_VERSION)
|
|
VLC_CODENAME=Ourumov
|
|
AC_SUBST(VLC_CODENAME)
|
|
|
|
dnl Check for tools
|
|
AC_PROG_MAKE_SET
|
|
if test -z "$CC"; then
|
|
AC_PROG_CC
|
|
fi
|
|
if test -z "$CPP"; then
|
|
AC_PROG_CPP
|
|
fi
|
|
|
|
dnl AM_PROG_LIBTOOL
|
|
AC_PROG_INSTALL
|
|
|
|
dnl Check for compiler environment
|
|
AC_C_CONST
|
|
AC_C_BIGENDIAN
|
|
|
|
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_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_SUBST(GETOPT)
|
|
|
|
AC_FUNC_MMAP
|
|
AC_TYPE_SIGNAL
|
|
AC_CHECK_LIB(dl,dlopen,LIB=${LIB}" -ldl")
|
|
AC_CHECK_LIB(m,pow,LIB_YUV=${LIB_YUV}" -lm")
|
|
AC_CHECK_LIB(pthread,pthread_create,LIB=${LIB}" -lpthread")
|
|
AC_CHECK_LIB(threads,thread_create,LIB=${LIB}" -lthreads")
|
|
|
|
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
|
|
AC_CHECK_HEADERS(stddef.h)
|
|
AC_CHECK_HEADERS(getopt.h)
|
|
AC_CHECK_HEADERS(sys/sockio.h)
|
|
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.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 Do a series of bizarre compilation tests
|
|
save_CFLAGS=$CFLAGS
|
|
|
|
dnl Check for ntohl, etc.
|
|
CFLAGS="${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 ntohl is in <sys/param.h>.)
|
|
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
|
|
|
|
dnl Check for -rdynamic flag
|
|
CFLAGS="${CFLAGS} -rdynamic -Wall -Werror"
|
|
AC_MSG_CHECKING([if \$CC accepts -rdynamic])
|
|
AC_TRY_COMPILE([],,
|
|
LCFLAGS=${LCFLAGS}" -rdynamic"
|
|
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
|
|
#PLUGINS=${PLUGINS}"ps ts yuv idct idctclassic motion "
|
|
BUILTINS=${BUILTINS}"ps ts yuv idct idctclassic motion "
|
|
if test x$host_os = xbeos; then
|
|
ACCEL_PLUGINS="yuvmmx idctmmx motionmmx "
|
|
else
|
|
ACCEL_PLUGINS="yuvmmx idctmmx idctmmxext motionmmx motionmmxext "
|
|
fi
|
|
|
|
dnl
|
|
dnl DVD module: check for DVD ioctls
|
|
dnl
|
|
AC_CHECK_HEADERS(sys/ioctl.h,[
|
|
BUILTINS=${BUILTINS}"dvd "
|
|
AC_CHECK_HEADERS(linux/cdrom.h)
|
|
AC_EGREP_HEADER(dvd,linux/cdrom.h,[
|
|
AC_DEFINE(LINUX_DVD,1, DVD support for linux)
|
|
])
|
|
])
|
|
|
|
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 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_PLUGINS}; fi ],
|
|
[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586 -o x${host_cpu} = xx86; then ARCH=${ARCH}" mmx";
|
|
BUILTINS=${BUILTINS}${ACCEL_PLUGINS}; 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 CSS DVD decryption
|
|
dnl
|
|
AC_ARG_ENABLE(css,
|
|
[ --disable-css Disable DVD CSS decryption (default enabled)],
|
|
[ if test x$enableval = xyes; then CSS=1; else CSS=0; fi ], [ CSS=1; ])
|
|
if test x${CSS} = x1; then AC_DEFINE(HAVE_CSS, 1, Define if you want DVD CSS decryption.) fi
|
|
|
|
dnl
|
|
dnl Debugging mode
|
|
dnl
|
|
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
|
|
AC_ARG_ENABLE(stats,
|
|
[ --enable-stats Enable printing of statistics (default disabled)],
|
|
[ if test x$enableval = xyes; then STATS=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 ])
|
|
|
|
SYS=${host_os}
|
|
|
|
dnl special case for BeOS
|
|
if test x$host_os = xbeos; then
|
|
BUILTINS=${BUILTINS}"beos "
|
|
LIB_BEOS="-lbe -lgame -lroot -ltracker"
|
|
|
|
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
|
|
PLUGINS=${PLUGINS}"esd "
|
|
LIB_ESD="`esd-config --libs`"
|
|
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 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_WITH(sdl,
|
|
[ --with-sdl[=name] SDL support (default enabled)],
|
|
[ if test "x$withval" != "xno";
|
|
then
|
|
PLUGINS=${PLUGINS}"sdl ";
|
|
if test "x$withval" != "xyes";
|
|
then
|
|
LIB_SDL=${LIB_SDL}" -L/usr/X11R6/lib -L"$withval"/lib -l"$withval
|
|
INCLUDE=${INCLUDE}" -I"$withval"/include"
|
|
else
|
|
AC_CHECK_HEADERS(SDL/SDL.h, , [echo "Cannot find SDL headers !"; exit])
|
|
LIB_SDL=${LIB_SDL}" -L/usr/X11R6/lib -lSDL"
|
|
fi
|
|
fi ])
|
|
if test "x$withval" = "x";
|
|
then
|
|
AC_CHECK_HEADERS(SDL/SDL.h,
|
|
[PLUGINS=${PLUGINS}"sdl "
|
|
LIB_SDL=${LIB_SDL}" -L/usr/X11R6/lib -lSDL"])
|
|
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
|
|
else
|
|
LIB_GLIDE="-lglide2x"
|
|
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"
|
|
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 "; 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
|
|
if which gtk-config; then
|
|
PLUGINS=${PLUGINS}"gtk "
|
|
ALIASES=${ALIASES}"gvlc "
|
|
LIB_GTK="`gtk-config --libs gtk | sed 's,-rdynamic,,'`"
|
|
fi
|
|
fi
|
|
|
|
dnl
|
|
dnl X11 module
|
|
dnl
|
|
AC_ARG_ENABLE(x11,
|
|
[ --disable-x11 X11 support (default enabled)])
|
|
if test x$enable_x11 != xno; then
|
|
AC_CHECK_HEADERS(X11/Xlib.h, [
|
|
PLUGINS=${PLUGINS}"x11 "
|
|
LIB_X11="-L/usr/X11R6/lib -lX11 -lXext"
|
|
])
|
|
fi
|
|
|
|
dnl
|
|
dnl XVideo module
|
|
dnl
|
|
AC_ARG_ENABLE(xvideo,
|
|
[ --enable-xvideo XVideo interface support (default disabled)],
|
|
[if test x$enable_xvideo = xyes; then
|
|
PLUGINS=${PLUGINS}"xvideo "
|
|
LIB_XVIDEO="-L/usr/X11R6/lib -lX11 -lXext -lXv"
|
|
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 $have_alsa = true; 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(INCLUDE)
|
|
AC_SUBST(DEBUG)
|
|
AC_SUBST(STATS)
|
|
AC_SUBST(OPTIMS)
|
|
AC_SUBST(CSS)
|
|
|
|
AC_SUBST(LCFLAGS)
|
|
AC_SUBST(LIB)
|
|
|
|
AC_SUBST(LIB_ALSA)
|
|
AC_SUBST(LIB_BEOS)
|
|
AC_SUBST(LIB_DARWIN)
|
|
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_MACOSX)
|
|
AC_SUBST(LIB_NCURSES)
|
|
AC_SUBST(LIB_QT)
|
|
AC_SUBST(LIB_TS)
|
|
AC_SUBST(LIB_SDL)
|
|
AC_SUBST(LIB_X11)
|
|
AC_SUBST(LIB_XVIDEO)
|
|
AC_SUBST(LIB_YUV)
|
|
|
|
AC_OUTPUT([Makefile.opts Makefile.modules include/config.h])
|
|
|
|
echo "
|
|
vlc configuration
|
|
-----------------
|
|
vlc version : ${VLC_VERSION}
|
|
system : ${SYS}
|
|
architecture : ${ARCH}
|
|
debug mode : ${DEBUG}
|
|
statistics : ${STATS}
|
|
optimizations : ${OPTIMS}
|
|
CSS decryption : ${CSS}
|
|
need builtin getopt : ${GETOPT}
|
|
plugin modules : ${PLUGINS}
|
|
built-in modules : ${BUILTINS}
|
|
vlc aliases : ${ALIASES}
|
|
|
|
You may now tune Makefile.opts at your convenience."
|
|
|