1 AC_INIT(cairomm/cairomm.h)
4 GENERIC_MAJOR_VERSION=1
5 GENERIC_MINOR_VERSION=4
6 GENERIC_MICRO_VERSION=6
7 GENERIC_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION.$GENERIC_MICRO_VERSION
8 AC_SUBST(GENERIC_MAJOR_VERSION)
9 AC_SUBST(GENERIC_MINOR_VERSION)
10 AC_SUBST(GENERIC_MICRO_VERSION)
11 AC_SUBST(GENERIC_VERSION)
13 #shared library versioning
14 GENERIC_LIBRARY_VERSION=2:0:1
18 # current:revision:age
20 # | | +- increment if interfaces have been added
21 # | | set to zero if interfaces have been removed
23 # | +- increment if source code has changed
24 # | set to zero if current is incremented
25 # +- increment if interfaces have been added, removed or changed
26 AC_SUBST(GENERIC_LIBRARY_VERSION)
29 VERSION=$GENERIC_VERSION
31 AM_INIT_AUTOMAKE(cairomm, $GENERIC_VERSION)
33 AM_CONFIG_HEADER(cairomm/cairommconfig.h)
42 dnl Used for enabling the "-no-undefined" and "-export-all-symbols" flags
43 dnl while generating DLLs. Borrowed from the official gtk+-2 configure.in
44 AC_MSG_CHECKING([for some Win32 platform])
46 *-*-mingw*|*-*-cygwin*)
53 AC_MSG_RESULT([$platform_win32])
54 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
56 AC_MSG_CHECKING([for native Win32])
65 AC_MSG_RESULT([$os_win32])
66 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
68 # Ensure MSVC-compatible struct packing convention is used when
69 # compiling for Win32 with gcc.
70 # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
71 # gcc2 uses "-fnative-struct".
72 if test x"$os_win32" = xyes; then
73 if test x"$GCC" = xyes; then
75 AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
76 if test -z "$ac_cv_prog_CC"; then
79 our_gcc="$ac_cv_prog_CC"
81 case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
83 if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
84 msnative_struct='-fnative-struct'
88 if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
89 msnative_struct='-mms-bitfields'
93 if test x"$msnative_struct" = x ; then
94 AC_MSG_RESULT([no way])
95 AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
97 CXXFLAGS="$CXXFLAGS $msnative_struct"
98 AC_MSG_RESULT([${msnative_struct}])
103 AC_CHECK_HEADERS(string list map, , exit)
105 PKG_CHECK_MODULES(CAIROMM, cairo >= 1.4)
108 AC_HELP_STRING([--enable-tests=yes|no],
109 [enable automated tests (default is no)]),
110 ENABLE_TESTS=$enableval,
112 if test x$CAIROMM_DEVEL = xon ; then
116 if test x$ENABLE_TESTS = xyes ; then
117 AX_BOOST_BASE([1.33.1])
118 AX_BOOST_UNIT_TEST_FRAMEWORK
119 AC_MSG_NOTICE(support of automated tests enabled)
121 AC_MSG_NOTICE(disabled support of automated tests)
123 AM_CONDITIONAL(AUTOTESTS, test x$ENABLE_TESTS = xyes)
125 dnl enable compiler warnings when the CAIROMM_DEVEL environment variable is set to 'on'
126 if test "x$CAIROMM_DEVEL" = "xon" ; then
127 CXXFLAGS="$CXXFLAGS -Wall -g -Werror -Wextra"
130 CAIROMM_ARG_ENABLE_API_EXCEPTIONS()
132 dnl Check whether to build the documentation directory
133 DOCS_SUBDIR="" dnl set DOCS_SUBDIR initially blank
134 AC_ARG_ENABLE(docs, [AC_HELP_STRING([--enable-docs],
135 [build the included docs [default=yes]])],,
137 if test "x$enable_docs" = "xyes"; then
138 dnl check if doxygen is installed
139 AC_CHECK_PROGS(DOXYGEN, [doxygen], no)
140 if test x$DOXYGEN = xno; then
141 AC_MSG_WARN([Doxygen not found, documentation will not be rebuilt])
143 dnl check if graphviz / dot is installed (used by doxygen)
144 AC_CHECK_PROGS(DOT, [dot], no)
145 if test x$DOT = xno; then
146 AC_MSG_WARN([graphviz / dot not found, documentation graphs will not be rebuilt])
153 docs/reference/Makefile
154 docs/reference/Doxyfile
157 AC_SUBST(DOCS_SUBDIR)
165 examples/png_file/Makefile
166 examples/pdf-surface/Makefile
167 examples/ps-surface/Makefile
168 examples/svg-surface/Makefile
169 examples/text-rotate/Makefile
179 MSVC/cairomm/Makefile
180 MSVC/cairomm/cairomm.rc
181 MSVC/examples/Makefile
182 MSVC/examples/pdf-surface/Makefile
183 MSVC/examples/png_file/Makefile
184 MSVC/examples/ps-surface/Makefile
185 MSVC/examples/svg-surface/Makefile
186 MSVC/examples/text-rotate/Makefile