[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: --with-arg by default

From: Adam Mercer
Subject: Re: --with-arg by default
Date: Wed, 29 Jul 2009 11:26:43 +0100

On Wed, Jul 29, 2009 at 10:29, Steffen
Dettmer<address@hidden> wrote:
> you would have flag list redundant and it could happen someone will
> forget to change one place when adding next flag...
> so maybe just call a function?

I was thinking along those lines myself.

> the withval isn't used? Wouldn't it be --enable-FEATURE then?

probably, I've recently taken over maintenance of this code, which was
originally written over 8 years ago, and this change seems like it is
a good opportunity to use AC_ARG_ENABLE instead of AC_ARG_WITH as it
will minimise any disruption.

> dnl surely my example is wrong (quoting, ...) and not portable, I
> dnl don't know the details.
> dnl
> dnl --with-gcc_flags? maybe better configure CFLAGS=xyz?
>  [AC_ARG_WITH([gcc_flags],AC_HELP_STRING([--x],[y]),
>  [case $withval in
>    yes)
>    no)
>      ;;
>    *)
>      DO_ENABLE_LAL_WITH_GCC_FLAGS($withval);;
>  esac ],
> ])
> dnl Sets several specific flags to variable lal_gcc_flags
> [
>    lal_gcc_flags="-g3 -O4 -Wall -W -Wmissing-prototypes
> -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align
> -Wwrite-strings -fno-common -Wnested-externs -Wno-format-zero-length"
>      case $host_cpu-$host_os in
>        *i386-darwin*) lal_gcc_flags="${lal_gcc_flags} -pedantic" ;;
>        *) lal_gcc_flags="${lal_gcc_flags} -pedantic-errors" ;;
>      esac
>  dnl setting CFLAGS is not indended by autoconf. Users should
>  dnl   set it if they want this (however, then they must set them all
>  dnl   and know compiler details etc).
>  dnl In "else" at least an "compiler not supported" or "option
>  dnl   not supported" should be added when lal_gcc_flags is set.
>  if test "$GCC" = yes; then
>    CFLAGS="$CFLAGS $lal_gcc_flags"
>  fi
> ])

Thanks, that's very helpful.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]