summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am4
-rwxr-xr-xautogen.sh2
-rw-r--r--build/c_std.m453
-rw-r--r--build/cxx.m434
-rw-r--r--build/cxx_std.m4131
-rw-r--r--build/debug.m436
-rw-r--r--build/dk-feature.m46
-rw-r--r--build/glibmm_check_perl.m457
-rw-r--r--build/macros.m472
-rw-r--r--build/sun.m445
-rw-r--r--configure.ac3
11 files changed, 191 insertions, 252 deletions
diff --git a/Makefile.am b/Makefile.am
index e88f874a..1a058b14 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 66866118..fadccc77 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 f4a8b56f..606aef6e 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 856c5570..22d24356 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 aa3d5c90..6708dc51 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 00000000..a1e0cf4e
--- /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 87a0e26e..8065441f 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/glibmm_check_perl.m4 b/build/glibmm_check_perl.m4
deleted file mode 100644
index ed6b33e8..00000000
--- a/build/glibmm_check_perl.m4
+++ /dev/null
@@ -1,57 +0,0 @@
-dnl
-dnl Some macros needed for autoconf
-dnl
-
-
-## GLIBMM_CV_PERL_VERSION(version)
-##
-## Helper macro of GLIBMM_CHECK_PERL(). It generates a cache variable
-## name that includes the version number, in order to avoid clashes.
-##
-m4_define([GLIBMM_CV_PERL_VERSION],
- [glibmm_cv_perl_version_[]m4_translit([$1], [.${}], [____])])
-
-
-## GLIBMM_CHECK_PERL(version)
-##
-## Check for Perl >= version and set PERL_PATH. If Perl is not found
-## and maintainer-mode is enabled, abort with an error message. If not
-## in maintainer-mode, set PERL_PATH=perl on failure.
-##
-## Deprecated: Use MM_CHECK_PERL from mm-common or omit entirely.
-##
-AU_DEFUN([GLIBMM_CHECK_PERL],
-[
- glibmm_perl_result=no
-
- AC_PATH_PROGS([PERL_PATH], [perl perl5], [not found])
-
- if test "x$PERL_PATH" != "xnot found"; then
- {
- AC_CACHE_CHECK(
- [whether Perl is new enough],
- GLIBMM_CV_PERL_VERSION([$1]),
- [
- ]GLIBMM_CV_PERL_VERSION([$1])[=no
- "$PERL_PATH" -e "require v$1; exit 0;" >/dev/null 2>&1 && ]GLIBMM_CV_PERL_VERSION([$1])[=yes
- ])
- test "x${GLIBMM_CV_PERL_VERSION([$1])}" = xyes && glibmm_perl_result=yes
- }
- else
- {
- # Make sure we have something sensible, even if it doesn't work.
- PERL_PATH=perl
- }
- fi
-
- if test "x$glibmm_perl_result" = xno && test "x$USE_MAINTAINER_MODE" = xyes; then
- {
- AC_MSG_ERROR([[
-*** Perl >= ]$1[ is required for building $PACKAGE in maintainer-mode.
-]])
- }
- fi
-
- AC_SUBST([PERL_PATH])
-],
-[[Use MM_CHECK_PERL from mm-common or omit entirely.]])
diff --git a/build/macros.m4 b/build/macros.m4
deleted file mode 100644
index 14708e47..00000000
--- a/build/macros.m4
+++ /dev/null
@@ -1,72 +0,0 @@
-dnl
-dnl Some macros needed for autoconf
-dnl
-
-dnl AL_PROG_GNU_M4(ACTION_NOT_FOUND)
-dnl Check for GNU m4. (sun won't do.)
-dnl
-AC_DEFUN([AL_PROG_GNU_M4],[
-AC_CHECK_PROGS(M4, gm4 m4, m4)
-
-if test "$M4" = "m4"; then
- AC_MSG_CHECKING(whether m4 is GNU m4)
- if $M4 --version </dev/null 2>/dev/null | grep -i '^GNU M4 ' >/dev/null ; then
- AC_MSG_RESULT(yes)
- else
- AC_MSG_RESULT(no)
- if test "$host_vendor" = "sun"; then
- $1
- fi
- fi
-fi
-])
-
-
-dnl AL_PROG_GNU_MAKE(ACTION_NOT_FOUND)
-dnl Check for GNU make (no sun make)
-dnl
-AC_DEFUN([AL_PROG_GNU_MAKE],[
-dnl
-dnl Check for GNU make (stolen from gtk+/configure.in)
-AC_MSG_CHECKING(whether make is GNU Make)
-if ${MAKE-make} --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
- if test "$host_vendor" = "sun" ; then
- $1
- fi
-fi
-])
-
-dnl AL_ACLOCAL_INCLUDE(macrodir)
-dnl Add a directory to macro search (from gnome)
-AC_DEFUN([AL_ACLOCAL_INCLUDE],
-[
- test "x$ACLOCAL_FLAGS" = "x" || ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
- for dir in $1
- do
- ACLOCAL="$ACLOCAL -I $srcdir/$dir"
- done
-])
-
-
-## 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],
- [ --enable-debug-refcounting Print a debug message on every ref/unref.
- [[default=disabled]]],
- [glibmm_debug_refcounting="$enableval"],
- [glibmm_debug_refcounting='no'])
-
- if test "x$glibmm_debug_refcounting" = "xyes"; then
- {
- AC_DEFINE([GLIBMM_DEBUG_REFCOUNTING],[1], [Defined when the --enable-debug-refcounting configure argument was given])
- }
- fi
-])
diff --git a/build/sun.m4 b/build/sun.m4
index 6b8950f7..8eb11526 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 e006e1b8..68f618c8 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])