[Cin] libzmpeg3 on non-x86/non-MMX arches, also little bit about CPU detection in autoconf.

Andrew Randrianasulu randrianasulu at gmail.com
Mon Feb 25 01:29:29 CET 2019


Hello again.

Recompiling Cinelerra-GG even partially on emulated ppc64le machine is SLOW 
process, so sorry if I fire those ideas faster than I can test them properly.

I was looking at libzmpeg3, because without it a lot of functionality (dvb, 
v4l2) simply not there, and _may be_ found reason why it was so insisting on 
MMX assembler:

https://git.cinelerra-gg.org/git/?p=goodguy/cinelerra.git;a=blob;f=cinelerra-5.1/libzmpeg3/Makefile;h=b256c73686cad8864236fcab6c5cdab6739a20f3;hb=HEAD

 121 $(OBJS): 
 122         $(CC) -c `cat $(OBJDIR)/c_flags` $(subst $(OBJDIR)/,, $*.C) -o $*.o
 123 $(ASMOBJS): 
 124         $(CC) -c `cat $(OBJDIR)/c_flags` $(subst $(OBJDIR)/,, $*.S) -o $*.o
 125 $(NASMOBJS): 
 126         $(NASM) -f elf $(subst $(OBJDIR)/,, $*.s) -o $*.o

So, I'll try with libzmpeg3 enabled and those four lines (123, 124, 125, 126) 
removed ...

More stackoverflow!

https://stackoverflow.com/questions/23379805/determining-architecture-in-makefile-am-using-automake

---------copy----------
  
 
 1 Answer  
 active oldest votes
 
 
4
 
Selecting the CPU and OS is better handled in configure.ac, which has 
AC_CANONICAL_HOST which parses the output from uname and puts it in a standard 
format:
configure.ac
...
AC_CANONICAL_HOST
WRAPPER_CPPFLAGS=""
AS_CASE([$host_os],
        [linux*],
        [
           WRAPPER_CPPFLAGS="$WRAPPER_CPPFLAGS -DLINUX"
           AS_CASE([$host_cpu],
                   [x86_64],
                   [
                       
WRAPPER_CPPFLAGS="$WRAPPER_CPPFLAGS -DAMD64 -I../../../external/xerces-c-3.1.1-x86_64-linux-gcc-3.4/include"
                   ],
                   [i?86],
                   [
                       
WRAPPER_CPPFLAGS="$WRAPPER_CPPFLAGS -I../../../external/xerces-c-3.1.1-x86-linux-gcc-3.4/include"
                   ])
        ],
        [darwin*],
        [
           WRAPPER_CPPFLAGS="$WRAPPER_CPPFLAGS -DOSX"
           AS_CASE([$host_cpu],
                   [i?86],
                   [
                       
WRAPPER_CPPFLAGS="$WRAPPER_CPPFLAGS -I../../../external/xerces-c-3.1.1-x86-macosx-gcc-3.4/include"
                   ])
        ])
AC_SUBST([WRAPPER_CPPFLAGS])
-------------

well, in our case configure.ac needs some MMX-outing for non-x86-machines AND 
thirdparty-libs=ON.

Alpine linux additionally need -lexecinfo for backtrace symbols, and -lintl for 
internationalization.


More information about the Cin mailing list