Bump version to 2012.02.16.1
[libfso-glib.git] / configure.ac
blob2aec9a71d935f8039c171b6602f52b98c5b266cc
1 AC_INIT([libfso-glib], [2012.02.16.1], [smartphones-standards@linuxtogo.org], [libfso-glib])
2 AC_CONFIG_SRCDIR([src/Makefile.am])
3 AC_CONFIG_HEADERS(config.h)
4 AM_INIT_AUTOMAKE([dist-bzip2])
5 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
7 AC_PROG_CC
8 AM_PROG_CC_C_O
9 AC_DISABLE_STATIC
10 AC_PROG_LIBTOOL
12 VALA_REQUIRED=0.14.2
13 AC_PATH_PROG(VALAC, valac, valac)
14 AC_SUBST(VALAC)
15 m4_ifdef([AM_PROG_VALAC], [AM_PROG_VALAC([$VALA_REQUIRED])])
17 AC_ARG_ENABLE(typelib,
18         [AS_HELP_STRING([--enable-typelib],
19                 [Enable typelib generation (default=no)])],
20         [ ],
21         [enable_typelib=no])
22 AM_CONDITIONAL([TYPELIB], [test x$enable_typelib != xno])
24 AS_IF([test "x$enable_typelib" != xno],
25         [AC_PATH_PROG(GIR_COMPILER, g-ir-compiler, :)
26          AC_SUBST(GIR_COMPILER)
27          AS_IF([test "$GIR_COMPILER" = :],
28                 [AC_MSG_ERROR([g-ir-compiler not found])])])
30 AC_SUBST(CFLAGS)
31 AC_SUBST(CPPFLAGS)
32 AC_SUBST(LDFLAGS)
34 VDBT_REQUIRED=0.1.3
35 GLIB_REQUIRED=2.12.0
36 DBUS_REQUIRED=0.70
37 SPECS_REQUIRED=$PACKAGE_VERSION
39 ##############################################################################
40 # binding tools
41 PKG_CHECK_MODULES(VALA_DBUS_BINDING_TOOL,
42         vala-dbus-binding-tool-1.0 >= $VDBT_REQUIRED)
43 PKG_CHECK_MODULES(SPECS,
44         fso-specs >= $SPECS_REQUIRED)
45 # specs directory
46 FSO_SPECS_DIR="`$PKG_CONFIG --variable=specsdir fso-specs`"
47 AC_SUBST(FSO_SPECS_DIR)
49 ##############################################################################
50 # gdbus?
51 AC_ARG_ENABLE(gdbus,
52   AS_HELP_STRING([--enable-gdbus],[Build code for gdbus as found in glib >= 2.26 (default=yes)]),
53   [gdbus=$enableval],
54   [gdbus="yes"])
56 if test x$gdbus = x"yes"; then
57     GLIB_REQUIRED=2.26.0
58     PKG_CHECK_MODULES(DEPS,
59         glib-2.0 >= $GLIB_REQUIRED
60         gobject-2.0 >= $GLIB_REQUIRED
61         gio-2.0 >= $GLIB_REQUIRED
62         gthread-2.0 >= $GLIB_REQUIRED)
63 else
64     PKG_CHECK_MODULES(DEPS,
65         glib-2.0 >= $GLIB_REQUIRED
66         gobject-2.0 >= $GLIB_REQUIRED
67         gio-2.0 >= $GLIB_REQUIRED
68         gthread-2.0 >= $GLIB_REQUIRED
69         dbus-glib-1 >= $DBUS_REQUIRED
70         dbus-1 >= $DBUS_REQUIRED)
72 AM_CONDITIONAL( [WANT_GDBUS], [test x"$gdbus" = x"yes"])
74 AC_SUBST(DEPS_CFLAGS)
75 AC_SUBST(DEPS_LIBS)
77 ##############################################################################
78 # check for debugging
79 AC_ARG_ENABLE(debug,
80   [  --enable-debug            Enable debug build (default=disabled)],
81   [debug=$enableval],
82   [debug="no"])
83 AM_CONDITIONAL( [WANT_DEBUG], [test x"$debug" = x"yes"])
85 AC_CONFIG_FILES([
86         Makefile
87         src/Makefile
88         fso-glib-1.0.pc
90 AC_OUTPUT
92 ##############################################################################
93 # info
94 echo
95 echo "------------------------------------------------------------------------"
96 echo "$PACKAGE_NAME $PACKAGE_VERSION"
97 echo "------------------------------------------------------------------------"
98 echo
99 echo "Configuration Options:"
100 echo
101 echo "  gdbus ...............................: $gdbus"
102 echo
103 echo "  debug build..........................: $debug"
104 echo
105 echo "  prefix...............................: $prefix"
106 echo
107 echo "------------------------------------------------------------------------"
108 echo
109 echo "Now type 'make' to compile and 'make install' to install this package."