[Ffmpeg-devel] [PATCH] Cygwin vhook, always static avformat
Måns Rullgård
mru
Sat Jul 15 17:58:17 CEST 2006
V?ctor Paesa <wzrlpy at arsystel.com> writes:
> Hi,
>
>> I've removed the Darwin hacks. Let's see if we can figure out a way to
>> support Cygwin cleanly now.
>>
> Following your example, would be acceptable to define a VHOOKLIBS, that
> would take the role of EXTRALIBS in my previous patch?
>
>> First off, please split your patch in two parts: one for the vhook issue
>> and one for the shared lib support under Cygwin.
>>
> Here is the patch only to allow shared libraries:
>
> Regards,
> V?ctor Paesa
>
> diff -Naur ffmpeg-old/common.mak ffmpeg/common.mak
> --- ffmpeg-old/common.mak 2006-07-12 17:55:47.000000000 +0200
> +++ ffmpeg/common.mak 2006-07-14 20:17:23.656250000 +0200
> @@ -65,11 +65,11 @@
> install $(INSTALLSTRIP) -m 755 $(SLIBNAME) "$(prefix)"
> else
> install $(INSTALLSTRIP) -m 755 $(SLIBNAME) \
> - $(libdir)/$(SLIBNAME_WITH_VERSION)
> + $(shlibdir)/$(SLIBNAME_WITH_VERSION)
> ln -sf $(SLIBNAME_WITH_VERSION) \
> - $(libdir)/$(SLIBNAME_WITH_MAJOR)
> + $(shlibdir)/$(SLIBNAME_WITH_MAJOR)
> ln -sf $(SLIBNAME_WITH_VERSION) \
> - $(libdir)/$(SLIBNAME)
> + $(shlibdir)/$(SLIBNAME)
> endif
>
> install-lib-static: $(LIB)
OK
> diff -Naur ffmpeg-old/configure ffmpeg/configure
> --- ffmpeg-old/configure 2006-07-14 18:19:20.000000000 +0200
> +++ ffmpeg/configure 2006-07-14 20:32:42.437500000 +0200
> @@ -331,6 +331,7 @@
> incdir='${prefix}/include/ffmpeg'
> mandir='${prefix}/man'
> bindir='${prefix}/bin'
> +shlibdir='$libdir'
> cross_prefix=""
> cross_compile="no"
> cc="gcc"
> @@ -585,6 +586,7 @@
> mingw32="yes"
> ;;
> CYGWIN*)
> +shlibdir='$bindir'
> v4l="no"
> v4l2="no"
> audio_oss="yes"
Should be shlibdir='${whatever}'
> @@ -593,6 +595,11 @@
> extralibs=""
> cygwin="yes"
> EXESUF=".exe"
> +SLIBPREF="cyg"
> +SLIBSUF=".dll"
> +SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)'
> +SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)-$(LIBMAJOR)$(SLIBSUF)'
> +SHFLAGS='-shared -Wl,--out-implib=lib$(NAME).dll.a'
> ;;
> Linux)
> ;;
OK, although .dll.a still looks weird, but if they say so...
> @@ -1557,6 +1564,7 @@
> echo "libdir=\$(DESTDIR)$libdir" >> config.mak
> echo "incdir=\$(DESTDIR)$incdir" >> config.mak
> echo "bindir=\$(DESTDIR)$bindir" >> config.mak
> +echo "shlibdir=$shlibdir" >> config.mak
shlibdir=\$(DESTDIR)$shlibdir
> echo "mandir=\$(DESTDIR)$mandir" >> config.mak
> echo "MAKE=$make" >> config.mak
> echo "CC=$cc" >> config.mak
> diff -Naur ffmpeg-old/vhook/Makefile ffmpeg/vhook/Makefile
> --- ffmpeg-old/vhook/Makefile 2006-07-14 18:19:19.000000000 +0200
> +++ ffmpeg/vhook/Makefile 2006-07-14 20:19:34.968750000 +0200
> @@ -33,12 +33,12 @@
> $(CC) -MM $(CFLAGS) $^ 1>.depend
>
> install: $(HOOKS)
> - install -d "$(libdir)/vhook"
> - install -m 755 $(HOOKS) "$(libdir)/vhook"
> + install -d "$(shlibdir)/vhook"
> + install -m 755 $(HOOKS) "$(shlibdir)/vhook"
>
> uninstall:
> - rm -f $(addprefix $(libdir)/vhook/,$(ALLHOOKS))
> - -rmdir "$(libdir)/vhook/"
> + rm -f $(addprefix $(shlibdir)/vhook/,$(ALLHOOKS))
> + -rmdir "$(shlibdir)/vhook/"
>
> %$(SLIBSUF): %.o
> $(CC) $(LDFLAGS) -g -o $@ $(SHFLAGS) $<
OK
Wow, an almost clean patch. Not even anything worthy of a good flame.
--
M?ns Rullg?rd
mru at inprovide.com
More information about the ffmpeg-devel
mailing list