[gtkmm] Begin transition to mm-common build system



commit 0741944c144c2a488f3469c97820d639f68649bb
Author: Daniel Elstner <danielk openismus com>
Date:   Wed Aug 12 11:33:55 2009 +0200

    Begin transition to mm-common build system
    
    * autogen.sh: Replace with minimal script already used in pangomm,
    only invoking mm-common-prepare, autoreconf and configure.
    * configure.ac: Overhaul and remove large chunks of unnecessary,
    inappropriate or broken tests and actions.  Start using shared
    macros from mm-common to simplify matters.  Insert some dummy
    substitutions and Automake conditional to keep the tree building.
    * Makefile.am (ACLOCAL_AMFLAGS): Define for autoreconf to work.
    (SUBDIRS): Temporary adjustments to keep the tree building.
    * config.h.in: Delete file, and have autoheader generate it.

 .gitignore         |   52 ++----
 ChangeLog          |   14 ++
 Makefile.am        |   23 +++-
 autogen.sh         |  117 +------------
 config.h.in        |    7 -
 configure.ac       |  499 ++++++++++++----------------------------------------
 scripts/.gitignore |   12 ++
 7 files changed, 185 insertions(+), 539 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 2dddd27..5f9db4f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,26 +1,27 @@
 # wildcard patterns
-*.o
-*.lo
-*.a
-*.la
+*.[ao]
+*.l[ao]
 Makefile
 Makefile.in
 .deps/
 .libs/
 .stamps/
+stamp-h?
+
 # generated private headers
-*_p.h
+/*/*mm/private/*_p.h
 
 # /
-aclocal.m4
-INSTALL
-autom4te.cache/
-config.h
-config.log
-config.status
-configure
-libtool
-stamp-h1
+/aclocal.m4
+/INSTALL
+/autom4te.cache/
+/config.h
+/config.h.in
+/config.log
+/config.status
+/configure
+/configure.lineno
+/libtool
 
 # MSVC
 MSVC_Net2005/atkmm/atkmm.rc
@@ -277,6 +278,8 @@ gtk/gtkmm/image.cc
 gtk/gtkmm/image.h
 gtk/gtkmm/imagemenuitem.cc
 gtk/gtkmm/imagemenuitem.h
+gtk/gtkmm/infobar.cc
+gtk/gtkmm/infobar.h
 gtk/gtkmm/inputdialog.cc
 gtk/gtkmm/inputdialog.h
 gtk/gtkmm/invisible.cc
@@ -483,27 +486,8 @@ gtk/gtkmm/wrap_init.cc
 gtk/gtkmmconfig.h
 gtk/stamp-h3
 
-# scripts
-scripts/config.guess
-scripts/config.sub
-scripts/depcomp
-scripts/install-sh
-scripts/ltmain.sh
-scripts/missing
-
 # tests
-tests/child_widget/test
-tests/child_widget2/test
-tests/child_widget_managed/test
-tests/delete_cpp_child/test
-tests/dialog/test
-tests/dialog_deletethis/test
-tests/main_with_options/test
-tests/menu_destruction/test
-tests/property_notification/test
-tests/refcount_dialog/test
-tests/scrolledwindow/test
-tests/wrap_existing/test
+/tests/*/test
 
 # tools
 tools/extra_defs_gen/generate_extra_defs
diff --git a/ChangeLog b/ChangeLog
index 7c60e2d..6788514 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2009-08-12  Daniel Elstner  <danielk openismus com>
+
+	Begin transition to mm-common build system
+
+	* autogen.sh: Replace with minimal script already used in pangomm,
+	only invoking mm-common-prepare, autoreconf and configure.
+	* configure.ac: Overhaul and remove large chunks of unnecessary,
+	inappropriate or broken tests and actions.  Start using shared
+	macros from mm-common to simplify matters.  Insert some dummy
+	substitutions and Automake conditional to keep the tree building.
+	* Makefile.am (ACLOCAL_AMFLAGS): Define for autoreconf to work.
+	(SUBDIRS): Temporary adjustments to keep the tree building.
+	* config.h.in: Delete file, and have autoheader generate it.
+
 2009-07-31  Johannes Schmid <jschmid openismus com>
 
 	* gtk/src/builder.hg:
diff --git a/Makefile.am b/Makefile.am
index 5743ba0..51a71e3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,11 +1,30 @@
+## Copyright (c) 2009  Openismus GmbH  <http://www.openismus.com/>
+##
+## This file is part of gtkmm.
+##
+## gtkmm 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.
+##
+## gtkmm 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/>.
+
+ACLOCAL_AMFLAGS = -I scripts ${ACLOCAL_FLAGS}
+
 if GTKMM_ATKMM_ENABLED
   ATK_SUBDIR=atk
 else
   ATK_SUBDIR=
 endif
 
-SUBDIRS		= tools $(ATK_SUBDIR) gdk gtk @DEMO_SUBDIR@ @DOCS_SUBDIR@ tests MSVC_Net2005 MSVC_Net2008 win32_installer
-DIST_SUBDIRS	= $(SUBDIRS) scripts
+SUBDIRS		= tools $(ATK_SUBDIR) gdk gtk tests MSVC_Net2005 MSVC_Net2008 win32_installer
+DIST_SUBDIRS	= $(SUBDIRS) demos docs scripts
 
 EXTRA_DIST	= build_shared/Makefile_build.am_fragment \
 		  build_shared/Makefile_build_gensrc.am_fragment \
diff --git a/autogen.sh b/autogen.sh
index 68577f7..fed2c5b 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,114 +1,7 @@
-#! /bin/sh
-
-# Copyright (c) 2006, The gtkmm Development Team
-#
-# This library 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.
-#
-# This library 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-# Be Bourne compatible. (stolen from autoconf)
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
-fi
-
-PROJECT=gtkmm
-MIN_AUTOMAKE_VERSION=1.9
-
-srcdir=`dirname "$0"`
+#! /bin/sh -e
+test -n "$srcdir" || srcdir=`dirname "$0"`
 test -n "$srcdir" || srcdir=.
 
-origdir=`pwd`
-cd "$srcdir"
-
-LIBTOOLIZE_FLAGS="--automake $LIBTOOLIZE_FLAGS"
-ACLOCAL_FLAGS="-I scripts $ACLOCAL_FLAGS"
-AUTOMAKE_FLAGS="--add-missing $AUTOMAKE_FLAGS"
-
-if test "x$*$AUTOGEN_SUBDIR_MODE" = x
-then
-  echo "I am going to run ./configure with no arguments -- if you wish"
-  echo "to pass any to it, please specify them on the $0 command line."
-fi
-
-libtoolize=libtoolize
-autoconf=autoconf
-autoheader=autoheader
-aclocal=
-automake=
-auto_version=0
-
-# awk program to transform the output of automake --version
-# into an integer value suitable for numeric comparison.
-extract_version='{ printf "%.0f", 1000000 * v[split($1, v, " ")] + 1000 * $2 + $3; exit }'
-
-for suffix in -1.7 -1.8 -1.9 ""
-do
-  aclocal_version=`aclocal$suffix --version </dev/null 2>/dev/null | awk -F. "$extract_version"`
-  automake_version=`automake$suffix --version </dev/null 2>/dev/null | awk -F. "$extract_version"`
-
-  if test "$aclocal_version" -eq "$automake_version" 2>/dev/null \
-     && test "$automake_version" -ge "$auto_version" 2>/dev/null
-  then
-    auto_version=$automake_version
-    aclocal=aclocal$suffix
-    automake=automake$suffix
-  fi
-done
-
-min_version=`echo "$MIN_AUTOMAKE_VERSION" | awk -F. "$extract_version"`
-
-if test "$auto_version" -ge "$min_version" 2>/dev/null
-then :; else
-  echo "Sorry, at least automake $MIN_AUTOMAKE_VERSION is required to configure $PROJECT."
-  exit 1
-fi
-
-rm -f config.guess config.sub depcomp install-sh missing mkinstalldirs
-rm -f config.cache acconfig.h
-rm -rf autom4te.cache
-
-#WARNINGS=all
-#export WARNINGS
-
-if (set -x && set +x) >/dev/null 2>&1
-then
-  set_xtrace=set
-else
-  set_xtrace=:
-fi
-
-$set_xtrace -x
-
-"$libtoolize" $LIBTOOLIZE_FLAGS	|| exit 1
-"$aclocal" $ACLOCAL_FLAGS	|| exit 1
-#"$autoheader"			|| exit 1
-"$automake" $AUTOMAKE_FLAGS	|| exit 1
-"$autoconf"			|| exit 1
-cd "$origdir"			|| exit 1
-
-if test -z "$AUTOGEN_SUBDIR_MODE"
-then
-  "$srcdir/configure" --enable-maintainer-mode ${1+"$@"} || exit 1
-  $set_xtrace +x
-  echo
-  echo "Now type 'make' to compile $PROJECT."
-fi
-
-exit 0
+mm-common-prepare --force --copy "$srcdir"
+autoreconf --force --install "$srcdir"
+test -n "$NOCONFIGURE" || "$srcdir/configure" --enable-maintainer-mode "$@"
diff --git a/configure.ac b/configure.ac
index 04f919e..6b7b7bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,405 +1,137 @@
-# Configure.in
-#
-#  This file tests for various compiler features needed to configure 
-#  the gtkmm package.  Original skeleton was provided by Stephan Kulow.
-#  All tests were written by Tero Pulkkinen, Mirko Streckenbach, and 
-#  Karl Nelson.
-#
-#  NOTE! IF YOU DO CHANGES HERE, CHECK IF YOU NEED TO MODIFY .m4 TOO!!!
-#
-#  Copyright 2001 Free Software Foundation
-#  Copyright 1999 gtkmm Development Team
-#  Copyright 1998 Stephan Kulow 
-#
-
-#We use pushdef here because we can't use shell variables before AC_INIT, but we want to use a variable with AC_INIT:
-pushdef([GTKMM_MAJOR_VERSION],     [2])
-pushdef([GTKMM_MINOR_VERSION],     [17])
-pushdef([GTKMM_MICRO_VERSION],     [2])
-pushdef([GTKMM_EXTRA_VERSION],     [])
-pushdef([GTKMM_VERSION], GTKMM_MAJOR_VERSION.GTKMM_MINOR_VERSION.GTKMM_MICRO_VERSION[]GTKMM_EXTRA_VERSION)
-AC_INIT([gtkmm], GTKMM_VERSION, [gtkmm-list gnome org])
-AC_CONFIG_SRCDIR([gtk/gtkmmconfig.h.in])
-AC_PREREQ(2.59)
-
-#########################################################################
-#  Version and initialization
-#########################################################################
-[GTKMM_MAJOR_VERSION]=GTKMM_MAJOR_VERSION
-[GTKMM_MINOR_VERSION]=GTKMM_MINOR_VERSION
-[GTKMM_MICRO_VERSION]=GTKMM_MICRO_VERSION
-[GTKMM_EXTRA_VERSION]=GTKMM_EXTRA_VERSION
-[GTKMM_VERSION]=GTKMM_VERSION
-popdef([GTKMM_MAJOR_VERSION])
-popdef([GTKMM_MINOR_VERSION])
-popdef([GTKMM_MICRO_VERSION])
-popdef([GTKMM_EXTRA_VERSION])
-popdef([GTKMM_VERSION])
-GTKMM_RELEASE=$GTKMM_MAJOR_VERSION.$GTKMM_MINOR_VERSION
-AC_DEFINE_UNQUOTED(GTKMM_MAJOR_VERSION, $GTKMM_MAJOR_VERSION, [Major version of gtkmm])
-AC_DEFINE_UNQUOTED(GTKMM_MINOR_VERSION, $GTKMM_MINOR_VERSION, [Minor version of gtkmm])
-AC_DEFINE_UNQUOTED(GTKMM_MICRO_VERSION, $GTKMM_MICRO_VERSION, [Micro version of gtkmm])
-AC_SUBST(GTKMM_MAJOR_VERSION)
-AC_SUBST(GTKMM_MINOR_VERSION)
-AC_SUBST(GTKMM_MICRO_VERSION)
-AC_SUBST(GTKMM_VERSION)
-AC_SUBST(GTKMM_RELEASE)
-
-#
-# +1 : ? : +1  == new interface that does not break old one
-# +1 : ? : 0   == new interface that breaks old one
-#  ? : ? : 0   == no new interfaces, but breaks apps
-#  ? :+1 : ?   == just some internal changes, nothing breaks but might work 
-#                 better
-# CURRENT : REVISION : AGE
-LIBGTKMM_SO_VERSION=1:30:0
-AC_SUBST(LIBGTKMM_SO_VERSION)
-
-AC_CONFIG_AUX_DIR(scripts)
-
-# Initialize automake stuff
-# tar-ustar asks it to use a sensible tar format that can handle long filenames.
-AM_INIT_AUTOMAKE([1.9 tar-ustar])
-
-dnl Specify a configuration file (no autoheader)
-AM_CONFIG_HEADER(config.h gdk/gdkmmconfig.h gtk/gtkmmconfig.h)
+## Copyright (c) 2009  Openismus GmbH  <http://www.openismus.com/>
+##
+## This file is part of gtkmm.
+##
+## gtkmm 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.
+##
+## gtkmm 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/>.
+
+AC_INIT([gtkmm], [2.17.2], [http://bugzilla.gnome.org/enter_bug.cgi?product=gtkmm],
+        [gtkmm], [http://www.gtkmm.org/])
+AC_PREREQ([2.59])
+
+AC_CONFIG_SRCDIR([gtk/gtkmm.h])
+AC_CONFIG_AUX_DIR([scripts])
+AC_CONFIG_MACRO_DIR([scripts])
+AC_CONFIG_HEADERS([config.h gtk/gtkmmconfig.h])
+
+MM_INIT_MODULE([atkmm-1.6], m4_expand([AC_PACKAGE_VERSION]))
+MM_INIT_MODULE([gdkmm-2.4], m4_expand([AC_PACKAGE_VERSION]))
+MM_INIT_MODULE([gtkmm-2.4], m4_expand([AC_PACKAGE_VERSION]))
+
+# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
+AC_SUBST([LIBGTKMM_SO_VERSION], [1:30:0])
+
+AM_INIT_AUTOMAKE([1.9 -Wno-portability dist-bzip2 no-define nostdinc tar-pax])
 AM_MAINTAINER_MODE
-AL_ACLOCAL_INCLUDE(scripts)
+AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>])
 
-
-#########################################################################
-#  Configure arguments 
-#########################################################################
-
-#########################################################################
-#  Environment Checks
-#########################################################################
-AC_PROG_CC
-AC_PROG_CPP
 AC_PROG_CXX
-AC_PROG_MAKE_SET
-AC_CANONICAL_BUILD
-AC_CANONICAL_HOST
-
-dnl Used for enabling the "-no-undefined" flag while generating DLLs
-dnl Copied from the official gtk+-2 configure.in
-AC_MSG_CHECKING([for some Win32 platform])
-case "$host" in
-  *-*-mingw*|*-*-cygwin*)
-    platform_win32=yes
-    ;;
-  *)
-    platform_win32=no
-    ;;
-esac
-AC_MSG_RESULT([$platform_win32])
-AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
-
-AC_MSG_CHECKING([for native Win32])
-case "$host" in
-  *-*-mingw*)
-    os_win32=yes
-    ;;
-  *)
-    os_win32=no
-    ;;
-esac
-AC_MSG_RESULT([$os_win32])
-AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
-
-# Disable static libraries by default
 AC_DISABLE_STATIC
 AC_LIBTOOL_WIN32_DLL
 AC_PROG_LIBTOOL
 
-if test x$enable_static = "xyes"; then
-	AC_DEFINE([GTKMM_STATIC_LIB],[1], [Defined when gtkmm is built as a static library])
-fi
-
-AL_PROG_GNU_M4(AC_MSG_ERROR([dnl
-SUN m4 does not work for building gtkmm. 
-Please install GNU m4.]))
-
-AL_PROG_GNU_MAKE(AC_MSG_ERROR([dnl
-SUN make does not work for building gtkmm.
-Please install GNU make.]))
-
-# This macro is installed by glibmm
-# Doxygen needs the path to the installed perl.
-GLIBMM_CHECK_PERL([5.6.0])
-
-#########################################################################
-#  Function checks
-#########################################################################
-
-AC_CHECK_FUNC(mkfifo, AC_DEFINE(HAVE_MKFIFO))
-
-# functions used in demos/gtk-demo. Undefined in config.h.
-AC_LANG_PUSH(C++)
-AC_MSG_CHECKING([for flockfile])
-AC_TRY_LINK([
-#include <stdio.h>],[
-flockfile (NULL);],[
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(HAVE_FLOCKFILE, 1,
-    [Define to 1 if you have the `flockfile' function.])],[
-  AC_MSG_RESULT(no)
-  AC_MSG_CHECKING([for flockfile with a custom prototype])
-  AC_TRY_LINK([
-#include <stdio.h>
-
-extern "C" void flockfile (FILE *);],[
-flockfile (NULL);],[
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(HAVE_FLOCKFILE, 1,
-      [Define to 1 if you have the `flockfile' function.])
-    AC_DEFINE(NEED_FLOCKFILE_PROTO, 1,
-      [Define if flockfile() prototype needed.])],[
-    AC_MSG_RESULT(not available)])])
-
-AC_MSG_CHECKING([for funlockfile])
-AC_TRY_LINK([
-#include <stdio.h>],[
-funlockfile (NULL);],[
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(HAVE_FUNLOCKFILE, 1,
-    [Define to 1 if you have the `funlockfile' function.])],[
-  AC_MSG_RESULT(no)
-  AC_MSG_CHECKING([for funlockfile with a custom prototype])
-  AC_TRY_LINK([
-#include <stdio.h>
-
-extern "C" void funlockfile (FILE *);],[
-funlockfile (NULL);],[
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(HAVE_FUNLOCKFILE, 1,
-      [Define to 1 if you have the `funlockfile' function.])
-    AC_DEFINE(NEED_FUNLOCKFILE_PROTO, 1,
-      [Define if funlockfile() prototype needed.])],[
-    AC_MSG_RESULT(not available)])])
-
-AC_MSG_CHECKING([for getc_unlocked])
-AC_TRY_LINK([
-#include <stdio.h>],[
-getc_unlocked (NULL);],[
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(HAVE_GETC_UNLOCKED, 1,
-    [Define to 1 if you have the `getc_unlocked' function.])],[
-  AC_MSG_RESULT(no)
-  AC_MSG_CHECKING([for getc_unlocked with a custom prototype])
-  AC_TRY_LINK([
-#include <stdio.h>
-
-extern "C" int getc_unlocked (FILE *);],[
-getc_unlocked (NULL);],[
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(HAVE_GETC_UNLOCKED, 1,
-      [Define to 1 if you have the `getc_unlocked' function.])
-    AC_DEFINE(NEED_GETC_UNLOCKED_PROTO, 1,
-      [Define if getc_unlocked() prototype needed.])],[
-    AC_MSG_RESULT(not available)])])
-AC_LANG_POP(C++)
-
-#########################################################################
-#  Dependancy checks
-#########################################################################
-gtkmm_min_glibmm_version=2.21.2
-gtkmm_min_giomm_version=2.21.2
-gtkmm_min_gtk_version=2.17.4
-gtkmm_min_cairomm_version=1.2.2
-gtkmm_min_pangomm_version=2.14.0
-
-
-GLIBMM_LIBDIR=`pkg-config --variable=libdir glibmm-2.4`
-GMMPROC_DIR=$GLIBMM_LIBDIR/glibmm-2.4/proc
-AC_SUBST(GMMPROC_DIR)
-GMMPROC=$GMMPROC_DIR/gmmproc
-AC_SUBST(GMMPROC)
-
-
-PKG_CHECK_MODULES(ATKMM, glibmm-2.4 >= ${gtkmm_min_glibmm_version} atk >= 1.9.0)
-AC_SUBST(ATKMM_CFLAGS)
-AC_SUBST(ATKMM_LIBS)
+AC_MSG_CHECKING([for native Windows host])
+AS_CASE([$host_os], [mingw*], [gtkmm_host_windows=yes], [gtkmm_host_windows=no])
+AC_MSG_RESULT([$gtkmm_host_windows])
+AM_CONDITIONAL([HOST_WINDOWS_NATIVE], [test "x$gtkmm_host_windows" = xyes])
+# TODO: kill dummies
+AM_CONDITIONAL([OS_WIN32], [false])
+AM_CONDITIONAL([PLATFORM_WIN32], [false])
+
+# TODO: What exactly does this do?  If both static and shared libraries
+# are built, both builds will have this macro defined!
+AS_IF([test "x$enable_static" = xyes],
+      [AC_DEFINE([GTKMM_STATIC_LIB], [1], [Define when building gtkmm as a static library])])
+
+AC_SUBST([ATKMM_MODULES], ['glibmm-2.4 >= 2.21.2 atk >= 1.9.0'])
 
 # gdkmm really does need GTK+, because part of Gdk::DragContext is in GTK+.
-PKG_CHECK_MODULES(GDKMM, glibmm-2.4 >= ${gtkmm_min_glibmm_version}
-                         giomm-2.4 >= ${gtkmm_min_glibmm_version}
-                         cairomm-1.0 >= ${gtkmm_min_cairomm_version}
-                         pangomm-1.4 >= ${gtkmm_min_pangomm_version}
-                         gtk+-2.0 >= ${gtkmm_min_gtk_version})
-AC_SUBST(GDKMM_CFLAGS)
-AC_SUBST(GDKMM_LIBS)
-
-# Only check for gtk+-unix-print-2.0 on non-win32 platform, as 
-# gtk+-unix-print-2.0.pc is not always included in win32 installers. 
-if test x"$os_win32" = xyes; then
-  PKG_CHECK_MODULES(GTKMM, glibmm-2.4 >= ${gtkmm_min_glibmm_version} giomm-2.4 >= ${gtkmm_min_giomm_version} cairomm-1.0 >= ${gtkmm_min_cairomm_version} pangomm-1.4 >= ${gtkmm_min_pangomm_version} gtk+-2.0 >= ${gtkmm_min_gtk_version})
-else
-  PKG_CHECK_MODULES(GTKMM, glibmm-2.4 >= ${gtkmm_min_glibmm_version} giomm-2.4 >= ${gtkmm_min_giomm_version} cairomm-1.0 >= ${gtkmm_min_cairomm_version} pangomm-1.4 >= ${gtkmm_min_pangomm_version} gtk+-2.0 >= ${gtkmm_min_gtk_version} gtk+-unix-print-2.0 >= ${gtkmm_min_gtk_version})
-fi
-AC_SUBST(GTKMM_CFLAGS)
-AC_SUBST(GTKMM_LIBS)
-
-# gthread isn't a requirement, but we should use its CFLAGS if available.
-PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.4.0,[],[GTHREAD_CFLAGS=''; GTHREAD_LIBS=''])
-AC_SUBST(GTHREAD_CFLAGS)
-AC_SUBST(GTHREAD_LIBS)
-
-#########################################################################
-#  C++ checks
-#########################################################################
-
-# Check for the SUN Forte compiler, and define GLIBMM_COMPILER_SUN_FORTE in the header.
-#GLIBMM_PROG_CXX_SUN
-
-# Ensure MSVC-compatible struct packing convention is used when
-# compiling for Win32 with gcc.
-# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
-# gcc2 uses "-fnative-struct".
-if test x"$os_win32" = xyes; then
-  if test x"$GCC" = xyes -a x"$GXX" = xyes; then
-    msnative_struct=''
-    AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
-    if test -z "$ac_cv_prog_CC"; then
-      our_gcc="$CC"
-    else
-      our_gcc="$ac_cv_prog_CC"
-    fi
-    case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
-      2.)
-	if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
-	  msnative_struct='-fnative-struct'
-	fi
-	;;
-      *)
-	if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
-	  msnative_struct='-mms-bitfields'
-	fi
-	;;
-    esac
-    if test x"$msnative_struct" = x ; then
-      AC_MSG_RESULT([no way])
-      AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
-    else
-      CXXFLAGS="$CXXFLAGS $msnative_struct"
-      AC_MSG_RESULT([${msnative_struct}])
-    fi
-  fi
-fi
+AC_SUBST([GDKMM_MODULES], ['giomm-2.4 >= 2.21.2 pangomm-1.4 >= 2.14.0 gtk+-2.0 >= 2.17.4'])
 
-AC_LANG([C++])
+AS_IF([test "x$gtkmm_host_windows" = xyes],
+      [GTKMM_MODULES=$GDKMM_MODULES],
+      [GTKMM_MODULES="$GDKMM_MODULES gtk+-unix-print-2.0"])
+AC_SUBST([GTKMM_MODULES])
+
+PKG_CHECK_MODULES([ATKMM], [$ATKMM_MODULES])
+PKG_CHECK_MODULES([GDKMM], [$GDKMM_MODULES])
+PKG_CHECK_MODULES([GTKMM], [$GTKMM_MODULES])
+
+MM_PKG_CONFIG_SUBST([GTHREAD_CFLAGS], [--cflags-only-other gthread-2.0])
+MM_PKG_CONFIG_SUBST([GTHREAD_LIBS], [--libs-only-other --libs-only-l gthread-2.0])
+MM_PKG_CONFIG_SUBST([GMMPROC_DIR], [--variable=gmmprocdir glibmm-2.4])
+# TODO: Temporary hack
+AC_SUBST([GMMPROC], ['${GMMPROC_DIR}/gmmproc'])
 
 # Create a list of input directories for Doxygen.
+# TODO: kill
 GTKMM_DOXYGEN_INPUT_SUBDIRS([atk gdk gtk])
 
+# TODO: Refactor into shared Autoconf macro
+AC_ARG_ENABLE([deprecated-api],
+              [AS_HELP_STRING([--disable-deprecated-api],
+                              [omit deprecated API from the library])],
+              [gtkmm_deprecated_api=$enableval],
+              [gtkmm_deprecated_api=yes])
+AS_IF([test "x$gtkmm_deprecated_api" = xyes],
+[
+  AC_MSG_NOTICE([[Deprecated API will be built, for backwards-compatibility.]])
+  DISABLE_DEPRECATED_API_CFLAGS=dnl
+], [
+  AC_MSG_WARN([[Deprecated API will not be built, breaking compatibility.
+Do not use this option for distribution packages.]])
+  DISABLE_DEPRECATED_API_CFLAGS='-DATKMM_DISABLE_DEPRECATED=1 -DGDKMM_DISABLE_DEPRECATED=1 -DGTKMM_DISABLE_DEPRECATED=1'dnl
+])
+AC_SUBST([DISABLE_DEPRECATED_API_CFLAGS])
+
+# Offer the ability to omit some API from the library, to reduce the code size.
+# Note that there are other options in glibmm, which affect gtkmm.
+GTKMM_ARG_ENABLE_API_ATKMM
+
+AS_IF([test "x$gtkmm_enable_api_atkmm" = xno],
+      [GTKMM_PC_ATKMM_DEP=],
+      [GTKMM_PC_ATKMM_DEP=atkmm-1.6])
+AC_SUBST([GTKMM_PC_ATKMM_DEP])
+
+AM_CONDITIONAL([GTKMM_ATKMM_ENABLED], [test "x$gtkmm_enable_api_atkmm" != xno])
+
+GTKMM_ARG_ENABLE_API_MAEMO_EXTENSIONS
+
+AC_LANG([C++])
+AC_CHECK_FUNCS([flockfile funlockfile getc_unlocked mkfifo])
+
 # Evaluate the --enable-warnings=level option.
 DK_ARG_ENABLE_WARNINGS([GTKMM_WXXFLAGS],
                        [-Wall],
-                       [-pedantic -Wall -Wextra])
-
-# Add an --enable-use-deprecations configure option:
-AC_ARG_ENABLE(deprecations,
-              [AC_HELP_STRING([--enable-use-deprecations],
-                              [warn about deprecated usages [default=no]])],,
-              [enable_deprecations=no])
+                       [-pedantic -Wall -Wextra]
+                       [G PANGO ATK GDK GDK_PIXBUF GTK])
 
-AS_IF([test "x$enable_use_deprecations" = xyes],
-[
-DISABLE_DEPRECATED_CFLAGS="\
--DG_DISABLE_DEPRECATED \
--DGDK_DISABLE_DEPRECATED \
--DGTK_DISABLE_DEPRECATED \
--DGDK_PIXBUF_DISABLE_DEPRECATED \
--DGNOME_DISABLE_DEPRECATED"
-],[
-DISABLE_DEPRECATED_CFLAGS=
+AC_CONFIG_FILES([
+      atk/Makefile
+      atk/atkmm-1.6.pc
+      atk/src/Makefile
+      atk/atkmm/Makefile
+      atk/atkmm/private/Makefile
 ])
-AC_SUBST([DISABLE_DEPRECATED_CFLAGS])
-
-# Add an --enable-deprecated-api option:
-AC_ARG_ENABLE(deprecated-api, [AC_HELP_STRING([--enable-deprecated-api],
-                                        [include (build) deprecated API in the libraries [default=yes]])],,
-                        [enable_deprecated_api=yes])
-if test "x$enable_deprecated_api" = "xyes"; then
-AC_MSG_WARN([Deprecated API will be built, for backwards-compatibility.])
-else
-  AC_DEFINE(ATKMM_DISABLE_DEPRECATED, 1, [Whether not to build deprecated API in atkmm])
-  AC_DEFINE(GDKMM_DISABLE_DEPRECATED, 1, [Whether not to build deprecated API in gdkmm])
-  AC_DEFINE(GTKMM_DISABLE_DEPRECATED, 1, [Whether not to build deprecated API in gtkmm])
-  DISABLE_DEPRECATED_API_CFLAGS="-DATKMM_DISABLE_DEPRECATED -DGDKMM_DISABLE_DEPRECATED -DGTKMM_DISABLE_DEPRECATED"
-AC_SUBST(DISABLE_DEPRECATED_API_CFLAGS)
-AC_MSG_WARN([Deprecated API will not be built, breaking backwards-compatibility. Do not use this build for distribution packages.])
-fi
-
-
-AC_ARG_ENABLE(demos, [AC_HELP_STRING([--enable-demos],
-              [build the included demos [default=yes]])],,
-                        [enable_demos=yes])
-if test "x$enable_demos" = "xyes"; then
-  DEMO_SUBDIR="demos"
-  AC_CONFIG_FILES([
-    demos/Makefile
-      demos/gtk-demo/Makefile
-  ])
-else
-  DEMO_SUBDIR=""
-fi
-
-AC_SUBST(DEMO_SUBDIR)
-
-
-#Offer the ability to omit some API from the library, 
-#to reduce the code size:
-#Note that there are other options in glibmm, which affect gtkmm.
-GTKMM_ARG_ENABLE_API_ATKMM()
-
-if test "x$gtkmm_enable_api_atkmm" = "xyes"; then
-  AC_CONFIG_FILES([
-	atk/Makefile
-  	atk/atkmm-1.6.pc
-	atk/src/Makefile
-	atk/atkmm/Makefile
-	atk/atkmm/private/Makefile
-  ])
-  GTKMM_PC_ATKMM_DEP="atkmm-1.6"
-else
-  GTKMM_PC_ATKMM_DEP=""
-fi
-AC_SUBST(GTKMM_PC_ATKMM_DEP)
-
-#Allow us to test for atkmm support in Makefile.am files:
-AM_CONDITIONAL(GTKMM_ATKMM_ENABLED, test "x$gtkmm_enable_api_atkmm" = "xyes")
-
-
-GTKMM_ARG_ENABLE_API_MAEMO_EXTENSIONS()
-
-
-AC_ARG_ENABLE(docs, [AC_HELP_STRING([--enable-docs],
-              [build the included docs [default=yes]])],,
-                        [enable_docs=yes])
-if test "x$enable_docs" = "xyes"; then
-  DOCS_SUBDIR="docs"
-  AC_CONFIG_FILES([
-    docs/Makefile
-      docs/images/Makefile
-      docs/reference/Makefile
-      docs/reference/Doxyfile
-        docs/reference/images/Makefile
-          docs/reference/images/widgets/Makefile
-  ])
-else
-  DOCS_SUBDIR=""
-fi
-AC_SUBST(DOCS_SUBDIR)
-
-# Dummy conditional just to make automake-1.4 happy.
-# We need an always-false condition in docs/Makefile.am.
-AM_CONDITIONAL(GTKMM_FALSE,[false])
-
-# HACK:  Assign a dummy in order to prevent execution of autoheader by the
-# maintainer-mode rules.  That would fail since we aren't using autoheader.
-AUTOHEADER=':'
 
+AC_CONFIG_FILES([
+  docs/Makefile
+    docs/images/Makefile
+    docs/reference/Makefile
+    docs/reference/Doxyfile
+      docs/reference/images/Makefile
+        docs/reference/images/widgets/Makefile
+])
 
 AC_CONFIG_FILES([
   Makefile
@@ -471,5 +203,4 @@ AC_CONFIG_FILES([
   win32_installer/gtkmm-installer.nsi
 ])
 
-AC_OUTPUT()
-
+AC_OUTPUT
diff --git a/scripts/.gitignore b/scripts/.gitignore
new file mode 100644
index 0000000..8051982
--- /dev/null
+++ b/scripts/.gitignore
@@ -0,0 +1,12 @@
+/compile-binding.am
+/config.guess
+/config.sub
+/depcomp
+/dist-changelog.am
+/doc-reference.am
+/generate-binding.am
+/install-sh
+/libtool.m4
+/lt*.m4
+/ltmain.sh
+/missing



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