]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
actually create the defines used to distinguisch the glib from the pcre cases
authorTobias Oetiker <tobi@oetiker.ch>
Mon, 27 Oct 2014 14:13:14 +0000 (15:13 +0100)
committerTobias Oetiker <tobi@oetiker.ch>
Mon, 27 Oct 2014 14:13:14 +0000 (15:13 +0100)
configure.ac
m4/acinclude.m4
src/rrd_create.c
src/rrd_graph.c

index 8f53cff77607a02495c30c0bda3404edde1f157f..92002600d67e39a384859d3a6f1be1ddaca8f6c5 100644 (file)
@@ -215,7 +215,7 @@ CONFIGURE_PART(Checking for Header Files)
 dnl Checks for header files.
 AC_HEADER_STDC
 AC_HEADER_DIRENT
-AC_CHECK_HEADERS(pcre.h langinfo.h stdint.h inttypes.h libgen.h features.h sys/stat.h sys/types.h fcntl.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/times.h sys/param.h sys/resource.h signal.h float.h stdio.h stdlib.h errno.h string.h ctype.h grp.h pwd.h)
+AC_CHECK_HEADERS(langinfo.h stdint.h inttypes.h libgen.h features.h sys/stat.h sys/types.h fcntl.h fp_class.h malloc.h unistd.h ieeefp.h math.h sys/times.h sys/param.h sys/resource.h signal.h float.h stdio.h stdlib.h errno.h string.h ctype.h grp.h pwd.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -552,10 +552,17 @@ AM_CONDITIONAL(BUILD_RRDRESTORE,[test $enable_rrd_restore != no])
 
 EX_CHECK_ALL(glib-2.0,   glib_check_version,            glib.h,                 glib-2.0,    2.28.7, ftp://ftp.gtk.org/pub/glib/2.28/, "")
 
-AC_CHECK_FUNC(g_regex_new,[],[
+AC_CHECK_FUNC(g_regex_new,[
+   AC_DEFINE(HAVE_G_REGEX_NEW,[1],[our glib has g_regex_new])
+],[
    AC_MSG_CHECKING(if pcre is available to supply the missing regex support in glib)
    AC_MSG_RESULT(checking now ...)
    EX_CHECK_ALL(pcre,   pcre_compile,            pcre.h,                 pcre,    x.x.x, [get a newer glib and you will not need pcre at all],"")
+   AC_CHECK_FUNC(g_regex_new,[
+        AC_DEFINE(HAVE_PCRE_COMPILE,[1],[we have pcre to replace missing regexp support form glib])
+   ],[
+        AC_MSG_ERROR([you need either glib with g_regex support or libpcre to compile rrdtool.])
+   ])
 ])
 
 
index 234ef48d154da523246523c6059b5f4feb37723a..bf7271d53068371028768e06081364416a859e49 100644 (file)
@@ -79,8 +79,8 @@ AC_DEFUN([EX_CHECK_ALL],
        LIBS="${ex_check_save_LIBS}"
        CPPFLAGS="${ex_check_save_CPPFLAGS}"
        LDFLAGS="${ex_check_save_LDFLAGS}"
-    fi
-    AC_LANG_POP(C)
+   fi
+   AC_LANG_POP(C)
 ]
 )
 
index 75121953bda8da122f8119d10b82d0e3a3b3570c..3b1efdf0f4135f3bdb27ad2a9ee693ea4b9389c8 100644 (file)
@@ -20,7 +20,7 @@
 #include "rrd_tool.h"
 
 #ifndef HAVE_G_REGEX_NEW
-#ifdef HAVE_PCRE_H
+#ifdef HAVE_PCRE_COMPILE
 #include <pcre.h>
 #else
 #error "you must have either glib with regexp support or libpcre"
index 26897f1084f668abf5fe2bad95a0963edf0d365f..b61feda086b2aaa253a86cf3241e9a662388408d 100644 (file)
@@ -22,7 +22,7 @@
 #ifdef HAVE_G_REGEX_NEW
 #include <glib.h>
 #else
-#ifdef HAVE_PCRE_H
+#ifdef HAVE_PCRE_COMPILE
 #include <pcre.h>
 #else
 #error "you must have either glib with regexp support or libpcre"