[glibmm] Don't use obsolete macros.



commit d1a70549a88dd1f0f5dc81ecd37428103e8aeec8
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Wed Sep 21 19:22:35 2011 +0200

    Don't use obsolete macros.
    
    * autogen.sh: Warn about everything during autoreconf.
    * configure.ac: Replaced obsolete macros with their modern counterparts.
    * build/c_std.m4: Ditto.
    * build/cxx.m4: Ditto.
    * build/cxx_std.m4: Ditto.
    * build/sun.m4: Ditto.
    * build/macros.m4: Ditto. Removed all unused macros and renamed to...
    * build/debug.m4: ...this, because only macro for debugging refcount has
    left.
    * build/glibmm_check_perl.m4: Deleted. None of the macros there was used.
    * build/dk-feature.m4: Use AS_VAR_IF.
    * Makefile.am: Removed distribution of deleted m4 file.

 Makefile.am                |    4 -
 autogen.sh                 |    2 +-
 build/c_std.m4             |   53 +++++++++++-------
 build/cxx.m4               |   34 ++++++------
 build/cxx_std.m4           |  131 +++++++++++++++++++++++---------------------
 build/debug.m4             |   36 ++++++++++++
 build/dk-feature.m4        |    6 +-
 build/glibmm_check_perl.m4 |   57 -------------------
 build/macros.m4            |   72 ------------------------
 build/sun.m4               |   45 +++++++++++----
 configure.ac               |    3 +-
 11 files changed, 191 insertions(+), 252 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index e88f874..1a058b1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -56,7 +56,3 @@ dist_noinst_DATA = $(text_files) $(msvc_files)
 dist_noinst_SCRIPTS = autogen.sh
 
 DISTCLEANFILES = $(filter %mmconfig.h,$(msvc_files))
-
-# TODO: Obsolete; remove after grace period.
-aclocal_macrodir = $(datadir)/aclocal
-dist_aclocal_macro_DATA = build/glibmm_check_perl.m4
diff --git a/autogen.sh b/autogen.sh
index 6686611..fadccc7 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -3,5 +3,5 @@ test -n "$srcdir" || srcdir=`dirname "$0"`
 test -n "$srcdir" || srcdir=.
 
 mm-common-prepare --copy --force "$srcdir"
-autoreconf --force --install --verbose "$srcdir"
+autoreconf --force --install --verbose --warnings=all "$srcdir"
 test -n "$NOCONFIGURE" || "$srcdir/configure" --enable-maintainer-mode "$@"
diff --git a/build/c_std.m4 b/build/c_std.m4
index f4a8b56..606aef6 100644
--- a/build/c_std.m4
+++ b/build/c_std.m4
@@ -1,22 +1,38 @@
-cv_c_std_time_t_is_not_int32
-## GLIBMM_CXX_HAS_NAMESPACE_STD()
+## Copyright (c) 2009, 2011  Openismus GmbH  <http://www.openismus.com/>
 ##
-## Test whether libstdc++ declares namespace std.  For safety,
-## also check whether several randomly selected STL symbols
-## are available in namespace std.
+## This file is part of glibmm.
 ##
-## On success, #define GLIBMM_HAVE_NAMESPACE_STD to 1.
+## glibmm is free software: you can redistribute it and/or modify it
+## under the terms of the GNU Lesser General Public License as published
+## by the Free Software Foundation, either version 2.1 of the License,
+## or (at your option) any later version.
+##
+## glibmm is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+## See the GNU Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public License
+## along with this library.  If not, see <http://www.gnu.org/licenses/>.
+
+#serial 20110910
+
+## GLIBMM_C_STD_TIME_T_IS_NOT_INT32
+##
+## Test whether time_t and gint32 are typedefs of the same builting type.  If
+## they aren't then they can be used for method overload.  In that case
+## GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32 is defined to 1.
 ##
 AC_DEFUN([GLIBMM_C_STD_TIME_T_IS_NOT_INT32],
 [
   AC_CACHE_CHECK(
     [whether time_t is not equivalent to gint32, meaning that it can be used for a method overload],
-    [gtkmm_cv_c_std_time_t_is_not_int32],
+    [glibmm_cv_c_std_time_t_is_not_int32],
   [
-    AC_TRY_COMPILE(
-    [
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+    [[
       #include <time.h>
-    ],[
+    ]],[[
       typedef signed int gint32;
       class Test
       {
@@ -26,18 +42,13 @@ AC_DEFUN([GLIBMM_C_STD_TIME_T_IS_NOT_INT32],
         void something(time_t val)
         {}
       };
-    ],
-      [gtkmm_cv_c_std_time_t_is_not_int32="yes"],
-      [gtkmm_cv_c_std_time_t_is_not_int32="no"]
+    ]])],
+      [glibmm_cv_c_std_time_t_is_not_int32='yes'],
+      [glibmm_cv_c_std_time_t_is_not_int32='no']
     )
   ])
 
-  if test "x${gtkmm_cv_c_std_time_t_is_not_int32}" = "xyes"; then
-  {
-    AC_DEFINE([GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32],[1], [Defined when time_t is not equivalent to gint32, meaning that it can be used for a method overload])
-  }
-  fi
+  AS_VAR_IF([glibmm_cv_c_std_time_t_is_not_int32], ['yes'],
+            [AC_DEFINE([GLIBMM_HAVE_C_STD_TIME_T_IS_NOT_INT32], [1],
+                       [Defined when time_t is not equivalent to gint32, meaning that it can be used for a method overload])])[]dnl
 ])
-
-
-
diff --git a/build/cxx.m4 b/build/cxx.m4
index 856c557..22d2435 100644
--- a/build/cxx.m4
+++ b/build/cxx.m4
@@ -1,4 +1,4 @@
-## Copyright (c) 2009  Openismus GmbH  <http://www.openismus.com/>
+## Copyright (c) 2009, 2011  Openismus GmbH  <http://www.openismus.com/>
 ##
 ## This file is part of glibmm.
 ##
@@ -15,7 +15,7 @@
 ## You should have received a copy of the GNU Lesser General Public License
 ## along with this library.  If not, see <http://www.gnu.org/licenses/>.
 
-#serial 20090816
+#serial 20110910
 
 ## GLIBMM_CXX_MEMBER_FUNCTIONS_MEMBER_TEMPLATES
 ##
@@ -66,9 +66,9 @@ func = &foo::doit<int>;
     [glibmm_cv_cxx_member_functions_member_templates=yes],
     [glibmm_cv_cxx_member_functions_member_templates=no])])
 
-AS_IF([test "x$glibmm_cv_cxx_member_functions_member_templates" = xyes],
-      [AC_DEFINE([GLIBMM_MEMBER_FUNCTIONS_MEMBER_TEMPLATES], [1],
-                 [Define if C++ member functions may refer to member templates.])])[]dnl
+AS_VAR_IF([glibmm_cv_cxx_member_functions_member_templates], ['yes'],
+          [AC_DEFINE([GLIBMM_MEMBER_FUNCTIONS_MEMBER_TEMPLATES], [1],
+                     [Define if C++ member functions may refer to member templates.])])[]dnl
 ])
 
 ## GLIBMM_CXX_CAN_DISAMBIGUATE_CONST_TEMPLATE_SPECIALIZATIONS
@@ -115,9 +115,9 @@ Traits< Foo<const int> > cfit;
     [glibmm_cv_cxx_can_disambiguate_const_template_specializations=yes],
     [glibmm_cv_cxx_can_disambiguate_const_template_specializations=no])])
 
-AS_IF([test "x$glibmm_cv_cxx_can_disambiguate_const_template_specializations" = xyes],
-      [AC_DEFINE([GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS], [1],
-[Define if the compiler disambiguates template specializations for const and non-const types.])])[]dnl
+AS_VAR_IF([glibmm_cv_cxx_can_disambiguate_const_template_specializations], ['yes'],
+          [AC_DEFINE([GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS], [1],
+                     [Define if the compiler disambiguates template specializations for const and non-const types.])])[]dnl
 ])
 
 ## GLIBMM_CXX_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION
@@ -152,9 +152,9 @@ class SomeTemplate
     [glibmm_cv_cxx_can_use_dynamic_cast_in_unused_template_without_definition=yes],
     [glibmm_cv_cxx_can_use_dynamic_cast_in_unused_template_without_definition=no])])
 
-AS_IF([test "x$glibmm_cv_cxx_can_use_dynamic_cast_in_unused_template_without_definition" = xyes],
-      [AC_DEFINE([GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION], [1],
-        [Define if non-instantiated templates may dynamic_cast<> to an undefined type.])])[]dnl
+AS_VAR_IF([glibmm_cv_cxx_can_use_dynamic_cast_in_unused_template_without_definition], ['yes'],
+          [AC_DEFINE([GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION], [1],
+                     [Define if non-instantiated templates may dynamic_cast<> to an undefined type.])])[]dnl
 ])
 
 ## GLIBMM_CXX_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS
@@ -186,9 +186,9 @@ something.callback = &somefunction;
     [glibmm_cv_cxx_can_assign_non_extern_c_functions_to_extern_c_callbacks=yes],
     [glibmm_cv_cxx_can_assign_non_extern_c_functions_to_extern_c_callbacks=no])])
 
-AS_IF([test "x$glibmm_cv_cxx_can_assign_non_extern_c_functions_to_extern_c_callbacks" = xyes],
-      [AC_DEFINE([GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS], [1],
-                 [Define if extern "C" and extern "C++" function pointers are compatible.])])[]dnl
+AS_VAR_IF([glibmm_cv_cxx_can_assign_non_extern_c_functions_to_extern_c_callbacks], ['yes'],
+          [AC_DEFINE([GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS], [1],
+                     [Define if extern "C" and extern "C++" function pointers are compatible.])])[]dnl
 ])
 
 ## GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC
@@ -232,7 +232,7 @@ void do_something()
     [glibmm_cv_cxx_can_use_namespaces_inside_externc=yes],
     [glibmm_cv_cxx_can_use_namespaces_inside_externc=no])])
 
-AS_IF([test "x$glibmm_cv_cxx_can_use_namespaces_inside_externc" = xyes],
-      [AC_DEFINE([GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC], [1],
-                 [Define if the compiler honors namespaces inside extern "C" blocks.])])[]dnl
+AS_VAR_IF([glibmm_cv_cxx_can_use_namespaces_inside_externc], ['yes'],
+          [AC_DEFINE([GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC], [1],
+                     [Define if the compiler honors namespaces inside extern "C" blocks.])])[]dnl
 ])
diff --git a/build/cxx_std.m4 b/build/cxx_std.m4
index aa3d5c9..6708dc5 100644
--- a/build/cxx_std.m4
+++ b/build/cxx_std.m4
@@ -1,3 +1,22 @@
+## Copyright (c) 2009, 2011  Openismus GmbH  <http://www.openismus.com/>
+##
+## This file is part of glibmm.
+##
+## glibmm is free software: you can redistribute it and/or modify it
+## under the terms of the GNU Lesser General Public License as published
+## by the Free Software Foundation, either version 2.1 of the License,
+## or (at your option) any later version.
+##
+## glibmm is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+## See the GNU Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public License
+## along with this library.  If not, see <http://www.gnu.org/licenses/>.
+
+#serial 20110910
+
 ## GLIBMM_CXX_HAS_NAMESPACE_STD()
 ##
 ## Test whether libstdc++ declares namespace std.  For safety,
@@ -10,15 +29,15 @@ AC_DEFUN([GLIBMM_CXX_HAS_NAMESPACE_STD],
 [
   AC_CACHE_CHECK(
     [whether C++ library symbols are declared in namespace std],
-    [gtkmm_cv_cxx_has_namespace_std],
+    [glibmm_cv_cxx_has_namespace_std],
   [
-    AC_TRY_COMPILE(
-    [
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+    [[
       #include <algorithm>
       #include <iterator>
       #include <iostream>
       #include <string>
-    ],[
+    ]],[[
       using std::min;
       using std::find;
       using std::copy;
@@ -26,17 +45,15 @@ AC_DEFUN([GLIBMM_CXX_HAS_NAMESPACE_STD],
       using std::string;
       using std::istream;
       using std::cout;
-    ],
-      [gtkmm_cv_cxx_has_namespace_std="yes"],
-      [gtkmm_cv_cxx_has_namespace_std="no"]
+    ]])],
+      [glibmm_cv_cxx_has_namespace_std='yes'],
+      [glibmm_cv_cxx_has_namespace_std='no']
     )
   ])
 
-  if test "x${gtkmm_cv_cxx_has_namespace_std}" = "xyes"; then
-  {
-    AC_DEFINE([GLIBMM_HAVE_NAMESPACE_STD],[1], [Defined when the libstdc++ declares the std-namespace])
-  }
-  fi
+  AS_VAR_IF([glibmm_cv_cxx_has_namespace_std], ['yes'],
+            [AC_DEFINE([GLIBMM_HAVE_NAMESPACE_STD], [1],
+                       [Defined when the libstdc++ declares the std-namespace])])[]dnl
 ])
 
 
@@ -51,27 +68,25 @@ AC_DEFUN([GLIBMM_CXX_HAS_STD_ITERATOR_TRAITS],
 
   AC_CACHE_CHECK(
     [whether the C++ library supports std::iterator_traits],
-    [gtkmm_cv_cxx_has_std_iterator_traits],
+    [glibmm_cv_cxx_has_std_iterator_traits],
   [
-    AC_TRY_COMPILE(
-    [
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+    [[
       #include <iterator>
       #ifdef GLIBMM_HAVE_NAMESPACE_STD
       using namespace std;
       #endif
-    ],[
+    ]],[[
       typedef iterator_traits<char*>::value_type ValueType;
-    ],
-      [gtkmm_cv_cxx_has_std_iterator_traits="yes"],
-      [gtkmm_cv_cxx_has_std_iterator_traits="no"]
+    ]])],
+      [glibmm_cv_cxx_has_std_iterator_traits='yes'],
+      [glibmm_cv_cxx_has_std_iterator_traits='no']
     )
   ])
 
-  if test "x${gtkmm_cv_cxx_has_std_iterator_traits}" = "xyes"; then
-  {
-    AC_DEFINE([GLIBMM_HAVE_STD_ITERATOR_TRAITS],[1], [Defined if std::iterator_traits<> is standard-conforming])
-  }
-  fi
+  AS_VAR_IF([glibmm_cv_cxx_has_std_iterator_traits], ['yes'],
+            [AC_DEFINE([GLIBMM_HAVE_STD_ITERATOR_TRAITS], [1],
+                       [Defined if std::iterator_traits<> is standard-conforming])])[]dnl
 ])
 
 
@@ -86,27 +101,25 @@ AC_DEFUN([GLIBMM_CXX_HAS_SUN_REVERSE_ITERATOR],
 
   AC_CACHE_CHECK(
     [for non-standard Sun libCstd reverse_iterator],
-    [gtkmm_cv_cxx_has_sun_reverse_iterator],
+    [glibmm_cv_cxx_has_sun_reverse_iterator],
   [
-    AC_TRY_COMPILE(
-    [
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+    [[
       #include <iterator>
       #ifdef GLIBMM_HAVE_NAMESPACE_STD
       using namespace std;
       #endif
-    ],[
+    ]],[[
       typedef reverse_iterator<char*,random_access_iterator_tag,char,char&,char*,int> ReverseIter;
-    ],
-      [gtkmm_cv_cxx_has_sun_reverse_iterator="yes"],
-      [gtkmm_cv_cxx_has_sun_reverse_iterator="no"]
+    ]])],
+      [glibmm_cv_cxx_has_sun_reverse_iterator='yes'],
+      [glibmm_cv_cxx_has_sun_reverse_iterator='no']
     )
   ])
 
-  if test "x${gtkmm_cv_cxx_has_sun_reverse_iterator}" = "xyes"; then
-  {
-    AC_DEFINE([GLIBMM_HAVE_SUN_REVERSE_ITERATOR],[1], [Defined if std::reverse_iterator is in Sun libCstd style])
-  }
-  fi
+  AS_VAR_IF([glibmm_cv_cxx_has_sun_reverse_iterator], ['yes'],
+            [AC_DEFINE([GLIBMM_HAVE_SUN_REVERSE_ITERATOR], [1],
+                       [Defined if std::reverse_iterator is in Sun libCstd style])])[]dnl
 ])
 
 
@@ -121,33 +134,31 @@ AC_DEFUN([GLIBMM_CXX_HAS_TEMPLATE_SEQUENCE_CTORS],
 
   AC_CACHE_CHECK(
     [whether STL containers have templated sequence constructors],
-    [gtkmm_cv_cxx_has_template_sequence_ctors],
+    [glibmm_cv_cxx_has_template_sequence_ctors],
   [
-    AC_TRY_COMPILE(
-    [
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+    [[
       #include <vector>
       #include <deque>
       #include <list>
       #ifdef GLIBMM_HAVE_NAMESPACE_STD
       using namespace std;
       #endif
-    ],[
+    ]],[[
       const int array[8] = { 0, };
       vector<int>  test_vector (&array[0], &array[8]);
       deque<short> test_deque  (test_vector.begin(), test_vector.end());
       list<long>   test_list   (test_deque.begin(),  test_deque.end());
       test_vector.assign(test_list.begin(), test_list.end());
-    ],
-      [gtkmm_cv_cxx_has_template_sequence_ctors="yes"],
-      [gtkmm_cv_cxx_has_template_sequence_ctors="no"]
+    ]])],
+      [glibmm_cv_cxx_has_template_sequence_ctors='yes'],
+      [glibmm_cv_cxx_has_template_sequence_ctors='no']
     )
   ])
 
-  if test "x${gtkmm_cv_cxx_has_template_sequence_ctors}" = "xyes"; then
-  {
-    AC_DEFINE([GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS],[1], [Defined if the STL containers have templated sequence ctors])
-  }
-  fi
+  AS_VAR_IF([glibmm_cv_cxx_has_template_sequence_ctors], ['yes'],
+            [AC_DEFINE([GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS], [1],
+                       [Defined if the STL containers have templated sequence ctors])])[]dnl
 ])
 
 ## GLIBMM_CXX_ALLOWS_STATIC_INLINE_NPOS()
@@ -162,10 +173,10 @@ AC_DEFUN([GLIBMM_CXX_ALLOWS_STATIC_INLINE_NPOS],
 
   AC_CACHE_CHECK(
     [whether the compiler allows a static member variable to be initialized inline to std::string::npos],
-    [gtkmm_cv_cxx_has_allows_static_inline_npos],
+    [glibmm_cv_cxx_has_allows_static_inline_npos],
   [
-    AC_TRY_COMPILE(
-    [
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+    [[
       #include <string>
       #include <iostream>
       
@@ -176,19 +187,15 @@ AC_DEFUN([GLIBMM_CXX_ALLOWS_STATIC_INLINE_NPOS],
         //so we need to initalize the static member data elsewhere.
         static const std::string::size_type ustringnpos = std::string::npos;
       };
-    ],[
+    ]],[[
       std::cout << "npos=" << ustringtest::ustringnpos << std::endl;
-    ],
-      [gtkmm_cv_cxx_has_allows_static_inline_npos="yes"],
-      [gtkmm_cv_cxx_has_allows_static_inline_npos="no"]
+    ]])],
+      [glibmm_cv_cxx_has_allows_static_inline_npos='yes'],
+      [glibmm_cv_cxx_has_allows_static_inline_npos='no']
     )
   ])
 
-  if test "x${gtkmm_cv_cxx_has_allows_static_inline_npos}" = "xyes"; then
-  {
-    AC_DEFINE([GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS],[1], [Defined if a static member variable may be initialized inline to std::string::npos])
-  }
-  fi
+  AS_VAR_IF([glibmm_cv_cxx_has_allows_static_inline_npos], ['yes'],
+            [AC_DEFINE([GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS], [1],
+                       [Defined if a static member variable may be initialized inline to std::string::npos])])[]dnl
 ])
-
-
diff --git a/build/debug.m4 b/build/debug.m4
new file mode 100644
index 0000000..a1e0cf4
--- /dev/null
+++ b/build/debug.m4
@@ -0,0 +1,36 @@
+## Copyright (c) 2009, 2011  Openismus GmbH  <http://www.openismus.com/>
+##
+## This file is part of glibmm.
+##
+## glibmm is free software: you can redistribute it and/or modify it
+## under the terms of the GNU Lesser General Public License as published
+## by the Free Software Foundation, either version 2.1 of the License,
+## or (at your option) any later version.
+##
+## glibmm is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+## See the GNU Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public License
+## along with this library.  If not, see <http://www.gnu.org/licenses/>.
+
+#serial 20110910
+
+## GLIBMM_ARG_ENABLE_DEBUG_REFCOUNTING()
+##
+## Provide the --enable-debug-refcounting configure argument, disabled
+## by default.  If enabled, #define GTKMM_DEBUG_REFCOUNTING.
+##
+AC_DEFUN([GLIBMM_ARG_ENABLE_DEBUG_REFCOUNTING],
+[
+  AC_ARG_ENABLE([debug-refcounting],
+      [AS_HELP_STRING([--enable-debug-refcounting],
+                      [Print a debug message on every ref/unref.@<:@default=no@:>@])],
+      [glibmm_debug_refcounting="$enableval"],
+      [glibmm_debug_refcounting='no'])
+
+  AS_VAR_IF([glibmm_debug_refcounting], ['yes'],
+            [AC_DEFINE([GLIBMM_DEBUG_REFCOUNTING], [1],
+                       [Defined when the --enable-debug-refcounting configure argument was given])])[]dnl
+])
diff --git a/build/dk-feature.m4 b/build/dk-feature.m4
index 87a0e26..8065441 100644
--- a/build/dk-feature.m4
+++ b/build/dk-feature.m4
@@ -16,7 +16,7 @@
 ## with danielk's Autostuff; if not, write to the Free Software Foundation,
 ## Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-#serial 20070105
+#serial 20110910
 
 ## _DK_SH_VAR_PUSH_DEPTH(depth, variable, [value])
 ##
@@ -75,8 +75,8 @@ AC_CACHE_CHECK([for $1], [$3],
                [AC_LINK_IFELSE([$2], [$3=yes], [$3=no])])
 $4=$$3
 
-AS_IF([test "x$$4" = xyes],
-      [AC_DEFINE([$5], [1], [Define to 1 if $1 is available.])
+AS_VAR_IF($4, ['yes'],
+          [AC_DEFINE([$5], [1], [Define to 1 if $1 is available.])
 ])[]dnl
 ])
 
diff --git a/build/sun.m4 b/build/sun.m4
index 6b8950f..8eb1152 100644
--- a/build/sun.m4
+++ b/build/sun.m4
@@ -1,15 +1,34 @@
+## Copyright (c) 2009, 2011  Openismus GmbH  <http://www.openismus.com/>
+##
+## This file is part of glibmm.
+##
+## glibmm is free software: you can redistribute it and/or modify it
+## under the terms of the GNU Lesser General Public License as published
+## by the Free Software Foundation, either version 2.1 of the License,
+## or (at your option) any later version.
+##
+## glibmm is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+## See the GNU Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public License
+## along with this library.  If not, see <http://www.gnu.org/licenses/>.
+
+#serial 20110910
+
 AC_DEFUN([GLIBMM_PROG_CXX_SUN],
-  [AC_CACHE_CHECK(whether we are using SUN CC compiler, ac_cv_prog_sun_cxx,
-    [if AC_TRY_COMMAND(${CXX-g++} -V 2>&1) | egrep "Sun WorkShop" >/dev/null 2>&1; then
-      ac_cv_prog_sun_cxx=yes
-    else
-      ac_cv_prog_sun_cxx=no
-    fi]
-   )]
+[
+  AC_CACHE_CHECK([whether we are using SUN CC compiler],
+                 [glibmm_cv_prog_sun_cxx],
+                 [AS_IF([${CXX-g++} -V 2>&1 | grep -e 'Sun WorkShop' >/dev/null 2>&1],
+                        [glibmm_cv_prog_sun_cxx='yes'],
+                        [glibmm_cv_prog_sun_cxx='no']
+                       )
+                 ]
+                )
 
-   if test "x${ac_cv_prog_sun_cxx}" = "xyes"; then
-   {
-     AC_DEFINE([GLIBMM_COMPILER_SUN_FORTE],[1], [Defined when the SUN Forte C++ compiler is being used.])
-   }
-   fi
-)
+  AS_VAR_IF([glibmm_cv_prog_sun_cxx], ['yes'],
+            [AC_DEFINE([GLIBMM_COMPILER_SUN_FORTE], [1],
+                       [Defined when the SUN Forte C++ compiler is being used.])])[]dnl
+])
diff --git a/configure.ac b/configure.ac
index e006e1b..68f618c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,8 +44,7 @@ AC_SUBST([LIBGLIBMM_SO_VERSION], [4:0:3])
 
 AC_PROG_CXX
 AC_DISABLE_STATIC
-AC_LIBTOOL_WIN32_DLL
-AC_PROG_LIBTOOL
+LT_INIT([win32-dll])
 MM_PATH_PERL
 AS_IF([test "x$USE_MAINTAINER_MODE" != xno], [MM_CHECK_PERL])
 



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