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
2000-08-28 08:37:44 +08:00
VLC_VERSION=0.1.99i
2000-03-08 18:22:45 +08:00
AC_SUBST(VLC_VERSION)
VLC_CODENAME=Onatopp
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
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_FUNC_MMAP
AC_FUNC_VPRINTF
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)
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h)
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)
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
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
PLUGINS=${PLUGINS}"yuv ";
ARCH=${host_cpu}
AC_ARG_ENABLE(ppro,
[ --enable-ppro Enable PentiumPro optimizations (default is no)],
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,
[ --enable-mmx Enable MMX optimizations (default is no)],
2000-11-29 22:36:20 +08:00
[ if test x`echo $ARCH | cut -b3-4` = x86 ; then if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}"yuvmmx "; fi; fi ],
[ if test x${host_cpu} = xi686 -o x${host_cpu} = xi586; then ARCH=${ARCH}" mmx"; PLUGINS=${PLUGINS}"yuvmmx "; fi ] )
2000-11-18 11:15:01 +08:00
AC_ARG_ENABLE(debug,
[ --enable-debug Enable debug mode (default is no)],
[ if test x$enableval = xyes; then DEBUG=1; fi ])
AC_ARG_ENABLE(stats,
2000-11-27 18:35:57 +08:00
[ --enable-stats Enable printing of statistics (default is no)],
[ if test x$enableval = xyes; then STATS=1; fi ])
2000-11-18 11:15:01 +08:00
AC_ARG_ENABLE(optimizations,
[ --enable-optimizations Enable 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
PLUGINS=${PLUGINS}"dummy beos "
dnl default case
else
2000-06-24 06:28:42 +08:00
AC_ARG_ENABLE(dummy,
[ --enable-dummy dummy audio and video support (default enabled)])
if test x$enable_dummy != xno; then PLUGINS=${PLUGINS}"dummy "; fi
2000-07-04 10:37:21 +08:00
AC_ARG_ENABLE(dsp,
[ --enable-dsp Linux /dev/dsp support (default enabled)])
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)],
2000-07-04 10:37:21 +08:00
[if test x$enable_fb = xyes; then PLUGINS=${PLUGINS}"fb "; ALIASES=${ALIASES}"fbvlc "; fi])
2000-06-24 06:28:42 +08:00
AC_ARG_ENABLE(ggi,
[ --enable-ggi GGI support (default disabled)],
2000-08-09 06:51:04 +08:00
[if test x$enable_ggi = xyes; then PLUGINS=${PLUGINS}"ggi "; fi])
2000-08-18 16:25:23 +08:00
AC_ARG_ENABLE(sdl,
2000-08-21 17:33:42 +08:00
[ --enable-sdl SDL support (default disabled)],
2000-08-19 01:02:03 +08:00
[if test x$enable_sdl = xyes; then PLUGINS=${PLUGINS}"sdl "; fi])
2000-06-24 06:28:42 +08:00
AC_ARG_ENABLE(glide,
[ --enable-glide Glide (3dfx) support (default disabled)],
2000-08-09 06:51:04 +08:00
[if test x$enable_glide = xyes; then PLUGINS=${PLUGINS}"glide "; fi])
2000-06-24 06:28:42 +08:00
AC_ARG_ENABLE(gnome,
[ --enable-gnome Gnome support (default disabled)],
2000-07-04 10:37:21 +08:00
[if test x$enable_gnome = xyes; then PLUGINS=${PLUGINS}"gnome "; ALIASES=${ALIASES}"gvlc "; fi])
2000-06-24 06:28:42 +08:00
AC_ARG_ENABLE(x11,
2000-11-23 09:40:31 +08:00
[ --enable-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 supprt (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])
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)
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}
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