summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/configure.ac.noversion13
-rw-r--r--build/configure.ac.pthread2
2 files changed, 14 insertions, 1 deletions
diff --git a/build/configure.ac.noversion b/build/configure.ac.noversion
index 1e145482..18c4bd5f 100644
--- a/build/configure.ac.noversion
+++ b/build/configure.ac.noversion
@@ -5,8 +5,19 @@ dnl
dnl Disable autoconf's version macros. We try hard to not rebuild the entire
dnl library just because version changed. The PACKAGE_VERSION* stuff in
dnl config.h is negating all the effort.
+dnl
+dnl We're not actually supposed to be doing this, and indeed adding the
+dnl AC_DEFINEs below causes confdefs.h to contain duplicate incompatible
+dnl #defines for the same PACKAGE_* symbols. Those are provoking warnings
+dnl from the compiler, and that throws our CAIRO_TRY_LINK_*_ checks off,
+dnl because they think that there's something wrong with some flag they're
+dnl testing rather than confdefs.h! So let's do the gross thing and puke
+dnl into confdefs.h some #undefs.
+echo '#undef PACKAGE_VERSION' >>confdefs.h
+echo '#undef PACKAGE_STRING' >>confdefs.h
+echo '#undef PACKAGE_NAME' >>confdefs.h
+echo '#undef PACKAGE_TARNAME' >>confdefs.h
AC_DEFINE(PACKAGE_VERSION, [USE_cairo_version_OR_cairo_version_string_INSTEAD])
AC_DEFINE(PACKAGE_STRING, [USE_cairo_version_OR_cairo_version_string_INSTEAD])
AC_DEFINE(PACKAGE_NAME, [USE_cairo_INSTEAD])
AC_DEFINE(PACKAGE_TARNAME, [USE_cairo_INSTEAD])
-
diff --git a/build/configure.ac.pthread b/build/configure.ac.pthread
index 93c967a7..b25d6b71 100644
--- a/build/configure.ac.pthread
+++ b/build/configure.ac.pthread
@@ -46,7 +46,9 @@ dnl A program to test all the pthread features we need to be able to
dnl compile libcairo itself. We could test the features independently,
dnl but we need all of them anyway.
m4_define([libcairo_pthread_program],[dnl
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE /* for PTHREAD_MUTEX_INITIALIZER under linux */
+#endif
#include <pthread.h>
pthread_mutex_t test_mutex_initializer = PTHREAD_MUTEX_INITIALIZER;