1 m4_define([fso_glib_released], [0])
2 m4_define([fso_glib_version], [2012.05.24.2])
4 # If library source has changed since last release, increment revision
5 # If public symbols have been added, removed or changed since last release,
6 # increment current and set revision to 0
7 # If public symbols have been added since last release, increment age
8 # If public symbols have been removed since last release, set age to 0
9 m4_define([fso_glib_lt_current], [1])
10 m4_define([fso_glib_lt_revision], [0])
11 m4_define([fso_glib_lt_age], [0])
13 AC_INIT([libfso-glib], fso_glib_version, [smartphones-standards@linuxtogo.org], [libfso-glib])
14 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
16 AC_CONFIG_SRCDIR([Makefile.am])
17 AC_CONFIG_HEADERS(config.h)
18 AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip])
19 AM_MAINTAINER_MODE([enable])
27 PKG_PROG_PKG_CONFIG([0.21])
33 LT_CURRENT=fso_glib_lt_current
34 LT_REVISION=fso_glib_lt_revision
35 LT_AGE=fso_glib_lt_age
36 AC_SUBST([LT_CURRENT])
37 AC_SUBST([LT_REVISION])
40 #########################################################################################
41 # Vala building options -- allows tarball builds without installing vala
42 #########################################################################################
46 AC_ARG_ENABLE([vala], AS_HELP_STRING([--enable-vala],[Enable building from Vala sources]),
47 [enable_vala=$enableval], [enable_vala=no])
49 # Force Vala for non-release builds
50 m4_if(fso_glib_released, [1], [],
53 echo "Vala compiler required for non-release builds; requiring Vala..."
56 if test "x$enable_vala" = "xyes" ; then
57 AM_PROG_VALAC([$VALA_REQUIRED])
58 if test "x$VALAC" = "x" ; then
59 AC_MSG_ERROR([Vala requested but valac is not installed])
63 AM_CONDITIONAL([HAVE_VALA], [test "x$enable_vala" = "xyes"])
65 #########################################################################################
66 # Check for typelib support and gir-compiler
67 #########################################################################################
69 AC_ARG_ENABLE(typelib,
70 [AS_HELP_STRING([--enable-typelib],
71 [Enable typelib generation (default=no)])],
74 AM_CONDITIONAL([TYPELIB], [test x$enable_typelib != xno])
76 AS_IF([test "x$enable_typelib" != xno],
77 [AC_PATH_PROG(GIR_COMPILER, g-ir-compiler, :)
78 AC_SUBST(GIR_COMPILER)
79 AS_IF([test "$GIR_COMPILER" = :],
80 [AC_MSG_ERROR([g-ir-compiler not found])])])
82 #########################################################################################
83 # Check for various dependencies
84 #########################################################################################
89 SPECS_REQUIRED=$PACKAGE_VERSION
91 PKG_CHECK_MODULES(VALA_DBUS_BINDING_TOOL,
92 vala-dbus-binding-tool-1.0 >= $VDBT_REQUIRED)
94 PKG_CHECK_MODULES(SPECS,
95 fso-specs >= $SPECS_REQUIRED)
96 FSO_SPECS_DIR="`$PKG_CONFIG --variable=specsdir fso-specs`"
97 AC_SUBST(FSO_SPECS_DIR)
100 AS_HELP_STRING([--enable-gdbus],[Build code for gdbus as found in glib >= 2.26 (default=yes)]),
104 if test x$gdbus = x"yes"; then
106 PKG_CHECK_MODULES(DEPS,
107 glib-2.0 >= $GLIB_REQUIRED
108 gobject-2.0 >= $GLIB_REQUIRED
109 gio-2.0 >= $GLIB_REQUIRED
110 gthread-2.0 >= $GLIB_REQUIRED)
112 PKG_CHECK_MODULES(DEPS,
113 glib-2.0 >= $GLIB_REQUIRED
114 gobject-2.0 >= $GLIB_REQUIRED
115 gio-2.0 >= $GLIB_REQUIRED
116 gthread-2.0 >= $GLIB_REQUIRED
117 dbus-glib-1 >= $DBUS_REQUIRED
118 dbus-1 >= $DBUS_REQUIRED)
120 AM_CONDITIONAL( [WANT_GDBUS], [test x"$gdbus" = x"yes"])
122 AC_SUBST(DEPS_CFLAGS)
125 #########################################################################################
126 # check for debugging
127 #########################################################################################
130 [ --enable-debug Enable debug build (default=disabled)],
133 AM_CONDITIONAL( [WANT_DEBUG], [test x"$debug" = x"yes"])
135 #########################################################################################
137 #########################################################################################
146 #########################################################################################
148 #########################################################################################
151 echo "------------------------------------------------------------------------"
152 echo "$PACKAGE_NAME $PACKAGE_VERSION"
153 echo "------------------------------------------------------------------------"
155 echo "Configuration Options:"
157 echo " gdbus ...............................: $gdbus"
159 echo " debug build..........................: $debug"
161 echo " prefix...............................: $prefix"
163 echo "------------------------------------------------------------------------"
165 echo "Now type 'make' to compile and 'make install' to install this package."