summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--configure.in1
-rw-r--r--gobject/gboxed.c4
3 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b595161ad..9b5cf60c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
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>
+
* glib/gbsearcharray.h: Quell some compiler warnings.
2009-01-18 Matthias Clasen <mclasen@redhat.com>
diff --git a/configure.in b/configure.in
index 921506dcb..5fd985fce 100644
--- a/configure.in
+++ b/configure.in
@@ -2502,6 +2502,7 @@ esac],
AM_CONDITIONAL(ENABLE_REGEX, $enable_regex)
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
AC_ARG_WITH(pcre,
[AC_HELP_STRING([--with-pcre=@<:@internal/system@:>@],
diff --git a/gobject/gboxed.c b/gobject/gboxed.c
index 0026b0ad5..8cdcd1ec5 100644
--- a/gobject/gboxed.c
+++ b/gobject/gboxed.c
@@ -263,10 +263,14 @@ GType
g_regex_get_type (void)
{
static GType type_id = 0;
+
+#ifdef ENABLE_REGEX
if (!type_id)
type_id = g_boxed_type_register_static (g_intern_static_string ("GRegex"),
(GBoxedCopyFunc) g_regex_ref,
(GBoxedFreeFunc) g_regex_unref);
+#endif
+
return type_id;
}