File: configure.ac

package info (click to toggle)
gnome-shell-pomodoro 0.10.3-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 6,616 kB
  • ctags: 29
  • sloc: makefile: 270; sh: 14; xml: 7
file content (191 lines) | stat: -rw-r--r-- 4,850 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
AC_PREREQ(2.63)

AC_INIT([Pomodoro],
        [0.10.3],
        [https://github.com/codito/gnome-shell-pomodoro/issues],
        [gnome-pomodoro],
        [https://github.com/codito/gnome-shell-pomodoro])

AC_CONFIG_SRCDIR([src])
AM_CONFIG_HEADER([config/config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([config])

AM_INIT_AUTOMAKE([1.13 dist-xz no-dist-gzip tar-ustar foreign])
AM_SILENT_RULES([yes])
AM_MAINTAINER_MODE([enable])
GNOME_MAINTAINER_MODE_DEFINES

AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AM_PROG_VALAC([0.20.0])

AC_PATH_PROG(PKG_CONFIG, pkg-config, no)

# Initialize libtool
LT_PREREQ([2.2])
LT_INIT([disable-static])


GETTEXT_PACKAGE=gnome-pomodoro
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"],
                   [The name of the gettext domain])

AM_GLIB_GNU_GETTEXT
GLIB_DEFINE_LOCALEDIR(GNOMELOCALEDIR)

GLIB_GSETTINGS

IT_PROG_INTLTOOL([0.40.1])


# Enable Debug
AC_ARG_ENABLE(debug,
  AS_HELP_STRING([--disable-debug],[Disable debugging code]),
  [
    case "${enableval}" in
      yes|no) enable_debug="${enableval}" ;;
      *)   AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
    esac
  ],
  [enable_debug=yes])

if test "$enable_debug" = yes; then
  AC_DEFINE(ENABLE_DEBUG, [], [Enable debug code])
else
  enable_debug=no
fi

# Enable Profiling
AC_ARG_ENABLE(profiling,
        [AS_HELP_STRING([--enable-profiling],
                        [turn on profiling])],
        , enable_profiling=yes)

if test "x$enable_profiling" = "xyes"; then
    AC_DEFINE(ENABLE_PROFILING,1,[enable profiling])
fi


# Turn on the additional warnings last, so -Werror doesn't affect other tests.
WARNING_CFLAGS=""

AC_ARG_ENABLE(more-warnings,
AS_HELP_STRING([--enable-more-warnings],[Maximum compiler warnings]),
set_more_warnings="$enableval",[
if test -d $srcdir/.git; then
    is_cvs_version=true
    set_more_warnings=yes
else
    set_more_warnings=no
fi
])
AC_MSG_CHECKING(for more warnings, including -Werror)
if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
    AC_MSG_RESULT(yes)
    WARNING_CFLAGS="\
    -Wall \
    -Wmissing-declarations -Wmissing-prototypes \
    -Wnested-externs -Wpointer-arith \
    -Wcast-align "

    for option in -Wstrict-aliasing=0 -Wno-pointer-sign; do
        SAVE_CFLAGS="$CFLAGS"
        CFLAGS="$CFLAGS $option"
        AC_MSG_CHECKING([whether gcc understands $option])
        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
                          [has_option=yes],
                          [has_option=no])
        if test $has_option = yes; then
               WARNING_CFLAGS="$WARNING_CFLAGS $option"
        fi
        AC_MSG_RESULT($has_option)
        CFLAGS="$SAVE_CFLAGS"
        unset has_option
        unset SAVE_CFLAGS
    done
    unset option
else
    AC_MSG_RESULT(no)
fi

AC_SUBST(WARNING_CFLAGS)


# don't rerun to this point if we abort
AC_CACHE_SAVE

m4_define(glib_minver,                 2.36.1)
m4_define(gnome_desktop_minver,        3.8.0)
m4_define(pango_minver,                1.32.0)
m4_define(gtk_minver,                  3.10.0)
m4_define(schemas_minver,              3.10.0)
m4_define(upower_minver,               0.9.20)
m4_define(canberra_minver,             0.30)
m4_define(gstreamer_minver,            1.0.0)

# Is docbook2man available?
AC_PATH_PROG(DOCBOOK2MAN, docbook2man, no)
if test "$DOCBOOK2MAN" = "no" ; then
       AC_MSG_WARN([docbook2man not found, will not be able to build man
                    documentation])
fi
AM_CONDITIONAL(HAVE_DOCBOOK2MAN, [test "$DOCBOOK2MAN" != "no"])

AC_CHECK_LIB(m, floor)
AC_CHECK_HEADERS(malloc.h)
AC_CHECK_FUNCS(mallopt)

# Some variables to pass to Makefiles
AC_SUBST(EXTENSION_UUID, [pomodoro@arun.codito.in])

# Some constants to pass to config.h
AC_DEFINE_UNQUOTED([EXTENSION_UUID], "$EXTENSION_UUID",
                   [UUID of the pomodoro extensoin])

PKG_PROG_PKG_CONFIG([0.22])
GOBJECT_INTROSPECTION_REQUIRE([1.36.0])

PKG_CHECK_MODULES(GNOME_POMODORO, [
    glib-2.0 >= glib_minver
    gtk+-3.0 >= gtk_minver
    gio-2.0 >= glib_minver
    gio-unix-2.0 >= glib_minver
    dbus-glib-1
    gnome-desktop-3.0 >= gnome_desktop_minver
    gthread-2.0 >= glib_minver
    gmodule-no-export-2.0 >= glib_minver
    gsettings-desktop-schemas >= schemas_minver
    upower-glib >= upower_minver
    libcanberra >= canberra_minver
    gstreamer-1.0 >= gstreamer_minver
])


AC_CONFIG_FILES([
  Makefile
  vapi/Makefile
  src/Makefile
  extension/Makefile
  data/Makefile
  data/icons/Makefile
  data/sounds/Makefile
  man/Makefile
  po/Makefile.in
])

AC_OUTPUT

echo "
gnome-pomodoro ${VERSION}:

    prefix:                 ${prefix}
    datadir:                ${datadir}
    srcdir:                 ${srcdir}
    compiler:               ${CC}
    cflags:                 ${CFLAGS}
    cppflags:               ${CPPFLAGS}
"