mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-16 12:28:48 +02:00
Define an ENABLE_REGEX macro
* configure.in: Define an ENABLE_REGEX macro * gobject/gboxed.c: Don't refer to g_regex_ref if ENABLE_REGEX is not defined. svn path=/trunk/; revision=7815
This commit is contained in:
parent
a55229a520
commit
a5fd60a8ac
@ -1,3 +1,12 @@
|
|||||||
|
2009-01-18 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
Bug 512779 – --disable-regex breaks compilation
|
||||||
|
|
||||||
|
* configure.in: Define an ENABLE_REGEX macro
|
||||||
|
|
||||||
|
* gobject/gboxed.c: Don't refer to g_regex_ref if ENABLE_REGEX
|
||||||
|
is not defined.
|
||||||
|
|
||||||
2009-01-18 Matthias Clasen <mclasen@redhat.com>
|
2009-01-18 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
* glib/gbsearcharray.h: Quell some compiler warnings.
|
* glib/gbsearcharray.h: Quell some compiler warnings.
|
||||||
|
@ -2502,6 +2502,7 @@ esac],
|
|||||||
AM_CONDITIONAL(ENABLE_REGEX, $enable_regex)
|
AM_CONDITIONAL(ENABLE_REGEX, $enable_regex)
|
||||||
|
|
||||||
if test x$enable_regex = xtrue; then
|
if test x$enable_regex = xtrue; then
|
||||||
|
AC_DEFINE(ENABLE_REGEX, [], [include GRegex])
|
||||||
# Check if we should use the internal or the system-supplied pcre
|
# Check if we should use the internal or the system-supplied pcre
|
||||||
AC_ARG_WITH(pcre,
|
AC_ARG_WITH(pcre,
|
||||||
[AC_HELP_STRING([--with-pcre=@<:@internal/system@:>@],
|
[AC_HELP_STRING([--with-pcre=@<:@internal/system@:>@],
|
||||||
|
@ -263,10 +263,14 @@ GType
|
|||||||
g_regex_get_type (void)
|
g_regex_get_type (void)
|
||||||
{
|
{
|
||||||
static GType type_id = 0;
|
static GType type_id = 0;
|
||||||
|
|
||||||
|
#ifdef ENABLE_REGEX
|
||||||
if (!type_id)
|
if (!type_id)
|
||||||
type_id = g_boxed_type_register_static (g_intern_static_string ("GRegex"),
|
type_id = g_boxed_type_register_static (g_intern_static_string ("GRegex"),
|
||||||
(GBoxedCopyFunc) g_regex_ref,
|
(GBoxedCopyFunc) g_regex_ref,
|
||||||
(GBoxedFreeFunc) g_regex_unref);
|
(GBoxedFreeFunc) g_regex_unref);
|
||||||
|
#endif
|
||||||
|
|
||||||
return type_id;
|
return type_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user