/[winpt]/trunk/configure.ac
ViewVC logotype

Contents of /trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 470 - (show annotations)
Sun Jan 13 14:53:25 2013 UTC (12 years, 1 month ago) by twoaday
File size: 6934 byte(s)


1 # configure.ac - for WinPT
2 # Copyright (C) 2005, 2006 g10 Code GmbH
3 # Copyright (C) 2006, 2007 Timo Schulz
4 #
5 # This file is free software; as a special exception the author gives
6 # unlimited permission to copy and/or distribute it, with or without
7 # modifications, as long as this notice is preserved.
8 #
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
11 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13 # Process this file with autoconf to produce a configure script.
14 AC_PREREQ(2.59)
15 min_automake_version="1.9.2"
16
17 # Version number: Remember to change it immediately *after* a release.
18 # Add a "-cvs" prefix for non-released code.
19 AC_INIT(WinPT, 1.5.4-svn, http://wald.intevation.org/projects/winpt)
20
21 # We always force to use the minimal GPG version which is
22 # known to be free of reported security issues
23 NEED_GPG_VERSION=1.4.12
24
25 NEED_GPGME_API=1
26 #there is a WinPT problem with recent gpgme versions
27 #NEED_GPGME_VERSION=1.3.1
28 NEED_GPGME_VERSION=1.1.0
29 #NEED_GPG_ERROR_VERSION=1.10
30 NEED_GPG_ERROR_VERSION=1.6
31
32 PACKAGE=$PACKAGE_NAME
33 PACKAGE_GT=${PACKAGE_NAME}
34 VERSION=$PACKAGE_VERSION
35
36 AC_CONFIG_SRCDIR(Src/WinPT.cpp)
37 AM_CONFIG_HEADER(config.h)
38 AC_CANONICAL_TARGET()
39 AM_INIT_AUTOMAKE
40 #AM_MKINSTALLDIRS
41
42 AC_GNU_SOURCE
43
44 AC_SUBST(PACKAGE)
45 AC_SUBST(PACKAGE_GT)
46 AC_SUBST(VERSION)
47 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
48 AC_DEFINE_UNQUOTED(PACKAGE_GT, "$PACKAGE_GT",
49 [Name of this package for gettext])
50 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
51 AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$PACKAGE_BUGREPORT",
52 [Bug report address])
53 AC_DEFINE_UNQUOTED(NEED_GPGME_VERSION, "$NEED_GPGME_VERSION",
54 [Required version of GPGME])
55 AC_DEFINE_UNQUOTED(NEED_GPG_VERSION, "$NEED_GPG_VERSION",
56 [Required version of GnuPG])
57
58 BUILD_TIMESTAMP=`date --iso-8601=minutes`
59 AC_SUBST(BUILD_TIMESTAMP)
60 changequote(,)dnl
61 BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1.0/;s/\./,/g'`
62 changequote([,])dnl
63 AC_SUBST(BUILD_FILEVERSION)
64
65 # For the distcheck target of make we need to set a few options for
66 # the cross compiling environment. We assume the same conevtion as
67 # used in autogen.sh; i.e. we take the root from the $w32root variable
68 # or default to ~/w32root.
69 if test -n "$w32root"; then
70 W32ROOT="$w32root"
71 else
72 W32ROOT="$HOME/w32root"
73 fi
74 AC_SUBST(W32ROOT)
75
76
77 AH_BOTTOM([
78 /* Some global constants. */
79
80 /* We need to include this header to be able to include specific parts
81 of the common controls header file. */
82 #include <w32api.h>
83 #define _WIN32_IE IE55
84 ])
85
86 AM_MAINTAINER_MODE
87
88 # Checks for programs.
89 AC_PROG_MAKE_SET
90 AM_SANITY_CHECK
91 missing_dir=`cd $ac_aux_dir && pwd`
92 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
93 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
94 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
95 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
96 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
97 AC_PROG_AWK
98 AC_PROG_CC
99 AC_PROG_CPP
100 AC_PROG_CXX
101 AC_PROG_INSTALL
102 AC_PROG_LN_S
103 AC_PROG_MAKE_SET
104 AC_PROG_RANLIB
105 AC_CHECK_TOOL(AR, ar, :)
106 AC_CHECK_TOOL(DLLTOOL, dlltool, :)
107 AC_CHECK_TOOL(WINDRES, windres, :)
108
109 try_gettext=yes
110 have_dosish_system=no
111 have_w32_system=no
112 case "${host}" in
113 *-mingw32*)
114 # special stuff for Windoze NT/XP
115 ac_cv_have_dev_random=no
116 AC_DEFINE(USE_SIMPLE_GETTEXT,1,
117 [Use a lightweight gettext version for cross-compiling])
118 have_dosish_system=yes
119 have_w32_system=yes
120 try_gettext="no"
121 ;;
122 *)
123 AC_MSG_ERROR([[
124 ***
125 *** This software my only be build for W32 systems. Use
126 *** ./autogen.sh --build-w32
127 *** to prepare it for such a build.
128 ***]])
129 ;;
130 esac
131
132
133 AH_BOTTOM([
134 /* Force using of NLS for W32 even if no libintl has been found. This is
135 okay because we have our own gettext implementation for W32. */
136 #if defined(HAVE_W32_SYSTEM) && !defined(ENABLE_NLS)
137 #define ENABLE_NLS 1
138 #endif
139 ])
140
141 # Note, that autogen.sh greps for the next line.
142 #AM_GNU_GETTEXT_VERSION(0.12.1)
143 #AM_GNU_GETTEXT([external])
144 # There is something wrong with the NLS checking here. We force using it.
145 USE_NLS=yes
146
147 if test "$have_dosish_system" = yes; then
148 AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
149 [Define this to indicate the binary is build for a system
150 with special properties like no posix file modes])
151 fi
152 AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
153
154 if test "$have_w32_system" = yes; then
155 AC_DEFINE(HAVE_W32_SYSTEM,1, [Defined if we run on a W32 API based system])
156 fi
157 AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
158
159
160 #
161 # Checks for libraries.
162 #
163
164 AM_PATH_GPGME("$NEED_GPGME_API:$NEED_GPGME_VERSION",
165 have_gpgme=yes,have_gpgme=no)
166 AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
167 have_gpg_error=yes,have_gpg_error=no)
168
169 # Checks for header files.
170 AC_HEADER_STDC
171 AC_CHECK_HEADERS(string.h unistd.h)
172
173 AC_CHECK_FUNCS(stpcpy)
174
175 # Checks for typedefs, structures, and compiler characteristics.
176 AC_C_CONST
177 AC_C_INLINE
178 AC_TYPE_SIZE_T
179
180 AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
181
182 # Add some extra libs here so that previous tests don't fail for
183 # mysterious reasons - the final link step should bail out.
184 if test "$have_w32_system" = yes; then
185 W32LIBS="-lws2_32"
186 fi
187
188 if test "$GCC" = yes; then
189 CFLAGS="$CFLAGS -Wall -mms-bitfields"
190 CXXFLAGS="$CXXFLAGS -Wall -mms-bitfields"
191 if test "$USE_MAINTAINER_MODE" = "yes"; then
192 CFLAGS="$CFLAGS -Wcast-align -Wshadow -Wstrict-prototypes"
193 CFLAGS="$CFLAGS -Wno-format-y2k -Wformat-security"
194 CXXFLAGS="$CXXFLAGS -Wcast-align -Wshadow"
195 CXXFLAGS="$CXXFLAGS -Wno-format-y2k -Wformat-security"
196 fi
197 fi
198
199 AC_SUBST(W32LIBS)
200
201
202 #
203 # Print errors here so that they are visible all
204 # together and the user can acquire them all together.
205 #
206 die=no
207 if test "$have_gpgme" = "no"; then
208 die=yes
209 AC_MSG_NOTICE([[
210 ***
211 *** You need gpgme to build this program.
212 ** This library is for example available at
213 *** ftp://ftp.gnupg.org/gcrypt/gpgme/
214 *** (at least version $NEED_GPGME_VERSION is required.)
215 ***]])
216 fi
217 if test "$have_gpg_error" = "no"; then
218 die=yes
219 AC_MSG_NOTICE([[
220 ***
221 *** You need libgpg-error to build this program.
222 ** This library is for example available at
223 *** ftp://ftp.gnupg.org/gcrypt/libgpg-error
224 *** (at least version $NEED_GPG_ERROR_VERSION is required.)
225 ***]])
226 fi
227 if test "$die" = "yes"; then
228 AC_MSG_ERROR([[
229 ***
230 *** Required libraries not found. Please consult the above messages
231 *** and install them before running configure again.
232 ***]])
233 fi
234
235
236 AC_CONFIG_FILES([
237 Makefile
238 PTD/Makefile
239 PTD/versioninfo.rc
240 Src/Makefile
241 Src/versioninfo.rc
242 Include/Makefile
243 icons/Makefile
244 m4/Makefile
245 Gnupg/Makefile
246 ])
247 #Po/Makefile.in
248 AC_OUTPUT

Properties

Name Value
svn:eol-style native

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26