Re: Generating configuration files conditionnally?

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

 



On 2022-06-16, Sébastien Hinderer <Sebastien.Hinderer@xxxxxxxx> wrote:
> Is it possible to have the META files produced from META.in files but
> only if the package they describe has been enabled?

There should be no problem using AC_CONFIG_FILES conditionally.
For example:

  % cat >configure.ac <<'EOF'
AC_INIT([test], [0])

AC_ARG_ENABLE([foo])

AS_IF([test x"$enable_foo" = x"yes"], [AC_CONFIG_FILES([foo])])
AC_CONFIG_FILES([bar])

AC_OUTPUT
EOF
  % autoconf

  % ./configure --disable-foo
  configure: creating ./config.status
  config.status: creating bar

  % ./configure --enable-foo
  configure: creating ./config.status
  config.status: creating foo
  config.status: creating bar

Hope that helps,
  Nick





[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux