Imported Upstream version 1.5.2
[platform/upstream/gpgme.git] / configure.ac
1 # configure.ac for GPGME
2 # Copyright (C) 2000 Werner Koch (dd9jn)
3 # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
4 #               2009, 2010, 2011, 2012, 2013  g10 Code GmbH
5 #
6 # This file is part of GPGME.
7 #
8 # GPGME is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU Lesser General Public License as
10 # published by the Free Software Foundation; either version 2.1 of the
11 # License, or (at your option) any later version.
12 #
13 # GPGME is distributed in the hope that it will be useful, but WITHOUT
14 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
16 # Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, see <http://www.gnu.org/licenses/>.
20
21 # (Process this file with autoconf to produce a configure script.)
22 AC_PREREQ(2.59)
23 min_automake_version="1.11"
24
25 # To build a release you need to create a tag with the version number
26 # (git tag -s gpgme-n.m.k) and run "./autogen.sh --force".  Please
27 # bump the version number immediately after the release and do another
28 # commit and push so that the git magic is able to work.  See below
29 # for the LT versions.
30 m4_define(mym4_version_major, [1])
31 m4_define(mym4_version_minor, [5])
32 m4_define(mym4_version_micro, [2])
33
34 # Below is m4 magic to extract and compute the revision number, the
35 # decimalized short revision number, a beta version string, and a flag
36 # indicating a development version (mym4_isgit). Note that the m4
37 # processing is done by autoconf and not during the configure run.
38 m4_define(mym4_version,
39           [mym4_version_major.mym4_version_minor.mym4_version_micro])
40 m4_define([mym4_revision],
41           m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r']))
42 m4_define([mym4_revision_dec],
43           m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))]))
44 m4_define([mym4_betastring],
45           m4_esyscmd_s([git describe --match 'gpgme-[0-9].*[0-9]' --long|\
46                         awk -F- '$3!=0{print"-beta"$3}']))
47 m4_define([mym4_isgit],m4_if(mym4_betastring,[],[no],[yes]))
48 m4_define([mym4_full_version],[mym4_version[]mym4_betastring])
49
50 AC_INIT([gpgme],[mym4_full_version],[http://bugs.gnupg.org])
51
52 # LT Version numbers, remember to change them just *before* a release.
53 #   (Code changed:                      REVISION++)
54 #   (Interfaces added/removed/changed:  CURRENT++, REVISION=0)
55 #   (Interfaces added:                  AGE++)
56 #   (Interfaces removed/changed:        AGE=0)
57 #
58 LIBGPGME_LT_CURRENT=24
59 # Subtract 2 from this value if you want to make the LFS transition an
60 # ABI break.  [Note to self: Remove this comment with the next regular break.]
61 LIBGPGME_LT_AGE=13
62 LIBGPGME_LT_REVISION=1
63
64 # If the API is changed in an incompatible way: increment the next counter.
65 GPGME_CONFIG_API_VERSION=1
66 ##############################################
67
68 NEED_GPG_ERROR_VERSION=1.11
69 NEED_LIBASSUAN_API=2
70 NEED_LIBASSUAN_VERSION=2.0.2
71
72
73 PACKAGE=$PACKAGE_NAME
74 VERSION=$PACKAGE_VERSION
75
76 AC_CONFIG_AUX_DIR([build-aux])
77 AC_CONFIG_MACRO_DIR([m4])
78 AC_CONFIG_SRCDIR(src/gpgme.h.in)
79 AC_CONFIG_HEADER(config.h)
80 # Note: For automake 1.13 add the option
81 #          serial-tests
82 AM_INIT_AUTOMAKE
83 AM_MAINTAINER_MODE
84 AC_CANONICAL_HOST
85 AM_SILENT_RULES
86 AC_ARG_VAR(SYSROOT,[locate config scripts also below that directory])
87
88 # Enable GNU extensions on systems that have them.
89 AC_GNU_SOURCE
90
91 AH_VERBATIM([_REENTRANT],
92 [/* To allow the use of GPGME in multithreaded programs we have to use
93   special features from the library.
94   IMPORTANT: gpgme is not yet fully reentrant and you should use it
95   only from one thread.  */
96 #ifndef _REENTRANT
97 # define _REENTRANT 1
98 #endif])
99
100 AC_PROG_CC
101 AC_PROG_CXX
102
103 # Note: A suitable gitlog-to-changelog script can be found in GnuPG master.
104 AC_CHECK_PROGS(GITLOG_TO_CHANGELOG, gitlog-to-changelog, [gitlog-to-changelog])
105
106 AC_SUBST(LIBGPGME_LT_CURRENT)
107 AC_SUBST(LIBGPGME_LT_AGE)
108 AC_SUBST(LIBGPGME_LT_REVISION)
109
110 AC_SUBST(PACKAGE)
111 AC_SUBST(VERSION)
112 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
113 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
114 VERSION_NUMBER=m4_esyscmd(printf "0x%02x%02x%02x" mym4_version_major \
115                           mym4_version_minor mym4_version_micro)
116 AC_SUBST(VERSION_NUMBER)
117
118 # Don't default to build static libs.
119 LT_PREREQ([2.2.6])
120 LT_INIT([win32-dll disable-static])
121 LT_LANG([Windows Resource])
122
123 # For now we hardcode the use of version scripts.  It would be better
124 # to write a test for this or even implement this within libtool.
125 have_ld_version_script=no
126 case "${host}" in
127     *-*-linux*)
128         have_ld_version_script=yes
129         ;;
130     *-*-gnu*)
131         have_ld_version_script=yes
132         ;;
133     *-apple-darwin*)
134         AC_DEFINE(_XOPEN_SOURCE, 500, Activate POSIX interface on MacOS X)
135         ;;
136 esac
137
138 AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
139
140 GPG_DEFAULT=no
141 GPGSM_DEFAULT=no
142 GPGCONF_DEFAULT=no
143 G13_DEFAULT=no
144 component_system=None
145 have_dosish_system=no
146 have_android_system=no
147 have_w32_system=no
148 have_w64_system=no
149 build_w32_glib=no
150 build_w32_qt=no
151 case "${host}" in
152     x86_64-*mingw32*)
153         have_w64_system=yes
154         ;;
155     *-mingw32ce*)
156         have_w32ce_system=yes
157         ;;
158     *-linux-androideabi)
159         have_android_system=yes
160         ;;
161 esac
162 case "${host}" in
163     *-mingw32ce*|*-mingw32*)
164         have_dosish_system=yes
165         have_w32_system=yes
166         GPG_DEFAULT='c:\\gnupg\\gpg.exe'
167         GPGSM_DEFAULT='c:\\gnupg\\gpgsm.exe'
168         GPGCONF_DEFAULT='c:\\gnupg\\gpgconf.exe'
169         G13_DEFAULT='c:\\gnupg\\g13.exe'
170         #component_system='COM+'
171
172         AM_PATH_GLIB_2_0
173         AC_ARG_ENABLE(w32-glib,
174             AC_HELP_STRING([--enable-w32-glib], [build GPGME Glib for W32]),
175                            build_w32_glib=$enableval)
176
177         # Check disabled, because the qt-dev packages in gpg4win do
178         # not provide any support for cross compilation.
179         # PKG_CHECK_MODULES(QT4_CORE, QtCore)
180
181         # Use it like this:
182         # ./configure --enable-w32-qt QT4_CORE_CFLAGS="..." QT4_CORE_LIBS="..."
183         AC_SUBST(QT4_CORE_CFLAGS)
184         AC_SUBST(QT4_CORE_LIBS)
185         AC_ARG_ENABLE(w32-qt,
186             AC_HELP_STRING([--enable-w32-qt], [build GPGME Qt for W32]),
187                            build_w32_qt=$enableval)
188         ;;
189     *)
190         AC_CHECK_LIB(pthread,pthread_create,have_pthread=yes)
191         if test "$have_pthread" = yes; then
192           AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.])
193         fi
194
195         # XXX: Probably use exec-prefix here?
196 #       GPG_DEFAULT='/usr/bin/gpg'
197 #       GPGSM_DEFAULT='/usr/bin/gpgsm'
198 #       GPGCONF_DEFAULT='/usr/bin/gpgconf'
199 #       G13_DEFAULT='/usr/bin/g13'
200         ;;
201 esac
202
203 if test "$have_dosish_system" = yes; then
204    AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
205              [Defined if we run on some of the PCDOS like systems
206               (DOS, Windoze. OS/2) with special properties like
207               no file modes])
208 fi
209 AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
210
211 if test "$have_w32_system" = yes; then
212    AC_DEFINE(HAVE_W32_SYSTEM,1,
213              [Defined if we run on any kind of W32 API based system])
214 fi
215 AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
216
217 if test "$have_w64_system" = yes; then
218    AC_DEFINE(HAVE_W64_SYSTEM,1,
219              [Defined if we run on a 64 bit W32 API based system])
220 fi
221 AM_CONDITIONAL(HAVE_W64_SYSTEM, test "$have_w64_system" = yes)
222
223 if test "$have_w32ce_system" = yes; then
224    AC_DEFINE(HAVE_W32CE_SYSTEM,1,
225              [Defined if we run on a W32 CE API based system])
226 fi
227 AM_CONDITIONAL(HAVE_W32CE_SYSTEM, test "$have_w32ce_system" = yes)
228
229 if test "$have_android_system" = yes; then
230    AC_DEFINE(HAVE_ANDROID_SYSTEM,1, [Defined if we build for an Android system])
231 fi
232 AM_CONDITIONAL(HAVE_ANDROID_SYSTEM, test "$have_android_system" = yes)
233
234 AM_CONDITIONAL(BUILD_W32_GLIB, test "$build_w32_glib" = yes)
235 AM_CONDITIONAL(BUILD_W32_QT, test "$build_w32_qt" = yes)
236
237 AM_CONDITIONAL(HAVE_PTHREAD, test "$have_pthread" = "yes")
238
239
240 AC_ARG_ENABLE([fixed-path],
241               AC_HELP_STRING([--enable-fixed-path=PATH],
242                              [locate binaries only via this PATH]),
243               [fixed_search_path="$enableval"],
244               [fixed_search_path=""])
245 if test x$fixed_search_path != x ; then
246   AC_DEFINE_UNQUOTED(FIXED_SEARCH_PATH, "$fixed_search_path",
247                     [Locate binaries only via this PATH])
248 fi
249
250
251 #
252 # Provide information about the build.
253 #
254 BUILD_REVISION="mym4_revision"
255 AC_SUBST(BUILD_REVISION)
256 AC_DEFINE_UNQUOTED(BUILD_REVISION, "$BUILD_REVISION",
257                    [GIT commit id revision used to build this package])
258
259 changequote(,)dnl
260 BUILD_FILEVERSION=`echo "$PACKAGE_VERSION"|sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
261 changequote([,])dnl
262 BUILD_FILEVERSION="${BUILD_FILEVERSION}mym4_revision_dec"
263 AC_SUBST(BUILD_FILEVERSION)
264
265 BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date`
266 AC_SUBST(BUILD_TIMESTAMP)
267 AC_DEFINE_UNQUOTED(BUILD_TIMESTAMP, "$BUILD_TIMESTAMP",
268                    [The time this package was configured for a build])
269
270 #
271 # Options to disable some regression tests
272 #
273 run_gpgconf_test="yes"
274 AC_ARG_ENABLE(gpgconf-test,
275   AC_HELP_STRING([--disable-gpgconf-test], [disable GPGCONF regression test]),
276          run_gpgconf_test=$enableval)
277 AM_CONDITIONAL(RUN_GPGCONF_TESTS, test "$run_gpgconf_test" = "yes")
278
279 run_gpg_test="yes"
280 AC_ARG_ENABLE(gpg-test,
281   AC_HELP_STRING([--disable-gpg-test], [disable GPG regression test]),
282          run_gpg_test=$enableval)
283 AM_CONDITIONAL(RUN_GPG_TESTS, test "$run_gpg_test" = "yes")
284
285 run_gpgsm_test="yes"
286 AC_ARG_ENABLE(gpgsm-test,
287   AC_HELP_STRING([--disable-gpgsm-test], [disable GPGSM regression test]),
288          run_gpgsm_test=$enableval)
289 AM_CONDITIONAL(RUN_GPGSM_TESTS, test "$run_gpgsm_test" = "yes")
290
291 run_g13_test="yes"
292 AC_ARG_ENABLE(g13-test,
293   AC_HELP_STRING([--disable-g13-test], [disable G13 regression test]),
294          run_g13_test=$enableval)
295 AM_CONDITIONAL(RUN_G13_TESTS, test "$run_g13_test" = "yes")
296
297
298 # Checks for header files.
299 AC_CHECK_HEADERS_ONCE([locale.h sys/select.h sys/uio.h argp.h
300                        unistd.h sys/time.h sys/types.h sys/stat.h])
301
302
303 # Type checks.
304 AC_C_INLINE
305 AC_CHECK_SIZEOF(unsigned int)
306 AC_SYS_LARGEFILE
307 AC_TYPE_OFF_T
308 AC_TYPE_UINTPTR_T
309
310 # A simple compile time check in gpgme.h for GNU/Linux systems that
311 # prevents a file offset bits mismatch between gpgme and the application.
312 NEED__FILE_OFFSET_BITS=0
313 if test "$have_w32_system" != yes; then
314   case "$ac_cv_sys_file_offset_bits" in
315     "" | no | unknown) ;;
316     *)
317     NEED__FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits
318     ;;
319   esac
320 fi
321 AC_SUBST(NEED__FILE_OFFSET_BITS)
322
323 # Figure out platform dependent typedefs for gpgme.h
324 if test "$have_w32_system" = yes; then
325     INSERT__TYPEDEFS_FOR_GPGME_H="
326 #ifdef _WIN64
327 # include <stdint.h>
328   typedef int64_t gpgme_off_t;
329   typedef int64_t gpgme_ssize_t;
330 #else /* _WIN32 */
331   typedef long gpgme_off_t;
332   typedef long gpgme_ssize_t;
333 #endif /* _WIN32 */"
334     API__OFF_T="gpgme_off_t"
335     API__SSIZE_T="gpgme_ssize_t"
336 else
337     INSERT__TYPEDEFS_FOR_GPGME_H="
338 #include <sys/types.h>
339 typedef off_t   gpgme_off_t;
340 typedef ssize_t gpgme_ssize_t;"
341     API__OFF_T="off_t"
342     API__SSIZE_T="ssize_t"
343 fi
344 AC_SUBST(INSERT__TYPEDEFS_FOR_GPGME_H)
345 AM_SUBST_NOTMAKE(INSERT__TYPEDEFS_FOR_GPGME_H)
346 AC_SUBST(API__OFF_T)
347 AM_SUBST_NOTMAKE(API__OFF_T)
348 AC_SUBST(API__SSIZE_T)
349 AM_SUBST_NOTMAKE(API__SSIZE_T)
350
351 # Checks for compiler features.
352 if test "$GCC" = yes; then
353     CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
354     if test "$have_w32_system" = yes; then
355        CFLAGS="$CFLAGS -mms-bitfields"
356     fi
357 fi
358
359 # Only used for debugging, so no serious test needed (for actual
360 # functionality you have to test libc as well, this only tests the
361 # compiler).
362 AC_CACHE_CHECK([for __thread],[gpgme_cv_tls_works],
363    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([__thread int foo;])],
364                      gpgme_cv_tls_works=yes,gpgme_cv_tls_works=no))
365 if test "$gpgme_cv_tls_works" = yes; then
366   AC_DEFINE(HAVE_TLS, [1], [Define if __thread is supported])
367 fi
368
369
370 # Checks for library functions.
371 AC_MSG_NOTICE([checking for libraries])
372
373 AC_FUNC_FSEEKO
374
375 AC_REPLACE_FUNCS(vasprintf)
376 if test "$ac_cv_func_vasprintf" != yes; then
377   GNUPG_CHECK_VA_COPY
378 fi
379
380 # Try to find a thread-safe version of ttyname().
381 gnupg_REPLACE_TTYNAME_R
382 if test "$ac_cv_func_ttyname_r" != yes; then
383   AC_MSG_WARN([
384 ***
385 *** ttyname() is not thread-safe and ttyname_r() does not exist
386 ***])
387 fi
388
389 # Try to find a thread-safe version of getenv().
390 have_thread_safe_getenv=no
391 jm_GLIBC21
392 if test $GLIBC21 = yes; then
393   have_thread_safe_getenv=yes
394 fi
395 if test $have_thread_safe_getenv = yes; then
396   AC_DEFINE(HAVE_THREAD_SAFE_GETENV, [1], [Define if getenv() is thread-safe])
397 fi
398 have_getenv_r=no
399 AC_CHECK_FUNCS(getenv_r, have_getenv_r=yes)
400 if test $have_getenv_r = no && test $have_thread_safe_getenv = no; then
401   AC_MSG_WARN([
402 ***
403 *** getenv() is not thread-safe and getenv_r() does not exist
404 ***])
405 fi
406
407 # For converting time strings to seconds since Epoch, we need the timegm
408 # function.
409 AC_CHECK_FUNCS(timegm)
410 if test "$ac_cv_func_timegm" != yes; then
411   AC_MSG_WARN([
412 ***
413 *** timegm() not available - a non-thread-safe kludge will be used
414 *** and the TZ variable might be changed at runtime.
415 ***])
416 fi
417
418 AC_CHECK_FUNCS(setlocale)
419
420 # Checking for libgpg-error.
421 have_gpg_error=no
422 AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
423                   have_gpg_error=yes, have_gpg_error=no)
424 AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME,
425           [The default error source for GPGME.])
426
427 # And for libassuan.
428 have_libassuan=no
429 AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
430                   have_libassuan=yes, have_libassuan=no)
431 if test "$have_libassuan" = "yes"; then
432   AC_DEFINE_UNQUOTED(GPGME_LIBASSUAN_VERSION, "$libassuan_version",
433                      [version of the libassuan library])
434 fi
435
436
437 #
438 # Other checks
439 #
440
441 # Check for funopen
442 AC_CHECK_FUNCS(funopen)
443 if test $ac_cv_func_funopen != yes; then
444     # No funopen but we can implement that in terms of fopencookie.
445     AC_CHECK_FUNCS(fopencookie)
446     if test $ac_cv_func_fopencookie = yes; then
447         AC_REPLACE_FUNCS(funopen)
448     else
449         AC_MSG_WARN([
450 ***
451 *** No implementation of fopencookie or funopen available
452 ***])
453     fi
454 fi
455
456 # Check for getgid etc
457 AC_CHECK_FUNCS(getgid getegid)
458
459
460 # Replacement functions.
461 AC_REPLACE_FUNCS(stpcpy)
462 AC_REPLACE_FUNCS(setenv)
463
464 # Assuan check for descriptor passing.
465 AC_CHECK_MEMBER(struct cmsghdr.cmsg_len,
466                 [supports_descriptor_passing=yes],
467                 [supports_descriptor_passing=no
468                  AC_MSG_WARN([
469 ***
470 *** Data structure for sending ancillary data missing.
471 *** Descriptor passing won't work.
472 ***])],[
473 #include <stdlib.h>
474 #include <stddef.h>
475 #include <stdio.h>
476 #include <sys/types.h>
477 #include <sys/socket.h>
478 #include <sys/un.h>
479 #if HAVE_SYS_UIO_H
480 #include <sys/uio.h>
481 #endif
482 #include <unistd.h>
483        ])
484
485
486 dnl There seems to be a problem with Apple and decriptor passing.
487 dnl Until we found a solution we change the default to no.
488 dnl See bug 1483.
489 case "${host}" in
490     *-apple-darwin*)
491       use_descriptor_passing=no
492       ;;
493     *)
494       use_descriptor_passing=yes
495       ;;
496 esac
497 AC_ARG_ENABLE(fd-passing,
498   AC_HELP_STRING([--disable-fd-passing], [do not use FD passing]),
499   use_descriptor_passing=$enableval)
500
501 if test "$supports_descriptor_passing" != "yes"; then
502   use_descriptor_passing=no
503 fi
504
505 if test "$use_descriptor_passing" = "yes"; then
506 AC_DEFINE(USE_DESCRIPTOR_PASSING,1,
507           [Defined if descriptor passing is enabled and supported])
508 fi
509
510 AM_CONDITIONAL(USE_DESCRIPTOR_PASSING, test "$use_descriptor_passing" = "yes")
511
512
513 uiserver=no
514 if test "$use_descriptor_passing" = "yes" && test "$have_libassuan" = "yes"; then
515   uiserver=yes
516 fi
517 if test "$uiserver" != "no"; then
518   AC_DEFINE(ENABLE_UISERVER, 1,
519             [Defined if we are building with uiserver support.])
520 fi
521 AM_CONDITIONAL(HAVE_UISERVER, test "$uiserver" != "no")
522
523
524 # Add a few constants to help porting to W32
525 AH_VERBATIM([SEPCONSTANTS],
526 [
527 /* Separators as used in $PATH and file name.  */
528 #ifdef HAVE_DOSISH_SYSTEM
529 #define PATHSEP_C ';'
530 #define DIRSEP_C '\\'
531 #define DIRSEP_S "\\"
532 #else
533 #define PATHSEP_C ':'
534 #define DIRSEP_C '/'
535 #define DIRSEP_S "/"
536 #endif
537 ])
538
539 AH_BOTTOM([
540 /* Definition of GCC specific attributes.  */
541 #if __GNUC__ > 2
542 # define GPGME_GCC_A_PURE  __attribute__ ((__pure__))
543 #else
544 # define GPGME_GCC_A_PURE
545 #endif
546
547 /* Under WindowsCE we need gpg-error's strerror macro.  */
548 #define GPG_ERR_ENABLE_ERRNO_MACROS 1
549
550 #define CRIGHTBLURB "Copyright (C) 2000 Werner Koch\n" \
551                     "Copyright (C) 2001--2013 g10 Code GmbH\n"
552 ])
553
554
555 # Substitution used for gpgme-config
556 GPGME_CONFIG_LIBS="-lgpgme"
557 GPGME_CONFIG_CFLAGS=""
558 GPGME_CONFIG_HOST="$host"
559 AC_SUBST(GPGME_CONFIG_API_VERSION)
560 AC_SUBST(GPGME_CONFIG_LIBS)
561 AC_SUBST(GPGME_CONFIG_CFLAGS)
562 AC_SUBST(GPGME_CONFIG_HOST)
563
564 # Frob'da Variables
565 LTLIBOBJS=`echo "$LIB@&t@OBJS" |
566            sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
567 AC_SUBST(LTLIBOBJS)
568
569 # Some checks for gpgme-tool
570 # Done at top: AC_CHECK_HEADER([argp.h])
571 AC_CHECK_TYPES([error_t], [],
572    [AC_DEFINE([error_t], [int],
573    [Define to a type to use for `error_t' if it is not otherwise available.])],
574    [#include <errno.h>])
575
576
577 # A substitution to set generated files in a Emacs buffer to read-only.
578 AC_SUBST(emacs_local_vars_begin, [['Local][ ][Variables:']])
579 AC_SUBST(emacs_local_vars_read_only, ['buffer-read-only: t'])
580 AC_SUBST(emacs_local_vars_end, ['End:'])
581
582
583 # Last check.
584 die=no
585 if test "$have_gpg_error" = "no"; then
586    die=yes
587    AC_MSG_NOTICE([[
588 ***
589 *** You need libgpg-error to build this program.
590 **  This library is for example available at
591 ***   ftp://ftp.gnupg.org/gcrypt/libgpg-error
592 *** (at least version $NEED_GPG_ERROR_VERSION is required.)
593 ***]])
594 fi
595 if test "$have_libassuan" = "no"; then
596    die=yes
597    AC_MSG_NOTICE([[
598 ***
599 *** You need libassuan to build this program.
600 *** This library is for example available at
601 ***   ftp://ftp.gnupg.org/gcrypt/libassuan/
602 *** (at least version $NEED_LIBASSUAN_VERSION (API $NEED_LIBASSUAN_API) is required).
603 ***]])
604 fi
605
606 if test "$die" = "yes"; then
607     AC_MSG_ERROR([[
608 ***
609 *** Required libraries not found. Please consult the above messages
610 *** and install them before running configure again.
611 ***]])
612 fi
613
614
615 #
616 # Create config files
617
618 AC_CONFIG_FILES(Makefile src/Makefile
619                 tests/Makefile
620                 tests/gpg/Makefile
621                 tests/gpgsm/Makefile
622                 tests/opassuan/Makefile
623                 doc/Makefile
624                 src/versioninfo.rc
625                 src/gpgme.h)
626 AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config)
627 AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd])
628 AC_OUTPUT
629
630 echo "
631         GPGME v${VERSION} has been configured as follows:
632
633         Revision:        mym4_revision  (mym4_revision_dec)
634         Platform:        $host
635
636         UI Server:       $uiserver
637         FD Passing:      $use_descriptor_passing
638         GPGME Pthread:   $have_pthread
639 "
640 if test "x${gpg_config_script_warn}" != x; then
641 cat <<G10EOF
642         Mismatches between the target platform and the to
643         be used libraries have been been detected for:
644          ${gpg_config_script_warn}
645         Please check above for warning messages.
646
647 G10EOF
648 fi