automake
[Top][All Lists]
Advanced

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

Re: question to the subpackage feature


From: Ralf Wildenhues
Subject: Re: question to the subpackage feature
Date: Fri, 27 Nov 2009 21:07:30 +0100
User-agent: Mutt/1.5.20 (2009-08-09)

Hello Andreas,

* Andreas Otto wrote on Wed, Nov 25, 2009 at 10:39:54AM CET:
>  I have integrated an subpackage into an already existing package
>  everything works well but one problem still exists
> 
>   the debugging feature is turned on in the toplevel package with
>   --enable-symbols and in the subpackage with --enable-debug
>   some kind of translation is necessary

If you can modify the subpackage, then I'd probably just add
  AC_ARG_ENABLE([symbols],
    [AS_HELP_STRING([--enable-symbols], [alias for --enable-debug])],
    [enable_debug=$enable_symbols])

to its configure.ac.

If you can only modify the toplevel package, you can iterate through and
modify $ac_configure_args, but you need to be very careful with the
quoting.

It works more or less like this (untested), added to toplevel
configure.ac after AC_INIT and sometime before AC_OUTPUT:

  new_configure_args=
  eval "set x $ac_configure_args"
  shift
  for arg
  do
    case arg in
    --enable-symbols)
      arg="--enable-debug" ;;
    *\'*)
      arg=`AS_ECHO(["$arg"]) | sed "s/'/'\\\\\\\\''/g"` ;;
    esac
    new_configure_args="$new_configure_args $arg"
  done
  ac_configure_args=$new_configure_args

If --enable-symbols takes an argument, then the above needs to be
adjusted accordingly.

Hope that helps.

Cheers,
Ralf




reply via email to

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