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 eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf