Commit 52cbe65f authored by Sam Hocevar's avatar Sam Hocevar

. encore un peu plus loin dans le passage � autoconf

 . giclage de l'ancien d�codeur dans le Makefile

n'oubliez pas de relancer ./configure avec les bonnes options !
typiquement elles sont du genre :

   ./configure --enable-fb --enable-mmx --enable-ppro
parent 17a8fa12
...@@ -9,75 +9,24 @@ ...@@ -9,75 +9,24 @@
# Configuration # Configuration
################################################################################ ################################################################################
# Audio output settings
AOUT += dsp
#AOUT += esd
# Not yet supported
#AOUT += alsa
# Fallback method that should always work
AOUT += dummy
# Video output settings
VOUT += x11
#VOUT += fb
#VOUT += ggi
#VOUT += glide
#VOUT += gnome
# Not yet supported
#VOUT += mga
#VOUT += beos
#VOUT += dga
# Fallback method that should always work
VOUT += dummy
# Interface settings
INTF += x11
#INTF += fb
#INTF += ggi
#INTF += glide
#INTF += gnome
# Not yet supported
#INTF += mga
#INTF += beos
#INTF += dga
# Fallback method that should always work
INTF += dummy
# Target architecture
ARCH=X86
#ARCH=PPC
#ARCH=SPARC
# Target operating system
SYS=LINUX
#SYS=GNU
#SYS=BSD
#SYS=BEOS
# For x86 architecture, choose MMX support
ARCH += MMX
# For x86 architecture, optimize for Pentium Pro
# (choose NO if you get `Invalid instruction' errors)
ARCH += PPRO
# Decoder choice - ?? old decoder will be removed soon
#DECODER=old
DECODER=new
# Debugging mode on or off (set to 1 to activate) # Debugging mode on or off (set to 1 to activate)
DEBUG=0 DEBUG=0
#----------------- do not change anything below this line ---------------------- SYS=@SYS@
ARCH=@ARCH@
prefix=@prefix@ AOUT=@AOUT@
VOUT=@VOUT@
INTF=@VOUT@
SNAPSHOTDIR=vlc-@VLC_VERSION@
INSTALL=@INSTALL@ INSTALL=@INSTALL@
prefix=@prefix@
#----------------- do not change anything below this line ----------------------
################################################################################ ################################################################################
# Configuration pre-processing # Configuration pre-processing
################################################################################ ################################################################################
SNAPSHOTDIR=vlc-@VLC_VERSION@
# PROGRAM_OPTIONS is an identification string of the compilation options # PROGRAM_OPTIONS is an identification string of the compilation options
PROGRAM_OPTIONS = $(SYS) $(ARCH) PROGRAM_OPTIONS = $(SYS) $(ARCH)
ifeq ($(DEBUG),1) ifeq ($(DEBUG),1)
...@@ -92,9 +41,8 @@ PROGRAM_BUILD = `date` $(USER) ...@@ -92,9 +41,8 @@ PROGRAM_BUILD = `date` $(USER)
#PROGRAM_BUILD = `date` $(USER)@`hostname` #PROGRAM_BUILD = `date` $(USER)@`hostname`
# DEFINE will contain some of the constants definitions decided in Makefile, # DEFINE will contain some of the constants definitions decided in Makefile,
# including ARCH_xx and SYS_xx. It will be passed to C compiler. # including SYS_xx. It will be passed to C compiler.
DEFINE += -DARCH_$(shell echo $(ARCH) | cut -f1 -d' ') DEFINE += -DSYS_`echo $(SYS) | sed 's/-.*//' | tr a-z A-Z`
DEFINE += -DSYS_$(SYS)
DEFINE += -DPLUGIN_PATH="\"$(prefix)/lib/videolan/vlc\"" DEFINE += -DPLUGIN_PATH="\"$(prefix)/lib/videolan/vlc\""
DEFINE += -DDATA_PATH="\"$(prefix)/share/videolan/vlc\"" DEFINE += -DDATA_PATH="\"$(prefix)/share/videolan/vlc\""
#DEFINE += -DPROGRAM_OPTIONS="\"$(shell echo $(PROGRAM_OPTIONS) | tr 'A-Z' 'a-z')\"" #DEFINE += -DPROGRAM_OPTIONS="\"$(shell echo $(PROGRAM_OPTIONS) | tr 'A-Z' 'a-z')\""
...@@ -117,20 +65,20 @@ INCLUDE += -Iinclude -I/usr/local/include -I/usr/X11R6/include ...@@ -117,20 +65,20 @@ INCLUDE += -Iinclude -I/usr/local/include -I/usr/X11R6/include
# Libraries # Libraries
# #
ifeq ($(SYS),GNU) ifeq ($(SYS),gnu)
LIB += -lthreads -ldl LIB += -lthreads -ldl
endif endif
ifeq ($(SYS),BSD) ifneq (,$(findstring bsd,$(SYS)))
LIB += -pthread -lgnugetopt LIB += -pthread -lgnugetopt
LIB += -L/usr/local/lib LIB += -L/usr/local/lib
endif endif
ifeq ($(SYS),LINUX) ifneq (,$(findstring linux,$(SYS)))
LIB += -lpthread -ldl LIB += -lpthread -ldl
endif endif
ifeq ($(SYS),BEOS) ifeq ($(SYS),beos)
LIB += -lbe -lroot -lgame LIB += -lbe -lroot -lgame
else else
LIB += -lm LIB += -lm
...@@ -153,28 +101,28 @@ CCFLAGS += -ffast-math -funroll-loops -fargument-noalias-global ...@@ -153,28 +101,28 @@ CCFLAGS += -ffast-math -funroll-loops -fargument-noalias-global
CCFLAGS += -fomit-frame-pointer CCFLAGS += -fomit-frame-pointer
# Optimizations for x86 familiy # Optimizations for x86 familiy
ifneq (,$(findstring X86,$(ARCH))) ifneq (,$(findstring 86,$(ARCH)))
CCFLAGS += -malign-double CCFLAGS += -malign-double
#CCFLAGS += -march=pentium #CCFLAGS += -march=pentium
# Eventual Pentium Pro optimizations # Eventual Pentium Pro optimizations
ifneq (,$(findstring PPRO,$(ARCH))) ifneq (,$(findstring pentiumpro,$(ARCH)))
ifneq ($(SYS), BSD) ifneq ($(SYS), BSD)
CCFLAGS += -march=pentiumpro CCFLAGS += -march=pentiumpro
endif endif
endif endif
# Eventual MMX optimizations for x86 # Eventual MMX optimizations for x86
ifneq (,$(findstring MMX,$(ARCH))) ifneq (,$(findstring mmx,$(ARCH)))
CFLAGS += -DHAVE_MMX CFLAGS += -DHAVE_MMX
endif endif
endif endif
# Optimizations for PowerPC # Optimizations for PowerPC
ifneq (,$(findstring PPC,$(ARCH))) ifneq (,$(findstring ppc,$(ARCH)))
CCFLAGS += -mcpu=604e -mmultiple -mhard-float -mstring CCFLAGS += -mcpu=604e -mmultiple -mhard-float -mstring
endif endif
# Optimizations for Sparc # Optimizations for Sparc
ifneq (,$(findstring SPARC,$(ARCH))) ifneq (,$(findstring sparc,$(ARCH)))
CCFLAGS += -mhard-float CCFLAGS += -mhard-float
endif endif
...@@ -253,20 +201,6 @@ spu_decoder_obj = spu_decoder/spu_decoder.o ...@@ -253,20 +201,6 @@ spu_decoder_obj = spu_decoder/spu_decoder.o
#??generic_decoder_obj = generic_decoder/generic_decoder.o #??generic_decoder_obj = generic_decoder/generic_decoder.o
# remeber to add it to OBJ # remeber to add it to OBJ
ifeq ($(DECODER),old)
CFLAGS += -DOLD_DECODER
video_decoder_obj = video_decoder_ref/video_decoder.o \
video_decoder_ref/display.o \
video_decoder_ref/getblk.o \
video_decoder_ref/gethdr.o \
video_decoder_ref/getpic.o \
video_decoder_ref/getvlc.o \
video_decoder_ref/idct.o \
video_decoder_ref/motion.o \
video_decoder_ref/mpeg2dec.o \
video_decoder_ref/recon.o \
video_decoder_ref/spatscal.o
else
video_parser_obj = video_parser/video_parser.o \ video_parser_obj = video_parser/video_parser.o \
video_parser/vpar_headers.o \ video_parser/vpar_headers.o \
video_parser/vpar_blocks.o \ video_parser/vpar_blocks.o \
...@@ -277,7 +211,6 @@ video_decoder_obj = video_decoder/video_decoder.o \ ...@@ -277,7 +211,6 @@ video_decoder_obj = video_decoder/video_decoder.o \
video_decoder/vdec_motion.o \ video_decoder/vdec_motion.o \
video_decoder/vdec_motion_inner.o \ video_decoder/vdec_motion_inner.o \
video_decoder/vdec_idct.o video_decoder/vdec_idct.o
endif
misc_obj = misc/mtime.o \ misc_obj = misc/mtime.o \
misc/rsc_files.o \ misc/rsc_files.o \
...@@ -300,22 +233,17 @@ C_OBJ = $(interface_obj) \ ...@@ -300,22 +233,17 @@ C_OBJ = $(interface_obj) \
$(vlan_obj) \ $(vlan_obj) \
$(misc_obj) $(misc_obj)
ifeq ($(SYS), BEOS) ifeq ($(SYS),beos)
CPP_OBJ = misc/beos_specific.o CPP_OBJ = misc/beos_specific.o
endif endif
# #
# Assembler Objects # Assembler Objects
# #
ifneq (,$(findstring X86,$(ARCH))) ifneq (,$(findstring 86,$(ARCH)))
ifneq (,$(findstring MMX,$(ARCH))) ifneq (,$(findstring mmx,$(ARCH)))
ifeq ($(DECODER),new)
ASM_OBJ = video_decoder/vdec_idctmmx.o \ ASM_OBJ = video_decoder/vdec_idctmmx.o \
video_output/video_yuv_mmx.o video_output/video_yuv_mmx.o
else
ASM_OBJ = video_decoder_ref/vdec_idctmmx.o \
video_output/video_yuv_mmx.o
endif
endif endif
endif endif
...@@ -393,7 +321,7 @@ FORCE: ...@@ -393,7 +321,7 @@ FORCE:
# Real targets # Real targets
# #
vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
ifeq ($(SYS), BEOS) ifeq ($(SYS),beos)
$(CC) $(CCFLAGS) $(LCFLAGS) $(CFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(CC) $(CCFLAGS) $(LCFLAGS) $(CFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
# ln -s ../vlc ./plugins/_APP_ # ln -s ../vlc ./plugins/_APP_
else else
...@@ -429,7 +357,7 @@ $(ASM_OBJ): %.o: %.S ...@@ -429,7 +357,7 @@ $(ASM_OBJ): %.o: %.S
# audio plugins # audio plugins
plugins/aout/aout_dummy.so plugins/aout/aout_dsp.so: %.so: %.c plugins/aout/aout_dummy.so plugins/aout/aout_dsp.so: %.so: %.c
@echo "compiling $*.so from $*.c" @echo "compiling $*.so from $*.c"
ifeq ($(SYS), BEOS) ifeq ($(SYS),beos)
@$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_ @$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
else else
@$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $< @$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
...@@ -437,7 +365,7 @@ endif ...@@ -437,7 +365,7 @@ endif
plugins/aout/aout_esd.so: %.so: %.c plugins/aout/aout_esd.so: %.so: %.c
@echo "compiling $*.so from $*.c" @echo "compiling $*.so from $*.c"
ifeq ($(SYS), BSD) ifneq (,$(findstring bsd,$(SYS)))
@$(CC) $(CCFLAGS) $(CFLAGS) -lesd -shared -o $@ $< @$(CC) $(CCFLAGS) $(CFLAGS) -lesd -shared -o $@ $<
else else
@$(CC) $(CCFLAGS) $(CFLAGS) -laudiofile -lesd -shared -o $@ $< @$(CC) $(CCFLAGS) $(CFLAGS) -laudiofile -lesd -shared -o $@ $<
...@@ -447,7 +375,7 @@ endif ...@@ -447,7 +375,7 @@ endif
plugins/intf/intf_dummy.so plugins/vout/vout_dummy.so \ plugins/intf/intf_dummy.so plugins/vout/vout_dummy.so \
plugins/intf/intf_fb.so plugins/vout/vout_fb.so: %.so: %.c plugins/intf/intf_fb.so plugins/vout/vout_fb.so: %.so: %.c
@echo "compiling $*.so from $*.c" @echo "compiling $*.so from $*.c"
ifeq ($(SYS), BEOS) ifeq ($(SYS),beos)
@$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_ @$(CC) $(CCFLAGS) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $< plugins/_APP_
else else
@$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $< @$(CC) $(CCFLAGS) $(CFLAGS) -shared -o $@ $<
......
This diff is collapsed.
dnl Autoconf settings for vlc dnl Autoconf settings for vlc
AC_INIT(src/interface/main.c) AC_INIT(src/interface/main.c)
AC_CONFIG_HEADER(include/defs.h) AC_CONFIG_HEADER(include/defs.h)
AC_CANONICAL_HOST AC_CANONICAL_HOST
VLC_VERSION=0.1.99 VLC_VERSION=0.1.99
...@@ -57,5 +58,64 @@ AC_C_CONST ...@@ -57,5 +58,64 @@ AC_C_CONST
AC_TYPE_SIZE_T AC_TYPE_SIZE_T
AC_HEADER_TIME AC_HEADER_TIME
AC_ARG_ENABLE(dummy,
[ --enable-vout-dummy dummy video support (default enabled)])
if test x$enable_dummy != xno; then VOUT=${VOUT}"dummy "; fi
AC_ARG_ENABLE(x11,
[ --enable-vout-x11 X11 video support (default enabled)])
if test x$enable_x11 != xno; then VOUT=${VOUT}"x11 "; fi
AC_ARG_ENABLE(fb,
[ --enable-vout-fb Linux framebuffer video support (default disabled)],
[if test x$enable_fb = xyes; then VOUT=${VOUT}"fb "; fi])
AC_ARG_ENABLE(gnome,
[ --enable-vout-gnome Gnome video support (default disabled)],
[if test x$enable_gnome = xyes; then VOUT=${VOUT}"gnome "; fi])
AC_ARG_ENABLE(glide,
[ --enable-vout-glide Glide (3dfx) video support (default disabled)],
[if test x$enable_glide = xyes; then VOUT=${VOUT}"glide "; fi])
AC_ARG_ENABLE(ggi,
[ --enable-vout-ggi GGI video support (default disabled)],
[if test x$enable_ggi = xyes; then VOUT=${VOUT}"ggi "; fi])
AC_ARG_ENABLE(dummy,
[ --enable-aout-dummy dummy audio support (default enabled)])
if test x$enable_dummy != xno; then AOUT=${AOUT}"dummy "; fi
AC_ARG_ENABLE(dsp,
[ --enable-aout-dsp Linux /dev/dsp support (default enabled)])
if test x$enable_dsp != xno; then AOUT=${AOUT}"dsp "; fi
AC_ARG_ENABLE(esd,
[ --enable-aout-esd Esound library support (default disabled)],
[if test x$enable_gnome = xyes; then AOUT=${AOUT}"esd "; fi])
ARCH=${host_cpu}
AC_ARG_ENABLE(ppro,
[ --enable-ppro Enable PentiumPro optimizations (default is no)],
[ if test x$enableval = xyes; then ARCH=${ARCH}" pentiumpro"; fi ])
AC_ARG_ENABLE(mmx,
[ --enable-mmx Enable MMX optimizations (default is no)],
[ if test x$enableval = xyes; then ARCH=${ARCH}" mmx"; fi ])
SYS=${host_os}
# special cases
if test x$host_os = xbeos; then
VOUT=beos
AOUT=beos
fi
AC_SUBST(SYS)
AC_SUBST(ARCH)
AC_SUBST(VOUT)
AC_SUBST(AOUT)
AC_OUTPUT([Makefile include/config.h]) AC_OUTPUT([Makefile include/config.h])
echo "
vlc configuration
-----------------
vlc version : ${VLC_VERSION}
system : ${SYS}
architecture : ${ARCH}
vout : ${VOUT}
aout : ${AOUT}
"
vlc_0.1.99-1_i386.deb unknown optional vlc_0.1.99-1_i386.deb graphics optional
shlibs:Depends=gdk-imlib1 (>= 1.9.8-3), libart2 (>= 1.0.56-1), libaudiofile0, libc6 (>= 2.1.2), libdb2 (>= 1:2.4.14-7), libesd0 (>= 0.2.16) | libesd-alsa0 (>= 0.2.16), libglib1.2 (>= 1.2.0), libgnome32 (>= 1.0.56-1), libgnomesupport0 (>= 1.0.56-1), libgnomeui32 (>= 1.0.56-1), libgtk1.2 (>= 1.2.7-1), libz1, xlib6g (>= 3.3.6) shlibs:Depends=libc6 (>= 2.1.2), xlib6g (>= 3.3.6)
...@@ -102,14 +102,12 @@ typedef struct video_parser_s * p_video_parser_t; ...@@ -102,14 +102,12 @@ typedef struct video_parser_s * p_video_parser_t;
#define PAD(n, d) ( ((n) % (d)) ? ((((n) / (d)) + 1) * (d)) : (n) ) #define PAD(n, d) ( ((n) % (d)) ? ((((n) / (d)) + 1) * (d)) : (n) )
/* MAX and MIN: self explanatory */ /* MAX and MIN: self explanatory */
//#ifndef SYS_BEOS
#ifndef MAX #ifndef MAX
#define MAX(a, b) ( ((a) > (b)) ? (a) : (b) ) #define MAX(a, b) ( ((a) > (b)) ? (a) : (b) )
#endif #endif
#ifndef MIN #ifndef MIN
#define MIN(a, b) ( ((a) < (b)) ? (a) : (b) ) #define MIN(a, b) ( ((a) < (b)) ? (a) : (b) )
#endif #endif
//#endif
/* MSB (big endian)/LSB (little endian) convertions - network order is always /* MSB (big endian)/LSB (little endian) convertions - network order is always
* MSB, and should be used for both network communications and files. Note that * MSB, and should be used for both network communications and files. Note that
......
...@@ -310,7 +310,7 @@ static void DecodePgrmAssocSection(u8* p_pas, input_thread_t *p_input ) ...@@ -310,7 +310,7 @@ static void DecodePgrmAssocSection(u8* p_pas, input_thread_t *p_input )
if( p_descr->i_PAT_version== PSI_UNINITIALISED ) if( p_descr->i_PAT_version== PSI_UNINITIALISED )
intf_DbgMsg("Building Program Association table\n"); intf_DbgMsg("Building Program Association table\n");
else else
intf_ErrMsg( "Stream Id has suddently changed ! Rebuilding PAT\n" ); intf_ErrMsg( "Stream Id has suddenly changed ! Rebuilding PAT\n" );
/* Whatever it is, ask the PSI decoder to rebuild the table */ /* Whatever it is, ask the PSI decoder to rebuild the table */
b_is_invalid = 1; b_is_invalid = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment