summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid King <davidk@openismus.com>2009-08-11 16:36:04 +0200
committerJonathon Jongsma <jjongsma@gnome.org>2009-08-13 11:08:51 -0500
commitbec0074252bb26a4d493ab7558fde1126c9d4f8d (patch)
tree835cbdcd6a877ad609234823b2497707c54a829d
parent61de1eb019e54c0887ec2751354df3b6ee09daae (diff)
Initial changes to ease transition to mm-common build infrastructure
* autogen.sh: Replace with a simple wrapper around mm-common-prepare and autoreconf. * build/*.m4: Move from m4 directory. * Makefile.am: Rename m4 directory to build. * configure.ac: Rename from configure.in, as it is recommended by Autoconf developers and currently required by mm-common-prepare. Major update to take advantage of mm-common build infrastructure. * INSTALL: Remove from repository, using GNU install instructions instead. * cairomm/Makefile.am: Remove unnecessary win32 conditionals.
-rw-r--r--ChangeLog13
-rw-r--r--INSTALL9
-rw-r--r--MSVC_Net2005/cairomm/Makefile.am2
-rw-r--r--MSVC_Net2008/cairomm/Makefile.am2
-rw-r--r--Makefile.am2
-rwxr-xr-xautogen.sh42
-rw-r--r--build/ax_boost_base.m4 (renamed from m4/ax_boost_base.m4)0
-rw-r--r--build/ax_boost_test_exec_monitor.m4 (renamed from m4/ax_boost_test_exec_monitor.m4)0
-rw-r--r--build/ax_boost_unit_test_framework.m4 (renamed from m4/ax_boost_unit_test_framework.m4)0
-rw-r--r--build/reduced.m4 (renamed from m4/reduced.m4)0
-rw-r--r--cairomm/Makefile.am9
-rw-r--r--configure.ac (renamed from configure.in)194
12 files changed, 73 insertions, 200 deletions
diff --git a/ChangeLog b/ChangeLog
index c35be51..1a6eaa2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2009-08-11 David King <davidk@openismus.com>
+
+ * autogen.sh: Replace with a simple wrapper around mm-common-prepare
+ and autoreconf.
+ * build/*.m4: Move from m4 directory.
+ * Makefile.am: Rename m4 directory to build.
+ * configure.ac: Rename from configure.in, as it is recommended by
+ Autoconf developers and currently required by mm-common-prepare. Major
+ update to take advantage of mm-common build infrastructure.
+ * INSTALL: Remove from repository, using GNU install instructions
+ instead.
+ * cairomm/Makefile.am: Remove unnecessary win32 conditionals.
+
2009-07-07 Christopher Harvey <chris@basementcode.com>
* cairomm/context.h
diff --git a/INSTALL b/INSTALL
deleted file mode 100644
index 88dee82..0000000
--- a/INSTALL
+++ /dev/null
@@ -1,9 +0,0 @@
-Simple install procedure
-========================
-
- % tar zxvf cairomm-<version>.tar.gz # unpack the sources
- % cd cairomm-<version> # change to toplevel directory
- % ./configure # run the `configure' script
- % make # build cairomm
- % make install # install cairomm
-
diff --git a/MSVC_Net2005/cairomm/Makefile.am b/MSVC_Net2005/cairomm/Makefile.am
index 2b6fcdb..5fc9b3e 100644
--- a/MSVC_Net2005/cairomm/Makefile.am
+++ b/MSVC_Net2005/cairomm/Makefile.am
@@ -8,5 +8,5 @@ EXTRA_DIST = cairommconfig.h cairomm.vcproj cairomm.rc
# wht respect to the .h.in file, to prevent an error with 'make distcheck'.
# See http://sources.redhat.com/automake/automake.html#distcleancheck
-cairommconfig.h: $(top_srcdir)/cairomm/cairommconfig.h.in $(top_srcdir)/configure.in
+cairommconfig.h: $(top_srcdir)/cairomm/cairommconfig.h.in $(top_srcdir)/configure.ac
cp -f $(top_builddir)/cairomm/cairommconfig.h $@
diff --git a/MSVC_Net2008/cairomm/Makefile.am b/MSVC_Net2008/cairomm/Makefile.am
index 2b6fcdb..5fc9b3e 100644
--- a/MSVC_Net2008/cairomm/Makefile.am
+++ b/MSVC_Net2008/cairomm/Makefile.am
@@ -8,5 +8,5 @@ EXTRA_DIST = cairommconfig.h cairomm.vcproj cairomm.rc
# wht respect to the .h.in file, to prevent an error with 'make distcheck'.
# See http://sources.redhat.com/automake/automake.html#distcleancheck
-cairommconfig.h: $(top_srcdir)/cairomm/cairommconfig.h.in $(top_srcdir)/configure.in
+cairommconfig.h: $(top_srcdir)/cairomm/cairommconfig.h.in $(top_srcdir)/configure.ac
cp -f $(top_builddir)/cairomm/cairommconfig.h $@
diff --git a/Makefile.am b/Makefile.am
index 00a6018..18bf4cc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@
SUBDIRS = cairomm data examples MSVC_Net2005 MSVC_Net2008 $(DOCS_SUBDIR) tests
#docs examples
-ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_AMFLAGS = -I build ${ACLOCAL_FLAGS}
EXTRA_DIST = MAINTAINERS autogen.sh
diff --git a/autogen.sh b/autogen.sh
index 5b3eb3e..0869555 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,9 +1,6 @@
-#! /bin/sh
-set -e
+#! /bin/sh -e
-# $Id: autogen.sh,v 1.4 2007-03-24 03:05:33 jjongsma Exp $
-#
-# Copyright (c) 2002 Daniel Elstner <daniel.elstner@gmx.net>
+# Copyright (c) 2009 Openismus GmbH
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License VERSION 2 as
@@ -21,34 +18,9 @@ set -e
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
-dir=`echo "$0" | sed 's,[^/]*$,,'`
-test "x${dir}" = "x" && dir='.'
-
-if test "x`cd "${dir}" 2>/dev/null && pwd`" != "x`pwd`"
-then
- echo "This script must be executed directly from the source directory."
- exit 1
-fi
-
-LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
-AUTOCONF=${AUTOCONF:-autoconf}
-AUTOMAKE=${AUTOMAKE:-automake}
-AUTOHEADER=${AUTOHEADER:-autoheader}
-
-ACLOCAL_FLAGS="-I m4"
-ACLOCAL=`echo $AUTOMAKE | sed s/automake/aclocal/`
-
-rm -f config.cache acconfig.h
-
-do_cmd() {
- echo "- $@"
- $@
-}
-
-do_cmd $ACLOCAL $ACLOCAL_FLAGS
-do_cmd $AUTOHEADER
-do_cmd $LIBTOOLIZE --force
-do_cmd $AUTOCONF
-do_cmd $AUTOMAKE --add-missing --gnu
-do_cmd ./configure "$@"
+mm-common-prepare --force --copy "$srcdir"
+autoreconf --force --install "$srcdir"
+test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
diff --git a/m4/ax_boost_base.m4 b/build/ax_boost_base.m4
index 575a51e..575a51e 100644
--- a/m4/ax_boost_base.m4
+++ b/build/ax_boost_base.m4
diff --git a/m4/ax_boost_test_exec_monitor.m4 b/build/ax_boost_test_exec_monitor.m4
index 44a1039..44a1039 100644
--- a/m4/ax_boost_test_exec_monitor.m4
+++ b/build/ax_boost_test_exec_monitor.m4
diff --git a/m4/ax_boost_unit_test_framework.m4 b/build/ax_boost_unit_test_framework.m4
index 6072b51..6072b51 100644
--- a/m4/ax_boost_unit_test_framework.m4
+++ b/build/ax_boost_unit_test_framework.m4
diff --git a/m4/reduced.m4 b/build/reduced.m4
index 5a941fc..5a941fc 100644
--- a/m4/reduced.m4
+++ b/build/reduced.m4
diff --git a/cairomm/Makefile.am b/cairomm/Makefile.am
index 8af1caa..25c9ca2 100644
--- a/cairomm/Makefile.am
+++ b/cairomm/Makefile.am
@@ -7,15 +7,10 @@ h_sources_private = private.h context_private.h
cc_sources = context.cc fontface.cc fontoptions.cc matrix.cc path.cc pattern.cc quartz_font.cc quartz_surface.cc surface.cc xlib_surface.cc win32_font.cc win32_surface.cc exception.cc scaledfont.cc
cc_sources_private = private.cc context_surface_quartz.cc context_surface_win32.cc context_surface_xlib.cc
-# Support for DLL on cygwin/mingw using libtool > 1.4
-if PLATFORM_WIN32
-win32_dlls_ldflags = -no-undefined -Wl,--export-all-symbols
-else
-win32_dlls_ldflags =
-endif
+win32_dlls_ldflags = -no-undefined
lib_LTLIBRARIES = libcairomm-1.0.la
-libcairomm_1_0_la_LDFLAGS = -version-info $(GENERIC_LIBRARY_VERSION) $(win32_dlls_ldflags)
+libcairomm_1_0_la_LDFLAGS = -version-info $(CAIROMM_SO_VERSION) $(win32_dlls_ldflags)
libcairomm_1_0_la_LIBADD = @CAIROMM_LIBS@
libcairomm_1_0_la_SOURCES = $(cc_sources) $(h_sources_public) $(h_sources_private) $(cc_sources_private)
diff --git a/configure.in b/configure.ac
index 6769d63..8631564 100644
--- a/configure.in
+++ b/configure.ac
@@ -1,39 +1,45 @@
-AC_INIT(cairomm/cairomm.h)
-
-#release versioning
-GENERIC_MAJOR_VERSION=1
-GENERIC_MINOR_VERSION=8
-GENERIC_MICRO_VERSION=2
-GENERIC_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION.$GENERIC_MICRO_VERSION
-AC_SUBST(GENERIC_MAJOR_VERSION)
-AC_SUBST(GENERIC_MINOR_VERSION)
-AC_SUBST(GENERIC_MICRO_VERSION)
-AC_SUBST(GENERIC_VERSION)
-
-#shared library versioning
-GENERIC_LIBRARY_VERSION=5:0:4
-# | | |
-# +------+ | +---+
-# | | |
-# current:revision:age
-# | | |
-# | | +- increment if interfaces have been added
-# | | set to zero if interfaces have been removed
-# or changed
-# | +- increment if source code has changed
-# | set to zero if current is incremented
-# +- increment if interfaces have been added, removed or changed
-AC_SUBST(GENERIC_LIBRARY_VERSION)
-
-VERSION=$GENERIC_VERSION
-
-AM_INIT_AUTOMAKE(cairomm, $GENERIC_VERSION)
-
-# define values for config header
-AC_DEFINE_UNQUOTED([CAIROMM_MAJOR_VERSION], $GENERIC_MAJOR_VERSION, [cairomm major version])
-AC_DEFINE_UNQUOTED([CAIROMM_MINOR_VERSION], $GENERIC_MINOR_VERSION, [cairomm minor version])
-AC_DEFINE_UNQUOTED([CAIROMM_MICRO_VERSION], $GENERIC_MICRO_VERSION, [cairomm micro version])
-AC_CONFIG_HEADER(cairomm/cairommconfig.h)
+AC_INIT([cairomm], [1.8.2], [cairo@cairographics.org], [cairomm])
+AC_PREREQ([2.62])
+
+AC_CONFIG_SRCDIR([cairomm/cairomm.h])
+AC_CONFIG_AUX_DIR([build])
+AC_CONFIG_MACRO_DIR([build])
+AC_CONFIG_HEADERS([cairomm/cairommconfig.h])
+
+AM_INIT_AUTOMAKE([1.10 -Wno-portability no-define tar-ustar])
+AM_MAINTAINER_MODE
+AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>])
+
+# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
+AC_SUBST([CAIROMM_SO_VERSION], [5:0:4])
+
+AC_PROG_CXX
+AC_DISABLE_STATIC
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+
+AC_SUBST([CAIROMM_MODULES], ['cairo >= 1.8.0 sigc++-2.0'])
+PKG_CHECK_MODULES([CAIROMM], [$CAIROMM_MODULES])
+
+MM_ARG_ENABLE_DOCUMENTATION
+MM_ARG_WITH_TAGFILE_DOC([libstdc++.tag], [mm-common-libstdc++])
+MM_ARG_WITH_TAGFILE_DOC([libsigc++-2.0.tag], [sigc++-2.0])
+
+AC_LANG([C++])
+MM_ARG_ENABLE_WARNINGS([CAIROMM_WXXFLAGS],
+ [-Wall],
+ [-Wall -g -Wextra])
+
+AC_CONFIG_FILES([Makefile
+ cairomm/Makefile
+ data/Makefile
+ data/cairomm-1.0.pc
+ docs/Makefile
+ docs/reference/Doxyfile
+ examples/Makefile
+ examples/surfaces/Makefile
+ examples/text/Makefile
+ tests/Makefile])
AC_PROG_CXX
AC_PROG_CXXCPP
@@ -42,66 +48,13 @@ AC_PROG_INSTALL
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
-dnl Used for enabling the "-no-undefined" and "-export-all-symbols" flags
-dnl while generating DLLs. Borrowed 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")
-
# 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; 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
+# TODO: Disabled for now. I don't think this should be enabled by the
+# libraries themselves on behalf of the user. That makes no sense as
+# it is a platform-wide ABI choice.
AC_CHECK_HEADERS(string list map, , exit)
dnl some platforms (e.g. Solaris) need additional C headers included so
@@ -111,10 +64,6 @@ AC_CHECK_HEADERS(math.h)
########################
# Determine Dependencies
########################
-dnl base dependencies
-DEPS_PC="cairo >= 1.8.0
- sigc++-2.0"
-
dnl always install the 'base' pkg-config file
INSTALLED_PC="cairomm-1.0.pc"
@@ -259,57 +208,10 @@ else
fi
AM_CONDITIONAL(AUTOTESTS, test x$ENABLE_TESTS = xyes)
-dnl enable compiler warnings when the CAIROMM_DEVEL environment variable is set to 'on'
-if test "x$CAIROMM_DEVEL" = "xon" ; then
- CXXFLAGS="$CXXFLAGS -Wall -g -Werror -Wextra"
-fi
-
-CAIROMM_ARG_ENABLE_API_EXCEPTIONS()
-
-dnl Check whether to build the documentation directory
-DOCS_SUBDIR="" dnl set DOCS_SUBDIR initially blank
-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
- dnl check if doxygen is installed
- AC_CHECK_PROGS(DOXYGEN, [doxygen], no)
- if test x$DOXYGEN = xno; then
- AC_MSG_WARN([Doxygen not found, documentation will not be rebuilt])
- else
- dnl check if graphviz / dot is installed (used by doxygen)
- AC_CHECK_PROGS(DOT, [dot], no)
- if test x$DOT = xno; then
- AC_MSG_WARN([graphviz / dot not found, documentation graphs will not be rebuilt])
- fi
- fi
-
- DOCS_SUBDIR="docs"
- AC_CONFIG_FILES(
- docs/Makefile
- docs/reference/Makefile
- docs/reference/Doxyfile
- )
-fi
-AC_SUBST(DOCS_SUBDIR)
-
-
-AC_CONFIG_FILES(
- Makefile
- cairomm/Makefile
-
- data/Makefile
-
- examples/Makefile
- examples/surfaces/Makefile
- examples/text/Makefile
-
- tests/Makefile
-
- $CONFIG_PC
-)
+CAIROMM_ARG_ENABLE_API_EXCEPTIONS
AC_CONFIG_FILES([
+ $CONFIG_PC
MSVC_Net2005/Makefile
MSVC_Net2005/gendef/Makefile
MSVC_Net2005/cairomm/Makefile
@@ -336,4 +238,4 @@ AC_CONFIG_FILES([
MSVC_Net2008/examples/user-font/Makefile
])
-AC_OUTPUT()
+AC_OUTPUT