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

Annotation of /trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 331 - (hide annotations)
Fri Sep 25 17:07:03 2009 UTC (15 years, 5 months ago) by twoaday
File size: 6821 byte(s)
Basically working, but there is a gettext problem
(AM_MKINSTALLDIRS).

1 werner 36 # configure.ac - for WinPT
2 twoaday 256 # Copyright (C) 2005, 2006 g10 Code GmbH
3 twoaday 283 # Copyright (C) 2006, 2007 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 330 AC_INIT(WinPT, 1.5.0-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 twoaday 287 NEED_GPGME_VERSION=1.1.4
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 331 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 twoaday 283 of the common controls header file. */
79 werner 48 #include <w32api.h>
80 twoaday 256 #define _WIN32_IE IE55
81 werner 36 ])
82    
83     AM_MAINTAINER_MODE
84    
85     # Checks for programs.
86     AC_PROG_MAKE_SET
87     AM_SANITY_CHECK
88     missing_dir=`cd $ac_aux_dir && pwd`
89     AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
90     AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
91     AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
92     AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
93     AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
94     AC_PROG_AWK
95     AC_PROG_CC
96     AC_PROG_CPP
97     AC_PROG_CXX
98     AC_PROG_INSTALL
99     AC_PROG_LN_S
100     AC_PROG_MAKE_SET
101     AC_PROG_RANLIB
102     AC_CHECK_TOOL(AR, ar, :)
103     AC_CHECK_TOOL(DLLTOOL, dlltool, :)
104     AC_CHECK_TOOL(WINDRES, windres, :)
105    
106     try_gettext=yes
107     have_dosish_system=no
108     have_w32_system=no
109     case "${host}" in
110     *-mingw32*)
111 twoaday 283 # special stuff for Windoze NT/XP
112 werner 36 ac_cv_have_dev_random=no
113     AC_DEFINE(USE_SIMPLE_GETTEXT,1,
114 twoaday 283 [Use a lightweight gettext version for cross-compiling])
115 werner 36 have_dosish_system=yes
116     have_w32_system=yes
117     try_gettext="no"
118     ;;
119     *)
120     AC_MSG_ERROR([[
121     ***
122     *** This software my only be build for W32 systems. Use
123     *** ./autogen.sh --build-w32
124     *** to prepare it for such a build.
125     ***]])
126     ;;
127     esac
128    
129 twoaday 126
130     AH_BOTTOM([
131     /* Force using of NLS for W32 even if no libintl has been found. This is
132     okay because we have our own gettext implementation for W32. */
133     #if defined(HAVE_W32_SYSTEM) && !defined(ENABLE_NLS)
134     #define ENABLE_NLS 1
135     #endif
136     ])
137    
138     # Note, that autogen.sh greps for the next line.
139 twoaday 330 AM_GNU_GETTEXT_VERSION(0.12.1)
140     AM_GNU_GETTEXT([external])
141 werner 132 # There is something wrong with the NLS checking here. We force using it.
142     USE_NLS=yes
143 twoaday 126
144 werner 36 if test "$have_dosish_system" = yes; then
145     AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
146 twoaday 283 [Define this to indicate the binary is build for a system
147     with special properties like no posix file modes])
148 werner 36 fi
149     AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
150    
151     if test "$have_w32_system" = yes; then
152     AC_DEFINE(HAVE_W32_SYSTEM,1, [Defined if we run on a W32 API based system])
153     fi
154     AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
155    
156    
157     #
158     # Checks for libraries.
159     #
160    
161     AM_PATH_GPGME("$NEED_GPGME_API:$NEED_GPGME_VERSION",
162     have_gpgme=yes,have_gpgme=no)
163     AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
164     have_gpg_error=yes,have_gpg_error=no)
165    
166     # Checks for header files.
167     AC_HEADER_STDC
168 twoaday 283 AC_CHECK_HEADERS(string.h unistd.h)
169 werner 36
170     AC_CHECK_FUNCS(stpcpy)
171    
172     # Checks for typedefs, structures, and compiler characteristics.
173     AC_C_CONST
174     AC_C_INLINE
175     AC_TYPE_SIZE_T
176    
177     AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
178    
179     # Add some extra libs here so that previous tests don't fail for
180     # mysterious reasons - the final link step should bail out.
181     if test "$have_w32_system" = yes; then
182 twoaday 163 W32LIBS="-lws2_32"
183 werner 36 fi
184    
185     if test "$GCC" = yes; then
186     CFLAGS="$CFLAGS -Wall -mms-bitfields"
187     CXXFLAGS="$CXXFLAGS -Wall -mms-bitfields"
188     if test "$USE_MAINTAINER_MODE" = "yes"; then
189     CFLAGS="$CFLAGS -Wcast-align -Wshadow -Wstrict-prototypes"
190     CFLAGS="$CFLAGS -Wno-format-y2k -Wformat-security"
191     CXXFLAGS="$CXXFLAGS -Wcast-align -Wshadow"
192     CXXFLAGS="$CXXFLAGS -Wno-format-y2k -Wformat-security"
193     fi
194     fi
195    
196     AC_SUBST(W32LIBS)
197    
198    
199     #
200     # Print errors here so that they are visible all
201     # together and the user can acquire them all together.
202     #
203     die=no
204     if test "$have_gpgme" = "no"; then
205     die=yes
206     AC_MSG_NOTICE([[
207     ***
208     *** You need gpgme to build this program.
209     ** This library is for example available at
210     *** ftp://ftp.gnupg.org/gcrypt/gpgme/
211     *** (at least version $NEED_GPGME_VERSION is required.)
212     ***]])
213     fi
214     if test "$have_gpg_error" = "no"; then
215     die=yes
216     AC_MSG_NOTICE([[
217     ***
218     *** You need libgpg-error to build this program.
219     ** This library is for example available at
220     *** ftp://ftp.gnupg.org/gcrypt/libgpg-error
221     *** (at least version $NEED_GPG_ERROR_VERSION is required.)
222     ***]])
223     fi
224     if test "$die" = "yes"; then
225     AC_MSG_ERROR([[
226     ***
227     *** Required libraries not found. Please consult the above messages
228     *** and install them before running configure again.
229     ***]])
230     fi
231    
232    
233 twoaday 326 AC_CONFIG_FILES([
234     Makefile
235 werner 46 PTD/Makefile
236 twoaday 198 PTD/versioninfo.rc
237 werner 46 Src/Makefile
238 twoaday 198 Src/versioninfo.rc
239 werner 46 Include/Makefile
240 werner 62 icons/Makefile
241 werner 46 m4/Makefile
242     Gnupg/Makefile
243 twoaday 126 Po/Makefile.in
244 werner 36 ])
245     AC_OUTPUT

Properties

Name Value
svn:eol-style native

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26