Add missing cairomm lib from previous commit.
[ardour.git] / libs / cairomm / configure.in
1 AC_INIT(cairomm/cairomm.h)
2
3 #release versioning
4 GENERIC_MAJOR_VERSION=1
5 GENERIC_MINOR_VERSION=2
6 GENERIC_MICRO_VERSION=4
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)
12
13 #shared library versioning
14 GENERIC_LIBRARY_VERSION=1:0:0
15 #                       | | |
16 #                +------+ | +---+
17 #                |        |     |
18 #             current:revision:age
19 #                |        |     |
20 #                |        |     +- increment if interfaces have been added
21 #                |        |        set to zero if interfaces have been removed
22 #                                  or changed
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)
27
28
29 VERSION=$GENERIC_VERSION
30
31
32 AM_INIT_AUTOMAKE(cairomm, $GENERIC_VERSION)
33
34 AC_PROG_CXX
35 AC_PROG_CXXCPP
36 AC_LANG_CPLUSPLUS
37 AC_PROG_INSTALL
38 AC_LIBTOOL_WIN32_DLL
39 AM_PROG_LIBTOOL
40
41 dnl Used for enabling the "-no-undefined" and "-export-all-symbols" flags
42 dnl while generating DLLs. Borrowed from the official gtk+-2 configure.in
43 AC_MSG_CHECKING([for some Win32 platform])
44 case "$host" in
45   *-*-mingw*|*-*-cygwin*)
46     platform_win32=yes
47     ;;
48   *)
49     platform_win32=no
50     ;;
51 esac
52 AC_MSG_RESULT([$platform_win32])
53 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
54
55 # Ensure MSVC-compatible struct packing convention is used when
56 # compiling for Win32 with gcc.
57 # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
58 # gcc2 uses "-fnative-struct".
59 if test x"$platform_win32" = xyes; then
60   if test x"$GCC" = xyes; then
61     msnative_struct=''
62     AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
63     if test -z "$ac_cv_prog_CC"; then
64       our_gcc="$CC"
65     else
66       our_gcc="$ac_cv_prog_CC"
67     fi
68     case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
69       2.)
70         if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
71           msnative_struct='-fnative-struct'
72         fi
73         ;;
74       *)
75         if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
76           msnative_struct='-mms-bitfields'
77         fi
78         ;;
79     esac
80     if test x"$msnative_struct" = x ; then
81       AC_MSG_RESULT([no way])
82       AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
83     else
84       CXXFLAGS="$CXXFLAGS $msnative_struct"
85       AC_MSG_RESULT([${msnative_struct}])
86     fi
87   fi
88 fi
89
90 AC_CHECK_HEADERS(string list map, , exit)
91
92 PKG_CHECK_MODULES(CAIROMM, cairo >= 1.2.0)
93
94
95 dnl Check whether to build the documentation directory
96 DOCS_SUBDIR="" dnl set DOCS_SUBDIR initially blank
97 AC_ARG_ENABLE(docs, [AC_HELP_STRING([--enable-docs],
98               [build the included docs [default=yes]])],,
99               [enable_docs=yes])
100 if test "x$enable_docs" = "xyes"; then
101   dnl check if doxygen is installed
102   AC_CHECK_PROGS(DOXYGEN, [doxygen], no)
103   if test x$DOXYGEN = xno; then
104     AC_MSG_WARN([Doxygen not found, documentation will not be rebuilt])
105   else
106     dnl check if graphviz / dot is installed (used by doxygen)
107     AC_CHECK_PROGS(DOT, [dot], no)
108     if test x$DOT = xno; then
109       AC_MSG_WARN([graphviz / dot not found, documentation graphs will not be rebuilt])
110     fi
111   fi
112
113   DOCS_SUBDIR="docs"
114   AC_CONFIG_FILES(
115     docs/Makefile
116     docs/reference/Makefile
117     docs/reference/Doxyfile
118   )
119 fi
120 AC_SUBST(DOCS_SUBDIR)
121
122
123 AC_CONFIG_FILES(
124   Makefile
125   cairomm/Makefile
126
127   examples/Makefile
128   examples/png_file/Makefile
129   examples/pdf-surface/Makefile
130   examples/ps-surface/Makefile
131   examples/svg-surface/Makefile
132   examples/text-rotate/Makefile
133
134   cairomm-1.0.pc
135 )
136
137 AC_CONFIG_FILES([
138   MSVC/Makefile
139     MSVC/gendef/Makefile
140     MSVC/cairomm/Makefile
141     MSVC/cairomm/cairomm.rc
142     MSVC/examples/Makefile
143       MSVC/examples/pdf-surface/Makefile
144       MSVC/examples/png_file/Makefile
145       MSVC/examples/ps-surface/Makefile
146       MSVC/examples/svg-surface/Makefile
147       MSVC/examples/text-rotate/Makefile
148 ])
149
150 AC_OUTPUT()