~online-accounts/libsignon-glib/packaging

1 by Alberto Mardegan
Initial commit
1
dnl Process this file with autoconf to produce a configure script.
122.1.38 by David King
Update configure.ac to recent autoconf syntax
2
AC_PREREQ([2.64])
3
AC_INIT([libsignon-glib],
122.1.76 by Alberto Mardegan
Version 1.12
4
        [1.12],
122.1.38 by David King
Update configure.ac to recent autoconf syntax
5
        [http://code.google.com/p/accounts-sso/issues/entry],
6
        [libsignon-glib],
7
        [http://code.google.com/p/accounts-sso/])
8
9
AC_CONFIG_AUX_DIR([build-aux])
10
AC_CONFIG_HEADERS([config.h])
11
AC_CONFIG_SRCDIR([libsignon-glib.pc.in])
12
AC_CONFIG_MACRO_DIR([m4])
13
122.1.64 by David King
Check that NEWS has been update before releasing
14
AM_INIT_AUTOMAKE([1.11 -Wall check-news nostdinc silent-rules subdir-objects])
122.1.38 by David King
Update configure.ac to recent autoconf syntax
15
16
AC_PROG_CC
17
AC_PROG_CC_STDC
18
AM_PROG_CC_C_O
19
20
LT_PREREQ([2.2])
21
LT_INIT([disable-static])
1 by Alberto Mardegan
Initial commit
22
105 by Alberto Mardegan
Setup GObject introspection
23
# Gobject Introspection
24
GOBJECT_INTROSPECTION_CHECK([1.30.0])
25
1 by Alberto Mardegan
Initial commit
26
PKG_CHECK_MODULES(
122.1.38 by David King
Update configure.ac to recent autoconf syntax
27
    [DEPS],
28
    [gio-2.0 >= 2.30
29
     gio-unix-2.0
30
     glib-2.0 >= 2.32
122.1.66 by Alberto Mardegan
Remove calls to g_type_init()
31
     gobject-2.0 >= 2.35.1
122.1.38 by David King
Update configure.ac to recent autoconf syntax
32
     signond >= 8.40])
1 by Alberto Mardegan
Initial commit
33
AC_SUBST(DEPS_CFLAGS)
34
AC_SUBST(DEPS_LIBS)
35
122.1.51 by David King
Make tests optional at configure time
36
# Build tests.
37
146.1.2 by Łukasz 'sil2100' Zemczak
Typo
38
CHECK_REQUIRED="check >= 0.9.4"
122.1.51 by David King
Make tests optional at configure time
39
40
AC_ARG_ENABLE([tests],
41
  [AS_HELP_STRING([--disable-tests], [build with testing support disabled])])
42
43
AS_IF([test "x$enable_tests" != "xno"],
44
  [PKG_CHECK_EXISTS([$CHECK_REQUIRED], [have_check=yes], [have_check=no])],
45
  [have_check=no])
46
47
AS_IF([test "x$have_check" = "xyes"],
48
  [PKG_CHECK_MODULES([CHECK], [$CHECK_REQUIRED])
49
   AC_SUBST([CHECK_CFLAGS])
50
   AC_SUBST([CHECK_LIBS])],
51
  [AS_IF([test "x$enable_tests" = "xyes"],
52
    [AC_MSG_ERROR([tests enabled but required dependencies were not found])])])
53
54
AM_CONDITIONAL([ENABLE_TESTS], [test "x$have_check" = "xyes"])
1 by Alberto Mardegan
Initial commit
55
122.1.1 by David King
Update gtk-doc configuration
56
GTK_DOC_CHECK([1.14], [--flavour no-tmpl])
1 by Alberto Mardegan
Initial commit
57
122.1.38 by David King
Update configure.ac to recent autoconf syntax
58
AC_ARG_ENABLE([cast-checks],
59
    [AS_HELP_STRING([--disable-cast-checks], [compile with GLib cast checks disabled])])
60
AS_IF([test "x$enable_cast_checks" = "xno"],
61
    [CFLAGS="$CFLAGS -DG_DISABLE_CAST_CHECKS"])
62
63
AC_ARG_ENABLE([asserts],
64
    [AS_HELP_STRING([--disable-asserts], [compile with GLib assertions disabled])])
65
AS_IF([test "x$enable_asserts" = "xno"],
66
    [CFLAGS="$CFLAGS -DG_DISABLE_ASSERTS"])
67
68
AC_ARG_ENABLE([checks],
69
    [AS_HELP_STRING([--disable-checks], [compile with GLib checks disabled])])
70
AS_IF([test "x$checks" = "xno"],
71
    [CFLAGS="$CFLAGS -DG_DISABLE_CHECKS"])
72
73
AC_ARG_ENABLE([debug],
74
    [AS_HELP_STRING([--enable-debug], [enable printing of debug messages])])
75
AS_IF([test "x$enable_debug" = "xyes"],
76
    [CFLAGS="$CFLAGS -DENABLE_DEBUG"])
77
78
AC_ARG_ENABLE([coverage],
79
    [AS_HELP_STRING([--enable-coverage], [compile with coverage info])])
80
AS_IF([test "x$enable_coverage" = "xyes"],
81
    [CFLAGS="$CFLAGS -g -fprofile-arcs -ftest-coverage"])
82
83
# Python support.
122.1.31 by Alberto Mardegan
Workaround for missing PyGObject support for GStrv
84
PYGOBJECT_REQUIRED=2.90
85
86
AC_ARG_ENABLE([python],
122.1.38 by David King
Update configure.ac to recent autoconf syntax
87
              [AS_HELP_STRING([--enable-python], [Build with python support])])
88
89
AS_IF([test "x$enable_python" != "xno"],
90
    [PKG_CHECK_EXISTS([pygobject-3.0 >= $PYGOBJECT_REQUIRED],
91
                      [have_python=yes], [have_python=no])])
92
93
AS_IF([test "x$have_python" = "xyes"],
94
    [AM_PATH_PYTHON
122.1.60 by Ken VanDine
Fix the check for pyoverridesdir for python3
95
     AC_SUBST([pyoverridesdir], [`$PYTHON -c "import gi;print (gi._overridesdir)" 2>/dev/null`])])
122.1.38 by David King
Update configure.ac to recent autoconf syntax
96
97
AM_CONDITIONAL([ENABLE_PYTHON], [test "x$have_python" = "xyes"])
98
99
AC_CONFIG_FILES([
1 by Alberto Mardegan
Initial commit
100
	Makefile
101
	libsignon-glib/Makefile
102
	libsignon-glib.pc
103
	docs/Makefile
104
	docs/reference/Makefile
122.1.41 by David King
Improve reference documentation main page
105
	docs/reference/version.xml
1 by Alberto Mardegan
Initial commit
106
	tests/Makefile
122.1.31 by Alberto Mardegan
Workaround for missing PyGObject support for GStrv
107
	pygobject/Makefile
1 by Alberto Mardegan
Initial commit
108
])
122.1.38 by David King
Update configure.ac to recent autoconf syntax
109
AC_OUTPUT