mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 11:50:28 +02:00
Make `--disable-deprecated' work.
* configure.in (enable_deprecated): Set SCM_WARN_DEPRECATED_DEFAULT even when --disable-deprecated is passed. * libguile/deprecation.h: Declare deprecation-issuing methods even if SCM_ENABLE_DEPRECATED is not set. * libguile/deprecation.c: Ditto. (scm_init_deprecation): Include full body even for unset SCM_ENABLE_DEPRECATED. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
aa49787b5e
commit
6ab8238d99
3 changed files with 7 additions and 18 deletions
|
@ -159,6 +159,7 @@ AC_ARG_ENABLE([deprecated],
|
||||||
|
|
||||||
if test "$enable_deprecated" = no; then
|
if test "$enable_deprecated" = no; then
|
||||||
SCM_I_GSC_ENABLE_DEPRECATED=0
|
SCM_I_GSC_ENABLE_DEPRECATED=0
|
||||||
|
warn_default=no
|
||||||
else
|
else
|
||||||
if test "$enable_deprecated" = yes || test "$enable_deprecated" = ""; then
|
if test "$enable_deprecated" = yes || test "$enable_deprecated" = ""; then
|
||||||
warn_default=summary
|
warn_default=summary
|
||||||
|
@ -168,9 +169,9 @@ else
|
||||||
warn_default=$enable_deprecated
|
warn_default=$enable_deprecated
|
||||||
fi
|
fi
|
||||||
SCM_I_GSC_ENABLE_DEPRECATED=1
|
SCM_I_GSC_ENABLE_DEPRECATED=1
|
||||||
AC_DEFINE_UNQUOTED(SCM_WARN_DEPRECATED_DEFAULT, "$warn_default",
|
|
||||||
[Define this to control the default warning level for deprecated features.])
|
|
||||||
fi
|
fi
|
||||||
|
AC_DEFINE_UNQUOTED(SCM_WARN_DEPRECATED_DEFAULT, "$warn_default",
|
||||||
|
[Define this to control the default warning level for deprecated features.])
|
||||||
|
|
||||||
AC_ARG_ENABLE(elisp,
|
AC_ARG_ENABLE(elisp,
|
||||||
[ --disable-elisp omit Emacs Lisp support],,
|
[ --disable-elisp omit Emacs Lisp support],,
|
||||||
|
|
|
@ -41,8 +41,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if (SCM_ENABLE_DEPRECATED == 1)
|
|
||||||
|
|
||||||
struct issued_warning {
|
struct issued_warning {
|
||||||
struct issued_warning *prev;
|
struct issued_warning *prev;
|
||||||
const char *message;
|
const char *message;
|
||||||
|
@ -138,8 +136,6 @@ print_deprecation_summary (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SCM_ENABLE_DEPRECATED == 1 */
|
|
||||||
|
|
||||||
SCM_DEFINE(scm_include_deprecated_features,
|
SCM_DEFINE(scm_include_deprecated_features,
|
||||||
"include-deprecated-features", 0, 0, 0,
|
"include-deprecated-features", 0, 0, 0,
|
||||||
(),
|
(),
|
||||||
|
@ -157,7 +153,6 @@ SCM_DEFINE(scm_include_deprecated_features,
|
||||||
void
|
void
|
||||||
scm_init_deprecation ()
|
scm_init_deprecation ()
|
||||||
{
|
{
|
||||||
#if (SCM_ENABLE_DEPRECATED == 1)
|
|
||||||
const char *level = getenv ("GUILE_WARN_DEPRECATED");
|
const char *level = getenv ("GUILE_WARN_DEPRECATED");
|
||||||
if (level == NULL)
|
if (level == NULL)
|
||||||
level = SCM_WARN_DEPRECATED_DEFAULT;
|
level = SCM_WARN_DEPRECATED_DEFAULT;
|
||||||
|
@ -170,7 +165,6 @@ scm_init_deprecation ()
|
||||||
SCM_WARN_DEPRECATED = 0;
|
SCM_WARN_DEPRECATED = 0;
|
||||||
atexit (print_deprecation_summary);
|
atexit (print_deprecation_summary);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#include "libguile/deprecation.x"
|
#include "libguile/deprecation.x"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#ifndef SCM_DEPRECATION_H
|
#ifndef SCM_DEPRECATION_H
|
||||||
#define SCM_DEPRECATION_H
|
#define SCM_DEPRECATION_H
|
||||||
|
|
||||||
/* Copyright (C) 2001, 2006, 2008 Free Software Foundation, Inc.
|
/* Copyright (C) 2001, 2006, 2008, 2009 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -26,20 +26,14 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if (SCM_ENABLE_DEPRECATED == 1)
|
/* These functions are a possibly useful part of the API and not only used
|
||||||
|
internally, thus they are exported always, not depending on
|
||||||
/* These functions are _not_ deprecated, but we exclude them along
|
SCM_ENABLE_DEPRECATED. */
|
||||||
with the really deprecated features to be sure that no-one is
|
|
||||||
trying to emit deprecation warnings when libguile is supposed to be
|
|
||||||
clean of them.
|
|
||||||
*/
|
|
||||||
|
|
||||||
SCM_API void scm_c_issue_deprecation_warning (const char *msg);
|
SCM_API void scm_c_issue_deprecation_warning (const char *msg);
|
||||||
SCM_API void scm_c_issue_deprecation_warning_fmt (const char *msg, ...);
|
SCM_API void scm_c_issue_deprecation_warning_fmt (const char *msg, ...);
|
||||||
SCM_API SCM scm_issue_deprecation_warning (SCM msgs);
|
SCM_API SCM scm_issue_deprecation_warning (SCM msgs);
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
SCM_API SCM scm_include_deprecated_features (void);
|
SCM_API SCM scm_include_deprecated_features (void);
|
||||||
SCM_INTERNAL void scm_init_deprecation (void);
|
SCM_INTERNAL void scm_init_deprecation (void);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue