[Click] [PATCH] Fix configure error

Eddie Kohler ekohler at gmail.com
Thu Nov 14 12:35:10 EST 2013


Hi Matteo,

Argh, the process of extracting flags from Linux. Can you give a
sample of the flags that were causing a problem? Getting rid of the
special characters might not be good enough; we might need to
recursively expand the make variables.

Eddie


On Thu, Nov 14, 2013 at 5:03 AM, Matteo Croce <matteo at openwrt.org> wrote:
> Strip special characters like $ or " from CFLAGS which causes all configure test to fail
> ---
>  configure    | 2 +-
>  configure.in | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 83632c5..d422f4e 100755
> --- a/configure
> +++ b/configure
> @@ -10693,7 +10693,7 @@ $as_echo_n "checking for Linux kernel compilation flags... " >&6; }
>         echo >conftest.c
>         make -C $linux_builddir M="`pwd`" $linux_makeargs --no-print-directory -p conftest.o >conftest.dat 2>&1
>         for v in KBUILD_CPPFLAGS KBUILD_CFLAGS CPPFLAGS CFLAGS LINUXINCLUDE debug_flags; do
> -           eval l$v="'""`grep ^$v' *:*=' conftest.dat | sed s/^$v' *:*= *//'`""'"
> +           eval l$v="'""`grep ^$v' *:*=' conftest.dat | sed -e s/^$v' *:*= *//' -e 's/\$\(.*\)//' -e 's/"//g'`""'"
>         done
>         if test -z "$lKBUILD_CPPFLAGS$lKBUILD_CFLAGS$lCPPFLAGS$lCFLAGS$lLINUXINCLUDE"; then
>             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
> diff --git a/configure.in b/configure.in
> index 869cacb..2f699e1 100644
> --- a/configure.in
> +++ b/configure.in
> @@ -1224,7 +1224,7 @@ if test $ac_have_linux_kernel = y; then
>         echo >conftest.c
>         make -C $linux_builddir M="`pwd`" $linux_makeargs --no-print-directory -p conftest.o >conftest.dat 2>&1
>         for v in KBUILD_CPPFLAGS KBUILD_CFLAGS CPPFLAGS CFLAGS LINUXINCLUDE debug_flags; do
> -           eval l$v="'""`grep ^$v' *:*=' conftest.dat | sed s/^$v' *:*= *//'`""'"
> +           eval l$v="'""`grep ^$v' *:*=' conftest.dat | sed -e s/^$v' *:*= *//' -e 's/\$\(.*\)//' -e 's/"//g'`""'"
>         done
>         if test -z "$lKBUILD_CPPFLAGS$lKBUILD_CFLAGS$lCPPFLAGS$lCFLAGS$lLINUXINCLUDE"; then
>             AC_MSG_RESULT([not found])
> --
> 1.8.3.2
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click


More information about the click mailing list