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

Annotation of /trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 282 - (hide annotations)
Mon Jan 15 22:11:52 2007 UTC (18 years, 1 month ago) by twoaday
File size: 7304 byte(s)


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

Properties

Name Value
svn:eol-style native

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26