1 # configure.ac for GPGME
2 # Copyright (C) 2000 Werner Koch (dd9jn)
3 # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 g10 Code GmbH
5 # This file is part of GPGME.
7 # GPGME is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU Lesser General Public License as
9 # published by the Free Software Foundation; either version 2.1 of the
10 # License, or (at your option) any later version.
12 # GPGME is distributed in the hope that it will be useful, but WITHOUT
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
15 # Public License for more details.
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
21 # (Process this file with autoconf to produce a configure script.)
23 min_automake_version="1.10"
25 # Version number: Remember to change it immediately *after* a release.
26 # Make sure to run "svn up" and "./autogen.sh --force"
27 # before a "make dist". See below for the LT versions.
29 # The SVN version is usually the next intended release version with
30 # the string "-svnNNN" appended. The reason for this is that tests for a
31 # specific feature can already be done under the assumption that the
32 # SVN version is the most recent one in a branch. To disable the SVN
33 # version for the real release, set the my_issvn macro to no.
34 m4_define(my_version, [1.2.1])
35 m4_define(my_issvn, [yes])
37 m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \
38 || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')]))
40 [my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision])],
41 [bug-gpgme@gnupg.org])
44 # LT Version numbers, remember to change them just *before* a release.
45 # (Code changed: REVISION++)
46 # (Interfaces added/removed/changed: CURRENT++, REVISION=0)
47 # (Interfaces added: AGE++)
48 # (Interfaces removed/changed: AGE=0)
50 LIBGPGME_LT_CURRENT=18
51 # Subtract 2 from this value if you want to make the LFS transition an
52 # ABI break. [Note to self: Remove this comment with the next regular break.]
54 LIBGPGME_LT_REVISION=0
56 # If the API is changed in an incompatible way: increment the next counter.
57 GPGME_CONFIG_API_VERSION=1
58 ##############################################
61 BUILD_REVISION=svn_revision
63 VERSION=$PACKAGE_VERSION
65 AC_CONFIG_SRCDIR(src/gpgme.h.in)
66 dnl FIXME: Enable this with autoconf 2.59.
67 dnl AC_CONFIG_MACRO_DIR(m4)
68 AM_CONFIG_HEADER(config.h)
69 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
73 # Enable GNU extensions on systems that have them.
76 AH_VERBATIM([_REENTRANT],
77 [/* To allow the use of GPGME in multithreaded programs we have to use
78 special features from the library.
79 IMPORTANT: gpgme is not yet fully reentrant and you should use it
80 only from one thread. */
88 AC_SUBST(LIBGPGME_LT_CURRENT)
89 AC_SUBST(LIBGPGME_LT_AGE)
90 AC_SUBST(LIBGPGME_LT_REVISION)
94 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package])
95 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package])
97 # Don't default to build static libs.
103 # For now we hardcode the use of version scripts. It would be better
104 # to write a test for this or even implement this within libtool.
105 have_ld_version_script=no
108 have_ld_version_script=yes
111 have_ld_version_script=yes
114 AC_DEFINE(_XOPEN_SOURCE, 500, Activate POSIX interface on MacOS X)
118 AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
123 component_system=None
124 have_dosish_system=no
130 # special stuff for Windoze NT
131 have_dosish_system=yes
133 GPG_DEFAULT='c:\\gnupg\\gpg.exe'
134 GPGSM_DEFAULT='c:\\gnupg\\gpgsm.exe'
135 GPGCONF_DEFAULT='c:\\gnupg\\gpgconf.exe'
136 #component_system='COM+'
139 AC_ARG_ENABLE(w32-glib,
140 AC_HELP_STRING([--enable-w32-glib], [build GPGME Glib for W32]),
141 build_w32_glib=$enableval)
143 # Check disabled, because the qt-dev packages in gpg4win do
144 # not provide any support for cross compilation.
145 # PKG_CHECK_MODULES(QT4_CORE, QtCore)
148 # ./configure --enable-w32-qt QT4_CORE_CFLAGS="..." QT4_CORE_LIBS="..."
149 AC_SUBST(QT4_CORE_CFLAGS)
150 AC_SUBST(QT4_CORE_LIBS)
151 AC_ARG_ENABLE(w32-qt,
152 AC_HELP_STRING([--enable-w32-qt], [build GPGME Qt for W32]),
153 build_w32_qt=$enableval)
156 AC_CHECK_PTH(1.2.0,,,no,have_pth=yes)
157 if test "$have_pth" = yes; then
158 AC_DEFINE(HAVE_PTH, ,[Define if we have Pth.])
160 AC_CHECK_LIB(pthread,pthread_create,have_pthread=yes)
161 if test "$have_pthread" = yes; then
162 AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.])
165 # XXX: Probably use exec-prefix here?
166 # GPG_DEFAULT='/usr/bin/gpg'
167 # GPGSM_DEFAULT='/usr/bin/gpgsm'
168 # GPGCONF_DEFAULT='/usr/bin/gpgconf'
172 if test "$have_dosish_system" = yes; then
173 AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
174 [Defined if we run on some of the PCDOS like systems
175 (DOS, Windoze. OS/2) with special properties like
178 AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes)
180 if test "$have_w32_system" = yes; then
181 AC_DEFINE(HAVE_W32_SYSTEM,1, [Defined if we run on a W32 API based system])
183 AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes)
184 AM_CONDITIONAL(BUILD_W32_GLIB, test "$build_w32_glib" = yes)
185 AM_CONDITIONAL(BUILD_W32_QT, test "$build_w32_qt" = yes)
187 AM_CONDITIONAL(HAVE_PTH, test "$have_pth" = "yes")
188 AM_CONDITIONAL(HAVE_PTHREAD, test "$have_pthread" = "yes")
192 # Checks for header files.
193 AC_CHECK_HEADERS(sys/select.h)
194 AC_CHECK_HEADERS([sys/uio.h])
199 AC_CHECK_SIZEOF(unsigned int)
204 # A simple compile time check in gpgme.h for GNU/Linux systems that
205 # prevents a file offset bits mismatch between gpgme and the application.
206 NEED__FILE_OFFSET_BITS=0
207 case $ac_cv_sys_file_offset_bits in
210 NEED__FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits
213 AC_SUBST(NEED__FILE_OFFSET_BITS)
216 # Checks for compiler features.
217 if test "$GCC" = yes; then
218 CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
219 if test "$have_w32_system" = yes; then
220 CFLAGS="$CFLAGS -mms-bitfields"
224 # Checks for library functions.
227 AC_REPLACE_FUNCS(vasprintf)
228 if test "$ac_cv_func_vasprintf" != yes; then
232 # Try to find a thread-safe version of ttyname().
233 AC_REPLACE_FUNCS(ttyname_r)
234 if test "$ac_cv_func_ttyname_r" != yes; then
237 *** ttyname() is not thread-safe and ttyname_r() does not exist
241 # Try to find a thread-safe version of getenv().
242 have_thread_safe_getenv=no
244 if test $GLIBC21 = yes; then
245 have_thread_safe_getenv=yes
247 if test $have_thread_safe_getenv = yes; then
248 AC_DEFINE(HAVE_THREAD_SAFE_GETENV, [1], [Define if getenv() is thread-safe])
251 AC_CHECK_FUNCS(getenv_r, have_getenv_r=yes)
252 if test $have_getenv_r = no && test $have_thread_safe_getenv = no; then
255 *** getenv() is not thread-safe and getenv_r() does not exist
259 # For converting time strings to seconds since Epoch, we need the timegm
261 AC_CHECK_FUNCS(timegm)
262 if test "$ac_cv_func_timegm" != yes; then
265 *** timegm() not available - a non-thread-safe kludge will be used
266 *** and the TZ variable might be changed at runtime.
270 # Checking for libgpg-error.
271 AM_PATH_GPG_ERROR(1.4,, AC_MSG_ERROR([libgpg-error was not found]))
272 AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME,
273 [The default error source for GPGME.])
276 NEED_LIBASSUAN_VERSION=1.1.0
278 AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_VERSION",
279 have_libassuan=yes, have_libassuan=no)
280 AM_CONDITIONAL(HAVE_ASSUAN, test "$have_libassuan" = "yes")
281 if test "$have_libassuan" = "yes"; then
282 AC_DEFINE(ENABLE_ASSUAN,1,[Whether Assuan support is enabled])
285 # Checks for system services
286 NEED_GPG_VERSION_DEFAULT=1.3.0
287 NEED_GPGSM_VERSION_DEFAULT=1.9.6
288 NEED_GPGCONF_VERSION_DEFAULT=2.0.4
289 NEED_GPG_VERSION="$NEED_GPG_VERSION_DEFAULT"
290 NEED_GPGSM_VERSION="$NEED_GPGSM_VERSION_DEFAULT"
291 NEED_GPGCONF_VERSION="$NEED_GPGCONF_VERSION_DEFAULT"
292 AC_ARG_WITH(gpg-version,
293 AC_HELP_STRING([--with-gpg-version=VER], [require GnuPG version VER]),
294 NEED_GPG_VERSION=$withval)
295 if test "$NEED_GPG_VERSION" = "yes"; then
296 NEED_GPG_VERSION="$NEED_GPG_VERSION_DEFAULT"
298 if test "$NEED_GPG_VERSION" = "no"; then
299 NEED_GPG_VERSION=0.0.0
301 AC_ARG_WITH(gpgsm-version,
302 AC_HELP_STRING([--with-gpgsm-version=VER], [require GPGSM version VER]),
303 NEED_GPGSM_VERSION=$withval)
304 if test "$NEED_GPGSM_VERSION" = "yes"; then
305 NEED_GPGSM_VERSION="$NEED_GPGSM_VERSION_DEFAULT"
307 if test "$NEED_GPGSM_VERSION" = "no"; then
308 NEED_GPGSM_VERSION=0.0.0
310 AC_ARG_WITH(gpgconf-version,
311 AC_HELP_STRING([--with-gpgconf-version=VER], [require GPGCONF version VER]),
312 NEED_GPGCONF_VERSION=$withval)
313 if test "$NEED_GPGCONF_VERSION" = "yes"; then
314 NEED_GPGCONF_VERSION="$NEED_GPGCONF_VERSION_DEFAULT"
316 if test "$NEED_GPGCONF_VERSION" = "no"; then
317 NEED_GPGCONF_VERSION=0.0.0
320 AC_DEFINE_UNQUOTED(NEED_GPG_VERSION, "$NEED_GPG_VERSION",
321 [Min. needed GnuPG version.])
322 AC_DEFINE_UNQUOTED(NEED_GPGSM_VERSION, "$NEED_GPGSM_VERSION",
323 [Min. needed GPGSM version.])
324 AC_DEFINE_UNQUOTED(NEED_GPGCONF_VERSION, "$NEED_GPGCONF_VERSION",
325 [Min. needed GPGCONF version.])
330 AC_HELP_STRING([--with-gpg=PATH], [use GnuPG binary at PATH]),
331 GPG=$withval, NO_OVERRIDE=yes)
332 if test "$NO_OVERRIDE" = "yes" || test "$GPG" = "yes"; then
335 if test "$cross_compiling" != "yes"; then
336 AC_PATH_PROG(GPG, gpg)
338 if test -z "$GPG"; then
342 if test "$GPG" = no; then
343 if test "$NO_OVERRIDE" = "yes"; then
344 if test "$cross_compiling" != "yes"; then
347 *** Could not find GnuPG, install GnuPG or use --with-gpg=PATH to enable it
352 *** Can not determine path to GnuPG when cross-compiling, use --with-gpg=PATH
357 AC_DEFINE_UNQUOTED(GPG_PATH, "$GPG", [Path to the GnuPG binary.])
360 dnl Check for GnuPG version requirement.
363 if test -z "$GPG" -o "x$GPG" = "xno"; then
366 if test "$cross_compiling" = "yes"; then
367 AC_MSG_WARN([GnuPG version can not be checked when cross compiling])
370 if test ! -x "$GPG"; then
371 AC_MSG_WARN([GnuPG not executable, version check disabled])
376 if test "$ok" = "maybe"; then
377 AC_MSG_CHECKING(for GPG >= $NEED_GPG_VERSION)
378 req_major=`echo $NEED_GPG_VERSION | \
379 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
380 req_minor=`echo $NEED_GPG_VERSION | \
381 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
382 req_micro=`echo $NEED_GPG_VERSION | \
383 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
384 GPG_VERSION=`$GPG --version | sed -n '1 s/[[^0-9]]*\(.*\)/\1/p'`
385 major=`echo $GPG_VERSION | \
386 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
387 minor=`echo $GPG_VERSION | \
388 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
389 micro=`echo $GPG_VERSION | \
390 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
392 if test "$major" -gt "$req_major"; then
395 if test "$major" -eq "$req_major"; then
396 if test "$minor" -gt "$req_minor"; then
399 if test "$minor" -eq "$req_minor"; then
400 if test "$micro" -ge "$req_micro"; then
407 if test "$ok" = "yes"; then
411 AC_MSG_WARN([GPG must be at least version $NEED_GPG_VERSION])
415 AC_ARG_ENABLE(gpg-test,
416 AC_HELP_STRING([--disable-gpg-test], [disable GPG run test]),
417 run_gpg_test=$enableval)
418 AM_CONDITIONAL(RUN_GPG_TESTS, test "$run_gpg_test" = "yes")
423 AC_HELP_STRING([--with-gpgsm=PATH], [use GpgSM binary at PATH]),
424 GPGSM=$withval, NO_OVERRIDE=yes)
425 if test "$NO_OVERRIDE" = "yes" || test "$GPGSM" = "yes"; then
428 if test "$cross_compiling" != "yes"; then
429 AC_PATH_PROG(GPGSM, gpgsm)
431 if test -z "$GPGSM"; then
432 GPGSM="$GPGSM_DEFAULT"
435 if test "$GPGSM" = no; then
436 if test "$NO_OVERRIDE" = "yes"; then
437 if test "$cross_compiling" != "yes"; then
440 *** Could not find GpgSM, install GpgSM or use --with-gpgsm=PATH to enable it
445 *** Can not determine path to GpgSM when cross-compiling, use --with-gpgsm=PATH
450 AC_DEFINE_UNQUOTED(GPGSM_PATH, "$GPGSM", [Path to the GPGSM binary.])
451 AC_DEFINE(ENABLE_GPGSM,1,[Whether GPGSM support is enabled])
453 AM_CONDITIONAL(HAVE_GPGSM, test "$GPGSM" != "no")
456 dnl Check for GPGSM version requirement.
457 GPGSM_VERSION=unknown
459 if test -z "$GPGSM" -o "x$GPGSM" = "xno"; then
462 if test "$cross_compiling" = "yes"; then
463 AC_MSG_WARN([GPGSM version can not be checked when cross compiling])
466 if test ! -x "$GPGSM"; then
467 AC_MSG_WARN([GPGSM not executable, version check disabled])
472 if test "$ok" = "maybe"; then
473 AC_MSG_CHECKING(for GPGSM >= $NEED_GPGSM_VERSION)
474 req_major=`echo $NEED_GPGSM_VERSION | \
475 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
476 req_minor=`echo $NEED_GPGSM_VERSION | \
477 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
478 req_micro=`echo $NEED_GPGSM_VERSION | \
479 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
480 GPGSM_VERSION=`$GPGSM --version | sed -n '1 s/[[^0-9]]*\(.*\)/\1/p'`
481 major=`echo $GPGSM_VERSION | \
482 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
483 minor=`echo $GPGSM_VERSION | \
484 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
485 micro=`echo $GPGSM_VERSION | \
486 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
488 if test "$major" -gt "$req_major"; then
491 if test "$major" -eq "$req_major"; then
492 if test "$minor" -gt "$req_minor"; then
495 if test "$minor" -eq "$req_minor"; then
496 if test "$micro" -ge "$req_micro"; then
503 if test "$ok" = "yes"; then
507 AC_MSG_WARN([GPGSM must be at least version $NEED_GPGSM_VERSION])
511 AC_ARG_ENABLE(gpgsm-test,
512 AC_HELP_STRING([--disable-gpgsm-test], [disable GPGSM run test]),
513 run_gpgsm_test=$enableval)
514 AM_CONDITIONAL(RUN_GPGSM_TESTS, test "$run_gpgsm_test" = "yes")
516 # Require libassuan if GPGSM is here.
518 if test "$GPGSM" != "no"; then
519 require_libassuan=yes
525 AC_HELP_STRING([--with-gpgconf=PATH],
526 [use gpgconf binary at PATH]),
527 GPGCONF=$withval, NO_OVERRIDE=yes)
528 if test "$NO_OVERRIDE" = "yes" || test "$GPGCONF" = "yes"; then
531 if test "$cross_compiling" != "yes"; then
532 AC_PATH_PROG(GPGCONF, gpgconf)
534 if test -z "$GPGCONF"; then
535 GPGCONF="$GPGCONF_DEFAULT"
538 if test "$GPGCONF" = no; then
539 if test "$NO_OVERRIDE" = "yes"; then
540 if test "$cross_compiling" != "yes"; then
543 *** Could not find gpgconf, install gpgconf or use --with-gpgconf=PATH to enable it
548 *** Can not determine path to gpgconf when cross-compiling, use --with-gpgconf=PATH
553 AC_DEFINE_UNQUOTED(GPGCONF_PATH, "$GPGCONF", [Path to the GPGCONF binary.])
554 AC_DEFINE(ENABLE_GPGCONF,1,[Whether GPGCONF support is enabled])
556 AM_CONDITIONAL(HAVE_GPGCONF, test "$GPGCONF" != "no")
558 dnl Check for GPGCONF version requirement.
559 GPGCONF_VERSION=unknown
561 if test -z "$GPGCONF" -o "x$GPGCONF" = "xno"; then
564 if test "$cross_compiling" = "yes"; then
565 AC_MSG_WARN([GPGCONF version can not be checked when cross compiling])
568 if test ! -x "$GPGCONF"; then
569 AC_MSG_WARN([GPGCONF not executable, version check disabled])
574 if test "$ok" = "maybe"; then
575 AC_MSG_CHECKING(for GPGCONF >= $NEED_GPGCONF_VERSION)
576 req_major=`echo $NEED_GPGCONF_VERSION | \
577 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
578 req_minor=`echo $NEED_GPGCONF_VERSION | \
579 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
580 req_micro=`echo $NEED_GPGCONF_VERSION | \
581 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
582 GPGCONF_VERSION=`$GPGCONF --version | sed -n '1 s/[[^0-9]]*\(.*\)/\1/p'`
583 major=`echo $GPGCONF_VERSION | \
584 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
585 minor=`echo $GPGCONF_VERSION | \
586 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
587 micro=`echo $GPGCONF_VERSION | \
588 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
590 if test "$major" -gt "$req_major"; then
593 if test "$major" -eq "$req_major"; then
594 if test "$minor" -gt "$req_minor"; then
597 if test "$minor" -eq "$req_minor"; then
598 if test "$micro" -ge "$req_micro"; then
605 if test "$ok" = "yes"; then
609 AC_MSG_WARN([GPGCONF must be at least version $NEED_GPGCONF_VERSION])
612 run_gpgconf_test="$ok"
613 AC_ARG_ENABLE(gpgconf-test,
614 AC_HELP_STRING([--disable-gpgconf-test], [disable GPGCONF run test]),
615 run_gpgconf_test=$enableval)
616 AM_CONDITIONAL(RUN_GPGCONF_TESTS, test "$run_gpgconf_test" = "yes")
618 # Only build if supported.
619 AM_CONDITIONAL(BUILD_GPGCONF, test "$GPGCONF" != "no")
620 if test "$GPGCONF" != "no"; then
621 AC_DEFINE(HAVE_GPGCONF, 1,
622 [Defined if we are building with gpgconf support.])
627 AC_CHECK_FUNCS(funopen)
628 if test $ac_cv_func_funopen != yes; then
629 # No funopen but we can implement that in terms of fopencookie.
630 AC_CHECK_FUNCS(fopencookie)
631 if test $ac_cv_func_fopencookie = yes; then
632 AC_REPLACE_FUNCS(funopen)
636 *** No implementation of fopencookie or funopen available
641 # Replacement functions.
642 AC_REPLACE_FUNCS(stpcpy)
643 # Check for unistd.h for setenv replacement function.
644 AC_CHECK_HEADERS(unistd.h)
645 AC_REPLACE_FUNCS(setenv)
647 # Assuan check for descriptor passing.
648 AC_CHECK_MEMBER(struct cmsghdr.cmsg_len,
649 [supports_descriptor_passing=yes],
650 [supports_descriptor_passing=no
653 *** Data structure for sending ancillary data missing.
654 *** Descriptor passing won't work.
659 #include <sys/types.h>
660 #include <sys/socket.h>
668 AC_ARG_ENABLE(fd-passing,
669 AC_HELP_STRING([--enable-fd-passing], [use FD passing if supported]),
670 use_descriptor_passing=$enableval)
672 if test "$supports_descriptor_passing" != "yes"; then
673 use_descriptor_passing=no
676 if test "$use_descriptor_passing" = "yes"; then
677 AC_DEFINE(USE_DESCRIPTOR_PASSING,1,
678 [Defined if descriptor passing is enabled and supported])
681 AM_CONDITIONAL(USE_DESCRIPTOR_PASSING, test "$use_descriptor_passing" = "yes")
684 AM_CONDITIONAL(BUILD_COMPLUS, test "$component_system" = "COM+")
686 # Generate values for the DLL version info
687 if test "$have_w32_system" = yes; then
688 BUILD_TIMESTAMP=`date --iso-8601=minutes`
690 BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
692 BUILD_FILEVERSION="${BUILD_FILEVERSION}${BUILD_REVISION}"
694 AC_SUBST(BUILD_REVISION)
695 AC_SUBST(BUILD_TIMESTAMP)
696 AC_SUBST(BUILD_FILEVERSION)
698 # Add a few constants to help porting to W32
699 AH_VERBATIM([SEPCONSTANTS],
701 /* Separators as used in $PATH. */
702 #ifdef HAVE_DOSISH_SYSTEM
703 #define PATHSEP_C ';'
705 #define PATHSEP_C ':'
710 /* Definition of GCC specific attributes. */
712 # define GPGME_GCC_A_PURE __attribute__ ((__pure__))
714 # define GPGME_GCC_A_PURE
719 # Substitution used for gpgme-config
720 GPGME_CONFIG_LIBS="-lgpgme"
721 GPGME_CONFIG_CFLAGS=""
722 AC_SUBST(GPGME_CONFIG_API_VERSION)
723 AC_SUBST(GPGME_CONFIG_LIBS)
724 AC_SUBST(GPGME_CONFIG_CFLAGS)
727 LTLIBOBJS=`echo "$LIB@&t@OBJS" |
728 sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
733 if test "$require_libassuan" = "no"; then
737 *** You need libassuan to build this program with GPGSM support.
738 *** This library is for example available at
739 *** ftp://ftp.gnupg.org/pub/gcrypt/alpha/libassuan/
740 *** (at least version $NEED_LIBASSUAN_VERSION is required).
744 if test "$die" = "yes"; then
747 *** Required libraries not found. Please consult the above messages
748 *** and install them before running configure again.
754 # Create config files
756 AC_CONFIG_FILES(Makefile assuan/Makefile src/Makefile
760 tests/opassuan/Makefile
761 doc/Makefile complus/Makefile
764 AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config)
765 AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd])
769 GPGME v${VERSION} has been configured as follows:
772 GnuPG version: $GPG_VERSION, min. $NEED_GPG_VERSION
775 GpgSM version: $GPGSM_VERSION, min. $NEED_GPGSM_VERSION
777 GpgConf path: $GPGCONF
778 GpgConf version: $GPGCONF_VERSION, min. $NEED_GPGCONF_VERSION
780 Assuan version: $LIBASSUAN_VERSION
782 GPGME Pthread: $have_pthread