Commit 727eb9d8 authored by Damien Fouilleul's avatar Damien Fouilleul

miscellaneous fixes when building contribs on Cygwin

- boostrap: make configure.ac happy when detecting contribs build on Cygwin
- Makefile: cleanup, fixed extraction of files containing invalid characters (on DOS LFN), gpg-error compiling
parent 4962512e
...@@ -43,11 +43,6 @@ fi ...@@ -43,11 +43,6 @@ fi
rm -f config.mak rm -f config.mak
echo -e "# Automatically generated by bootstrap.\n# Make changes if you know what you're doing.\n" > config.mak echo -e "# Automatically generated by bootstrap.\n# Make changes if you know what you're doing.\n" > config.mak
echo "BUILD = $BUILD" >> config.mak
echo "HOST = $HOST" >> config.mak
echo "PREFIX = `pwd`" >> config.mak
if test "$HOST" != "$BUILD"; then if test "$HOST" != "$BUILD"; then
CC="${HOST}-gcc" CC="${HOST}-gcc"
CXX="${HOST}-g++" CXX="${HOST}-g++"
...@@ -117,10 +112,11 @@ case $HOST in ...@@ -117,10 +112,11 @@ case $HOST in
;; ;;
i686-pc-cygwin) i686-pc-cygwin)
echo "HAVE_WIN32 = 1" >> config.mak echo "HAVE_WIN32 = 1" >> config.mak
CC="gcc -mno-cygwin" CC="gcc -mno-cygwin -isystem /usr/include/mingw"
CXX="g++ -mno-cygwin" CXX="g++ -mno-cygwin -isystem /usr/include/mingw"
EXTRA_CFLAGS=" -mno-cygwin" HOST=`$CC -dumpmachine`
EXTRA_CPPFLAGS=" -mno-cygwin" EXTRA_CFLAGS=" -mno-cygwin -isystem /usr/include/mingw"
EXTRA_CPPFLAGS=" -mno-cygwin -isystem /usr/include/mingw"
EXTRA_LDFLAGS=" -mno-cygwin" EXTRA_LDFLAGS=" -mno-cygwin"
echo "PKG_CONFIG_PATH = \$(PREFIX)/lib/pkgconfig" >> config.mak echo "PKG_CONFIG_PATH = \$(PREFIX)/lib/pkgconfig" >> config.mak
;; ;;
...@@ -133,6 +129,11 @@ case $HOST in ...@@ -133,6 +129,11 @@ case $HOST in
;; ;;
esac esac
echo "BUILD = $BUILD" >> config.mak
echo "HOST = $HOST" >> config.mak
echo "PREFIX = `pwd`" >> config.mak
echo "CC = ${CC}" >> config.mak echo "CC = ${CC}" >> config.mak
echo "CXX = ${CXX}" >> config.mak echo "CXX = ${CXX}" >> config.mak
echo "LD = ${LD}" >> config.mak echo "LD = ${LD}" >> config.mak
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
# Felix Kühne <fkuehne@users.sourceforge.net> # Felix Kühne <fkuehne@users.sourceforge.net>
# Christophe Mutricy <xtophe AT xtelevision.com> # Christophe Mutricy <xtophe AT xtelevision.com>
# Gildas Bazin <gbazin at videolan dot org> # Gildas Bazin <gbazin at videolan dot org>
# Damien Fouilleul <damienf at videolan dot org>
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
...@@ -81,15 +82,21 @@ else ...@@ -81,15 +82,21 @@ else
HOSTCC2=$(HOSTCC) HOSTCC2=$(HOSTCC)
endif endif
ifneq ($(BUILD),$(HOST)) #
# We are cross compiling # compiling for MinGW under Cygwin could be detected as cross compiling
HOSTCONF=--host=$(HOST) --build=$(BUILD) # unfortunately there isn't a complete separate GCC toolchain for MinGW under cygwin
FFMPEGCONF=--cross-prefix=$(HOST)- #
X264CONF=--crosscompile=$(HOST) ifeq (,$(findstring cygwin,$(BUILD)),)
else ifneq ($(BUILD),$(HOST))
ifneq ($(CC),) # We are cross compiling
FFMPEGCONF=--cc="$(CC)" HOSTCONF=--host=$(HOST) --build=$(BUILD)
endif FFMPEGCONF=--cross-prefix=$(HOST)-
X264CONF=--crosscompile=$(HOST)
else
ifneq ($(CC),)
FFMPEGCONF=--cc="$(CC)"
endif
endif
endif endif
# #
...@@ -198,17 +205,26 @@ FORCE: ...@@ -198,17 +205,26 @@ FORCE:
# *************************************************************************** # ***************************************************************************
define EXTRACT_GZ define EXTRACT_GZ
tar xzf $< rm -rf $@ || true
tar xzf $< --exclude='[*?:<>\|]'
mv $(patsubst %.tar.gz,%,$(patsubst %.tgz,%,$(notdir $<))) $@ || true mv $(patsubst %.tar.gz,%,$(patsubst %.tgz,%,$(notdir $<))) $@ || true
touch $@ touch $@
endef endef
define EXTRACT_BZ2 define EXTRACT_BZ2
bunzip2 -c $< | tar xf - rm -rf $@ || true
bunzip2 -c $< | tar xf - --exclude='[*?:<>\|]'
mv $(patsubst %.tar.bz2,%,$(notdir $<)) $@ || true mv $(patsubst %.tar.bz2,%,$(notdir $<)) $@ || true
touch $@ touch $@
endef endef
define EXTRACT_ZIP
rm -rf $@ || true
unzip $<
mv $(patsubst %.zip,%,$(notdir $<)) $@ || true
touch $@
endef
### Darwin-specific ### ### Darwin-specific ###
# These macros prepare the dynamic libraries for inclusion in the Mac OS X # These macros prepare the dynamic libraries for inclusion in the Mac OS X
# bundle. For instance if you're building a library named libtoto.dylib, # bundle. For instance if you're building a library named libtoto.dylib,
...@@ -786,7 +802,7 @@ faad: faad2-$(FAAD2_VERSION).tar.bz2 ...@@ -786,7 +802,7 @@ faad: faad2-$(FAAD2_VERSION).tar.bz2
touch $@ touch $@
CLEAN_FILE += .faad CLEAN_FILE += .faad
CLEAN_PKG += faad2 CLEAN_PKG += faad
DISTCLEAN_PKG += faad2-$(FAAD2_VERSION).tar.bz2 DISTCLEAN_PKG += faad2-$(FAAD2_VERSION).tar.bz2
# *************************************************************************** # ***************************************************************************
...@@ -1486,7 +1502,8 @@ libgpg-error: libgpg-error-$(GPGERROR_VERSION).tar.gz ...@@ -1486,7 +1502,8 @@ libgpg-error: libgpg-error-$(GPGERROR_VERSION).tar.gz
ifeq ($(HOST),i686-apple-darwin8) ifeq ($(HOST),i686-apple-darwin8)
(cd $<; ./autogen.sh) (cd $<; ./autogen.sh)
endif endif
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --disable-nls --disable-shared && make && make install) # MinGW host is not properly detected when building on cygwin
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --host=$(HOST) --prefix=$(PREFIX) --disable-nls --disable-shared && make && make install)
# $(INSTALL_NAME) # $(INSTALL_NAME)
touch $@ touch $@
...@@ -1948,3 +1965,4 @@ clean-src: clean ...@@ -1948,3 +1965,4 @@ clean-src: clean
rm -rf $(DISTCLEAN_PKG) rm -rf $(DISTCLEAN_PKG)
distclean: clean-src distclean: clean-src
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