File: configure.ac

package info (click to toggle)
tasks 0.20-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 1,744 kB
  • sloc: ansic: 6,133; sh: 1,222; makefile: 108
file content (110 lines) | stat: -rw-r--r-- 2,976 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
AC_PREREQ(2.52)
AC_INIT(tasks, 0.20, http://o-hand.com)
AC_CONFIG_SRCDIR(libkoto/koto-task-store.c)
AC_CONFIG_HEADERS([libkoto/config.h])
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)

m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

AC_PROG_CPP
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_RANLIB

GNOME_COMPILE_WARNINGS

IT_PROG_INTLTOOL([0.33.0])

GETTEXT_PACKAGE=tasks
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext domain name])

AM_GLIB_GNU_GETTEXT

PKG_CHECK_MODULES(GTK, glib-2.0 gtk+-2.0)
PKG_CHECK_MODULES(ECAL, libecal-1.2)

AC_DEFINE(HANDLE_LIBICAL_MEMORY, 1, [we free libical memory])

AC_ARG_ENABLE(gtk,
        AS_HELP_STRING([--enable-gtk],[Build the GTK frontend]),
        ,enable_gtk=yes)
AM_CONDITIONAL(WITH_GTK, test "x$enable_gtk" = "xyes")

AC_ARG_WITH(owl,
        AS_HELP_STRING([--with-owl],[Use the OWL menu]),
        ,with_owl=no)
AS_IF([test "x$with_owl" = "xyes"], [
        PKG_CHECK_MODULES(OWL, libowl)
        AC_DEFINE(WITH_OWL, 1, [libowl present])
        ])
AM_CONDITIONAL(WITH_OWL, test "x$with_owl" = "xyes")

AC_ARG_WITH(unique,
	AS_HELP_STRING([--with-unique],[Enable LibUnique support]),
	,with_unique=no)
AS_IF([test "x$with_unique" = "xyes"], [
	PKG_CHECK_MODULES(UNIQUE, unique-1.0)
	AC_DEFINE(WITH_UNIQUE, 1, [LibUnique present])
	])
AM_CONDITIONAL(WITH_UNIQUE, test "$with_unique" = "xyes")

#
# Find out what functionality the libraries support
#
old_cflags=$CFLAGS
CFLAGS=$GTK_CFLAGS

# This was introduced in GLib 2.10
AC_CHECK_DECLS([g_date_set_time_t],
               [have_date=yes], [have_date=no], [#include <glib.h>])
AM_CONDITIONAL(HAVE_GDATE_TIME_T, test "x$have_date" = "xyes")

# This was introduced in GLib 2.14
AC_CHECK_DECLS([g_regex_new],
               [have_regex=yes], [have_regex=no], [#include <glib.h>])
AM_CONDITIONAL(HAVE_GREGEX, test "x$have_regex" = "xyes")

# This was introduced in GTK+ 2.10
AC_CHECK_DECLS([GDK_WINDOW_TYPE_HINT_COMBO, gtk_style_lookup_color],
               [], [], [#include <gtk/gtk.h>])

# This was introduced in GTK+ 2.12
AC_CHECK_DECLS([gtk_widget_set_has_tooltip],
               [], [], [#include <gtk/gtk.h>])

# This was introduced in GTK+ 2.14
AC_CHECK_DECLS([gtk_show_uri],
               [], [], [#include <gtk/gtk.h>])

# This was introduced in GTK+ 2.16
AC_CHECK_DECLS([gtk_entry_set_icon_from_icon_name],
               [], [], [#include <gtk/gtk.h>])

# This was introduced in newer libecal
CFLAGS=$ECAL_CFLAGS
AC_CHECK_TYPES(ECalComponentId, [], [], [#include <libecal/e-cal.h>])

CFLAGS=$old_cflags

AC_OUTPUT([
Makefile
data/Makefile
data/icons/Makefile
data/icons/16x16/Makefile
data/icons/22x22/Makefile
data/icons/24x24/Makefile
data/icons/26x26/Makefile
data/icons/32x32/Makefile
data/icons/48x48/Makefile
data/icons/64x64/Makefile
data/icons/scalable/Makefile
po/Makefile.in
libkoto/Makefile
src/Makefile
src/gtk/Makefile
])

if test "x$enable_gtk" = "xyes" ; then
  AC_MSG_NOTICE([Building GTK frontend])
fi