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

Contents of /trunk/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 17 - (show annotations)
Tue Apr 11 19:05:05 2006 UTC (19 years ago) by twoaday
File size: 4868 byte(s)
Release version 0.8.0


1 # configure.ac - for GPGOE
2
3 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ(2.59)
5 min_automake_version="1.9.4"
6
7 # Version number: Remember to change it immediately *after* a release.
8 # Make sure to run "svn up" before a "make dist".
9 # Add a "-cvs" prefix for non-released code.
10 AC_INIT(gpgoe, 0.8.0, [email protected])
11
12 NEED_GPGME_API=1
13 NEED_GPGME_VERSION=1.1.0
14
15
16 PACKAGE=$PACKAGE_NAME
17 PACKAGE_GT=${PACKAGE_NAME}
18 VERSION=$PACKAGE_VERSION
19
20 AC_CONFIG_SRCDIR(src/GPGOE.c)
21 AM_CONFIG_HEADER(config.h)
22 AC_CANONICAL_TARGET()
23 AM_INIT_AUTOMAKE
24
25 AC_GNU_SOURCE
26
27 AC_SUBST(PACKAGE)
28 AC_SUBST(PACKAGE_GT)
29 AC_SUBST(VERSION)
30 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
31 AC_DEFINE_UNQUOTED(PACKAGE_GT, "$PACKAGE_GT",
32 [Name of this package for gettext])
33 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
34 AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$PACKAGE_BUGREPORT",
35 [Bug report address])
36 AC_DEFINE_UNQUOTED(NEED_GPGME_VERSION, "$NEED_GPGME_VERSION",
37 [Required version of GPGME])
38
39
40 BUILD_TIMESTAMP=`date --iso-8601=minutes`
41 AC_SUBST(BUILD_TIMESTAMP)
42 changequote(,)dnl
43 BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
44 tmp="`echo '$Revision$' | sed 's/[^0-9]//g'`"
45 changequote([,])dnl
46 test -z "$tmp" && tmp="0"
47 BUILD_FILEVERSION="${BUILD_FILEVERSION}$tmp"
48 AC_SUBST(BUILD_FILEVERSION)
49
50
51 W32ROOT="$HOME/w32root"
52 AC_SUBST(W32ROOT)
53
54 AH_BOTTOM([
55 /* Some global constants. */
56
57 /* Force using of NLS for W32 even if no libintl has been found. This is
58 okay because we have our own gettext implementation for W32. */
59 #if defined(HAVE_W32_SYSTEM) && !defined(ENABLE_NLS)
60 #define ENABLE_NLS 1
61 #endif
62
63 /* we need to define this so we can use the extended listview styles. */
64 #define _WIN32_IE 0x500
65 ])
66
67 AM_MAINTAINER_MODE
68
69 # Checks for programs.
70 AC_PROG_MAKE_SET
71 AM_SANITY_CHECK
72 missing_dir=`cd $ac_aux_dir && pwd`
73 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
74 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
75 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
76 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
77 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
78 AC_PROG_AWK
79 AC_PROG_CC
80 AC_PROG_CPP
81 AC_PROG_CXX
82 AC_PROG_INSTALL
83 AC_PROG_LN_S
84 AC_PROG_MAKE_SET
85 AC_PROG_RANLIB
86 AC_CHECK_TOOL(AR, ar, :)
87 AC_CHECK_TOOL(DLLTOOL, dlltool, :)
88 AC_CHECK_TOOL(WINDRES, windres, :)
89
90
91 have_dosish_system=no
92 have_w32_system=no
93 case "${host}" in
94 *-mingw32*)
95 # special stuff for Windoze NT
96 ac_cv_have_dev_random=no
97 have_dosish_system=yes
98 have_w32_system=yes
99 ;;
100 *)
101 AC_MSG_ERROR([[
102 ***
103 *** This software my only be build for W32 systems. Use
104 *** ./autogen.sh --build-w32
105 *** to prepare it for such a build.
106 ***]])
107 ;;
108 esac
109
110 AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
111 if test "$have_w32_system" = yes; then
112 AC_DEFINE(HAVE_W32_SYSTEM,1, [Defined if we run on a W32 API based system])
113 fi
114 AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
115
116
117
118 #
119 # Checks for libraries.
120 #
121 AM_PATH_GPGME("$NEED_GPGME_API:$NEED_GPGME_VERSION",
122 have_gpgme=yes,have_gpgme=no)
123 AM_PATH_GPG_ERROR(0.5,, AC_MSG_ERROR([libgpg-error was not found]))
124
125
126 # Note, that autogen.sh greps for the next line.
127 AM_GNU_GETTEXT_VERSION(0.12.1)
128 AM_GNU_GETTEXT([external])
129 # We always want NLs, despite what the above macro figures out.
130 USE_NLS=yes
131
132 # Checks for header files.
133 AC_HEADER_STDC
134 AC_CHECK_HEADERS(string.h)
135
136 # Checks for typedefs, structures, and compiler characteristics.
137 AC_C_CONST
138 AC_TYPE_SIZE_T
139
140 AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
141
142 # Add some extra libs here so that previous tests don't fail for
143 # mysterious reasons - the final link step should bail out.
144 if test "$have_w32_system" = yes; then
145 W32LIBS=""
146 fi
147
148 if test "$GCC" = yes; then
149 CFLAGS="$CFLAGS -Wall -mms-bitfields"
150 if test "$USE_MAINTAINER_MODE" = "yes"; then
151 CFLAGS="$CFLAGS -Wcast-align -Wshadow -Wstrict-prototypes"
152 CFLAGS="$CFLAGS -Wno-format-y2k -Wformat-security"
153
154 fi
155 fi
156
157 AC_SUBST(W32LIBS)
158
159
160
161 #
162 # Print errors here so that they are visible all
163 # together and the user can acquire them all together.
164 #
165 die=no
166 if test "$have_gpgme" = "no"; then
167 die=yes
168 AC_MSG_NOTICE([[
169 ***
170 *** You need gpgme to build this program.
171 ** This library is for example available at
172 *** ftp://ftp.gnupg.org/gcrypt/gpgme/
173 *** (at least version $NEED_GPGME_VERSION is required.)
174 ***]])
175 fi
176 if test "$die" = "yes"; then
177 AC_MSG_ERROR([[
178 ***
179 *** Required libraries not found. Please consult the above messages
180 *** and install them before running configure again.
181 ***]])
182 fi
183
184
185 AC_CONFIG_FILES([ Makefile
186 src/Makefile
187 m4/Makefile
188 init/Makefile
189 doc/Makefile
190 po/Makefile.in
191 ])
192 AC_OUTPUT

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26