Commit 0a6c40c6 authored by Bernie Purcell's avatar Bernie Purcell

Some fixes for compiling on Cygwin: x264, pthreads, taglib and dirac.

Reverse previous workaround for pthreads lib having GC2 suffix - that
is actually normal; patch should instead go into x264 to make it ignore
the presence of a local pthread lib under cygwin when doing configure tests.
parent 03b4d88e
......@@ -1312,7 +1312,11 @@ endif
ifdef HAVE_WIN32
.x264: x264 .pthreads
ifdef HAVE_CYGWIN
(cd $<; $(HOSTCC) RANLIB="ranlib" AR="ar" STRIP="strip" ./configure $(X264CONF) --prefix="$(PREFIX)" --extra-cflags="-I$(PREFIX)/include" --extra-ldflags="-L$(PREFIX)/lib" && make && make install)
else
(cd $<; $(HOSTCC) ./configure $(X264CONF) --prefix="$(PREFIX)" && make && make install)
endif
else
.x264: x264
(cd $<; $(HOSTCC) ./configure $(X264CONF) --prefix="$(PREFIX)" && make && make install)
......@@ -1515,7 +1519,11 @@ endif
ifdef HAVE_WIN32
(cd xml; aclocal && automake && autoreconf)
endif
ifdef HAVE_CYGWIN
(cd xml; ac_cv_header_pthread_h="no" CFLAGS="-DLIBXML_STATIC" $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --with-minimal --with-catalog --with-reader --with-tree --with-push --with-xptr --with-valid --with-xpath --with-xinclude --with-sax1 --without-zlib --without-iconv --without-http --without-ftp && make && make install)
else
(cd xml; CFLAGS="-DLIBXML_STATIC" $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) --with-minimal --with-catalog --with-reader --with-tree --with-push --with-xptr --with-valid --with-xpath --with-xinclude --with-sax1 --without-zlib --without-iconv --without-http --without-ftp && make && make install)
endif
ifndef HAVE_DARWIN_OS
$(INSTALL_NAME)
endif
......@@ -1995,6 +2003,9 @@ dirac-$(DIRAC_VERSION).tar.gz:
dirac: dirac-$(DIRAC_VERSION).tar.gz
$(EXTRACT_GZ)
patch -p0 <Patches/dirac-cross.patch
ifdef HAVE_CYGWIN
patch -p0 <Patches/dirac-cygwin.patch
endif
(cd $@; aclocal && autoconf && automake)
DIRAC_SUBDIRS = libdirac_byteio libdirac_common libdirac_motionest libdirac_encoder libdirac_decoder
......@@ -2150,6 +2161,9 @@ taglib-$(TAGLIB_VERSION).tar.gz:
taglib: taglib-$(TAGLIB_VERSION).tar.gz
$(EXTRACT_GZ)
ifdef HAVE_CYGWIN
patch -p0 <Patches/taglib-cygwin.patch
endif
.tag: taglib
(cd $<; $(HOSTCC) ./configure $(HOSTCONF) --prefix=$(PREFIX) && make && make install)
......@@ -2172,10 +2186,6 @@ pthreads: pthreads-w32-$(PTHREADS_VERSION)-release.tar.gz
.pthreads: pthreads
(cd $<; $(HOSTCC) make $(PTHREADSCONF) GC-static && cp -v pthread.h sched.h semaphore.h $(PREFIX)/include/ && cp -v *.a $(PREFIX)/lib/)
ifdef HAVE_CYGWIN
# for some reason Cygwin builds libpthreadGC2.a
mv $(PREFIX)/lib/libpthreadGC2.a $(PREFIX)/lib/libpthread.a
endif
$(INSTALL_NAME)
touch $@
......
--- dirac/configure.ac 2007-09-30 14:45:51.156250000 +1000
+++ dirac/configure.ac 2007-09-30 14:44:27.625000000 +1000
@@ -225,8 +225,6 @@
AC_TRY_CXXFLAGS([],[], [$TRY_CFLAGS $CXXFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"])
TRY_CFLAGS="$OPT_CFLAGS -Wall"
AC_TRY_CXXFLAGS([],[], [$TRY_CFLAGS $CXXFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"])
- TRY_CFLAGS="$OPT_CFLAGS -Werror"
- AC_TRY_CXXFLAGS([],[], [$TRY_CFLAGS $CXXFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"])
TRY_CFLAGS="$OPT_CFLAGS -W"
AC_TRY_CXXFLAGS([],[], [$TRY_CFLAGS $CXXFLAGS],[OPT_CFLAGS="$TRY_CFLAGS"])
TRY_CFLAGS="$OPT_CFLAGS -Woverloaded-virtual"
--- taglib/admin/conf.change.pl 2005-07-27 10:23:52.000000000 +1000
+++ taglib/admin/conf.change.pl 2007-09-30 15:57:48.062500000 +1000
@@ -146,6 +146,7 @@
fi
done
if test -f \$tmp/subs.files ; then
+ dos2unix \$tmp/subs.files
perl $ac_aux_dir/config.pl "\$tmp/subs.sed" "\$tmp/subs.files" "\$srcdir" "\$INSTALL"
fi
rm -f \$tmp/subs.files
......@@ -2,6 +2,23 @@ Index: configure
===================================================================
--- configure (revision 672)
+++ configure (working copy)
@@ -339,13 +339,13 @@
pthread="yes"
;;
MINGW|CYGWIN)
- if cc_check pthread.h -lpthread "pthread_create(0,0,0,0);" ; then
+ if cc_check pthread.h -lpthread "pthread_create(0,0,0,0); pthread_num_processors_np();" ; then
pthread="yes"
libpthread="-lpthread"
- elif cc_check pthread.h -lpthreadGC2 "pthread_create(0,0,0,0);" ; then
+ elif cc_check pthread.h -lpthreadGC2 "pthread_create(0,0,0,0); pthread_num_processors_np();" ; then
pthread="yes"
libpthread="-lpthreadGC2"
- elif cc_check pthread.h "-lpthreadGC2 -lwsock32 -DPTW32_STATIC_LIB" "pthread_create(0,0,0,0);" ; then
+ elif cc_check pthread.h "-lpthreadGC2 -lwsock32 -DPTW32_STATIC_LIB" "pthread_create(0,0,0,0); pthread_num_processors_np();" ; then
pthread="yes"
libpthread="-lpthreadGC2 -lwsock32"
CFLAGS="$CFLAGS -DPTW32_STATIC_LIB"
@@ -428,6 +428,10 @@
ASFLAGS=$ASFLAGS
GTK=$gtk
......
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