~ubuntu-branches/ubuntu/jaunty/almanah/jaunty

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Ebner
  • Date: 2008-07-04 15:07:43 UTC
  • Revision ID: james.westby@ubuntu.com-20080704150743-tgp3cljsjpolgv00
Tags: upstream-0.4.0
ImportĀ upstreamĀ versionĀ 0.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_INIT(almanah, 0.4.0)
 
2
 
 
3
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
 
4
AM_CONFIG_HEADER(config.h)
 
5
AM_MAINTAINER_MODE
 
6
 
 
7
AC_ISC_POSIX
 
8
AC_PROG_CC
 
9
AM_PROG_CC_STDC
 
10
AC_HEADER_STDC
 
11
 
 
12
dnl ***************************************************************************
 
13
dnl Options
 
14
dnl ***************************************************************************
 
15
 
 
16
AC_ARG_ENABLE([debug],
 
17
        [  --enable-debug       Turn on debugging],
 
18
        [case "${enableval}" in
 
19
                yes) debug=true ;;
 
20
                no)  debug=false ;;
 
21
                *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
 
22
        esac],[debug=false])
 
23
 
 
24
if test $debug = "true"; then
 
25
        AC_DEFINE([ENABLE_DEBUG],[1],[Define if you want debugging enabled])
 
26
fi
 
27
 
 
28
AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
 
29
 
 
30
AC_ARG_ENABLE([encryption],
 
31
        [  --enable-encryption  Enable database encryption support],
 
32
        [case "${enableval}" in
 
33
                yes) encryption=true ;;
 
34
                no)  encryption=false ;;
 
35
                *) AC_MSG_ERROR([bad value ${enableval} for --enable-encryption]) ;;
 
36
        esac],[encryption=true])
 
37
 
 
38
if test $encryption = "true"; then
 
39
        AC_DEFINE([ENABLE_ENCRYPTION],[1],[Define if you want database encryption support])
 
40
fi
 
41
 
 
42
AM_CONDITIONAL([ENCRYPTION], [test x$encryption = xtrue])
 
43
 
 
44
dnl ***************************************************************************
 
45
dnl Internationalisation
 
46
dnl ***************************************************************************
 
47
 
 
48
GETTEXT_PACKAGE=almanah
 
49
AC_SUBST(GETTEXT_PACKAGE)
 
50
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
 
51
AM_GLIB_GNU_GETTEXT
 
52
IT_PROG_INTLTOOL([0.35.0])
 
53
 
 
54
AM_PROG_LIBTOOL
 
55
 
 
56
PKG_CHECK_MODULES(STANDARD, glib-2.0 gtk+-2.0 >= 2.12 gmodule-2.0 gio-2.0 sqlite3 gtkspell-2.0 cairo)
 
57
AC_SUBST(STANDARD_CFLAGS)
 
58
AC_SUBST(STANDARD_LIBS)
 
59
 
 
60
if test $encryption = "true"; then
 
61
        PKG_CHECK_MODULES(ENCRYPTION, gconf-2.0)
 
62
 
 
63
        dnl Check for GPGME, which doesn't provide a pkgconfig file
 
64
        dnl This code courtesy of seahorse
 
65
        min_gpgme_version=1.0.0
 
66
        AC_PATH_PROG(GPGME_CONFIG, gpgme-config, "failed")
 
67
        if test $GPGME_CONFIG != "failed" ; then
 
68
                AC_MSG_CHECKING(for GPGME)
 
69
                req_major=`echo $min_gpgme_version | \
 
70
                        sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
 
71
                req_minor=`echo $min_gpgme_version | \
 
72
                        sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
 
73
                req_micro=`echo $min_gpgme_version | \
 
74
                        sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
 
75
                gpgme_config_version=`$GPGME_CONFIG --version`
 
76
                major=`echo $gpgme_config_version | \
 
77
                        sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
 
78
                minor=`echo $gpgme_config_version | \
 
79
                        sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
 
80
                micro=`echo $gpgme_config_version | \
 
81
                        sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
 
82
 
 
83
                if test "$major" -eq "$req_major"; then
 
84
                        if test "$minor" -ge "$req_minor"; then
 
85
                                if test "$micro" -ge "$req_micro"; then
 
86
                                        ok="yes"
 
87
                                fi
 
88
                        fi
 
89
                fi
 
90
        fi
 
91
 
 
92
        if test $ok = "yes"; then
 
93
                ENCRYPTION_CFLAGS="$ENCRYPTION_CFLAGS `$GPGME_CONFIG --cflags`"
 
94
                ENCRYPTION_LIBS="$ENCRYPTION_LIBS `$GPGME_CONFIG --libs`"
 
95
                AC_MSG_RESULT(yes)
 
96
        else
 
97
                AC_MSG_ERROR(GPGME $min_gpgme_version or later needed)
 
98
        fi
 
99
else
 
100
        ENCRYPTION_CFLAGS=""
 
101
        ENCRYPTION_LIBS=""
 
102
fi
 
103
 
 
104
AC_SUBST(ENCRYPTION_CFLAGS)
 
105
AC_SUBST(ENCRYPTION_LIBS)
 
106
 
 
107
AC_OUTPUT([
 
108
Makefile
 
109
src/Makefile
 
110
po/Makefile.in
 
111
data/Makefile
 
112
data/icons/Makefile
 
113
data/icons/16x16/Makefile
 
114
data/icons/22x22/Makefile
 
115
data/icons/32x32/Makefile
 
116
data/icons/48x48/Makefile
 
117
])