1 m4_define([adg_version],[0.5.5])
2 m4_define([adg_api_version],[1.0])
4 m4_define([gtkdoc_prereq],[1.9])
5 m4_define([gobject_prereq],[2.4.0])
6 m4_define([cairo_prereq],[1.7.4])
7 m4_define([gtk_prereq],[2.12.0])
13 AC_INIT([Automatic Drawing Generation],adg_version,
14 [http://dev.entidi.com/p/adg/],[adg],[http://adg.entidi.com/])
15 AC_CONFIG_SRCDIR([configure.ac])
16 AC_CONFIG_HEADERS([config.h])
17 AC_CONFIG_MACRO_DIR([build])
18 AM_INIT_AUTOMAKE([1.6 gnits no-dist-gzip dist-bzip2 -Wall])
21 # Check for host information
56 AM_CONDITIONAL([OS_UNIX],[test "${guessed_host}" != "mingw"])
57 AM_CONDITIONAL([OS_WIN32],[test "${guessed_host}" == "mingw" -o "${guessed_host}" == "cygwin"])
64 AC_PATH_PROG([XSLTPROC],[xsltproc],[/usr/bin/xsltproc])
65 AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums],[/usr/bin/glib-mkenums])
66 AC_PATH_PROG([GLIB_GENMARSHAL],[glib-genmarshal],[/usr/bin/glib-genmarshal])
67 AC_PATH_PROG([GTESTER],[gtester],[/usr/bin/gtester])
68 AC_PATH_PROG([GTESTER_REPORT],[gtester-report],[/usr/bin/gtester-report])
71 [LT_INIT([disable-static])],
78 dnl Alloca is required by cpml, so it should be removed
79 dnl in case the adg and cpml libraries will be splitted
85 AC_SUBST([GETTEXT_PACKAGE],adg-adg_api_version)
86 AC_DEFINE([GETTEXT_PACKAGE],"AC_PACKAGE_TARNAME-adg_api_version",
87 [Define to the domain used by gettext.])
90 GLIB_DEFINE_LOCALEDIR([LOCALEDIR])
91 AC_OUTPUT_COMMANDS([case "${CONFIG_FILES}" in *po-properties/Makefile.in*)
92 sed -e "/POTFILES =/r po-properties/POTFILES" po-properties/Makefile.in > po-properties/Makefile
96 # Check for required packages
98 GTK_DOC_CHECK(gtkdoc_prereq)
99 PKG_CHECK_MODULES([GOBJECT2],[gobject-2.0 >= ]gobject_prereq)
100 PKG_CHECK_MODULES([CAIRO],[cairo >= ]cairo_prereq)
103 # Check for optional GTK+2 support
105 AC_ARG_ENABLE([gtk2],
106 [AS_HELP_STRING([--enable-gtk2],
107 [include GKT+2 specific widgets @<:@default=check@:>@])],
108 [],[enable_gtk2=check])
109 AS_IF([test "x${enable_gtk2}" != "xno"],
110 [PKG_CHECK_MODULES([GTK2],[gtk+-2.0 >= ]gtk_prereq,
112 [AS_IF([test "x${enable_gtk2}" = "xyes"],
113 [AC_MSG_ERROR([$GTK2_PKG_ERRORS and GTK+2 support requested])],
114 [enable_gtk2=no])])])
115 AM_CONDITIONAL([HAVE_GTK2],[test "x${enable_gtk2}" = "xyes"])
118 # Check for optional GLib test framework
120 AC_ARG_ENABLE([test_framework],
121 [AS_HELP_STRING([--enable-test-framework],
122 [enable GLib test framework @<:@default=check@:>@])],
123 [],[enable_test_framework=check])
124 AS_IF([test "x${enable_test_framework}" != "xno"],
125 [PKG_CHECK_EXISTS([glib-2.0 >= 2.16.0],
126 [enable_test_framework=yes],
127 [AS_IF([test "x${enable_test_framework}" = "xyes"],
128 [AC_MSG_ERROR([The test framework needs glib2-2.16.0 or later])],
129 [enable_test_framework=no])])])
130 AM_CONDITIONAL([HAVE_TEST_FRAMEWORK],[test "x${enable_test_framework}" = "xyes"])
133 # Check for compiler characteristics
140 CPML_REQUIRES='cairo >= cairo_prereq'
141 CPML_CFLAGS="${CAIRO_CFLAGS}"
142 CPML_LIBS="${CAIRO_LIBS}"
143 AS_IF([test "x${enable_gtk2}" = "xyes"],
144 [ADG_REQUIRES='gtk+-2.0 >= gtk_prereq'
145 ADG_CFLAGS="${GTK2_CFLAGS}"
146 ADG_LIBS="${GTK2_LIBS}"],
147 [ADG_REQUIRES='gobject-2.0 >= gobject_prereq'
148 ADG_CFLAGS="${GOBJECT2_CFLAGS} ${CAIRO_CFLAGS}"
149 ADG_LIBS="${GOBJECT2_LIBS} ${CAIRO_LIBS}"])
150 AC_SUBST([CPML_REQUIRES])
151 AC_SUBST([CPML_CFLAGS])
152 AC_SUBST([CPML_LIBS])
153 AC_SUBST([ADG_REQUIRES])
154 AC_SUBST([ADG_CFLAGS])
157 SHAVE_INIT([build],[enable])
158 AC_CONFIG_FILES([build/shave
167 po-properties/Makefile.in
171 docs/cpml/bookinfo.xml
173 docs/adg/bookinfo.xml])
180 echo 'ADG canvas adg_version will be built with the following options:'
181 echo "----------------------------------------------------------"
182 echo ' API compatibility: adg_api_version'
183 echo ' CPML library to use: internal (cpml-adg_version)'
184 echo " AdgWidget support (requires GTK+2): ${enable_gtk2}"
185 echo " Build API reference: ${enable_gtk_doc}"
186 echo " Test framework support: ${enable_test_framework}"