mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-04 09:11:33 +02:00
![Sam Hocevar](/assets/img/avatar_default.png)
don't forget to use the -p option if you cvs update) * Added a plain Gtk+ port of the Gnome interface, for the gnome-impaired people. Gtk+ is now compiled by default, while Gnome isn't (you will have to add --enable-gnome when running configure) * Replaced -lcurses with -lncurses in configure.in.
248 lines
7.9 KiB
Plaintext
248 lines
7.9 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.62
|
|
AC_SUBST(VLC_VERSION)
|
|
VLC_CODENAME=Urumov
|
|
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
|
|
|
|
AC_MSG_CHECKING([whether compiler accepts bswap x86 instruction])
|
|
AC_TRY_COMPILE([unsigned int foo( unsigned int x )
|
|
{ __asm__("bswap %0" : "=r" (x) : "0" (x)); return x; }],,
|
|
AC_DEFINE(HAVE_X86_BSWAP, 1, Define if compiler accepts bswap x86 instruction.) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
|
|
|
|
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)])
|
|
AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
|
|
AC_CHECK_FUNC(nanosleep,,[AC_CHECK_LIB(rt,nanosleep,,[AC_CHECK_LIB(posix4,nanosleep)])])
|
|
AC_CHECK_FUNCS(usleep)
|
|
AC_CHECK_FUNC(inet_aton,,[AC_CHECK_LIB(resolv,inet_aton)])
|
|
AC_CHECK_FUNCS(vasprintf)
|
|
AC_FUNC_MMAP
|
|
AC_TYPE_SIGNAL
|
|
AC_CHECK_LIB(dl, dlopen)
|
|
AC_CHECK_LIB(gnugetopt, optarg)
|
|
AC_CHECK_LIB(be, _)
|
|
AC_CHECK_LIB(game, _)
|
|
AC_CHECK_LIB(root, _)
|
|
AC_CHECK_LIB(m, powl)
|
|
AC_CHECK_LIB(pthread, pthread_create)
|
|
AC_CHECK_LIB(threads, thread_create)
|
|
|
|
dnl check for getopt_long, substitute the distributed versions if not
|
|
AC_CHECK_FUNC(getopt_long,,[LIBOBJS="$LIBOBJS getopt.o getopt1.o"])
|
|
AC_SUBST(LIBOBJS)
|
|
|
|
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"
|
|
AC_MSG_CHECKING([if \$CC accepts -rdynamic])
|
|
AC_TRY_COMPILE([],,
|
|
DYNAMIC_FLAG="-rdynamic"
|
|
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
|
|
|
|
dnl End of the bizarre compilation tests
|
|
CFLAGS=$save_CFLAGS
|
|
|
|
dnl Check for boolean_t in sys/types.h
|
|
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))
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
AC_C_CONST
|
|
AC_TYPE_SIZE_T
|
|
AC_HEADER_TIME
|
|
|
|
dnl default plugins
|
|
PLUGINS=${PLUGINS}"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 Checks for DVD ioctls
|
|
AC_CHECK_HEADERS(sys/ioctl.h,
|
|
[PLUGINS=${PLUGINS}"dvd "
|
|
AC_CHECK_HEADERS(linux/cdrom.h)
|
|
AC_EGREP_HEADER(dvd,linux/cdrom.h,[AC_DEFINE(LINUX_DVD,1,DVD support for linux)])])
|
|
|
|
ARCH=${host_cpu}
|
|
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 ])
|
|
AC_ARG_ENABLE(mmx,
|
|
[ --disable-mmx Disable MMX optimizations (default enabled for x86)],
|
|
[ if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; fi ],
|
|
[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}${ACCEL_PLUGINS}; fi ])
|
|
AC_ARG_ENABLE(debug,
|
|
[ --enable-debug Enable debug mode (default disabled)],
|
|
[ if test x$enableval = xyes; then DEBUG=1; fi ])
|
|
AC_ARG_ENABLE(stats,
|
|
[ --enable-stats Enable printing of statistics (default disabled)],
|
|
[ if test x$enableval = xyes; then STATS=1; fi ])
|
|
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}
|
|
|
|
# special cases
|
|
if test x$host_os = xbeos; then
|
|
PLUGINS=${PLUGINS}"dummy null beos "
|
|
|
|
dnl default case
|
|
else
|
|
|
|
GVLC=0
|
|
KVLC=0
|
|
|
|
AC_ARG_ENABLE(dummy,
|
|
[ --disable-dummy dummy module (default enabled)])
|
|
if test x$enable_dummy != xno; then PLUGINS=${PLUGINS}"dummy "; fi
|
|
AC_ARG_ENABLE(null,
|
|
[ --disable-null Null module (default enabled)])
|
|
if test x$enable_null != xno; then PLUGINS=${PLUGINS}"null "; fi
|
|
AC_ARG_ENABLE(dsp,
|
|
[ --disable-dsp Linux /dev/dsp support (default enabled)])
|
|
if test x$enable_dsp != xno; then PLUGINS=${PLUGINS}"dsp "; fi
|
|
AC_ARG_ENABLE(esd,
|
|
[ --enable-esd Esound library support (default disabled)],
|
|
[if test x$enable_esd = xyes; then PLUGINS=${PLUGINS}"esd "; fi])
|
|
AC_ARG_ENABLE(fb,
|
|
[ --enable-fb Linux framebuffer support (default disabled)],
|
|
[if test x$enable_fb = xyes; then PLUGINS=${PLUGINS}"fb "; fi])
|
|
AC_ARG_WITH(ggi,
|
|
[ --with-ggi[=name] GGI support (default disabled)],
|
|
[ PLUGINS=${PLUGINS}"ggi ";
|
|
if test "x$withval" != "xyes";
|
|
then
|
|
LIB_GGI="-l"$withval
|
|
else
|
|
LIB_GGI="-lggi"
|
|
fi ])
|
|
AC_ARG_WITH(sdl,
|
|
[ --with-sdl[=name] SDL support (default enabled)],
|
|
[ PLUGINS=${PLUGINS}"sdl ";
|
|
if test "x$withval" != "xyes";
|
|
then
|
|
LIB_SDL="L/usr/X11R6/lib -l"$withval
|
|
else
|
|
LIB_SDL="-L/usr/X11R6/lib -lSDL"
|
|
fi ])
|
|
if test "x$withval" = "x";
|
|
then
|
|
PLUGINS=${PLUGINS}"sdl "
|
|
LIB_SDL="-L/usr/X11R6/lib -lSDL"
|
|
fi
|
|
AC_ARG_WITH(glide,
|
|
[ --with-glide[=name] Glide (3dfx) support (default disabled)],
|
|
[ PLUGINS=${PLUGINS}"glide ";
|
|
if test "x$withval" != "xyes";
|
|
then
|
|
LIB_GLIDE="-l"$withval
|
|
else
|
|
LIB_GLIDE="-lglide2x"
|
|
fi ])
|
|
AC_ARG_ENABLE(ncurses,
|
|
[ --enable-ncurses ncurses interface support (default disabled)],
|
|
[if test x$enable_ncurses = xyes; then PLUGINS=${PLUGINS}"ncurses "; fi])
|
|
AC_ARG_ENABLE(kde,
|
|
[ --enable-kde KDE interface support (default disabled)],
|
|
[if test x$enable_kde = xyes; then PLUGINS=${PLUGINS}"kde "; KVLC=1; fi])
|
|
AC_ARG_ENABLE(gnome,
|
|
[ --enable-gnome Gnome interface support (default disabled)],
|
|
[if test x$enable_gnome = xyes; then PLUGINS=${PLUGINS}"gnome "; GVLC=1; fi])
|
|
AC_ARG_ENABLE(gtk,
|
|
[ --disable-gtk Gtk+ support (default enabled)])
|
|
if test x$enable_gtk != xno; then PLUGINS=${PLUGINS}"gtk "; GVLC=1; fi
|
|
AC_ARG_ENABLE(x11,
|
|
[ --disable-x11 X11 support (default enabled)])
|
|
if test x$enable_x11 != xno; then PLUGINS=${PLUGINS}"x11 "; fi
|
|
|
|
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 "; fi; fi])
|
|
|
|
if test x$GVLC = x1 ; then ALIASES=${ALIASES}"gvlc "; fi
|
|
if test x$KVLC = x1 ; then ALIASES=${ALIASES}"kvlc "; fi
|
|
|
|
fi
|
|
|
|
AC_SUBST(SYS)
|
|
AC_SUBST(ARCH)
|
|
AC_SUBST(PLUGINS)
|
|
AC_SUBST(ALIASES)
|
|
AC_SUBST(DEBUG)
|
|
AC_SUBST(STATS)
|
|
AC_SUBST(OPTIMS)
|
|
AC_SUBST(DYNAMIC_FLAG)
|
|
AC_SUBST(LIB_SDL)
|
|
AC_SUBST(LIB_GLIDE)
|
|
AC_SUBST(LIB_GGI)
|
|
|
|
AC_OUTPUT([Makefile include/config.h])
|
|
|
|
echo "
|
|
vlc configuration
|
|
-----------------
|
|
vlc version : ${VLC_VERSION}
|
|
system : ${SYS}
|
|
architecture : ${ARCH}
|
|
debug mode : ${DEBUG}
|
|
statistics : ${STATS}
|
|
optimizations : ${OPTIMS}
|
|
plugins : ${PLUGINS}
|
|
vlc aliases : ${ALIASES}
|
|
"
|
|
|