From 1e3ccbc4fb196d719f2f72167e2bcb0630a318ee Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Sat, 21 Jul 2007 23:04:07 +0200 Subject: 2007-07-21 Murray Cumming * m4/reduced.m4: Added, containing CAIROMM_ARG_ENABLE_API_EXCEPTIONS(). * configure.in: Use CAIROMM_ARG_ENABLE_API_EXCEPTIONS() to add a --enable-api-exceptions=yes/no option. Used to generate a cairomm/cairommconfig.h config file, which defines (or not) CAIROMM_EXCEPTIONS_ENABLED. * cairomm/cairommconfig.h.in: Added, used to generate cairommconfig.h * cairomm/private.cc: * cairomm/private.h: Use ifdef to replace throw_exception() with an empty implementation when exceptions are disabled. This allows cairomm to be built when using CXXFLAGS=-fno-exceptions. --- m4/reduced.m4 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 m4/reduced.m4 (limited to 'm4') diff --git a/m4/reduced.m4 b/m4/reduced.m4 new file mode 100644 index 0000000..5a941fc --- /dev/null +++ b/m4/reduced.m4 @@ -0,0 +1,20 @@ +## CAIROMM_ARG_ENABLE_API_EXCEPTIONS() +## +## Provide the --enable-api-exceptions configure argument, enabled +## by default. +## +AC_DEFUN([CAIROMM_ARG_ENABLE_API_EXCEPTIONS], +[ + AC_ARG_ENABLE([api-exceptions], + [ --enable-api-exceptions Build exceptions API. + [[default=yes]]], + [cairomm_enable_api_exceptions="$enableval"], + [cairomm_enable_api_exceptions='yes']) + + if test "x$cairomm_enable_api_exceptions" = "xyes"; then + { + AC_DEFINE([CAIROMM_EXCEPTIONS_ENABLED],[1], [Defined when the --enable-api-exceptions configure argument was given]) + } + fi +]) + -- cgit v1.2.3