Hi.

Currently in autogen.sh there is:

# Regenerate configuration files
aclocal $ACLOCAL_FLAGS
libtoolize --force --copy >/dev/null
autoheader
automake --foreign
autoconf

and this is wrong unfortunately.
Regenerating libtool files (via libtoolize) needs also to get new
libtool m4 macros (call aclocal after libtoolize). Automake requires
properly regenerated configure (check automake info files for more
information). For new autoconf (2.5x) autoupdate is
required/suggested. Some automake versions (1.4d) uses depcomp script
(or similar name) in compilation so --add-missing --copy is added to
always add this script (automake 1.4p5 doesn't use this script).

So better autogen.sh should look like:

Currently in autogen.sh there is:
# Regenerate configuration files
libtoolize --copy --force > /dev/null
aclocal $ACLOCAL_FLAGS
autoupdate
autoheader
autoconf
automake --add-missing --copy --foreign

And here is fix to get libtool properly working with asm
files. Wihtout this compilation fails for me (with message telling
something like: bad libtool object xyz.lo)

See attachment. Don't forget to chmod +x strip_fPIC.sh.

diff -urN avifile-0.6.org/Makefile.am avifile-0.6/Makefile.am
--- avifile-0.6.org/Makefile.am	Fri Jul 27 15:42:07 2001
+++ avifile-0.6/Makefile.am	Fri Jul 27 16:58:36 2001
@@ -12,7 +12,7 @@
 SUBDIRS = $(BASE_SUBDIRS) $(QT_SUBDIRS) $(DRIVER_SUBDIRS)
 
 noinst_SCRIPTS = README
-EXTRA_DIST = autogen.sh
+EXTRA_DIST = autogen.sh strip_fPIC.sh
 
 install-exec-local:
 	$(INSTALL_SCRIPT) -m 0755 $(srcdir)/avifile-config $(DESTDIR)$(bindir)
diff -urN avifile-0.6.org/plugins/libffmpeg/libavcodec/i386/Makefile.am avifile-0.6/plugins/libffmpeg/libavcodec/i386/Makefile.am
--- avifile-0.6.org/plugins/libffmpeg/libavcodec/i386/Makefile.am	Fri Jul 27 15:42:12 2001
+++ avifile-0.6/plugins/libffmpeg/libavcodec/i386/Makefile.am	Fri Jul 27 16:57:35 2001
@@ -5,8 +5,8 @@
   fdct_mmx.s fdctdata.c sad_mmx.s cputest.c dsputil_mmx.c
 
 CFLAGS = -fomit-frame-pointer -I.. -I../.. @CFLAGS@
-#SUFFIXES = .h .moc
+SUFFIXES = .s
+STRIP_FPIC = sh $(top_srcdir)/strip_fPIC.sh
 
-# incompatible with libtool!!
-%.lo: %.s
-	nasm -f elf -o $@ $<
+.s.lo:
+	$(LIBTOOL) --mode=compile --tag=disable-shared $(STRIP_FPIC) nasm -f elf $<
diff -urN avifile-0.6.org/strip_fPIC.sh avifile-0.6/strip_fPIC.sh
--- avifile-0.6.org/strip_fPIC.sh	Thu Jan  1 01:00:00 1970
+++ avifile-0.6/strip_fPIC.sh	Thu May 10 22:19:50 2001
@@ -0,0 +1,18 @@
+#!/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 [ $# -gt 0 ]; do
+    case "$1" in
+        -?PIC)
+            # Ignore -fPIC and -DPIC options
+            ;;
+        *)
+            command="$command $1"
+            ;;
+    esac
+    shift
+done
+echo $command
+exec $command

Please commit in.

Bye,
-- 
 Arkadiusz Miśkiewicz, AM2-6BONE, 1024/3DB19BBD
 IPv6 ready PLD Linux at http://www.pld.org.pl/
My jsme Borg. Odpor je marný, budete asimilováni

Reply via email to