[Flac-dev] patches for flac build
collver at linuxfreemail.com
collver at linuxfreemail.com
Mon Jul 9 11:26:56 PDT 2001
Hello,
I recently built FLAC 0.10 in NetBSD 1.5 i386 and had to make minor changes
to the build configuration. Thanks for the awesome software!
libtool would not link the "plain" nasm-generated object files for the i386
assembly optimizations. I've patched src/libFLAC/i386/Makefile.am to
operate similarly to the automake file used for the SDL assembly routines.
I saw a post to the FLAC mailing list saying that automake expects the
suffix to be .s, so .nasm files were renamed to .s files. automake
can be told to accept other suffixes using the SUFFIXES variable.
libtool recognizes files with .asm suffixes, so I renamed .s files
to .asm files.
The first two patches cause libtool to generate the object files for the
i386 assembly optimizations. The third patch fixes a linking bug for the
xmms plugin. (does the xmms plugin link out-of-the-box on other platforms?)
--- src/libFLAC/i386/Makefile.am.orig Thu May 24 12:28:48 2001
+++ src/libFLAC/i386/Makefile.am
@@ -1,9 +1,15 @@
# nasm build rule:
-%.lo: %.s
- $(NASM) -f elf -d ELF $< -o $@
+
+STRIP_FPIC = sh $(top_srcdir)/strip_fPIC.sh
+
+SUFFIXES = .asm
+
+.asm.lo:
+ $(LIBTOOL) --tag=CC --mode=compile \
+ $(STRIP_FPIC) $(NASM) -f elf -d ELF $<
noinst_LTLIBRARIES = libFLAC-asm.la
libFLAC_asm_la_SOURCES = \
- cpu_asm.s \
- fixed_asm.s \
- lpc_asm.s
+ cpu_asm.asm \
+ fixed_asm.asm \
+ lpc_asm.asm
--- strip_fPIC.sh.orig Sun Jul 8 22:06:23 2001
+++ strip_fPIC.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# libtool assumes that the compiler can handle the -fPIC flag
+# This isn't always true (for example, nasm can't handle it)
+command=""
+while [ $1 ]; do
+ if [ "$1" != "-fPIC" ]; then
+ if [ "$1" != "-DPIC" ]; then
+ command="$command $1"
+ fi
+ fi
+ shift
+done
+echo $command
+exec $command
--- src/plugin_xmms/Makefile.am.orig Fri Jan 19 12:48:18 2001
+++ src/plugin_xmms/Makefile.am
@@ -9,5 +9,5 @@
xmmsinputplugin_LTLIBRARIES = libxmms-flac.la
libxmms_flac_la_SOURCES = plugin.c
-libxmms_flac_la_LIBADD = -L$(top_builddir)/src/libFLAC/.libs -lFLAC @XMMS_LIBS@
+libxmms_flac_la_LIBADD = -L$(top_builddir)/src/libFLAC -lFLAC @XMMS_LIBS@
libxmms_flac_la_LDFLAGS = -module -avoid-version
More information about the Flac-dev
mailing list