From 6ba2c80cdedf6d4eea99c565ffa8b204174d0576 Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Sat, 4 Dec 2010 00:31:22 -0800 Subject: Some piece of this commit triggers a syntax error running swig: make[2]: Entering directory `/home/eb/git/wf-exec/gr-howto-write-a-block/swig' Compile .i to .py /usr/bin/swig -fvirtual -python -modern -keyword -w511 -outdir . -I/home/eb/git/wf-exec/gr-howto-write-a-block/lib -I/home/eb/install/include/gnuradio -I/home/eb/install/include/gnuradio/swig \ -MD -MF python/howto_swig.Std \ -module howto_swig -o python/howto_swig.cc -oh python/howto_swig.h howto_swig.i /usr/share/swig/1.3.40/python/std_complex.i:12: Error: Syntax error in input(1). make[2]: *** [howto_swig.py] Error 1 --- gr-howto-write-a-block/config/pkg.m4 | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'gr-howto-write-a-block/config/pkg.m4') diff --git a/gr-howto-write-a-block/config/pkg.m4 b/gr-howto-write-a-block/config/pkg.m4 index 80bdfed4c..2d4d96109 100644 --- a/gr-howto-write-a-block/config/pkg.m4 +++ b/gr-howto-write-a-block/config/pkg.m4 @@ -111,8 +111,11 @@ fi[]dnl # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_DEFUN([PKG_CHECK_MODULES],[ +AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl + AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_INCLUDEDIR], [includedir for $1, overriding pkg-config])dnl @@ -124,7 +127,17 @@ _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) if test x$cross_compiling = xyes then - _PKG_CONFIG([$1][_LIBS], [libs-only-l --static], [$2]) + dnl _PKG_CONFIG([$1][_LIBS], [libs-only-l --static], [$2]) + _PKG_CONFIG([$1][_LIBS], [libs --static], [$2]) + dnl prune out any -L/lib or -L/usr/lib since they're pointing to the wrong filesystem root + _pkg_tmp= + for flag in [$]pkg_cv_[$1][_LIBS]; do + case $flag in + (-L/lib* | -L/usr/lib* ) ;; # ignore + (*) _pkg_tmp="$_pkg_tmp $flag" ;; + esac + done + pkg_cv_[$1][_LIBS]="$_pkg_tmp" else _PKG_CONFIG([$1][_LIBS], [libs --static], [$2]) fi -- cgit