Generation d'un makefile presque correct pour les vieilles versions de make

Nettoyage: gestion des dependances pour les plugins, suppressions de pas
mal de redondances, options de compilations coherentes, etc...
This commit is contained in:
Benoit Steiner 2000-12-10 08:08:35 +00:00
parent 93d8bc1416
commit 53c2e3acf7
7 changed files with 301 additions and 212 deletions

View File

@ -20,6 +20,9 @@ SNAPSHOTDIR=vlc-@VLC_VERSION@
INSTALL=@INSTALL@
ARCH=@ARCH@
prefix=@prefix@
CC=@CC@
SHELL=@SHELL@
#----------------- do not change anything below this line ----------------------
@ -62,7 +65,6 @@ INCLUDE += -Iinclude -I/usr/local/include -I/usr/X11R6/include
#
# Libraries
#
ifeq ($(SYS),gnu)
LIB += -lthreads -ldl
endif
@ -76,6 +78,10 @@ ifneq (,$(findstring linux,$(SYS)))
LIB += -lpthread -ldl
endif
ifneq (,$(findstring solaris,$(SYS)))
LIB += -ldl -lsocket -lnsl -lposix4 -lpthread
endif
ifeq ($(SYS),beos)
LIB += -lbe -lroot -lgame
else
@ -83,7 +89,7 @@ LIB += -lm
endif
#
# C compiler flags: compilation
# C compiler flags: mainstream compilation
#
CFLAGS += $(DEFINE) $(INCLUDE)
CFLAGS += -Wall -Winline
@ -130,7 +136,7 @@ ifneq (,$(findstring sparc,$(ARCH)))
CFLAGS += -mhard-float
endif
# /debug
#end of optimisations
endif
# Optional MMX optimizations for x86
@ -138,7 +144,12 @@ ifneq (,$(findstring mmx,$(ARCH)))
CFLAGS += -DHAVE_MMX
endif
# End of optimizations
#
# C compiler flags: plugin compilation
#
ifneq (,$(findstring solaris,$(SYS)))
PCFLAGS += -fPIC
endif
#
# C compiler flags: dependancies
@ -154,13 +165,13 @@ LCFLAGS += -Wall
#LCFLAGS += -s
#
# Additionnal debugging flags
# Debugging and profiling support (unless optimisations are active)
#
# Debugging and profiling support
ifneq ($(OPTIMS),0)
ifeq ($(DEBUG),1)
ifneq ($(OPTIMS),1)
CFLAGS += -g
endif
endif
#################################################################################
# Objects and files
@ -169,88 +180,91 @@ endif
#
# C Objects
#
interface_obj = interface/main.o \
interface/interface.o \
interface/intf_msg.o \
interface/intf_cmd.o \
interface/intf_ctrl.o \
interface/intf_console.o
INTERFACE = src/interface/main.o \
src/interface/interface.o \
src/interface/intf_msg.o \
src/interface/intf_cmd.o \
src/interface/intf_ctrl.o \
src/interface/intf_console.o
input_obj = input/input_ps.o \
input/mpeg_system.o \
input/input_ext-dec.o \
input/input.o
INPUT = src/input/input_ps.o \
src/input/mpeg_system.o \
src/input/input_ext-dec.o \
src/input/input.o
audio_output_obj = audio_output/audio_output.o
AUDIO_OUTPUT = src/audio_output/audio_output.o
video_output_obj = video_output/video_output.o \
video_output/video_text.o \
video_output/video_spu.o \
video_output/video_yuv.o
VIDEO_OUTPUT = src/video_output/video_output.o \
src/video_output/video_text.o \
src/video_output/video_spu.o \
src/video_output/video_yuv.o
ac3_decoder_obj = ac3_decoder/ac3_decoder_thread.o \
ac3_decoder/ac3_decoder.o \
ac3_decoder/ac3_parse.o \
ac3_decoder/ac3_exponent.o \
ac3_decoder/ac3_bit_allocate.o \
ac3_decoder/ac3_mantissa.o \
ac3_decoder/ac3_rematrix.o \
ac3_decoder/ac3_imdct.o \
ac3_decoder/ac3_downmix.o
lpcm_decoder_obj = lpcm_decoder/lpcm_decoder_thread.o \
lpcm_decoder/lpcm_decoder.o
AC3_DECODER = src/ac3_decoder/ac3_decoder_thread.o \
src/ac3_decoder/ac3_decoder.o \
src/ac3_decoder/ac3_parse.o \
src/ac3_decoder/ac3_exponent.o \
src/ac3_decoder/ac3_bit_allocate.o \
src/ac3_decoder/ac3_mantissa.o \
src/ac3_decoder/ac3_rematrix.o \
src/ac3_decoder/ac3_imdct.o \
src/ac3_decoder/ac3_downmix.o
audio_decoder_obj = audio_decoder/audio_decoder_thread.o \
audio_decoder/audio_decoder.o \
audio_decoder/audio_math.o
LPCM_DECODER = src/lpcm_decoder/lpcm_decoder_thread.o \
src/lpcm_decoder/lpcm_decoder.o
spu_decoder_obj = spu_decoder/spu_decoder.o
AUDIO_DECODER = src/audio_decoder/audio_decoder_thread.o \
src/audio_decoder/audio_decoder.o \
src/audio_decoder/audio_math.o
#??generic_decoder_obj = generic_decoder/generic_decoder.o
# remeber to add it to OBJ
SPU_DECODER = src/spu_decoder/spu_decoder.o
video_parser_obj = video_parser/video_parser.o \
video_parser/vpar_headers.o \
video_parser/vpar_blocks.o \
video_parser/vpar_synchro.o \
video_parser/video_fifo.o
#GEN_DECODER = src/generic_decoder/generic_decoder.o
VIDEO_PARSER = src/video_parser/video_parser.o \
src/video_parser/vpar_headers.o \
src/video_parser/vpar_blocks.o \
src/video_parser/vpar_synchro.o \
src/video_parser/video_fifo.o
ifneq (,$(findstring mmx,$(ARCH)))
vdec_motion_inner = video_decoder/vdec_motion_inner_mmx.o
vdec_motion_inner = src/video_decoder/vdec_motion_inner_mmx.o
else
vdec_motion_inner = video_decoder/vdec_motion_inner.o
vdec_motion_inner = src/video_decoder/vdec_motion_inner.o
endif
video_decoder_obj = video_decoder/video_decoder.o \
video_decoder/vdec_motion.o \
video_decoder/vdec_idct.o \
$(vdec_motion_inner)
VIDEO_DECODER = src/video_decoder/video_decoder.o \
src/video_decoder/vdec_motion.o \
src/video_decoder/vdec_idct.o \
$(vdec_motion_inner)
misc_obj = misc/mtime.o \
misc/tests.o \
misc/rsc_files.o \
misc/netutils.o \
misc/playlist.o \
misc/plugins.o
MISC = src/misc/mtime.o \
src/misc/tests.o \
src/misc/rsc_files.o \
src/misc/netutils.o \
src/misc/playlist.o \
src/misc/plugins.o
C_OBJ = $(interface_obj) \
$(input_obj) \
$(audio_output_obj) \
$(video_output_obj) \
$(ac3_decoder_obj) \
$(lpcm_decoder_obj) \
$(audio_decoder_obj) \
$(spu_decoder_obj) \
$(generic_decoder_obj) \
$(video_parser_obj) \
$(video_decoder_obj) \
$(vlan_obj) \
$(misc_obj)
C_OBJ = $(INTERFACE) \
$(INPUT) \
$(VIDEO_OUTPUT) \
$(AUDIO_OUTPUT) \
$(AC3_DECODER) \
$(LPCM_DECODER) \
$(AUDIO_DECODER) \
$(SPU_DEOCDER) \
$(GEN_DECODER) \
$(VIDEO_PARSER) \
$(VIDEO_DECODER) \
$(MISC)
#
# CPP Objects
#
ifeq ($(SYS),beos)
CPP_OBJ = misc/beos_specific.o
CPP_OBJ = src/misc/beos_specific.o
endif
#
@ -258,67 +272,64 @@ endif
#
ifneq (,$(findstring 86,$(ARCH)))
ifneq (,$(findstring mmx,$(ARCH)))
ASM_OBJ = video_decoder/vdec_idctmmx.o \
video_output/video_yuv_mmx.o
ASM_OBJ = src/video_decoder/vdec_idctmmx.o \
src/video_output/video_yuv_mmx.o
endif
endif
#
# Plugins
#
PLUGINS := $(PLUGINS:%=lib/%.so)
PLUGIN_BEOS = plugins/beos/beos.o \
PLUGIN_BEOS = plugins/beos/beos.o \
plugins/beos/aout_beos.o \
plugins/beos/intf_beos.o \
plugins/beos/vout_beos.o
PLUGIN_DSP = plugins/dsp/dsp.o \
PLUGIN_DSP = plugins/dsp/dsp.o \
plugins/dsp/aout_dsp.o \
PLUGIN_DUMMY = plugins/dummy/dummy.o \
PLUGIN_DUMMY = plugins/dummy/dummy.o \
plugins/dummy/aout_dummy.o \
plugins/dummy/intf_dummy.o \
plugins/dummy/vout_dummy.o
PLUGIN_ESD = plugins/esd/esd.o \
PLUGIN_ESD = plugins/esd/esd.o \
plugins/esd/aout_esd.o
PLUGIN_FB = plugins/fb/fb.o \
PLUGIN_FB = plugins/fb/fb.o \
plugins/fb/intf_fb.o \
plugins/fb/vout_fb.o
PLUGIN_GGI = plugins/ggi/ggi.o \
PLUGIN_GGI = plugins/ggi/ggi.o \
plugins/ggi/intf_ggi.o \
plugins/ggi/vout_ggi.o
PLUGIN_SDL = plugins/sdl/sdl.o \
PLUGIN_SDL = plugins/sdl/sdl.o \
plugins/sdl/intf_sdl.o \
plugins/sdl/vout_sdl.o
# plugins/sdl/video_yuv.o \
# plugins/sdl/video_yuvall.o
PLUGIN_GLIDE = plugins/glide/glide.o \
PLUGIN_GLIDE = plugins/glide/glide.o \
plugins/glide/intf_glide.o \
plugins/glide/vout_glide.o
PLUGIN_GNOME = plugins/gnome/gnome.o \
PLUGIN_GNOME = plugins/gnome/gnome.o \
plugins/gnome/intf_gnome.o \
plugins/gnome/intf_gnome_callbacks.o \
plugins/gnome/intf_gnome_interface.o \
plugins/gnome/intf_gnome_support.o \
plugins/gnome/vout_gnome.o
PLUGIN_MGA = plugins/mga/mga.o \
PLUGIN_MGA = plugins/mga/mga.o \
plugins/mga/intf_mga.o \
plugins/mga/vout_mga.o
PLUGIN_X11 = plugins/x11/x11.o \
PLUGIN_X11= plugins/x11/x11.o \
plugins/x11/intf_x11.o \
plugins/x11/vout_x11.o
PLUGIN_YUV = plugins/yuv/yuv.o \
PLUGIN_YUV = plugins/yuv/yuv.o \
plugins/yuv/video_yuv.o \
plugins/yuv/video_yuv8.o \
plugins/yuv/video_yuv15.o \
@ -326,7 +337,6 @@ PLUGIN_YUV = plugins/yuv/yuv.o \
plugins/yuv/video_yuv24.o \
plugins/yuv/video_yuv32.o
PLUGIN_YUVMMX = plugins/yuvmmx/yuvmmx.o \
plugins/yuvmmx/video_yuv.o \
plugins/yuvmmx/video_yuv8.o \
@ -335,21 +345,27 @@ PLUGIN_YUVMMX = plugins/yuvmmx/yuvmmx.o \
plugins/yuvmmx/video_yuv24.o \
plugins/yuvmmx/video_yuv32.o
PLUGIN_ALSA = plugins/alsa/alsa.o \
plugins/alsa/aout_alsa.o
PLUGIN_ALSA = plugins/alsa/alsa.o \
plugins/alsa/aout_alsa.o
STD_PLUGIN_OBJ =$(PLUGIN_BEOS) \
$(PLUGIN_DSP) \
$(PLUGIN_DUMMY) \
$(PLUGIN_ESD) \
$(PLUGIN_FB) \
$(PLUGIN_GGI) \
$(PLUGIN_MGA) \
$(PLUGIN_X11) \
$(PLUGIN_YUV) \
$(PLUGIN_YUVMMX) \
$(PLUGIN_SDL) \
$(PLUGIN_ALSA)
PLUGIN_OBJ = $(PLUGIN_BEOS) $(PLUGIN_DSP) $(PLUGIN_DUMMY) $(PLUGIN_ESD) \
$(PLUGIN_FB) $(PLUGIN_GGI) $(PLUGIN_GLIDE) $(PLUGIN_GNOME) \
$(PLUGIN_MGA) $(PLUGIN_X11) $(PLUGIN_YUV) $(PLUGIN_YUVMMX) \
$(PLUGIN_SDL) $(PLUGIN_ALSA)
#
# Other lists of files
#
C_OBJ := $(C_OBJ:%.o=src/%.o)
CPP_OBJ := $(CPP_OBJ:%.o=src/%.o)
ASM_OBJ := $(ASM_OBJ:%.o=src/%.o)
sources_c := $(C_OBJ:%.o=%.c)
dependancies := $(sources_c:%.c=.dep/%.d)
objects := $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ) $(STD_PLUGIN_OBJ)
dependancies := $(objects:%.o=.dep/%.d)
# All symbols must be exported
export
@ -379,7 +395,7 @@ distclean: clean
install:
mkdir -p $(prefix)/bin
$(INSTALL) vlc $(prefix)/bin
# ugly
# ugly
for alias in "" @ALIASES@ ; do if test $$alias ; then ln -s vlc $(prefix)/bin/$$alias ; fi ; done
mkdir -p $(prefix)/lib/videolan/vlc
$(INSTALL) -m 644 $(PLUGINS) $(prefix)/lib/videolan/vlc
@ -411,19 +427,9 @@ snapshot:
mv /tmp/${SNAPSHOTDIR}.tar.bz2 ..
@echo "Sources are in ../${SNAPSHOTDIR}.tar.[gz,bz2]"
FORCE:
plugins: $(PLUGINS:%=lib/%.so)
#
# Real targets
#
vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
ifeq ($(SYS),beos)
$(CC) $(CFLAGS) $(LCFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
rm -f ./plugins/_APP_
ln -s ../vlc ./plugins/_APP_
else
$(CC) $(CFLAGS) $(LCFLAGS) --export-dynamic -rdynamic -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
endif
FORCE:
#
# Gnome and Framebuffer aliases - don't add new aliases which could bloat
@ -432,7 +438,6 @@ endif
gvlc fbvlc: vlc
rm -f $@ && ln -s vlc $@
plugins: $(PLUGINS)
#
# Generic rules (see below)
@ -452,90 +457,84 @@ $(ASM_OBJ): %.o: Makefile.dep
$(ASM_OBJ): %.o: %.S
$(CC) $(CFLAGS) -c -o $@ $<
#$(PLUGIN_OBJ): %.so: Makefile.dep
#$(PLUGIN_OBJ): %.so: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: Makefile.dep
$(STD_PLUGIN_OBJ): %.o: .dep/%.d
$(STD_PLUGIN_OBJ): %.o: %.c
$(CC) $(CFLAGS) $(PCFLAGS) -c -o $@ $<
lib/beos.so: $(PLUGIN_BEOS)
$(CC) $(CFLAGS) $(LCFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
$(PLUGIN_BEOS): %.o: %.cpp
$(CC) $(CFLAGS) -c -o $@ $<
lib/esd.so: $(PLUGIN_ESD)
ifneq (,$(findstring bsd,$(SYS)))
ld -shared -lesd -o $@ $^
else
ld -shared -laudiofile -lesd -o $@ $^
endif
$(PLUGIN_ESD): %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
lib/dsp.so: $(PLUGIN_DSP)
ld -shared -o $@ $^
$(PLUGIN_DSP): %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
lib/alsa.so: $(PLUGIN_ALSA)
ld -shared -o $@ $^
$(PLUGIN_ALSA): %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
lib/dummy.so: $(PLUGIN_DUMMY)
ld -shared -o $@ $^
$(PLUGIN_DUMMY): %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
lib/fb.so: $(PLUGIN_FB)
ld -shared -o $@ $^
$(PLUGIN_FB): %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
lib/x11.so: $(PLUGIN_X11)
ld -shared -L/usr/X11R6/lib -lX11 -lXext -o $@ $^
$(PLUGIN_X11): %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
lib/mga.so: $(PLUGIN_MGA)
ld -shared -L/usr/X11R6/lib -lX11 -lXext -o $@ $^
$(PLUGIN_MGA): %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
lib/gnome.so: $(PLUGIN_GNOME)
ld -shared `gnome-config --libs gnomeui | sed 's,-rdynamic,,'` -o $@ $^
$(PLUGIN_GNOME): %.o: Makefile.dep
$(PLUGIN_GNOME): %.o: %.c
$(CC) $(CFLAGS) `gnome-config --cflags gnomeui` -c -o $@ $<
lib/glide.so: $(PLUGIN_GLIDE)
ld -shared -lglide2x -o $@ $^
$(PLUGIN_GLIDE): %.o: Makefile.dep
$(PLUGIN_GLIDE): %.o: %.c
$(CC) $(CFLAGS) -I/usr/include/glide -c -o $@ $<
#
# Real targets
#
vlc: $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
ifeq ($(SYS),beos)
$(CC) $(CFLAGS) $(LCFLAGS) -Xlinker -soname=_APP_ -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
rm -f ./plugins/_APP_
ln -s ../vlc ./plugins/_APP_
else
$(CC) $(CFLAGS) $(LCFLAGS) --export-dynamic -o $@ $(C_OBJ) $(CPP_OBJ) $(ASM_OBJ)
endif
lib/beos.so: $(PLUGIN_BEOS)
$(CC) $(CFLAGS) $(LCFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
lib/esd.so: $(PLUGIN_ESD)
ifneq (,$(findstring bsd,$(SYS)))
$(CC) -shared -lesd -o $@ $^
else
$(CC) -shared -laudiofile -lesd -o $@ $^
endif
lib/dsp.so: $(PLUGIN_DSP)
$(CC) -shared -o $@ $^
lib/alsa.so: $(PLUGIN_ALSA)
$(CC) -shared -o $@ $^
lib/dummy.so: $(PLUGIN_DUMMY)
$(CC) -shared -o $@ $^
lib/fb.so: $(PLUGIN_FB)
$(CC) -shared -o $@ $^
lib/x11.so: $(PLUGIN_X11)
$(CC) -shared -L/usr/X11R6/lib -lX11 -lXext -o $@ $^
lib/mga.so: $(PLUGIN_MGA)
$(CC) -shared -L/usr/X11R6/lib -lX11 -lXext -o $@ $^
lib/gnome.so: $(PLUGIN_GNOME)
$(CC) -shared `gnome-config --libs gnomeui | sed 's,-rdynamic,,'` -o $@ $^
lib/glide.so: $(PLUGIN_GLIDE)
$(CC) -shared -lglide2x -o $@ $^
lib/ggi.so: $(PLUGIN_GGI)
ld -shared -lggi -o $@ $^
$(PLUGIN_GGI): %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
$(CC) -shared -lggi -o $@ $^
lib/sdl.so: $(PLUGIN_SDL)
ld -shared -lSDL -o $@ $^
$(PLUGIN_SDL): %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
$(CC) -shared -lSDL -o $@ $^
lib/yuv.so: $(PLUGIN_YUV)
ifeq ($(SYS),beos)
$(CC) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
else
ld -shared -o $@ $^
$(CC) -shared -o $@ $^
endif
$(PLUGIN_YUV): %.o: %.c
$(CC) $(CCFLAGS) $(CFLAGS) -c -o $@ $<
lib/yuvmmx.so: $(PLUGIN_YUVMMX)
ifeq ($(SYS),beos)
$(CC) $(CFLAGS) -nostart -Xlinker -soname=$@ -o $@ $^ plugins/_APP_
else
ld -shared -o $@ $^
$(CC) $(LCFLAGS) -shared -o $@ $^
endif
$(PLUGIN_YUVMMX): %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
################################################################################
# Note on generic rules and dependancies

136
configure vendored
View File

@ -2605,7 +2605,7 @@ fi
for ac_hdr in fcntl.h sys/ioctl.h sys/time.h unistd.h
for ac_hdr in getopt.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -2645,7 +2645,7 @@ else
fi
done
for ac_hdr in sys/soundcard.h machine/soundcard.h
for ac_hdr in sys/sockio.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -2685,7 +2685,7 @@ else
fi
done
for ac_hdr in dlfcn.h image.h
for ac_hdr in fcntl.h sys/ioctl.h sys/time.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -2725,7 +2725,7 @@ else
fi
done
for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
for ac_hdr in sys/soundcard.h machine/soundcard.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@ -2765,22 +2765,102 @@ else
fi
done
for ac_hdr in dlfcn.h image.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2773: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2778 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_hdr in arpa/inet.h net/if.h netinet/in.h sys/socket.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2813: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2818 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
for ac_hdr in cthreads.h pthread.h kernel/scheduler.h kernel/OS.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2774: checking for $ac_hdr" >&5
echo "configure:2854: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2779 "configure"
#line 2859 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2808,12 +2888,12 @@ done
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:2812: checking for working const" >&5
echo "configure:2892: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2817 "configure"
#line 2897 "configure"
#include "confdefs.h"
int main() {
@ -2862,7 +2942,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:2866: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@ -2883,12 +2963,12 @@ EOF
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:2887: checking for ANSI C header files" >&5
echo "configure:2967: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2892 "configure"
#line 2972 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@ -2896,7 +2976,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2913,7 +2993,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 2917 "configure"
#line 2997 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@ -2931,7 +3011,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 2935 "configure"
#line 3015 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@ -2952,7 +3032,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 2956 "configure"
#line 3036 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@ -2963,7 +3043,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:2967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:3047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@ -2987,12 +3067,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:2991: checking for size_t" >&5
echo "configure:3071: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2996 "configure"
#line 3076 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@ -3020,12 +3100,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:3024: checking whether time.h and sys/time.h may both be included" >&5
echo "configure:3104: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3029 "configure"
#line 3109 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@ -3034,7 +3114,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:3038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@ -3164,17 +3244,17 @@ if test "${enable_alsa+set}" = set; then
enableval="$enable_alsa"
if test x$enable_alsa = xyes; then ac_safe=`echo "sys/asoundlib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/asoundlib.h""... $ac_c" 1>&6
echo "configure:3168: checking for sys/asoundlib.h" >&5
echo "configure:3248: checking for sys/asoundlib.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 3173 "configure"
#line 3253 "configure"
#include "confdefs.h"
#include <sys/asoundlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:3178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:3258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -3191,7 +3271,7 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for main in -lasound""... $ac_c" 1>&6
echo "configure:3195: checking for main in -lasound" >&5
echo "configure:3275: checking for main in -lasound" >&5
ac_lib_var=`echo asound'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -3199,14 +3279,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lasound $LIBS"
cat > conftest.$ac_ext <<EOF
#line 3203 "configure"
#line 3283 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
if { (eval echo configure:3210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:3290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else

View File

@ -49,6 +49,8 @@ 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(getopt.h)
AC_CHECK_HEADERS(sys/sockio.h)
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h)
AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h)
AC_CHECK_HEADERS(dlfcn.h image.h)

View File

@ -67,6 +67,9 @@
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define if you have the <getopt.h> header file. */
#undef HAVE_GETOPT_H
/* Define if you have the <image.h> header file. */
#undef HAVE_IMAGE_H
@ -94,6 +97,9 @@
/* Define if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define if you have the <sys/sockio.h> header file. */
#undef HAVE_SYS_SOCKIO_H
/* Define if you have the <sys/soundcard.h> header file. */
#undef HAVE_SYS_SOUNDCARD_H

View File

@ -458,14 +458,15 @@ static int SelectPID( int i_argc, intf_arg_t *p_argv )
*****************************************************************************/
static int SpawnInput( int i_argc, intf_arg_t *p_argv )
{
/* FIXME */
#if 0
int i_arg;
int i_method = 0; /* method parameter */
char * p_source = NULL; /* source parameter */
int i_port = 0; /* port parameter */
int i_vlan = 0; /* vlan parameter */
/* FIXME */
#if 0
/* Parse parameters - see command list above */
for ( i_arg = 1; i_arg < i_argc; i_arg++ )
{

View File

@ -30,7 +30,7 @@
#include <signal.h> /* SIGHUP, SIGINT, SIGKILL */
#include <stdio.h> /* sprintf() */
#ifdef HAVE_LIBGNUGETOPT
#ifdef HAVE_GETOPT_H
#include <getopt.h> /* getopt() */
#endif
@ -94,7 +94,7 @@
#define LONG_HELP 2
/* Long options */
#ifdef HAVE_LIBGNUGETOPT
#ifdef HAVE_GETOPT_H
static const struct option longopts[] =
{
/* name, has_arg, flag, val */
@ -471,7 +471,7 @@ static int GetConfiguration( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
}
/* Parse command line options */
#ifdef HAVE_LIBGNUGETOPT
#ifdef HAVE_GETOPT_H
opterr = 0;
while( ( c = getopt_long( i_argc, ppsz_argv, psz_shortopts, longopts, 0 ) ) != EOF )
{

View File

@ -4,6 +4,7 @@
* Copyright (C) 1999, 2000 VideoLAN
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Benoit Steiner <benny@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -46,9 +47,9 @@
#if defined (HAVE_NET_IF_H)
#include <net/if.h> /* interface (arch-dependent) */
#endif
//#ifdef HAVE_SYS_SOCKIO_H
#ifdef HAVE_SYS_SOCKIO_H
#include <sys/sockio.h>
//#endif
#endif
#include "config.h"
#include "common.h"