[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Do not use deprecation flags in releases
From: |
Eric Blake |
Subject: |
Re: Do not use deprecation flags in releases |
Date: |
Mon, 20 Jun 2011 11:34:32 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.10 |
On 06/19/2011 04:55 PM, Javier Jardón wrote:
> Hello,
>
> I'm looking for the best solution to deal with the deprecation flags
> for Glib/GTK+.
> Most project use them incodiotionally, so releases will break if a in
> Glib/GTK+ deprecation is introduced.
> I've propossed this code [1] to add to our configure.ac files, and I'd
> like to know if there is a better solution for this
>
> Regards
>
> [1] http://mail.gnome.org/archives/release-team/2011-June/msg00030.html
I'm not sure what your question is, at least as it relates to autoconf.
Are you trying to determine a way to change the default of a
configure-time option depending on whether you are building from the
development tree vs. building from a release tarball?
> dnl if .git directory is present, considering we are working in the repository
> if test -d ".git"; then
> default_strict=yes
> else
> default_strict=no
> fi
That doesn't work with VPATH builds; you may want to use:
test -d "$(srcdir)/.git"
instead.
>
> AC_ARG_ENABLE(strict, AS_HELP_STRING([--enable-strict],
> [Enable strict compilation options]),
> enable_strict=$enableval,
> enable_strict=$default_strict)
Under-quoted. For recommended quoting, you need:
AC_ARG_ENABLE([strict], [AS_HELP_STRING([--enable-strict],
[Enable strict compilation options])], [enable_strict=$enableval],
[enable_strict=$default_strict])
> if test x$enable_strict != xno; then
> CPPFLAGS="$CPPFLAGS -DG_DISABLE_DEPRECATED
> -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED"
> fi
But yes, that approach looks reasonable as a way to make development of
your package default to a different strictness than users of your
tarball, all while still allowing explicit overrides of the default for
either build situation.
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature