File: configure.ac

package info (click to toggle)
telepathy-rakia 0.7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,936 kB
  • sloc: sh: 11,088; ansic: 9,899; python: 4,530; makefile: 385; xml: 15
file content (145 lines) | stat: -rw-r--r-- 3,526 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
AC_PREREQ([2.59])

m4_define([THIS_PACKAGE],[telepathy-rakia])
m4_define([VERSION_MAJOR],[0])
m4_define([VERSION_MINOR],[7])
m4_define([VERSION_MICRO],[4])
m4_define([VERSION_NANO],[0])

m4_define([BASE_VERSION],[VERSION_MAJOR.VERSION_MINOR.VERSION_MICRO])
m4_define([THIS_VERSION],
          [m4_if(VERSION_NANO, 0, [BASE_VERSION], [BASE_VERSION.VERSION_NANO])])

AC_INIT(THIS_PACKAGE, THIS_VERSION)
AC_CONFIG_MACRO_DIR([m4])

AS_VERSION(THIS_PACKAGE, TELEPATHY_SIP_VERSION,
           VERSION_MAJOR, VERSION_MINOR, VERSION_MICRO, VERSION_NANO,
           WERROR="no", WERROR="yes")

AM_INIT_AUTOMAKE([1.9 -Wno-portability])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])

AC_DISABLE_SHARED

AC_CONFIG_HEADER([config.h])

dnl check for tools
AC_PROG_CC
AC_PROG_CC_STDC
AM_PROG_MKDIR_P

AC_PROG_LIBTOOL

COMPILER_OPTIMISATIONS
COMPILER_COVERAGE

dnl decide on error flags
AS_COMPILER_FLAG(-Wall, WALL="yes", WALL="no")

if test "x$WALL" = "xyes"; then
  ERROR_CFLAGS="-Wall"

  if test "x$WERROR" = "xyes"; then
    AS_COMPILER_FLAG(-Werror,ERROR_CFLAGS="$ERROR_CFLAGS -Werror",ERROR_CFLAGS="$ERROR_CFLAGS")
  fi
fi

AC_SUBST(ERROR_CFLAGS)

AC_ARG_ENABLE(debug,
  AS_HELP_STRING([--disable-debug],[omit debug code]),
    enable_debug=$enableval, enable_debug=yes )

if test x$enable_debug = xyes; then
  AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
fi
AM_CONDITIONAL([ENABLE_DEBUG], [test "x$enable_debug" = xyes])

AC_C_INLINE

dnl GTK docs
GTK_DOC_CHECK

dnl Check for Glib 
PKG_CHECK_MODULES(GLIB, gobject-2.0 >= 2.30, have_glib=yes, have_glib=no)

if test x$have_glib = xno ; then
    AC_MSG_ERROR([GLib development libraries not found])
fi

GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_GENMARSHAL)

dnl Check for DBus
PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60, dbus-glib-1 >= 0.60], have_dbus=yes, have_dbus=no)

AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)

dnl Check for sofia
PKG_CHECK_MODULES(SOFIA_SIP_UA, sofia-sip-ua-glib >= 1.12.11)
AC_SUBST(SOFIA_SIP_UA_LIBS)
AC_SUBST(SOFIA_SIP_UA_CFLAGS)
AC_SUBST(SOFIA_SIP_UA_VERSION)

dnl Check for telepathy-glib
PKG_CHECK_MODULES(TELEPATHY_GLIB, [telepathy-glib >= 0.17.7])
AC_SUBST(TELEPATHY_GLIB_CFLAGS)
AC_SUBST(TELEPATHY_GLIB_LIBS)

dnl Check for optional IP heartbeat support
AC_ARG_WITH(iphb,
  AS_HELP_STRING([--with-iphb],[use IP heartbeat support in Maemo]),
  [],
  [with_iphb=no]
)
if test "x$with_iphb" != xno; then
  PKG_CHECK_MODULES(IPHB, [libiphb >= 0.61.31],
    [
      AC_DEFINE([HAVE_LIBIPHB], [], [IP heartbeat library is available])
    ]
  )
else
  IPHB_CFLAGS=
  IPHB_LIBS=
fi
AC_SUBST(IPHB_CFLAGS)
AC_SUBST(IPHB_LIBS)

dnl Check for code generation tools
XSLTPROC=
AC_CHECK_PROGS([XSLTPROC], [xsltproc])
if test -z "$XSLTPROC"; then
  AC_MSG_ERROR([xsltproc (from the libxslt source package) is required])
fi
AM_PATH_PYTHON([2.3],[],
  [AC_MSG_ERROR([Python is required to compile this package])]
)

dnl Check for twisted python for tests
AC_MSG_CHECKING([for TwistedPython with SIP protocol support])
if $PYTHON -c "import twisted.protocols.sip, twisted.internet.reactor" >/dev/null 2>&1; then
  AC_MSG_RESULT([yes])
  AM_CONDITIONAL([WANT_TWISTED_TESTS], true)
else
  AC_MSG_RESULT([no])
  AM_CONDITIONAL([WANT_TWISTED_TESTS], false)
fi

AC_CONFIG_FILES([
  Makefile
  rakia/Makefile
  extensions/Makefile
  src/Makefile
  m4/Makefile
  data/Makefile
  tests/Makefile
  tests/twisted/Makefile
  tests/twisted/tools/Makefile
  tools/Makefile
  docs/Makefile
])
AC_OUTPUT