Add missing Makefile.
[gpg4win.git] / configure.ac
1 # configure.ac for GPG4Win
2 # Copyright (C) 2005, 2006 g10 Code GmbH
3
4 # This file is part of GPG4Win
5
6 # GPG4Win is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
10
11 # GPG4Win is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 # General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
19  
20 # (Process this file with autoconf to produce a configure script.)
21
22 AC_PREREQ(2.59)
23 min_automake_version="1.9.3"
24
25 # Remember to change the version number immediately *after* a release.
26 # Uncomment the my_iscvs macro for non-released code.
27 m4_define(my_version, [0.7.0])
28 #m4_define(my_iscvs, yes)
29
30 AC_INIT([gpg4win], my_version[]m4_ifdef([my_iscvs], [-cvs[]m4_translit(
31                   [$Revision$],[Ra-z $:])]),
32                   [gpg4win-devel@wald.intevation.org])
33
34 PACKAGE=$PACKAGE_NAME
35 VERSION=$PACKAGE_VERSION
36
37 AC_CONFIG_SRCDIR(include/config.nsi.in)
38 AC_CONFIG_MACRO_DIR(m4)
39
40 AM_INIT_AUTOMAKE
41 AM_MAINTAINER_MODE
42 AC_CANONICAL_HOST
43
44 AC_SUBST(PACKAGE)
45 AC_SUBST(VERSION)
46
47
48 # Generate extended version information.  Note, that for NSIS use we
49 # must not translate the dots to commas in the BUILD_FILEVERSION.
50 BUILD_TIMESTAMP=`date --iso-8601=minutes`
51 changequote(,)dnl
52 BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./'`
53 tmp="`echo '$Revision$' | sed 's/[^0-9]//g'`"
54 changequote([,])dnl
55 test -z "$tmp" && tmp="0"
56 BUILD_FILEVERSION="${BUILD_FILEVERSION}$tmp"
57 AC_SUBST(BUILD_TIMESTAMP)
58 AC_SUBST(BUILD_FILEVERSION)
59
60
61 # For development of this package it is useful to build without
62 # creatign the source install;er (takes a long time).  This option may
63 # be used to suppress creation of the source installer.
64 AC_ARG_ENABLE(source-installer,
65     AC_HELP_STRING([--disable-source-installer],
66                    [Do not create the Source installer]),
67                     build_source_installer=$enableval,
68                     build_source_installer=yes)
69 AC_MSG_RESULT($source_installer)
70 AM_CONDITIONAL(BUILD_SOURCE_INSTALLER, test "$build_source_installer" = yes)
71
72
73 # Required tools.
74 AC_PROG_CC
75 AC_PROG_CPP
76 AC_CHECK_TOOLS(DLLTOOL, dlltool)
77 AC_CHECK_PROGS(MAKE, make)
78 AC_CHECK_PROGS(UNZIP, unzip)
79 AC_CHECK_PROGS(TAR, tar)
80 AC_CHECK_PROGS(MKDIR, mkdir)
81 AC_CHECK_PROGS(CP, cp)
82 AC_CHECK_PROGS(RM, rm)
83 AC_CHECK_PROGS(STOW, stow)
84 AC_CHECK_PROGS(MAKENSIS, makensis)
85 AC_CHECK_PROGS(ZCAT, zcat)
86 AC_CHECK_PROGS(TEXI2DVI, texi2dvi)
87 AC_CHECK_PROGS(DVIPDF, dvipdf)
88 AC_CHECK_PROGS(CONVERT, convert)
89 AC_CHECK_PROGS(SHA1SUM, sha1sum)
90 AC_PROG_INSTALL
91
92 missing_tools=
93 for i in DLLTOOL MAKE UNZIP TAR MKDIR CP RM STOW MAKENSIS ZCAT TEXI2DVI \
94          DVIPDF CONVERT SHA1SUM ; do
95    eval tmp='$'$i
96    if test -z "$tmp"; then 
97       missing_tools="$missing_tools `echo $i | tr 'A-Z' 'a-z'`"
98    fi
99 done
100
101
102 # Optional tools.
103
104 AC_CHECK_PROGS(WGET, wget)
105
106
107 # Packages.
108
109 GPG4WIN_BPKG_GNU([libiconv])
110 GPG4WIN_BPKG_GNU([gettext], [libiconv])
111
112 GPG4WIN_BPKG_GNUWIN32([zlib])
113 GPG4WIN_BPKG_GNUWIN32_LIB([crypt])
114 GPG4WIN_BPKG_GNUWIN32_LIB([regex])
115 GPG4WIN_BPKG_GNUWIN32([libpng], [pkgconfig])
116
117 GPG4WIN_BPKG_GTK([pkgconfig])
118 # We build our own version of glib, because we need to patch giowin32.c.
119 # GPG4WIN_BPKG_GTK_DEV([glib], [pkgconfig])
120 GPG4WIN_SPKG([glib], [libiconv gettext pkgconfig])
121 GPG4WIN_BPKG_GTK_DEV([gtk+], [atk pango glib libiconv gettext pkgconfig])
122 GPG4WIN_BPKG_GTK_DEV([atk], [glib pkgconfig])
123 GPG4WIN_BPKG_GTK_DEV([pango], [glib pkgconfig])
124 GPG4WIN_BPKG_BINSRC([GPGee], [gnupg])
125
126 GPG4WIN_SPKG([libgpg-error], [libiconv gettext])
127 GPG4WIN_SPKG([gpgme], [libgpg-error gnupg glib])
128 GPG4WIN_SPKG([gnupg])
129 GPG4WIN_SPKG([pthreads-w32])
130 GPG4WIN_SPKG([gpgol], [gpgme])
131 GPG4WIN_SPKG([gpa], [libiconv gettext zlib gtk+ libpng glib gpgme])
132 GPG4WIN_SPKG([winpt], [gpgme gnupg])
133 GPG4WIN_SPKG([sylpheed-claws], [libiconv gettext zlib gtk+ libpng glib dnl
134                                 gpgme pthreads-w32 crypt regex])
135 GPG4WIN_SPKG([eudoragpg])
136 GPG4WIN_SPKG([man_novice_de])
137 GPG4WIN_SPKG([man_advanced_de])
138
139 GPG4WIN_FINALIZE
140
141 # Throw an error if required tools are missing
142 if test -n "$missing_tools"; then
143     for i in $missing_tools; do 
144       AC_MSG_NOTICE([$i is missing])
145     done
146     AC_MSG_ERROR([[
147 ***
148 *** Required tools not found. Please consult the above messages
149 *** and install them before running configure again.
150 ***]])
151 fi
152
153
154 # Finalize.
155
156 AC_CONFIG_FILES(Makefile packages/Makefile include/Makefile src/Makefile)
157 AC_CONFIG_FILES(include/config.nsi src/gpg4win.mk)
158 AC_CONFIG_FILES(doc/Makefile)
159 AC_CONFIG_FILES(doc/logo/Makefile)
160 AC_CONFIG_FILES(doc/manual-de/Makefile doc/manual-de/version.tex)
161 AC_CONFIG_FILES(doc/website/Makefile)
162 AC_OUTPUT