Commit 9e3ab283 authored by Sam Hocevar's avatar Sam Hocevar

* ALL: the first libvlc commit.

   As for video output 4, this breaks almost everything, but I'll slowly
  do what remains to be fixed during the weekend.

   Changes in vlc:
   ===============

  * vlc is now a very small program (20 lines) which uses the libvlc API;
   it is quite simple for the moment but can be extended in the future.

  * interfaces, decoders, video outputs, etc. are now almost the same
   objects (yes, I know, this is C++ redone in C) and are structured in
   a tree. More about this later, but basically it allows the following
   nice features:
    - several interfaces
    - several playlists with several outputs
    - input plugins spawning helper interfaces (will be used for DVD menus)
    - anything spawning anything; I swear there are useful uses for this!

  * libvlc can be used in other programs; I'm currently writing a Mozilla
   plugin for my employer.

   Things currently broken:
   ========================

  * most interfaces, most ports
  * the playlist handling (almost finished rewriting this though). This means
   no file can be played from the GUI, you need to use the commandline. This
   also means it segfaults at EOF, when exiting the program, and it sometimes
   refuses to open a file when asked to.
parent 36c0b151
......@@ -5,8 +5,8 @@ conftest
conftest.*
.dep
gmon.out
vlc-debug.log
vlc-debug.ct
vlc-debug.*
vlc-log.*
config.log
config.cache
config.status
......
List of known vlc bugs $Id: BUGS,v 1.13 2002/05/20 22:30:19 sam Exp $
List of known vlc bugs $Id: BUGS,v 1.14 2002/06/01 12:31:57 sam Exp $
Please try to keep this file up to date. Also, grep for FIXME in the
source files for more and more bugs to fix.
......@@ -63,3 +63,10 @@ Misc:
* The Jin-Roh DVD seems to segfault.
From: David Legg <David.Legg@legg.uklinux.net>
If I change the value of AOUT_FIFO_SIZE from 255 to 511, vlc segmentation
faults.
......@@ -96,10 +96,11 @@ PLUGINS_TARGETS := a52/a52 \
esd/esd \
fb/fb \
ffmpeg/ffmpeg \
filter/filter_clone \
filter/filter_deinterlace \
filter/filter_transform \
filter/filter_invert \
filter/filter_distort \
filter/filter_invert \
filter/filter_transform \
filter/filter_wall \
filter/filter_clone \
fx/fx_scope \
......@@ -132,7 +133,7 @@ PLUGINS_TARGETS := a52/a52 \
motion/motionmmxext \
motion/motion3dnow \
motion/motionaltivec \
mpeg_system/mpeg_audio \
mpeg_system/mpeg_audio \
mpeg_system/mpeg_es \
mpeg_system/mpeg_ps \
mpeg_system/mpeg_ts \
......@@ -159,27 +160,36 @@ PLUGINS_TARGETS := a52/a52 \
#
# C Objects
#
INTERFACE := main interface intf_msg intf_playlist intf_eject
VLC := vlc
LIBVLC := libvlc
INTERFACE := interface intf_eject
PLAYLIST := playlist
INPUT := input input_ext-plugins input_ext-dec input_ext-intf input_dec input_programs input_clock mpeg_system
VIDEO_OUTPUT := video_output video_text vout_pictures vout_subpictures
AUDIO_OUTPUT := audio_output aout_ext-dec aout_pcm aout_spdif
MISC := mtime modules configuration netutils iso_lang
MISC := mtime modules threads cpu configuration netutils iso_lang messages objects
C_OBJ := $(INTERFACE:%=src/interface/%.o) \
LIBVLC_OBJ := $(LIBVLC:%=src/%.o) \
$(INTERFACE:%=src/interface/%.o) \
$(PLAYLIST:%=src/playlist/%.o) \
$(INPUT:%=src/input/%.o) \
$(VIDEO_OUTPUT:%=src/video_output/%.o) \
$(AUDIO_OUTPUT:%=src/audio_output/%.o) \
$(MISC:%=src/misc/%.o)
VLC_OBJ := $(VLC:%=src/%.o)
C_OBJ := $(VLC_OBJ) $(LIBVLC_OBJ)
#
# Misc Objects
#
ifeq ($(NEED_GETOPT),1)
C_OBJ += extras/GNUgetopt/getopt.o extras/GNUgetopt/getopt1.o
LIBVLC_OBJ += extras/GNUgetopt/getopt.o extras/GNUgetopt/getopt1.o
endif
ifeq ($(NEED_SYMBOLS),1)
C_OBJ += src/misc/symbols.o
LIBVLC_OBJ += src/misc/symbols.o
endif
ifeq ($(SYS),beos)
......@@ -187,15 +197,16 @@ CPP_OBJ := src/misc/beos_specific.o
endif
ifneq (,$(findstring darwin,$(SYS)))
C_OBJ += src/misc/darwin_specific.o
LIBVLC_OBJ += src/misc/darwin_specific.o
endif
ifneq (,$(findstring mingw32,$(SYS)))
C_OBJ += src/misc/win32_specific.o
LIBVLC_OBJ += src/misc/win32_specific.o
RESOURCE_OBJ := share/vlc_win32_rc.o
endif
VLC_OBJ := $(C_OBJ) $(CPP_OBJ) $(M_OBJ) $(BUILTIN_OBJ) $(RESOURCE_OBJ)
LIBVLC_OBJ += $(CPP_OBJ) $(M_OBJ) $(BUILTIN_OBJ)
VLC_OBJ += $(RESOURCE_OBJ)
#
# Generated header
......@@ -262,7 +273,7 @@ clean: plugins-clean po-clean vlc-clean
rm -f src/*/*.o extras/*/*.o
rm -f lib/*.so* lib/*.a
rm -f plugins/*.so plugins/*.a plugins/*.lib plugins/*.tds
rm -rf extras/MacOSX/build
rm -Rf extras/MacOSX/build
po-clean:
-cd po && $(MAKE) clean
......@@ -302,28 +313,28 @@ vlc-install:
ifneq (,$(ALIASES))
for alias in $(ALIASES) ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias && ln -s vlc $(DESTDIR)$(bindir)/$$alias ; fi ; done
endif
mkdir -p $(DESTDIR)$(datadir)/videolan
$(INSTALL) -m 644 share/*.psf $(DESTDIR)$(datadir)/videolan
$(INSTALL) -m 644 share/*.png $(DESTDIR)$(datadir)/videolan
$(INSTALL) -m 644 share/*.xpm $(DESTDIR)$(datadir)/videolan
mkdir -p $(DESTDIR)$(datadir)/vlc
$(INSTALL) -m 644 share/*.psf $(DESTDIR)$(datadir)/vlc
$(INSTALL) -m 644 share/*.png $(DESTDIR)$(datadir)/vlc
$(INSTALL) -m 644 share/*.xpm $(DESTDIR)$(datadir)/vlc
vlc-uninstall:
rm -f $(DESTDIR)$(bindir)/vlc
ifneq (,$(ALIASES))
for alias in $(ALIASES) ; do if test $$alias ; then rm -f $(DESTDIR)$(bindir)/$$alias ; fi ; done
endif
rm -f $(DESTDIR)$(datadir)/videolan/*.psf
rm -f $(DESTDIR)$(datadir)/videolan/*.png
rm -f $(DESTDIR)$(datadir)/videolan/*.xpm
rm -f $(DESTDIR)$(datadir)/vlc/*.psf
rm -f $(DESTDIR)$(datadir)/vlc/*.png
rm -f $(DESTDIR)$(datadir)/vlc/*.xpm
plugins-install:
mkdir -p $(DESTDIR)$(libdir)/videolan/vlc
mkdir -p $(DESTDIR)$(libdir)/vlc
ifneq (,$(PLUGINS))
$(INSTALL) -m 644 $(PLUGINS:%=plugins/%.so) $(DESTDIR)$(libdir)/videolan/vlc
$(INSTALL) -m 644 $(PLUGINS:%=plugins/%.so) $(DESTDIR)$(libdir)/vlc
endif
plugins-uninstall:
rm -f $(DESTDIR)$(libdir)/videolan/vlc/*.so
rm -f $(DESTDIR)$(libdir)/vlc/*.so
po-install:
-cd po && $(MAKE) install
......@@ -386,7 +397,9 @@ dist:
cp $$file tmp/vlc/share ; done
# Build archives
F=vlc-${VERSION}; \
mv tmp/vlc tmp/$$F; (cd tmp ; tar czf ../$$F.tar.gz $$F); \
mv tmp/vlc tmp/$$F; (cd tmp ; \
cd $$F && $(MAKE) distclean && cd .. ; \
tar czf ../$$F.tar.gz $$F);
# Clean up
rm -Rf tmp
......@@ -495,8 +508,8 @@ FORCE:
#
# Generic rules (see below)
#
$(H_OBJ): Makefile.opts Makefile.dep Makefile
# @echo "regenerating $@"
src/misc/modules_builtin.h: Makefile.opts Makefile
@echo "make[$(MAKELEVEL)]: Creating \`$@'"
@rm -f $@ && cp $@.in $@
ifneq (,$(BUILTINS))
@for i in $(BUILTINS) ; do \
......@@ -550,25 +563,41 @@ endif
#
# Main application target
#
vlc: Makefile.config Makefile.opts Makefile.dep Makefile $(VLC_OBJ) $(BUILTIN_OBJ)
$(CC) $(CFLAGS) -o $@ $(VLC_OBJ) $(BUILTIN_OBJ) $(LDFLAGS) $(vlc_LDFLAGS) $(builtins_LDFLAGS)
vlc: Makefile.config Makefile.opts Makefile.dep Makefile $(VLC_OBJ) lib/libvlc.a $(BUILTIN_OBJ)
$(CC) $(CFLAGS) -o $@ $(VLC_OBJ) lib/libvlc.a $(BUILTIN_OBJ) $(LDFLAGS) $(vlc_LDFLAGS) $(builtins_LDFLAGS)
ifeq ($(SYS),beos)
xres -o $@ ./share/vlc_beos.rsrc
mimeset -f $@
endif
# here are the rules for a dynamic link of libvlc:
#vlc: Makefile.opts Makefile.dep Makefile $(VLC_OBJ) lib/libvlc.so $(BUILTIN_OBJ)
# $(CC) $(CFLAGS) -o $@ $(VLC_OBJ) $(BUILTIN_OBJ) $(LDFLAGS) $(builtins_LDFLAGS) -L./lib -lvlc
#
# Main library target
#
lib/libvlc.a: Makefile.opts Makefile.dep Makefile $(LIBVLC_OBJ)
rm -f $@
ar rc $@ $(LIBVLC_OBJ)
$(RANLIB) $@
#lib/libvlc.so: Makefile.opts Makefile.dep Makefile $(LIBVLC_OBJ)
# $(CC) -shared $(LIBVLC_OBJ) $(LDFLAGS) $(vlc_LDFLAGS) -o $@
# chmod a-x $@
#
# Plugins target
#
plugins: Makefile.modules Makefile.opts Makefile.dep Makefile $(PLUGIN_OBJ)
$(PLUGIN_OBJ): FORCE
$(PLUGIN_OBJ): $(H_OBJ) FORCE
@cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.so=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) -f ../../Makefile.modules $(@:plugins/%=../%)
#
# Built-in modules target
#
builtins: Makefile.modules Makefile.opts Makefile.dep Makefile $(BUILTIN_OBJ)
$(BUILTIN_OBJ): FORCE
$(BUILTIN_OBJ): $(H_OBJ) FORCE
@cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.a=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) -f ../../Makefile.modules $(@:plugins/%=../%)
#
......
......@@ -49,7 +49,7 @@ CFLAGS += -DMAKE_DEP
$(C_DEP): .dep/%.d: %.c
@test -d .dep/$(dir $*) || mkdir -p $(shell dirname .dep/$*)
#@echo "regenerating dependencies for $*.c"
@echo "make[$(MAKELEVEL)]: Generating dependencies for \`$*.c'"
@$(SHELL) -ec '$(CC) -M $(CFLAGS) 2>/dev/null $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
.dep\/$(subst /,\/,$*).d : /g'\'' > $@; \
......@@ -57,7 +57,7 @@ $(C_DEP): .dep/%.d: %.c
$(CPP_DEP): .dep/%.dpp: %.cpp
@test -d .dep/$(dir $*) || mkdir -p $(shell dirname .dep/$*)
#@echo "regenerating dependencies for $*.cpp"
@echo "make[$(MAKELEVEL)]: Generating dependencies for \`$*.cpp'"
@$(SHELL) -ec '$(CC) -M $(CFLAGS) 2>/dev/null $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
.dep\/$(subst /,\/,$*).dpp : /g'\'' > $@; \
......@@ -65,7 +65,7 @@ $(CPP_DEP): .dep/%.dpp: %.cpp
$(M_DEP): .dep/%.dm: %.m
@test -d .dep/$(dir $*) || mkdir -p $(shell dirname .dep/$*)
#@echo "regenerating dependencies for $*.m"
@echo "make[$(MAKELEVEL)]: Generating dependencies for \`$*.m'"
@$(SHELL) -ec '$(CC) -M $(CFLAGS) 2>/dev/null $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
.dep\/$(subst /,\/,$*).dm : /g'\'' > $@; \
......
......@@ -53,7 +53,7 @@ all:
clean:
# rm -f $(PLUGIN_ALL) $(BUILTIN_ALL)
rm -f *.o *.o.* *.lo *.lo.* *.obj *.moc *.moc.* *.bak
rm -rf .dep
rm -Rf .dep
FORCE:
......
......@@ -167,8 +167,8 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_LARGEFILE64_SOURCE
CFLAGS += -DLOCALEDIR=\"$(datadir)/locale\"
# Data and plugin location
CFLAGS += -DDATA_PATH=\"@prefix@/share/videolan\"
CFLAGS += -DPLUGIN_PATH=\"@prefix@/lib/videolan/vlc\"
CFLAGS += -DDATA_PATH=\"@prefix@/share/vlc\"
CFLAGS += -DPLUGIN_PATH=\"@prefix@/lib/vlc\"
###############################################################################
# Tuning and other variables - do not change anything except if you know
......@@ -183,13 +183,15 @@ CFLAGS += -Iinclude -Iextras
#
# C compiler flags: mainstream compilation
#
CFLAGS += -D_REENTRANT
CFLAGS += -D_REENTRANT -D_THREAD_SAFE
CFLAGS += -D_GNU_SOURCE
ifeq ($(RELEASE),1)
CFLAGS += -DHAVE_RELEASE
endif
CFLAGS += -D__VLC__
# Optimizations : don't compile debug versions with them
ifeq ($(OPTIMS),1)
CFLAGS += @CFLAGS_OPTIM@
......@@ -241,9 +243,8 @@ endif
#
# C compiler flags: plugins and builtins compilation
#
vlc_CFLAGS += -D__VLC__
plugins_CFLAGS += -D__VLC__ -D__PLUGIN__ -I../../include -I../../extras
builtins_CFLAGS += -D__VLC__ -D__BUILTIN__ -I../../include -I../../extras
plugins_CFLAGS += -D__PLUGIN__ -I../../include -I../../extras
builtins_CFLAGS += -D__BUILTIN__ -I../../include -I../../extras
#
# Linker flags: plugins and builtins linking
......
#! /bin/sh
## bootstrap.sh file for vlc, the VideoLAN Client
## $Id: bootstrap.sh,v 1.1 2002/06/01 12:31:57 sam Exp $
##
## Authors: Samuel Hocevar <sam@zoy.org>
##
## autoconf && autoheader
##
echo -n "running the auto* tools: "
autoconf || exit $?
echo -n "autoconf "
autoheader || exit $?
echo "autoheader."
##
## headers which need to be regenerated because of the VLC_EXPORT macro
##
file=src/misc/modules_plugin.h
echo -n "creating headers: "
rm -f $file
cp $file.in $file
echo '#define STORE_SYMBOLS( p_symbols ) \' >> $file
cat include/*.h | grep '^ *VLC_EXPORT.*;' | \
sed 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ (p_symbols)->\2_inner = \2; \\/' >> $file
echo '' >> $file
echo -n "$file "
file=include/vlc_symbols.h
rm -f $file && touch $file
echo '/* DO NOT EDIT THIS FILE ! It was generated by bootstrap.sh */' >> $file
echo '' >> $file
echo 'struct module_symbols_s' >> $file
echo '{' >> $file
cat include/*.h | grep '^ *VLC_EXPORT.*;' | \
sed 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/ \1 (* \2_inner) \3;/' >> $file
echo '};' >> $file
echo '' >> $file
echo '#ifdef __PLUGIN__' >> $file
cat include/*.h | grep '^ *VLC_EXPORT.*;' | \
sed 's/VLC_EXPORT( *\([^,]*\), *\([^,]*\), *\(.*\));.*/# define \2 p_symbols->\2_inner/' >> $file
echo '#endif /* __PLUGIN__ */' >> $file
echo '' >> $file
echo "$file."
##
## Glade sometimes sucks
##
echo -n "fixing glade bugs: "
for file in gnome_interface.c gtk_interface.c
do
if grep -q "DO NOT EDIT THIS FILE" plugins/gtk/$file
then
rm -f /tmp/$$.$file.bak
cat > /tmp/$$.$file.bak << EOF
/* This file was created automatically by glade and fixed by bootstrap.sh */
#include <vlc/vlc.h>
EOF
tail +8 plugins/gtk/$file \
| sed 's#DISABLED!!!_("/dev/dvd")#config_GetPsz( "dvd" )#' \
| sed 's#DISABLED!!!11954#config_GetInt( "frequency" )#' \
| sed 's#DISABLED!!!27500#config_GetInt( "symbol-rate" )#' \
| sed 's#_("-:--:--")#"-:--:--"#' \
| sed 's#_("---")#"---"#' \
| sed 's#_("--")#"--"#' \
| sed 's#_("/dev/dvd")#"/dev/dvd"#' \
| sed 's#_(\("./."\))#\1#' \
>> /tmp/$$.$file.bak
mv -f /tmp/$$.$file.bak plugins/gtk/$file
fi
echo -n "$file "
done
file=gtk_support.h
if grep -q "DO NOT EDIT THIS FILE" plugins/gtk/$file
then
rm -f /tmp/$$.$file.bak
sed 's/DO NOT EDIT THIS FILE.*/This file was created automatically by glade and fixed by bootstrap.sh/ ; s/#if.*ENABLE_NLS.*/#if defined( ENABLE_NLS ) \&\& defined ( HAVE_GETTEXT )/' < plugins/gtk/$file > /tmp/$$.$file.bak
mv -f /tmp/$$.$file.bak plugins/gtk/$file
fi
echo "$file."
##
## Update the potfiles because no one ever does it
##
echo -n "updating potfiles: "
cd po
make update-po 2>&1 | grep '^[^:]*:$' | cut -f1 -d: | tr '\n' ' ' | sed 's/ $//'
cd ..
echo "."
This diff is collapsed.
......@@ -3,16 +3,22 @@ AC_INIT(include/main.h)
AC_CONFIG_HEADER(include/defs.h)
AC_CANONICAL_SYSTEM
CONFIGURE_LINE="$0 $*"
PACKAGE="vlc"
VERSION="0.4.0"
CODENAME=Ourumov
dnl Save CFLAGS and LDFLAGS
save_CFLAGS="${CFLAGS}"
dnl
dnl Save *FLAGS
dnl
save_CPPFLAGS="${CPPFLAGS}"
save_CFLAGS="${CFLAGS}"
save_LDFLAGS="${LDFLAGS}"
dnl
dnl Check for tools
dnl
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PROG_CPP
......@@ -21,7 +27,9 @@ dnl Find the right ranlib, even when cross-compiling
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_CHECK_TOOL(STRIP, strip, :)
dnl
dnl Check for GNU make
dnl
AC_PATH_PROG(GMAKE, gmake, no)
if test "x$GMAKE" = "xno"; then
AC_CACHE_CHECK([whether GNU make is installed],
......@@ -48,6 +56,11 @@ AM_GNU_GETTEXT
dnl AM_PROG_LIBTOOL
AC_PROG_INSTALL
dnl
dnl Set default LDFLAGS
dnl
vlc_LDFLAGS="${LDFLAGS}"
dnl
dnl Check the operating system
dnl
......@@ -137,7 +150,7 @@ AC_CHECK_FUNC(inet_aton,,[
AC_CHECK_LIB(resolv,inet_aton,ipv4_LDFLAGS="${ipv4_LDFLAGS} -lresolv")
])
AC_CHECK_FUNC(textdomain,,[
AC_CHECK_LIB(intl,textdomain,save_LDFLAGS="${save_LDFLAGS} -lintl")
AC_CHECK_LIB(intl,textdomain,vlc_LDFLAGS="${vlc_LDFLAGS} -lintl")
])
dnl Check for getopt
......@@ -154,6 +167,7 @@ AC_CHECK_LIB(m,cos,
imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
filter_distort_LDFLAGS="${filter_distort_LDFLAGS} -lm")
AC_CHECK_LIB(m,pow,
ffmpeg_LDFLAGS="${ffmpeg_LDFLAGS} -lm"
imdct_LDFLAGS="${imdct_LDFLAGS} -lm"
imdct3dn_LDFLAGS="${imdct3dn_LDFLAGS} -lm"
imdctsse_LDFLAGS="${imdctsse_LDFLAGS} -lm"
......@@ -183,12 +197,15 @@ 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(pthread_once,pthread.h,[
AC_DEFINE(PTHREAD_ONCE_IN_PTHREAD_H, 1,
Define if <pthread.h> defines pthread_once.)])
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(getopt.h strings.h)
AC_CHECK_HEADERS(stdint.h getopt.h strings.h)
AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/types.h sys/time.h sys/times.h)
AC_CHECK_HEADERS(dlfcn.h image.h)
AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
......@@ -254,17 +271,17 @@ fi
dnl Check for -W or -w flags
AC_CACHE_CHECK([if \$CC accepts -Wall -Winline],
[ac_cv_c_Wall_Winline],
[CFLAGS="${save_CFLAGS} -Wall -Winline"
[CFLAGS="-Wall -Winline ${save_CFLAGS}"
AC_TRY_COMPILE([],,ac_cv_c_Wall_Winline=yes, ac_cv_c_Wall_Winline=no)])
if test x"$ac_cv_c_Wall_Winline" != x"no"; then
save_CFLAGS="${save_CFLAGS} -Wall -Winline"
save_CFLAGS="-Wall -Winline ${save_CFLAGS}"
else
AC_CACHE_CHECK([if \$CC accepts -wall -winline],
[ac_cv_c_wall_winline],
[CFLAGS="${save_CFLAGS} -wall -winline"
[CFLAGS="-wall -winline ${save_CFLAGS}"
AC_TRY_COMPILE([],,ac_cv_c_wall_winline=yes, ac_cv_c_wall_winline=no)])
if test x"$ac_cv_c_wall_winline" != x"no"; then
save_CFLAGS="${save_CFLAGS} -wall -winline"
save_CFLAGS="-wall -winline ${save_CFLAGS}"
fi
fi
......@@ -376,36 +393,6 @@ if test x"$ac_cv_c_attribute_aligned" != x"0"; then
[$ac_cv_c_attribute_aligned],[Maximum supported data alignment])
fi
dnl End of the bizarre compilation tests
CFLAGS="${save_CFLAGS}"
CPPFLAGS="${save_CPPFLAGS}"
LDFLAGS="${save_LDFLAGS}"
dnl Check for boolean_t
AC_CACHE_CHECK([for boolean_t in sys/types.h],
[ac_cv_c_boolean_t_sys_types_h],
[AC_TRY_COMPILE([#include <sys/types.h>], [boolean_t foo;],
ac_cv_c_boolean_t_sys_types_h=yes, ac_cv_c_boolean_t_sys_types_h=no)])
if test x"$ac_cv_c_boolean_t_sys_types_h" != x"no"; then
AC_DEFINE(BOOLEAN_T_IN_SYS_TYPES_H, 1, Define if <sys/types.h> defines boolean_t.)
fi
AC_CACHE_CHECK([for boolean_t in pthread.h],
[ac_cv_c_boolean_t_pthread_h],
[AC_TRY_COMPILE([#include <pthread.h>], [boolean_t foo;],
ac_cv_c_boolean_t_pthread_h=yes, ac_cv_c_boolean_t_pthread_h=no)])
if test x"$ac_cv_c_boolean_t_pthread_h" != x"no"; then
AC_DEFINE(BOOLEAN_T_IN_PTHREAD_H, 1, Define if <pthread.h> defines boolean_t.)
fi
AC_CACHE_CHECK([for boolean_t in cthreads.h],
[ac_cv_c_boolean_t_cthreads_h],
[AC_TRY_COMPILE([#include <cthreads.h>], [boolean_t foo;],
ac_cv_c_boolean_t_cthreads_h=yes, ac_cv_c_boolean_t_cthreads_h=no)])
if test x"$ac_cv_c_boolean_t_cthreads_h" != x"no"; then
AC_DEFINE(BOOLEAN_T_IN_CTHREADS_H, 1, Define if <cthreads.h> defines boolean_t.)
fi
dnl
dnl Check the CPU
dnl
......@@ -421,8 +408,8 @@ esac
dnl
dnl default modules
dnl
BUILTINS="${BUILTINS} idct idctclassic motion imdct downmix chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga mpeg_adec ac3_adec mpeg_vdec"
PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_ps mpeg_ts mpeg_audio file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort filter_clone fx_scope"
BUILTINS="${BUILTINS} idct idctclassic motion imdct downmix mpeg_adec ac3_adec mpeg_vdec"
PLUGINS="${PLUGINS} dummy null rc logger mpeg_es mpeg_audio mpeg_ps mpeg_ts file udp http ipv4 memcpy lpcm_adec ac3_spdif spudec filter_deinterlace filter_invert filter_wall filter_transform filter_distort filter_clone fx_scope chroma_i420_rgb chroma_i420_yuy2 chroma_i422_yuy2 chroma_i420_ymga"
dnl
dnl Accelerated modules
......@@ -435,7 +422,8 @@ ALTIVEC_MODULES="idctaltivec motionaltivec memcpyaltivec"
AC_CACHE_CHECK([if \$CC groks MMX inline assembly],
[ac_cv_mmx_inline],
[AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));],
[CFLAGS="${save_CFLAGS}"
AC_TRY_COMPILE(,[void *p;asm volatile("packuswb %%mm1,%%mm2"::"r"(p));],
ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)])
if test x"$ac_cv_mmx_inline" != x"no"; then
ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}"
......@@ -443,7 +431,8 @@ fi
AC_CACHE_CHECK([if \$CC groks MMX EXT inline assembly],
[ac_cv_mmxext_inline],
[AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));],
[CFLAGS="${save_CFLAGS}"
AC_TRY_COMPILE(,[void *p;asm volatile("maskmovq %%mm1,%%mm2"::"r"(p));],
ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)])
if test x"$ac_cv_mmxext_inline" != x"no"; then
ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}"
......@@ -451,7 +440,8 @@ fi
AC_CACHE_CHECK([if \$CC groks 3D Now! inline assembly],
[ac_cv_3dnow_inline],
[AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));],
[CFLAGS="${save_CFLAGS}"
AC_TRY_COMPILE(,[void *p;asm volatile("pfadd %%mm1,%%mm2"::"r"(p));],
ac_cv_3dnow_inline=yes, ac_cv_3dnow_inline=no)])
if test x"$ac_cv_3dnow_inline" != x"no"; then
AC_DEFINE(CAN_COMPILE_3DNOW, 1, Define if \$CC groks 3D Now! inline assembly.)
......@@ -460,29 +450,29 @@ fi
AC_CACHE_CHECK([if \$CC groks SSE inline assembly],
[ac_cv_sse_inline],
[AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));],
[CFLAGS="${save_CFLAGS}"
AC_TRY_COMPILE(,[void *p;asm volatile("xorps %%xmm1,%%xmm2"::"r"(p));],
ac_cv_sse_inline=yes, ac_cv_sse_inline=no)])
if test x"$ac_cv_sse_inline" != x"no" -a x$SYS != xmingw32; then
AC_DEFINE(CAN_COMPILE_SSE, 1, Define if \$CC groks SSE inline assembly.)
ACCEL_MODULES="${ACCEL_MODULES} ${SSE_MODULES}"
fi
# don't try to grok altivec with native mingw32 it doesn't work right now
# don't try to grok AltiVec with native mingw32 it doesn't work right now
# we should be able to remove this test with future versions of mingw32
if test x$SYS != xmingw32; then
AC_CACHE_CHECK([if \$CC groks Altivec inline assembly],
AC_CACHE_CHECK([if \$CC groks AltiVec inline assembly],
[ac_cv_altivec_inline],
[AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
[CFLAGS="${save_CFLAGS}"
AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
ac_cv_altivec_inline=yes,
[save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Wa,-m7400"
[CFLAGS="$save_CFLAGS -Wa,-m7400"
AC_TRY_COMPILE(,[asm volatile("vperm 0,1,2,3");],
[ac_cv_altivec_inline="-Wa,-m7400"],
ac_cv_altivec_inline=no)
CFLAGS=$save_CFLAGS
])])
if test x"$ac_cv_altivec_inline" != x"no"; then
AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks ALTIVEC inline assembly.)
AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks AltiVec inline assembly.)
if test x"$ac_cv_altivec_inline" != x"yes"; then
idctaltivec_CFLAGS="$idctaltivec_CFLAGS $ac_cv_altivec_inline"
motionaltivec_CFLAGS="$motionaltivec_CFLAGS $ac_cv_altivec_inline"
......@@ -492,10 +482,9 @@ if test x"$ac_cv_altivec_inline" != x"no"; then
ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
fi
AC_CACHE_CHECK([if \$CC groks Altivec C extensions],
AC_CACHE_CHECK([if \$CC groks AltiVec C extensions],
[ac_cv_c_altivec],
[save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -faltivec"
[CFLAGS="$save_CFLAGS -faltivec"
# Darwin test
AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
ac_cv_c_altivec=-faltivec, [
......@@ -504,10 +493,9 @@ AC_CACHE_CHECK([if \$CC groks Altivec C extensions],
AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
[ac_cv_c_altivec="-fvec"], ac_cv_c_altivec=no)