[glibmm] Use mm-common macro for --disable-deprecated-api



commit ba85103d8353c267a7fc66ab303d8f370ccc2dbc
Author: Daniel Elstner <danielk openismus com>
Date:   Fri Aug 21 13:24:40 2009 +0200

    Use mm-common macro for --disable-deprecated-api
    
    * configure.ac: Replace GLIBMM_ARG_ENABLE_API_DEPRECATED() with
    the new MM_ARG_DISABLE_DEPRECATED_API() macro from mm-common.
    (MM_PREREQ): Raise requirement to mm-common 0.6.
    * build/reduced.m4 (GLIBMM_ARG_ENABLE_API_DEPRECATED): Remove
    obsolete macro definition.
    * glib/glibmmconfig.h.in (GLIBMM_DISABLE_DEPRECATED): Copy #undef
    statement from config.h.in template.
    * gio/giommconfig.h.in (GIOMM_DISABLE_DEPRECATED): ditto.

 ChangeLog              |   13 +++++++++++++
 build/reduced.m4       |   27 ---------------------------
 configure.ac           |   11 ++++-------
 gio/giommconfig.h.in   |    3 +++
 glib/glibmmconfig.h.in |    3 +++
 5 files changed, 23 insertions(+), 34 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 22d9c8f..f11f8f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2009-08-21  Daniel Elstner  <danielk openismus com>
 
+	Use mm-common macro for --disable-deprecated-api
+
+	* configure.ac: Replace GLIBMM_ARG_ENABLE_API_DEPRECATED() with
+	the new MM_ARG_DISABLE_DEPRECATED_API() macro from mm-common.
+	(MM_PREREQ): Raise requirement to mm-common 0.6.
+	* build/reduced.m4 (GLIBMM_ARG_ENABLE_API_DEPRECATED): Remove
+	obsolete macro definition.
+	* glib/glibmmconfig.h.in (GLIBMM_DISABLE_DEPRECATED): Copy #undef
+	statement from config.h.in template.
+	* gio/giommconfig.h.in (GIOMM_DISABLE_DEPRECATED): ditto.
+
+2009-08-21  Daniel Elstner  <danielk openismus com>
+
 	Insist on working Perl in maintainer mode
 
 	* configure.ac: Call MM_CHECK_PERL in maintainer mode in order
diff --git a/build/reduced.m4 b/build/reduced.m4
index 9411a57..fb78a17 100644
--- a/build/reduced.m4
+++ b/build/reduced.m4
@@ -58,33 +58,6 @@ AC_DEFUN([GLIBMM_ARG_ENABLE_API_EXCEPTIONS],
   fi
 ])
 
-## GLIBMM_ARG_ENABLE_API_DEPRECATED()
-##
-## Provide the --enable-deprecated-api configure argument, enabled
-## by default.
-##
-AC_DEFUN([GLIBMM_ARG_ENABLE_API_DEPRECATED],
-[
-  AC_ARG_ENABLE(deprecated-api, 
-      [  --enable-deprecated-api  Include (build) deprecated API in the libraries.
-                              [[default=yes]]],
-      [glibmm_enable_api_deprecated="$enableval"],
-      [glibmm_enable_api_deprecated='yes'])
-
-  if test "x$glibmm_enable_api_deprecated" = "xyes"; then
-  {
-    AC_MSG_WARN([Deprecated API will be built, for backwards-compatibility.])
-  }
-  else
-  {
-    AC_MSG_WARN([Deprecated API will not be built, breaking backwards-compatibility. Do not use this build for distribution packages.])
-    DISABLE_DEPRECATED_API_CFLAGS="-DGLIBMM_DISABLE_DEPRECATED"
-    AC_SUBST(DISABLE_DEPRECATED_API_CFLAGS)
-  }
-  fi
-])
-
-
 ## GLIBMM_ARG_ENABLE_API_DEFAULT_SIGNAL_HANDLERS()
 ##
 ## Provide the --enable-api-default-signal-handlers configure argument, enabled
diff --git a/configure.ac b/configure.ac
index 9a415ba..de71df0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,7 @@ AM_INIT_AUTOMAKE([1.9 -Wno-portability dist-bzip2 no-define nostdinc tar-pax])
 AM_MAINTAINER_MODE
 AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>])
 
-MM_PREREQ([0.4])
+MM_PREREQ([0.6])
 MM_INIT_MODULE([glibmm-2.4])
 MM_INIT_MODULE([giomm-2.4])
 MM_CONFIG_DOCTOOL_DIR([docs])
@@ -113,15 +113,12 @@ MM_ARG_ENABLE_WARNINGS([GLIBMM_WXXFLAGS],
                        [-pedantic -Wall -Wextra],
                        [G])
 
-#Offer the ability to omit some API from the library, 
-#to reduce the code size:
-GLIBMM_ARG_ENABLE_API_DEPRECATED
+# Offer the ability to omit some API from the library,
+# to reduce the code size:
+MM_ARG_DISABLE_DEPRECATED_API([GLIBMM GIOMM])
 GLIBMM_ARG_ENABLE_API_EXCEPTIONS
 GLIBMM_ARG_ENABLE_API_PROPERTIES
 GLIBMM_ARG_ENABLE_API_VFUNCS
-
-# Offer the ability to omit some API from the library, 
-# to reduce the code size:
 GLIBMM_ARG_ENABLE_API_DEFAULT_SIGNAL_HANDLERS
 
 AC_CONFIG_FILES([Makefile
diff --git a/gio/giommconfig.h.in b/gio/giommconfig.h.in
index 7c5e76b..8f27b73 100644
--- a/gio/giommconfig.h.in
+++ b/gio/giommconfig.h.in
@@ -3,6 +3,9 @@
 
 #include <glibmmconfig.h>
 
+/* Define to omit deprecated API from the library. */
+#undef GIOMM_DISABLE_DEPRECATED
+
 /* Major version number of giomm. */
 #undef GIOMM_MAJOR_VERSION
 
diff --git a/glib/glibmmconfig.h.in b/glib/glibmmconfig.h.in
index 3cda2f9..719603f 100644
--- a/glib/glibmmconfig.h.in
+++ b/glib/glibmmconfig.h.in
@@ -42,6 +42,9 @@
    was given */
 #undef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
 
+/* Define to omit deprecated API from the library. */
+#undef GLIBMM_DISABLE_DEPRECATED
+
 /* Defined when the --enable-api-exceptions configure argument was given */
 #undef GLIBMM_EXCEPTIONS_ENABLED
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]