propagate the pcre flags to libglib and not to all parts of glib.
authorMarco Barisione <marco@barisione.org>
Tue, 11 Sep 2007 20:10:31 +0000 (20:10 +0000)
committerMarco Barisione <mbari@src.gnome.org>
Tue, 11 Sep 2007 20:10:31 +0000 (20:10 +0000)
2007-09-11  Marco Barisione <marco@barisione.org>

* glib/Makefile.am:
* configure.in: propagate the pcre flags to libglib and not to all
parts of glib. (#475854, dmacks@netspace.org)

svn path=/trunk/; revision=5749

ChangeLog
configure.in
glib/Makefile.am

index 8e138cd..ae1a0f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-09-11  Marco Barisione <marco@barisione.org>
+
+       * glib/Makefile.am:
+       * configure.in: propagate the pcre flags to libglib and not to all
+       parts of glib. (#475854, dmacks@netspace.org)
+
 2007-09-11  Matthias Clasen  <mclasen@redhat.com>
 
        * configure.in: Define G_ATOMIC_ARM.
index eea8af4..ffb6808 100644 (file)
@@ -2196,6 +2196,8 @@ if test x$enable_regex = xtrue; then
     PKG_CHECK_MODULES(PCRE,
                       libpcre >= $PCRE_REQUIRED_VERSION)
     AC_CACHE_CHECK([for Unicode support in PCRE],glib_cv_pcre_has_unicode,[
+                   glib_save_CFLAGS="$CFLAGS"
+                   glib_save_LDFLAGS="$LDFLAGS"
                    CFLAGS="$CFLAGS $PCRE_CFLAGS" LDFLAGS="$LDFLAGS $PCRE_LIBS"
                    AC_TRY_RUN([#include <pcre.h>
                                int main () {
@@ -2210,7 +2212,10 @@ if test x$enable_regex = xtrue; then
                                }],
                    glib_cv_pcre_has_unicode=yes,
                    glib_cv_pcre_has_unicode=no,
-                   glib_cv_pcre_has_unicode=yes)])
+                   glib_cv_pcre_has_unicode=yes)
+                   CFLAGS="$lib_save_CFLAGS"
+                   LDFLAGS="$glib_save_LDFLAGS"
+       ])
     if test "$glib_cv_pcre_has_unicode" = "no"; then
       AC_MSG_ERROR([*** The system-supplied PCRE does not support Unicode properties or UTF-8.])
     fi
index 22ecd19..df6aed7 100644 (file)
@@ -22,7 +22,7 @@ SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre
 
 DIST_SUBDIRS = libcharset gnulib pcre update-pcre
 
-INCLUDES = -I$(top_srcdir) -DG_LOG_DOMAIN=\"GLib\" \
+INCLUDES = -I$(top_srcdir) $(pcre_inc) -DG_LOG_DOMAIN=\"GLib\" \
        $(GLIB_DEBUG_FLAGS) -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION 
 
 glib.def: glib.symbols
@@ -261,11 +261,14 @@ endif
 if ENABLE_REGEX
 if USE_SYSTEM_PCRE
 pcre_lib = $(PCRE_LIBS)
+pcre_inc = $(PCRE_CFLAGS)
 else
 pcre_lib = pcre/libpcre.la
+pcre_inc =
 endif
 else
 pcre_lib =
+pcre_inc =
 endif
 
 libglib_2_0_la_LIBADD = libcharset/libcharset.la $(printf_la) @GIO@ @GSPAWN@ @PLATFORMDEP@ @ICONV_LIBS@ @G_LIBS_EXTRA@ $(pcre_lib)