[spook-l] how to cross compile spook

Nathan Lutchansky lutchann at litech.org
Thu Mar 2 22:59:55 EST 2006


On Fri, 3 Mar 2006, [gb2312] =D6=DC =C3=F7 wrote:
> thank you !first I cross compile xvidcore 1.1.0 then I use=20
>=20
> "./configure --host=3Darm-linux --build=3D=3Darm CC=3Darm-linux-gcc \
> =09  CFLAGS=3D-I/usr/local/arm/2.95.3/arm-linux/include \
>              LDFLAGS=3D-L/usr/local/arm/2.95.3/arm-linux/lib" to configur=
e=20
> spook.
>=20
> it reports:
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking for arm-linux-strip... arm-linux-strip
> checking for arm-linux-gcc... arm-linux-gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... yes
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether arm-linux-gcc accepts -g... yes
> checking for arm-linux-gcc option to accept ANSI C... none needed
> checking for style of include used by make... GNU
> checking dependency style of arm-linux-gcc... gcc
> checking for flex... flex
> checking for yywrap in -lfl... no
> checking for yywrap in -ll... no
> checking lex output file root... lex.yy
> checking whether yytext is a pointer... no
> checking pwc-ioctl.h in the kernel source tree... no
> checking for dc1394_create_handle in -ldc1394_control... no
> checking for xvid_encore in -lxvidcore... yes
> checking XviD version 1.0.0... configure: error: cannot run test program=
=20
> while c
> ross compiling

OK, you need to edit the configure.ac file and replace this section:

        AC_CHECK_LIB(xvidcore,xvid_encore,[
                AC_MSG_CHECKING([for XviD version 1.0.0])
                AC_RUN_IFELSE(
                        AC_LANG_PROGRAM([[#include <xvid.h>]],[[
                           exit( XVID_VERSION_MAJOR(XVID_VERSION) !=3D 1 );
                           ]]),
                [
                        AC_MSG_RESULT(yes)
                        LIBS=3D"-lxvidcore $LIBS"
                        build_encoder_mpeg4=3Dtrue
                ],[
                        AC_MSG_RESULT(no)
                        if test x$enable_encoder_mpeg4 !=3D xauto; then
                                AC_MSG_ERROR([XviD is too old])
                        fi
                ])
        ],[
                if test x$enable_encoder_mpeg4 !=3D xauto; then
                        AC_MSG_ERROR([Unable to find libxvidcore.so])
                fi
        ])

with this:

        AC_CHECK_LIB(xvidcore,xvid_encore,[
                        LIBS=3D"-lxvidcore $LIBS"
                        build_encoder_mpeg4=3Dtrue
        ],[
                if test x$enable_encoder_mpeg4 !=3D xauto; then
                        AC_MSG_ERROR([Unable to find libxvidcore.so])
                fi
        ])

and run autoconf to rebuild the configure script.  Then you will be able=20
to run configure and it will detect XviD.  -Nathan



More information about the spook-l mailing list