Commit cc0f0bb6 authored by Sam Hocevar's avatar Sam Hocevar

Some heavy changes today:
  * Removed duplicate function checks from configure.in.
  * Added extra magic to Makefile.modules so that the module Makefiles
    are now ridiculously simple. And I mean *simple*. Check it! This will
    make a possible switch to full autoconf/automake a lot easier.
  * Added the vlc version name to the plugin symbols, to be sure we only load
    plugins with the same version number. A nasty consequence is that you
    need to rebuild your tree after midnight if you are using a CVS tree :-)
  * Got rid of modules_export.h by #defining exported functions in the same
    header as their prototype.
  * Added modules_inner.h and other commonly used .h files to common.h so
    there are less and less files to include, and renamed common.h to
    <videolan/vlc.h>.
  * First modifications to the module handling system towards my ultimate
    goal to get rid of the *_Probe functions. Got rid of TestMethod and
    TestCPU, as well as src/misc/tests.c.
  * Wrote the chroma plugin handling functions. No YUV functions have been
    ported yet because it'ls a lot of work, but the core system works, I
    tried it with a naive yv12->rgb16 plugin (which will disappear when the
    real functions are ready).
  * Made a lot of functions in dvd_summary.c one-liners to avoid wasting
    too many output lines.
  * Fixed a segfault in input_dvd.c:DVDInit.
  * Added a fixfiles.sh script in plugins/gtk to be run after Glade has
    generated its C files.
  * Did some work on the KDE interface to make it suck a bit less. It still
    segfaults, but at least it runs and it looks less ugly.
  * RGB SDL rendering works again, though in 16bpp only.
  * Made plugins/vcd/linux_cdrom_tools.c independent of any vlc structure
    so that it'll be easily put in a library. Maybe libdvdcss?
  * Fixed VCD date display.
  * Merged vout_xvideo.c, vout_x11.c and vout_common.c into xcommon.c.
  * Wrote non-Shm XVideo output.
  * Made X11 output work again. Still pretty unstable, only works for 16bpp.
  * Additional french translation in po/fr.po. Any taker for the rest?
  * Fixed a segfault in video_output.c when the allocated pictures were
    not direct buffers.
  * If $DISPLAY isn't set, don't try to run the Gtk+ interface.
  * Replaced 48x48 .xpm images with 32x32 ones to conform to Debian policy
    (Closes Debian bug #126939).
  * Removed the automatic ./configure launch when running `make all' for
    the first time.

Stuff currently more broken than it ought to be:
  * The wall filter. Being fixed.
  * x11 and sdl plugins for depth != 16bpp.
  * Software YUV.
  * gvlc, gnome-vlc, kvlc shortcuts. Use --intf instead for the moment.
parent 316a83ad
......@@ -56,6 +56,7 @@ PLUGINS_TARGETS := ac3_adec/ac3_adec \
arts/arts \
beos/beos \
chroma/chroma_yv12_rgb8 \
chroma/chroma_yv12_rgb16 \
directx/directx \
dsp/dsp \
dummy/dummy \
......@@ -64,7 +65,7 @@ PLUGINS_TARGETS := ac3_adec/ac3_adec \
dvdread/dvdread \
esd/esd \
fb/fb \
filter/filter_bob \
filter/filter_deinterlace \
filter/filter_transform \
filter/filter_invert \
filter/filter_distort \
......@@ -121,7 +122,7 @@ INTERFACE := main interface intf_msg intf_playlist
INPUT := input 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_u8 aout_s8 aout_u16 aout_s16 aout_spdif
MISC := mtime tests modules netutils iso_lang
MISC := mtime modules netutils iso_lang
C_OBJ := $(INTERFACE:%=src/interface/%.o) \
$(INPUT:%=src/input/%.o) \
......@@ -192,18 +193,19 @@ export
all: Makefile.opts vlc ${ALIASES} vlc.app plugins po
Makefile.opts:
@echo "**** No configuration found, running ./configure..."
./configure
$(MAKE) $(MAKECMDGOALS)
exit
@echo "**** No configuration found, please run ./configure"
@exit 1
# ./configure
# $(MAKE) $(MAKECMDGOALS)
# exit
show:
@echo CC: $(CC)
@echo CFLAGS: $(CFLAGS)
@echo DCFLAGS: $(DCFLAGS)
@echo LCFLAGS: $(LCFLAGS)
@echo LDFLAGS: $(LDFLAGS)
@echo PCFLAGS: $(PCFLAGS)
@echo PLCFLAGS: $(PLCFLAGS)
@echo PLDFLAGS: $(PLDFLAGS)
@echo C_OBJ: $(C_OBJ)
@echo CPP_OBJ: $(CPP_OBJ)
@echo PLUGIN_OBJ: $(PLUGIN_OBJ)
......@@ -229,8 +231,9 @@ libdvdread-clean:
plugins-clean:
for dir in $(PLUGINS_DIR) ; do \
( cd plugins/$${dir} && $(MAKE) clean ) ; done
rm -f plugins/*/*.o plugins/*/*.moc plugins/*/*.bak
( cd plugins/$${dir} \
&& $(MAKE) -f ../../Makefile.modules clean ) ; done
rm -f plugins/*/*.o plugins/*/*.lo plugins/*/*.moc plugins/*/*.bak
vlc-clean:
rm -f $(C_OBJ) $(CPP_OBJ)
......@@ -495,30 +498,35 @@ FORCE:
#
# Generic rules (see below)
#
$(C_DEP): %.d: FORCE
@$(MAKE) -s --no-print-directory -f Makefile.dep $@
$(CPP_DEP): %.dpp: FORCE
@$(MAKE) -s --no-print-directory -f Makefile.dep $@
$(H_OBJ): Makefile.opts Makefile.dep Makefile
rm -f $@ && cp $@.in $@
# @echo "regenerating $@"
@rm -f $@ && cp $@.in $@
ifneq (,$(BUILTINS))
for i in $(BUILTINS) ; do \
echo "int module_"$$i"_InitModule( module_t* );" >> $@ ; \
echo "int module_"$$i"_ActivateModule( module_t* );" >> $@ ; \
echo "int module_"$$i"_DeactivateModule( module_t* );" >> $@ ; \
@for i in $(BUILTINS) ; do \
echo "int InitModule__MODULE_"$$i"( module_t* );" >>$@; \
echo "int ActivateModule__MODULE_"$$i"( module_t* );" >>$@; \
echo "int DeactivateModule__MODULE_"$$i"( module_t* );" >>$@; \
done
echo "" >> $@ ;
printf "#define ALLOCATE_ALL_BUILTINS() do { " >> $@ ;
for i in $(BUILTINS) ; do \
printf "ALLOCATE_BUILTIN("$$i"); " >> $@ ; \
@echo "" >> $@ ;
endif
@echo "#define ALLOCATE_ALL_BUILTINS() \\" >> $@ ;
@echo " do \\" >> $@ ;
@echo " { \\" >> $@ ;
ifneq (,$(BUILTINS))
@for i in $(BUILTINS) ; do \
echo " ALLOCATE_BUILTIN("$$i"); \\" >> $@ ; \
done
echo "} while( 0 );" >> $@ ;
echo "" >> $@ ;
@echo " } while( 0 );" >> $@ ;
@echo "" >> $@ ;
endif
$(C_OBJ): %.o: Makefile.opts Makefile.dep Makefile
$(C_DEP): %.d: FORCE
@$(MAKE) -s --no-print-directory -f Makefile.dep $@
$(CPP_DEP): %.dpp: FORCE
@$(MAKE) -s --no-print-directory -f Makefile.dep $@
$(C_OBJ): %.o: Makefile.opts Makefile.dep Makefile $(H_OBJ)
$(C_OBJ): %.o: .dep/%.d
$(C_OBJ): %.o: %.c
$(CC) $(CFLAGS) $(CFLAGS_VLC) -c -o $@ $<
......@@ -537,8 +545,8 @@ endif
#
# Main application target
#
vlc: Makefile.opts Makefile.dep Makefile $(H_OBJ) $(VLC_OBJ) $(BUILTIN_OBJ)
$(CC) $(CFLAGS) -o $@ $(VLC_OBJ) $(BUILTIN_OBJ) $(LCFLAGS)
vlc: Makefile.opts Makefile.dep Makefile $(VLC_OBJ) $(BUILTIN_OBJ)
$(CC) $(CFLAGS) -o $@ $(VLC_OBJ) $(BUILTIN_OBJ) $(LDFLAGS)
ifeq ($(SYS),beos)
xres -o $@ ./share/vlc_beos.rsrc
mimeset -f $@
......@@ -549,14 +557,14 @@ endif
#
plugins: Makefile.modules Makefile.opts Makefile.dep Makefile $(PLUGIN_OBJ)
$(PLUGIN_OBJ): FORCE
@cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.so=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) $(@:plugins/%=../%)
@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
@cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.a=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) $(@:plugins/%=../%)
@cd $(shell echo " "$(PLUGINS_TARGETS)" " | sed -e 's@.* \([^/]*/\)'$(@:plugins/%.a=%)' .*@plugins/\1@' -e 's@^ .*@@') && $(MAKE) -f ../../Makefile.modules $(@:plugins/%=../%)
#
# libdvdcss target
......
......@@ -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 "regenerating dependencies for $*.c"
@$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) 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 $*.c"
#@echo "regenerating dependencies for $*.c"
@$(SHELL) -ec '$(CC) $(DCFLAGS) $(CFLAGS) $(DEFINE) 2>/dev/null $< \
| sed '\''s/$(subst .,\.,$(notdir $*))\.o[ :]*/$(subst /,\/,$*).o \
.dep\/$(subst /,\/,$*).dpp : /g'\'' > $@; \
......
......@@ -6,16 +6,41 @@
###############################################################################
#
# C headers directories
# include the local Makefile
#
CFLAGS := -I../../include -I../../extras $(CFLAGS)
include Makefile
#
# Analyze the target we are asked to build
#
module_name := $(shell echo $(MAKECMDGOALS) | sed 's@.*/\(.*\)\..*@\1@')
MODULE_NAME := $(shell echo $(module_name) | tr '[a-z]' '[A-Z]')
suff := $(shell echo $(MAKECMDGOALS) | sed 's@.*\.@@' | tr so/a lo/o)
#
# Compiler flags
#
SRC_C := $(filter %.c,$($(module_name)_SOURCES))
SRC_CPP := $(filter %.cpp,$($(module_name)_SOURCES))
ifeq (lo,$(suff))
CFLAGS_EXTRA := -I../../include -I../../extras $(CFLAGS_$(MODULE_NAME)) \
-DMODULE_NAME=$(module_name) -DMODULE_NAME_IS_$(module_name) \
-DPLUGIN $(CFLAGS_$(MODULE_NAME)_PLUGIN) $(PCFLAGS)
OBJ_ALL := $(SRC_C:%.c=%.lo.$(module_name)) $(SRC_CPP:%.cpp=%.lo.$(module_name))
else
CFLAGS_EXTRA := -I../../include -I../../extras $(CFLAGS_$(MODULE_NAME)) \
-DMODULE_NAME=$(module_name) -DMODULE_NAME_IS_$(module_name) \
-DBUILTIN $(CFLAGS_$(MODULE_NAME)_BUILTIN)
OBJ_ALL := $(SRC_C:%.c=%.o.$(module_name)) $(SRC_CPP:%.cpp=%.o.$(module_name))
endif
#
# Standard dependencies
#
C_DEP := $(ALL_OBJ:%.o=.dep/%.d)
CPP_DEP := $(ALL_OBJ:%.o=.dep/%.dpp)
C_DEP := $(SRC_C:%.c=.dep/%.d)
CPP_DEP := $(SRC_CPP:%.cpp=.dep/%.dpp)
export
......@@ -25,33 +50,31 @@ export
all:
clean:
rm -f $(ALL_OBJ)
rm -f *.o *.moc *.bak *.builtin
# rm -f $(PLUGIN_ALL) $(BUILTIN_ALL)
rm -f *.o *.o.* *.lo *.lo.* *.moc *.moc.* *.bak
rm -rf .dep
FORCE:
$(ALL_OBJ): %.o: ../../Makefile.modules ../../Makefile.dep Makefile
$(OBJ_ALL): ../../Makefile.modules ../../Makefile.dep ../../Makefile Makefile
$(C_DEP): %.d: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@ CFLAGS="$(CFLAGS) $(CFLAGS_EXTRA)"
$(CPP_DEP): %.dpp: FORCE
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@
@$(MAKE) -s --no-print-directory -f ../../Makefile.dep $@ CFLAGS="$(CFLAGS) $(CFLAGS_EXTRA)"
$(PLUGIN_C): %.o: .dep/%.d
$(PLUGIN_C): %.o: %.c
$(CC) $(CFLAGS) -DPLUGIN $(PCFLAGS) -c -o $@ $<
$(SRC_C:%.c=%.$(suff).$(module_name)): %.$(suff).$(module_name): .dep/%.d
$(SRC_C:%.c=%.$(suff).$(module_name)): %.$(suff).$(module_name): %.c
$(CC) $(CFLAGS) $(CFLAGS_EXTRA) -c $< -o $@
$(BUILTIN_C): BUILTIN_%.o: .dep/%.d
$(BUILTIN_C): BUILTIN_%.o: %.c
$(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
$(SRC_CPP:%.cpp=%.$(suff).$(module_name)): %.$(suff).$(module_name): .dep/%.dpp
$(SRC_CPP:%.cpp=%.$(suff).$(module_name)): %.$(suff).$(module_name): %.cpp
$(CC) $(CFLAGS) $(CFLAGS_EXTRA) -c $< -o $@
$(PLUGIN_CPP): %.o: .dep/%.dpp
$(PLUGIN_CPP): %.o: %.cpp
$(CC) $(CFLAGS) -DPLUGIN $(PCFLAGS) -c -o $@ $<
../$(module_name).so: $(EXTRA_DEP) $(OBJ_ALL)
$(CC) $(OBJ_ALL) $(PLDFLAGS) $(LIB_$(MODULE_NAME)) -o $@
$(BUILTIN_CPP): BUILTIN_%.o: .dep/%.dpp
$(BUILTIN_CPP): BUILTIN_%.o: %.cpp
$(CC) $(CFLAGS) -DBUILTIN -c -o $@ $<
../$(module_name).a: $(EXTRA_DEP) $(OBJ_ALL)
rm -f $@ && ar rc $@ $(OBJ_ALL) && $(RANLIB) $@
......@@ -67,13 +67,13 @@ includedir = @includedir@
# Libraries for special cases
#
LIB_ALSA = @LIB_ALSA@
LIB_ALTIVEC = @LIB_ALTIVEC@
LIB_ARTS = @LIB_ARTS@
LIB_BEOS = @LIB_BEOS@
LIB_DARWIN = @LIB_DARWIN@
LIB_DIRECTX = @LIB_DIRECTX@
LIB_DVD = @LIB_DVD@
LIB_DVD_PLUGIN = @LIB_DVD_PLUGIN@
LIB_DVDREAD_PLUGIN = @LIB_DVDREAD_PLUGIN@
LIB_DVDREAD = @LIB_DVDREAD@
LIB_DVDREAD_PLUGIN = @LIB_DVDREAD_PLUGIN@
LIB_ESD = @LIB_ESD@
......@@ -82,6 +82,7 @@ LIB_GGI = @LIB_GGI@
LIB_GLIDE = @LIB_GLIDE@
LIB_GNOME = @LIB_GNOME@
LIB_GTK = @LIB_GTK@
LIB_IDCTALTIVEC = @LIB_IDCTALTIVEC@
LIB_IMDCT = @LIB_IMDCT@
LIB_IMDCT3DN = @LIB_IMDCT3DN@
LIB_IMDCTSSE = @LIB_IMDCTSSE@
......@@ -89,6 +90,7 @@ LIB_KDE = @LIB_KDE@
LIB_LIBDVDCSS = @LIB_LIBDVDCSS@
LIB_MACOSX = @LIB_MACOSX@
LIB_MAD = @LIB_MAD@
LIB_MOTIONALTIVEC = @LIB_MOTIONALTIVEC@
LIB_MPEG_TS = @LIB_MPEG_TS@
LIB_NCURSES = @LIB_NCURSES@
LIB_QNX = @LIB_QNX@
......@@ -102,15 +104,20 @@ LIB_XVIDEO = @LIB_XVIDEO@
# CFLAGS for special cases
#
CFLAGS_VLC = @CFLAGS_VLC@
CFLAGS_ALTIVEC = @CFLAGS_ALTIVEC@
CFLAGS_ARTS = @CFLAGS_ARTS@
CFLAGS_DVD = @CFLAGS_DVD@
CFLAGS_DVDREAD = @CFLAGS_DVDREAD@
CFLAGS_ARTS = @CFLAGS_ARTS@
CFLAGS_ESD = @CFLAGS_ESD@
CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
CFLAGS_ESD = @CFLAGS_ESD@
CFLAGS_GLIDE = @CFLAGS_GLIDE@
CFLAGS_GNOME = @CFLAGS_GNOME@
CFLAGS_GTK = @CFLAGS_GTK@
CFLAGS_KDE = @CFLAGS_KDE@
CFLAGS_IDCTALTIVEC = @CFLAGS_IDCTALTIVEC@
CFLAGS_LIBDVDCSS = @CFLAGS_LIBDVDCSS@
CFLAGS_MACOSX = @CFLAGS_MACOSX@
CFLAGS_MAD = @CFLAGS_MAD@
CFLAGS_MOTIONALTIVEC = @CFLAGS_MOTIONALTIVEC@
CFLAGS_QT = @CFLAGS_QT@
CFLAGS_SDL = @CFLAGS_SDL@
CFLAGS_X11 = @CFLAGS_X11@
CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
......@@ -118,8 +125,8 @@ CFLAGS_XVIDEO = @CFLAGS_XVIDEO@
#
# Additional objects
#
OBJ_DVD = @OBJ_DVD@
OBJ_LIBDVDCSS = @OBJ_LIBDVDCSS@
SRC_DVD_EXTRA = @SRC_DVD_EXTRA@
SRC_DVDCSS_EXTRA = @SRC_DVDCSS_EXTRA@
#
# Other special cases
......@@ -166,8 +173,8 @@ LIBDVDCSS_VERSION=@LIBDVDCSS_VERSION@
# DEFINE will contain some of the constants definitions decided in Makefile,
# including SYS_xx. It will be passed to C compiler.
DEFINE_CONSTANTS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
DEFINE += $(DEFINE_CONSTANTS)
DEFINE_SYS := -DSYS_$(shell echo $(SYS) | sed -e 's/-.*//' | tr '[a-z].' '[A-Z]_')
DEFINE += $(DEFINE_SYS)
# On Linux and Solaris, activate 64-bit off_t (by default under BSD)
DEFINE += -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98
......@@ -189,13 +196,8 @@ INCLUDE += -Iinclude -Iextras
#
# Libraries needed by built-in modules
#
# Let's go for a crude hack !
LIB_MOTIONALTIVEC := $(LIB_ALTIVEC)
LIB_IDCTALTIVEC := $(LIB_ALTIVEC)
ifneq (,$(BUILTINS))
LIB_BUILTINS := $(shell for i in ${BUILTINS} ; do echo $$i | tr '[a-z]' '[A-Z]' | sed -e 's/.*/$$LIB_&/' ; done)
LIB_BUILTINS := $(patsubst %,$$LIB_%,$(shell echo $(BUILTINS) | tr '[a-z]' '[A-Z]'))
LIB += $(LIB_BUILTINS)
endif
#
# Libraries
......@@ -282,17 +284,18 @@ DCFLAGS += -MM
#
# C compiler flags: linking
#
LCFLAGS += @LCFLAGS@ $(LIB)
LCFLAGS += -Wall
LDFLAGS += @LDFLAGS@
LDFLAGS += $(LIB)
LDFLAGS += -Wall
ifneq ($(DEBUG),1)
ifneq ($(GPROF),1)
ifneq ($(CPROF),1)
#LCFLAGS += -s
#LDFLAGS += -s
endif
endif
endif
ifneq (,$(findstring mingw32,$(SYS)))
LCFLAGS += -mwindows -Xlinker --force-exe-suffix
LDFLAGS += -mwindows -Xlinker --force-exe-suffix
endif
#
......@@ -312,7 +315,7 @@ endif
#
# C compiler flags: plugin linking
#
PLCFLAGS += @PLCFLAGS@
PLDFLAGS += @PLDFLAGS@
#
# Debugging and profiling support
......
#undef PACKAGE
#undef VERSION
#undef DVD_DEVICE
#undef VCD_DEVICE
This diff is collapsed.
dnl Autoconf settings for vlc and libdvdcss
AC_INIT(include/common.h)
AC_INIT(include/main.h)
AC_CONFIG_HEADER(include/defs.h)
AC_CANONICAL_SYSTEM
......@@ -31,7 +31,6 @@ dnl Check for tools
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PROG_CPP
AC_CHECK_TOOL(RANLIB, ranlib, :)
dnl Gettext stuff
ALL_LINGUAS="de fr ru"
......@@ -46,15 +45,13 @@ dnl AM_PROG_LIBTOOL
AC_PROG_INSTALL
dnl
dnl Endianness check, with a special test for cross-compilation
dnl Endianness check, AC_C_BIGENDIAN doesn't work if we are cross-compiling
dnl
if test x${cross_compiling} != xyes; then
AC_C_BIGENDIAN
else
dnl We are crosscompiling, give the user the opportunity to specify
dnl --with-words=big or --with-words=little ; otherwise, try to guess
AC_ARG_WITH(words,
[ --with-words=endianness Set endianness (big or little)])
dnl We give the user the opportunity to specify
dnl --with-words=big or --with-words=little ; otherwise, try to guess
dnl
AC_ARG_WITH(words,
[ --with-words=endianness Set endianness (big or little)])
case "x$withval" in
xbig)
ac_cv_c_bigendian=yes
......@@ -107,11 +104,9 @@ EOF
fi
;;
esac
fi
dnl Check for system libs needed
AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol)
AC_CHECK_FUNCS(setenv putenv)
AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty)
AC_CHECK_FUNC(connect,,[
AC_CHECK_LIB(socket,connect,LIB="${LIB} -lsocket")
])
......@@ -141,7 +136,6 @@ AC_CHECK_FUNC(getopt_long,[AC_DEFINE(HAVE_GETOPT_LONG,1,long getopt support)],
[AC_DEFINE(HAVE_GETOPT_LONG,1,getopt support) LIB="${LIB} -lgnugetopt"],
[NEED_GETOPT=1])])
AC_FUNC_MMAP
AC_TYPE_SIGNAL
AC_CHECK_LIB(dl,dlopen,LIB="${LIB} -ldl")
AC_CHECK_LIB(m,cos,
......@@ -181,13 +175,15 @@ AC_EGREP_HEADER(strncasecmp,strings.h,[
Define if <strings.h> defines strncasecmp.)])
dnl Check for headers
AC_CHECK_HEADERS(stddef.h getopt.h strings.h)
AC_CHECK_HEADERS(getopt.h strings.h)
AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/time.h sys/times.h)
AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h)
AC_CHECK_HEADERS(dlfcn.h image.h)
AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
AC_CHECK_HEADERS(machine/param.h)
AC_HEADER_TIME
dnl Check for threads library
AC_CHECK_HEADERS(cthreads.h pthread.h kernel/scheduler.h kernel/OS.h)
......@@ -217,7 +213,7 @@ AC_CACHE_CHECK([if \$CC accepts -bundle -undefined error],
[CFLAGS="${save_CFLAGS} -bundle -undefined error"
AC_TRY_COMPILE([],,ac_cv_ld_darwin=yes, ac_cv_ld_darwin=no)])
if test x"$ac_cv_ld_darwin" != x"no"; then
PLCFLAGS="${PLCFLAGS} -bundle -undefined error"
PLDFLAGS="${PLDFLAGS} -bundle -undefined error"
fi
dnl Check for standard plugin linking flags
......@@ -226,7 +222,7 @@ AC_CACHE_CHECK([if \$CC accepts -shared],
[CFLAGS="${save_CFLAGS} -shared"
AC_TRY_COMPILE([],, ac_cv_ld_plugins=yes, ac_cv_ld_plugins=no)])
if test x"$ac_cv_ld_plugins" != x"no"; then
PLCFLAGS="${PLCFLAGS} -shared"
PLDFLAGS="${PLDFLAGS} -shared"
fi
dnl Check for soname setting
......@@ -300,19 +296,13 @@ 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 Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
ARCH=${target_cpu}
dnl
dnl default modules
dnl
BUILTINS="${BUILTINS} mpeg_es mpeg_ps mpeg_ts memcpy idct idctclassic motion imdct downmix mpeg_adec lpcm_adec ac3_adec mpeg_vdec"
PLUGINS="${PLUGINS} ac3_spdif spudec chroma_yv12_rgb8 filter_bob filter_invert filter_wall filter_transform filter_distort"
PLUGINS="${PLUGINS} ac3_spdif spudec chroma_yv12_rgb16 filter_deinterlace filter_invert filter_wall filter_transform filter_distort"
dnl
dnl Accelerated modules
......@@ -371,7 +361,8 @@ AC_CACHE_CHECK([if \$CC groks Altivec inline assembly],
if test x"$ac_cv_altivec_inline" != x"no"; then
AC_DEFINE(CAN_COMPILE_ALTIVEC, 1, Define if \$CC groks ALTIVEC inline assembly.)
if test x"$ac_cv_altivec_inline" != x"yes"; then
CFLAGS_ALTIVEC="$CFLAGS_ALTIVEC $ac_cv_altivec_inline"
CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_altivec_inline"
CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_altivec_inline"
CFLAGS_VLC="$CFLAGS_VLC $ac_cv_altivec_inline"
fi
ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
......@@ -385,7 +376,7 @@ AC_CACHE_CHECK([if \$CC groks Altivec C extensions],
AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
ac_cv_c_altivec=-faltivec, [
# Linux/PPC test
CFLAGS="$save_CFLAGS $CFLAGS_ALTIVEC -fvec"
CFLAGS="$save_CFLAGS $CFLAGS_IDCTALTIVEC -fvec"
AC_TRY_COMPILE(,[vec_mtvscr((vector unsigned int)(0));],
[ac_cv_c_altivec="-fvec"], ac_cv_c_altivec=no)
])
......@@ -393,7 +384,8 @@ AC_CACHE_CHECK([if \$CC groks Altivec C extensions],
])
if test x"$ac_cv_c_altivec" != x"no"; then
AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C altivec extensions.)
CFLAGS_ALTIVEC="$CFLAGS_ALTIVEC $ac_cv_c_altivec"
CFLAGS_IDCTALTIVEC="$CFLAGS_IDCTALTIVEC $ac_cv_c_altivec"
CFLAGS_MOTIONALTIVEC="$CFLAGS_MOTIONALTIVEC $ac_cv_c_altivec"
CFLAGS_VLC="$CFLAGS_VLC $ac_cv_c_altivec"
ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
fi
......@@ -406,7 +398,8 @@ AC_CACHE_CHECK([if linker needs -framework vecLib],
LDFLAGS=$save_LDFLAGS
])
if test x"$ac_cv_ld_altivec" != x"no"; then
LIB_ALTIVEC="-framework vecLib"
LIB_IDCTALTIVEC="${LIB_IDCTALTIVEC} -framework vecLib"
LIB_MOTIONALTIVEC="${LIB_MOTIONALTIVEC} -framework vecLib"
fi
dnl
......@@ -424,25 +417,43 @@ case ${target_os} in
;;
*mingw32*)
SYS=mingw32
AC_CHECK_TOOL(WINDRES, windres, :)
LIB_MPEG_TS="-lws2_32"
LIB_RC="-lws2_32"
;;
*nto*)
SYS=nto
LIB_X11="${LIB_X11} -lsocket"
LIB_XVIDEO="${LIB_XVIDEO} -lsocket"