~ubuntu-branches/ubuntu/trusty/accountsservice/trusty

« back to all changes in this revision

Viewing changes to .pc/1002-language-tools.patch/configure.ac

  • Committer: Martin Pitt
  • Date: 2011-08-16 06:09:15 UTC
  • mfrom: (15.1.1 accountsservice-0.6.13)
  • Revision ID: martin.pitt@canonical.com-20110816060915-pukshtg2opjtq6a7
* debian/patches/1002-language-tools.patch:
  Helper scripts for managing the language environment are made available
  in /usr/share/language-tools. They are supporting accountsservice's
  "SetLanguage" method, but for now some of the files may also be
  called from other packages directly. This brings back the functionality
  that previously was in gdm and language-selector.
* debian/patches/1003-set-language.patch:
  When a new language is set, update the user's ~/.profile file with
  the corresponding environment variables.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_INIT([AccountsService],[0.6.13])
 
2
AM_INIT_AUTOMAKE(no-dist-gzip dist-xz tar-ustar foreign)
 
3
 
 
4
GETTEXT_PACKAGE=accounts-service
 
5
AC_SUBST(GETTEXT_PACKAGE)
 
6
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
 
7
                   [the gettext translation domain])
 
8
 
 
9
# Support silent build rules, requires at least automake-1.11. Enable
 
10
# by either passing --enable-silent-rules to configure or passing V=0
 
11
# to make
 
12
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
 
13
 
 
14
AC_PROG_CC
 
15
PKG_PROG_PKG_CONFIG
 
16
AM_GLIB_GNU_GETTEXT
 
17
IT_PROG_INTLTOOL([0.40.0])
 
18
AC_USE_SYSTEM_EXTENSIONS
 
19
 
 
20
LT_INIT
 
21
LT_CURRENT=0
 
22
LT_REVISION=0
 
23
LT_AGE=0
 
24
AC_SUBST(LT_CURRENT)
 
25
AC_SUBST(LT_REVISION)
 
26
AC_SUBST(LT_AGE)
 
27
 
 
28
PKG_CHECK_MODULES(GLIB, glib-2.0)
 
29
PKG_CHECK_MODULES(GIO, gio-2.0 gio-unix-2.0)
 
30
PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1)
 
31
PKG_CHECK_MODULES(POLKIT, polkit-gobject-1)
 
32
 
 
33
AM_MAINTAINER_MODE([enable])
 
34
 
 
35
# client library dependencies
 
36
LIBACCOUNTSSERVICE_LIBS="$GLIB_LIBS $DBUS_GLIB_LIBS"
 
37
AC_SUBST(LIBACCOUNTSSERVICE_LIBS)
 
38
LIBACCOUNTSSERVICE_CFLAGS="$GLIB_CFLAGS $DBUS_GLIB_CFLAGS"
 
39
AC_SUBST(LIBACCOUNTSSERVICE_CFLAGS)
 
40
 
 
41
GOBJECT_INTROSPECTION_CHECK([0.9.12])
 
42
LIBACCOUNTSSERVICE_GIR_INCLUDES="GLib-2.0 GObject-2.0 DBusGLib-1.0"
 
43
AC_SUBST(LIBACCOUNTSSERVICE_GIR_INCLUDES)
 
44
 
 
45
 
 
46
AC_ARG_ENABLE(more-warnings,
 
47
              AS_HELP_STRING([--enable-more-warnings],
 
48
                             [Maximum compiler warnings]),
 
49
              set_more_warnings="$enableval",[
 
50
              if test -d $srcdir/.git; then
 
51
                set_more_warnings=yes
 
52
              else
 
53
                set_more_warnings=no
 
54
              fi])
 
55
 
 
56
AC_MSG_CHECKING(for more warnings)
 
57
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
 
58
  AC_MSG_RESULT(yes)
 
59
  MAYBE_WARN="\
 
60
   -Wall -Wextra  \
 
61
   -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
 
62
   -Wwrite-strings -Wnested-externs -Wpointer-arith \
 
63
   -Wswitch-enum -Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \
 
64
   -Wno-missing-field-initializers -Wno-unused-parameter \
 
65
   -Wcast-align -Wsign-compare -Wp,-D_FORTIFY_SOURCE=2"
 
66
elif test "$GCC" = "yes"; then
 
67
  AC_MSG_RESULT(no)
 
68
  MAYBE_WARN="-Wall -Wno-sign-compare -Wno-deprecated-declarations"
 
69
else
 
70
  AC_MSG_RESULT(no)
 
71
fi
 
72
 
 
73
# invalidate cached value if MAYBE_WARN has changed
 
74
if test "x$accountsservice_cv_warn_maybe" != "x$MAYBE_WARN"; then
 
75
  unset accountsservice_cv_warn_cflags
 
76
fi
 
77
 
 
78
AC_DEFUN([ACCOUNTSSERVICE_CC_TRY_FLAG], [
 
79
  AC_MSG_CHECKING([whether $CC supports $1])
 
80
 
 
81
  accountsservice_save_CFLAGS="$CFLAGS"
 
82
  CFLAGS="$CFLAGS $1"
 
83
 
 
84
  AC_COMPILE_IFELSE([ ], [accountsservice_cc_flag=yes], [accountsservice_cc_flag=no])
 
85
  CFLAGS="$accountsservice_save_CFLAGS"
 
86
 
 
87
  if test "x$accountsservice_cc_flag" = "xyes"; then
 
88
    ifelse([$2], , :, [$2])
 
89
  else
 
90
    ifelse([$3], , :, [$3])
 
91
  fi
 
92
  AC_MSG_RESULT([$accountsservice_cc_flag])
 
93
])
 
94
 
 
95
AC_CACHE_CHECK([for supported warning flags], accountsservice_cv_warn_cflags, [
 
96
  echo
 
97
  WARN_CFLAGS=""
 
98
 
 
99
  # Some warning options are not supported by all versions of
 
100
  # gcc, so test all desired options against the current
 
101
  # compiler.
 
102
  #
 
103
  # Note that there are some order dependencies
 
104
  # here. Specifically, an option that disables a warning will
 
105
  # have no net effect if a later option then enables that
 
106
  # warnings, (perhaps implicitly). So we put some grouped
 
107
  # options (-Wall and -Wextra) up front and the -Wno options
 
108
  # last.
 
109
 
 
110
  for W in $MAYBE_WARN; do
 
111
    ACCOUNTSSERVICE_CC_TRY_FLAG([$W], [WARN_CFLAGS="$WARN_CFLAGS $W"])
 
112
  done
 
113
 
 
114
  accountsservice_cv_warn_cflags=$WARN_CFLAGS
 
115
  accountsservice_cv_warn_maybe=$MAYBE_WARN
 
116
 
 
117
  AC_MSG_CHECKING([which warning flags were supported])
 
118
])
 
119
 
 
120
WARN_CFLAGS="$accountsservice_cv_warn_cflags"
 
121
AC_SUBST(WARN_CFLAGS)
 
122
 
 
123
dnl ---------------------------------------------------------------------------
 
124
dnl - DocBook Documentation
 
125
dnl ---------------------------------------------------------------------------
 
126
 
 
127
AC_ARG_ENABLE(docbook-docs,
 
128
        [AS_HELP_STRING([--enable-docbook-docs],[build documentation (requires xmlto)])],
 
129
        enable_docbook_docs=$enableval,enable_docbook_docs=no)
 
130
AC_PATH_PROG(XMLTO, xmlto, no)
 
131
AC_MSG_CHECKING([whether to build DocBook documentation])
 
132
if test x$XMLTO = xno ; then
 
133
        have_docbook=no
 
134
else
 
135
        have_docbook=yes
 
136
fi
 
137
if test x$enable_docbook_docs = xauto ; then
 
138
        if test x$have_docbook = xno ; then
 
139
                enable_docbook_docs=no
 
140
        else
 
141
                enable_docbook_docs=yes
 
142
        fi
 
143
fi
 
144
if test x$enable_docbook_docs = xyes; then
 
145
        if test x$have_docbook = xno; then
 
146
                AC_MSG_ERROR([Building DocBook docs explicitly required, but DocBook not found])
 
147
        fi
 
148
fi
 
149
AM_CONDITIONAL(DOCBOOK_DOCS_ENABLED, test x$enable_docbook_docs = xyes)
 
150
AC_MSG_RESULT(yes)
 
151
AC_ARG_VAR([XMLTO],[Define/override the 'xmlto' location.])
 
152
AC_ARG_VAR([XMLTO_FLAGS],[Define/override 'xmlto' options, like '--skip-validation'.])
 
153
 
 
154
dnl ---------------------------------------------------------------------------
 
155
dnl Check for xsltproc
 
156
dnl ---------------------------------------------------------------------------
 
157
AC_PATH_PROG([XSLTPROC], [xsltproc])
 
158
 
 
159
# systemd
 
160
 
 
161
AC_ARG_WITH([systemdsystemunitdir],
 
162
        AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
 
163
        [],
 
164
        [with_systemdsystemunitdir=yes])
 
165
if test "x$with_systemdsystemunitdir" = "xyes"; then
 
166
    with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
 
167
fi
 
168
if test "x$with_systemdsystemunitdir" != "xno"; then
 
169
    AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
 
170
fi
 
171
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != "xno" ])
 
172
 
 
173
AC_CONFIG_HEADERS([config.h])
 
174
AC_CONFIG_FILES([
 
175
Makefile
 
176
po/Makefile.in
 
177
data/Makefile
 
178
src/Makefile
 
179
src/libaccountsservice/Makefile
 
180
src/libaccountsservice/accountsservice.pc
 
181
doc/Makefile
 
182
doc/dbus/Makefile
 
183
doc/dbus/AccountsService.xml
 
184
])
 
185
AC_OUTPUT
 
186
 
 
187
echo
 
188
AC_MSG_NOTICE([accountsservice was configured with the following options:])
 
189
if test "x$enable_docbook_docs" = "xyes"; then
 
190
        AC_MSG_NOTICE([** DocBook documentation build enabled])
 
191
else
 
192
        AC_MSG_NOTICE([** DocBook documentation build disabled])
 
193
fi
 
194
echo
 
195
 
 
196