cairo/build/configure.ac.noversion
M Joonas Pihlaja 3f1d7de8e1 build: Fix regression provoked by newer autoconf and dodgy configuring.
We're not supposed to be redefining PACKAGE_VERSION, PACKAGE_...
from the configure generated confdefs.h.  This patch rudely adds
paper over the problem.  The compiler warnings are a problem for
us since our checking of various compiler flags assumes that
no news is good news, and that any warning messages are due
to the flags under test.  The regression appears when using
an autoconf >= 2.64, at least, but not with 2.61.

The same issue appears in the pthread test because our conftest
unconditionally #defines _GNU_SOURCE, but autoconf ends up doing
that in the confdefs.h.
2010-07-11 21:40:26 +03:00

23 lines
1.1 KiB
Text

dnl
dnl Version stuff
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])