2000-03-08 18:22:45 +08:00
dnl Autoconf settings for vlc
AC_INIT(src/interface/main.c)
AC_CONFIG_HEADER(include/defs.h)
2000-05-29 15:29:50 +08:00
2000-03-08 18:22:45 +08:00
AC_CANONICAL_HOST
2001-03-05 09:29:25 +08:00
VLC_VERSION=0.2.63
2000-03-08 18:22:45 +08:00
AC_SUBST(VLC_VERSION)
2001-01-20 02:17:36 +08:00
VLC_CODENAME=Urumov
2000-03-08 18:22:45 +08:00
AC_SUBST(VLC_CODENAME)
dnl Check for tools
AC_PROG_MAKE_SET
2000-08-24 07:45:27 +08:00
if test -z "$CC"; then
AC_PROG_CC
fi
if test -z "$CPP"; then
AC_PROG_CPP
fi
2000-03-08 18:22:45 +08:00
dnl AM_PROG_LIBTOOL
AC_PROG_INSTALL
dnl Check for compiler environment
AC_C_CONST
AC_C_BIGENDIAN
2001-01-10 05:03:47 +08:00
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))
2000-03-08 18:22:45 +08:00
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)])
2001-01-06 15:23:32 +08:00
AC_CHECK_FUNCS(vasprintf)
2000-03-08 18:22:45 +08:00
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)
2001-01-06 02:46:45 +08:00
CPPFLAGS="${CPPFLAGS} -I/usr/local/include"
AC_CHECK_HEADERS(stddef.h)
2000-12-10 16:08:35 +08:00
AC_CHECK_HEADERS(getopt.h)
AC_CHECK_HEADERS(sys/sockio.h)
2001-02-21 07:30:15 +08:00
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h)
2000-03-08 18:22:45 +08:00
AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h)
2000-03-10 08:47:17 +08:00
AC_CHECK_HEADERS(dlfcn.h image.h)
AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
2001-01-06 02:46:45 +08:00
AC_CHECK_HEADERS(machine/param.h)
2000-03-08 18:22:45 +08:00
dnl Check for threads library
2000-03-11 08:05:16 +08:00
AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
2000-03-08 18:22:45 +08:00
2001-01-06 15:23:32 +08:00
dnl Do a series of bizarre compilation tests
2001-01-06 02:46:45 +08:00
save_CFLAGS=$CFLAGS
2001-01-06 15:23:32 +08:00
dnl Check for ntohl, etc.
2001-01-06 02:46:45 +08:00
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); }],,
2001-01-06 15:23:32 +08:00
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"
2001-01-06 02:46:45 +08:00
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
2001-01-06 15:23:32 +08:00
dnl End of the bizarre compilation tests
2001-01-06 02:46:45 +08:00
CFLAGS=$save_CFLAGS
2001-01-06 15:23:32 +08:00
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))
2000-03-08 18:22:45 +08:00
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
2000-07-04 10:37:21 +08:00
dnl default plugins
2001-02-20 21:41:01 +08:00
PLUGINS=${PLUGINS}"ps ts yuv idct idctclassic motion "
2001-02-18 11:32:02 +08:00
if test x$host_os = xbeos; then
ACCEL_PLUGINS="yuvmmx idctmmx motionmmx "
else
ACCEL_PLUGINS="yuvmmx idctmmx idctmmxext motionmmx motionmmxext "
fi
2000-07-04 10:37:21 +08:00
2001-02-21 07:30:15 +08:00
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)])])
2001-02-20 21:41:01 +08:00
2000-07-04 10:37:21 +08:00
ARCH=${host_cpu}
AC_ARG_ENABLE(ppro,
2000-11-30 03:02:17 +08:00
[ --disable-ppro Disable PentiumPro optimizations (default enabled for x86)],
2000-11-29 22:36:20 +08:00
[ if test x$enableval = xyes; then ARCH=${ARCH}" ppro"; fi ],
[ if test x${host_cpu} = xi686; then ARCH=${ARCH}" ppro"; fi ])
2000-07-04 10:37:21 +08:00
AC_ARG_ENABLE(mmx,
2001-01-06 02:46:45 +08:00
[ --disable-mmx Disable MMX optimizations (default enabled for x86)],
2001-02-18 11:32:02 +08:00
[ 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 ])
2001-03-02 21:47:01 +08:00
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
2000-11-18 11:15:01 +08:00
AC_ARG_ENABLE(debug,
2000-11-30 03:02:17 +08:00
[ --enable-debug Enable debug mode (default disabled)],
2000-11-18 11:15:01 +08:00
[ if test x$enableval = xyes; then DEBUG=1; fi ])
AC_ARG_ENABLE(stats,
2000-11-30 03:02:17 +08:00
[ --enable-stats Enable printing of statistics (default disabled)],
2000-11-27 18:35:57 +08:00
[ if test x$enableval = xyes; then STATS=1; fi ])
2000-11-18 11:15:01 +08:00
AC_ARG_ENABLE(optimizations,
2000-11-30 03:02:17 +08:00
[ --disable-optimizations Disable compiler optimizations (default enabled)],
2000-11-29 22:36:20 +08:00
[ if test x$enableval = xno; then OPTIMS=0; fi ],
[ OPTIMS=1 ])
2000-07-04 10:37:21 +08:00
SYS=${host_os}
# special cases
if test x$host_os = xbeos; then
2001-01-06 15:23:32 +08:00
PLUGINS=${PLUGINS}"dummy null beos "
2000-07-04 10:37:21 +08:00
dnl default case
else
2001-02-21 19:49:18 +08:00
GVLC=0
KVLC=0
2000-06-24 06:28:42 +08:00
AC_ARG_ENABLE(dummy,
2001-02-13 12:29:46 +08:00
[ --disable-dummy dummy module (default enabled)])
if test x$enable_dummy != xno; then PLUGINS=${PLUGINS}"dummy "; fi
2001-01-06 15:23:32 +08:00
AC_ARG_ENABLE(null,
[ --disable-null Null module (default enabled)])
if test x$enable_null != xno; then PLUGINS=${PLUGINS}"null "; fi
2000-07-04 10:37:21 +08:00
AC_ARG_ENABLE(dsp,
2000-11-30 03:02:17 +08:00
[ --disable-dsp Linux /dev/dsp support (default enabled)])
2000-07-04 10:37:21 +08:00
if test x$enable_dsp != xno; then PLUGINS=${PLUGINS}"dsp "; fi
2000-05-29 15:29:50 +08:00
AC_ARG_ENABLE(esd,
2000-06-01 23:25:38 +08:00
[ --enable-esd Esound library support (default disabled)],
2000-10-18 10:17:20 +08:00
[if test x$enable_esd = xyes; then PLUGINS=${PLUGINS}"esd "; fi])
2000-06-24 06:28:42 +08:00
AC_ARG_ENABLE(fb,
[ --enable-fb Linux framebuffer support (default disabled)],
2001-02-18 18:24:20 +08:00
[if test x$enable_fb = xyes; then PLUGINS=${PLUGINS}"fb "; fi])
2001-01-06 02:46:45 +08:00
AC_ARG_WITH(ggi,
[ --with-ggi[=name] GGI support (default disabled)],
2001-03-03 19:01:07 +08:00
[ if test "x$withval" != "xno";
2001-01-06 02:46:45 +08:00
then
2001-03-03 19:01:07 +08:00
PLUGINS=${PLUGINS}"ggi ";
if test "x$withval" != "xyes";
then
LIB_GGI="-l"$withval
else
LIB_GGI="-lggi"
fi
2001-01-06 02:46:45 +08:00
fi ])
AC_ARG_WITH(sdl,
Beginning of Interface II
---------------------------
* Plugins have completely disappeared, we now only use the new module API.
* All intf and vout modules are now independant. So far, only the Gnome
intf module and the SDL vout module have been ported. configure.in has
been modified to reflect the changes (x11 and dummy aren't compiled by
default anymore, while SDL and Gnome are).
Note that this is _not_ Interface II, it's just a step forward. For
instance, it lacks the whole message passing scheme.
Things that should work:
* Right-clicking on the SDL video output window brings the Gnome menu.
* Pause, Play, Exit, About work from the menu or from the interface window.
* The old SDL keys still work.
Things that are broken or may be broken:
* Xlib calls are not locked yet, which may lead to "Unexpected async reply"
errors, and make the vlc segfault.
* Sound only works for the first file.
* The SDL vout_sdl.c file is absolutely ugly and kludgey.
* The vlc immediately quits when no filename is given as an argument. Not
a real bug, but still annoying.
* The Gnome menu does not work in fullscreen mode.
Things that will come soon, maybe tomorrow:
* Complete navigation buttons (fast forward, slow, etc.).
* File/Open menu to add files to the playlist.
* Return of the X11 video output for those of us who do not have SDL.
* Textmode interface for those of us who do not have Gnome.
* aout and vout autospawn (maybe).
2001-02-11 09:15:12 +08:00
[ --with-sdl[=name] SDL support (default enabled)],
2001-03-03 19:01:07 +08:00
[ if test "x$withval" != "xno";
2001-01-06 02:46:45 +08:00
then
2001-03-03 19:01:07 +08:00
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
2001-01-06 02:46:45 +08:00
fi ])
2001-02-20 19:34:01 +08:00
if test "x$withval" = "x";
Beginning of Interface II
---------------------------
* Plugins have completely disappeared, we now only use the new module API.
* All intf and vout modules are now independant. So far, only the Gnome
intf module and the SDL vout module have been ported. configure.in has
been modified to reflect the changes (x11 and dummy aren't compiled by
default anymore, while SDL and Gnome are).
Note that this is _not_ Interface II, it's just a step forward. For
instance, it lacks the whole message passing scheme.
Things that should work:
* Right-clicking on the SDL video output window brings the Gnome menu.
* Pause, Play, Exit, About work from the menu or from the interface window.
* The old SDL keys still work.
Things that are broken or may be broken:
* Xlib calls are not locked yet, which may lead to "Unexpected async reply"
errors, and make the vlc segfault.
* Sound only works for the first file.
* The SDL vout_sdl.c file is absolutely ugly and kludgey.
* The vlc immediately quits when no filename is given as an argument. Not
a real bug, but still annoying.
* The Gnome menu does not work in fullscreen mode.
Things that will come soon, maybe tomorrow:
* Complete navigation buttons (fast forward, slow, etc.).
* File/Open menu to add files to the playlist.
* Return of the X11 video output for those of us who do not have SDL.
* Textmode interface for those of us who do not have Gnome.
* aout and vout autospawn (maybe).
2001-02-11 09:15:12 +08:00
then
PLUGINS=${PLUGINS}"sdl "
2001-02-19 03:14:27 +08:00
LIB_SDL="-L/usr/X11R6/lib -lSDL"
Beginning of Interface II
---------------------------
* Plugins have completely disappeared, we now only use the new module API.
* All intf and vout modules are now independant. So far, only the Gnome
intf module and the SDL vout module have been ported. configure.in has
been modified to reflect the changes (x11 and dummy aren't compiled by
default anymore, while SDL and Gnome are).
Note that this is _not_ Interface II, it's just a step forward. For
instance, it lacks the whole message passing scheme.
Things that should work:
* Right-clicking on the SDL video output window brings the Gnome menu.
* Pause, Play, Exit, About work from the menu or from the interface window.
* The old SDL keys still work.
Things that are broken or may be broken:
* Xlib calls are not locked yet, which may lead to "Unexpected async reply"
errors, and make the vlc segfault.
* Sound only works for the first file.
* The SDL vout_sdl.c file is absolutely ugly and kludgey.
* The vlc immediately quits when no filename is given as an argument. Not
a real bug, but still annoying.
* The Gnome menu does not work in fullscreen mode.
Things that will come soon, maybe tomorrow:
* Complete navigation buttons (fast forward, slow, etc.).
* File/Open menu to add files to the playlist.
* Return of the X11 video output for those of us who do not have SDL.
* Textmode interface for those of us who do not have Gnome.
* aout and vout autospawn (maybe).
2001-02-11 09:15:12 +08:00
fi
2001-01-06 02:46:45 +08:00
AC_ARG_WITH(glide,
[ --with-glide[=name] Glide (3dfx) support (default disabled)],
2001-03-03 19:01:07 +08:00
[ if test "x$withval" != "xno";
2001-01-06 02:46:45 +08:00
then
2001-03-03 19:01:07 +08:00
PLUGINS=${PLUGINS}"glide ";
if test "x$withval" != "xyes";
then
LIB_GLIDE="-l"$withval
else
LIB_GLIDE="-lglide2x"
fi
2001-01-06 02:46:45 +08:00
fi ])
2001-02-16 14:37:09 +08:00
AC_ARG_ENABLE(ncurses,
[ --enable-ncurses ncurses interface support (default disabled)],
[if test x$enable_ncurses = xyes; then PLUGINS=${PLUGINS}"ncurses "; fi])
2001-02-20 19:34:01 +08:00
AC_ARG_ENABLE(kde,
[ --enable-kde KDE interface support (default disabled)],
2001-02-21 19:49:18 +08:00
[if test x$enable_kde = xyes; then PLUGINS=${PLUGINS}"kde "; KVLC=1; fi])
2000-06-24 06:28:42 +08:00
AC_ARG_ENABLE(gnome,
2001-02-21 19:49:18 +08:00
[ --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
2001-02-20 19:34:01 +08:00
AC_ARG_ENABLE(x11,
2001-02-15 11:01:20 +08:00
[ --disable-x11 X11 support (default enabled)])
if test x$enable_x11 != xno; then PLUGINS=${PLUGINS}"x11 "; fi
Beginning of Interface II
---------------------------
* Plugins have completely disappeared, we now only use the new module API.
* All intf and vout modules are now independant. So far, only the Gnome
intf module and the SDL vout module have been ported. configure.in has
been modified to reflect the changes (x11 and dummy aren't compiled by
default anymore, while SDL and Gnome are).
Note that this is _not_ Interface II, it's just a step forward. For
instance, it lacks the whole message passing scheme.
Things that should work:
* Right-clicking on the SDL video output window brings the Gnome menu.
* Pause, Play, Exit, About work from the menu or from the interface window.
* The old SDL keys still work.
Things that are broken or may be broken:
* Xlib calls are not locked yet, which may lead to "Unexpected async reply"
errors, and make the vlc segfault.
* Sound only works for the first file.
* The SDL vout_sdl.c file is absolutely ugly and kludgey.
* The vlc immediately quits when no filename is given as an argument. Not
a real bug, but still annoying.
* The Gnome menu does not work in fullscreen mode.
Things that will come soon, maybe tomorrow:
* Complete navigation buttons (fast forward, slow, etc.).
* File/Open menu to add files to the playlist.
* Return of the X11 video output for those of us who do not have SDL.
* Textmode interface for those of us who do not have Gnome.
* aout and vout autospawn (maybe).
2001-02-11 09:15:12 +08:00
2000-11-23 09:40:31 +08:00
AC_ARG_ENABLE(alsa,
2000-11-30 03:02:17 +08:00
[ --enable-alsa Alsa sound drivers support (Only for linux) (default disabled)],
2000-11-23 09:40:31 +08:00
[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])
2001-02-21 19:49:18 +08:00
if test x$GVLC = x1 ; then ALIASES=${ALIASES}"gvlc "; fi
if test x$KVLC = x1 ; then ALIASES=${ALIASES}"kvlc "; fi
2000-05-29 15:29:50 +08:00
fi
AC_SUBST(SYS)
AC_SUBST(ARCH)
2000-06-24 06:28:42 +08:00
AC_SUBST(PLUGINS)
2000-07-04 10:37:21 +08:00
AC_SUBST(ALIASES)
2000-11-18 11:15:01 +08:00
AC_SUBST(DEBUG)
AC_SUBST(STATS)
AC_SUBST(OPTIMS)
2001-03-02 21:47:01 +08:00
AC_SUBST(CSS)
2001-01-06 15:23:32 +08:00
AC_SUBST(DYNAMIC_FLAG)
2001-01-06 02:46:45 +08:00
AC_SUBST(LIB_SDL)
AC_SUBST(LIB_GLIDE)
AC_SUBST(LIB_GGI)
2000-05-29 15:29:50 +08:00
2000-03-10 08:47:17 +08:00
AC_OUTPUT([Makefile include/config.h])
2000-03-08 18:22:45 +08:00
2000-05-29 15:29:50 +08:00
echo "
vlc configuration
-----------------
vlc version : ${VLC_VERSION}
system : ${SYS}
architecture : ${ARCH}
2000-11-18 11:15:01 +08:00
debug mode : ${DEBUG}
statistics : ${STATS}
optimizations : ${OPTIMS}
2001-03-02 21:47:01 +08:00
CSS decryption : ${CSS}
2000-06-24 06:28:42 +08:00
plugins : ${PLUGINS}
2000-07-04 10:37:21 +08:00
vlc aliases : ${ALIASES}
2000-05-29 15:29:50 +08:00
"
2000-08-09 06:51:04 +08:00