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.1.9])
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=17
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=6
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")
191 # Checks for header files.
192 AC_CHECK_HEADERS(sys/select.h)
197 AC_CHECK_SIZEOF(unsigned int)
201 # Checks for compiler features.
202 if test "$GCC" = yes; then
203 CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
204 if test "$have_w32_system" = yes; then
205 CFLAGS="$CFLAGS -mms-bitfields"
209 # Network library fun.
210 AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname,
211 [NETLIBS="-lnsl $NETLIBS"]))
212 AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt,
213 [NETLIBS="-lsocket $NETLIBS"]))
216 # Checks for library functions.
219 AC_REPLACE_FUNCS(vasprintf)
220 if test "$ac_cv_func_vasprintf" != yes; then
224 # Try to find a thread-safe version of ttyname().
225 AC_REPLACE_FUNCS(ttyname_r)
226 if test "$ac_cv_func_ttyname_r" != yes; then
229 *** ttyname() is not thread-safe and ttyname_r() does not exist
233 # Try to find a thread-safe version of getenv().
234 have_thread_safe_getenv=no
236 if test $GLIBC21 = yes; then
237 have_thread_safe_getenv=yes
239 if test $have_thread_safe_getenv = yes; then
240 AC_DEFINE(HAVE_THREAD_SAFE_GETENV, [1], [Define if getenv() is thread-safe])
243 AC_CHECK_FUNCS(getenv_r, have_getenv_r=yes)
244 if test $have_getenv_r = no && test $have_thread_safe_getenv = no; then
247 *** getenv() is not thread-safe and getenv_r() does not exist
251 # For converting time strings to seconds since Epoch, we need the timegm
253 AC_CHECK_FUNCS(timegm)
254 if test "$ac_cv_func_timegm" != yes; then
257 *** timegm() not available - a non-thread-safe kludge will be used
258 *** and the TZ variable might be changed at runtime.
262 # Checking for libgpg-error.
263 AM_PATH_GPG_ERROR(1.4,, AC_MSG_ERROR([libgpg-error was not found]))
264 AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME,
265 [The default error source for GPGME.])
269 # Checks for system services
270 NEED_GPG_VERSION_DEFAULT=1.3.0
271 NEED_GPGSM_VERSION_DEFAULT=1.9.6
272 NEED_GPGCONF_VERSION_DEFAULT=2.0.4
273 NEED_GPG_VERSION="$NEED_GPG_VERSION_DEFAULT"
274 NEED_GPGSM_VERSION="$NEED_GPGSM_VERSION_DEFAULT"
275 NEED_GPGCONF_VERSION="$NEED_GPGCONF_VERSION_DEFAULT"
276 AC_ARG_WITH(gpg-version,
277 AC_HELP_STRING([--with-gpg-version=VER], [require GnuPG version VER]),
278 NEED_GPG_VERSION=$withval)
279 if test "$NEED_GPG_VERSION" = "yes"; then
280 NEED_GPG_VERSION="$NEED_GPG_VERSION_DEFAULT"
282 if test "$NEED_GPG_VERSION" = "no"; then
283 NEED_GPG_VERSION=0.0.0
285 AC_ARG_WITH(gpgsm-version,
286 AC_HELP_STRING([--with-gpgsm-version=VER], [require GPGSM version VER]),
287 NEED_GPGSM_VERSION=$withval)
288 if test "$NEED_GPGSM_VERSION" = "yes"; then
289 NEED_GPGSM_VERSION="$NEED_GPGSM_VERSION_DEFAULT"
291 if test "$NEED_GPGSM_VERSION" = "no"; then
292 NEED_GPGSM_VERSION=0.0.0
294 AC_ARG_WITH(gpgconf-version,
295 AC_HELP_STRING([--with-gpgconf-version=VER], [require GPGCONF version VER]),
296 NEED_GPGCONF_VERSION=$withval)
297 if test "$NEED_GPGCONF_VERSION" = "yes"; then
298 NEED_GPGCONF_VERSION="$NEED_GPGCONF_VERSION_DEFAULT"
300 if test "$NEED_GPGCONF_VERSION" = "no"; then
301 NEED_GPGCONF_VERSION=0.0.0
304 AC_DEFINE_UNQUOTED(NEED_GPG_VERSION, "$NEED_GPG_VERSION",
305 [Min. needed GnuPG version.])
306 AC_DEFINE_UNQUOTED(NEED_GPGSM_VERSION, "$NEED_GPGSM_VERSION",
307 [Min. needed GPGSM version.])
308 AC_DEFINE_UNQUOTED(NEED_GPGCONF_VERSION, "$NEED_GPGCONF_VERSION",
309 [Min. needed GPGCONF version.])
314 AC_HELP_STRING([--with-gpg=PATH], [use GnuPG binary at PATH]),
315 GPG=$withval, NO_OVERRIDE=yes)
316 if test "$NO_OVERRIDE" = "yes" || test "$GPG" = "yes"; then
319 if test "$cross_compiling" != "yes"; then
320 AC_PATH_PROG(GPG, gpg)
322 if test -z "$GPG"; then
326 if test "$GPG" = no; then
327 if test "$NO_OVERRIDE" = "yes"; then
328 if test "$cross_compiling" != "yes"; then
331 *** Could not find GnuPG, install GnuPG or use --with-gpg=PATH to enable it
336 *** Can not determine path to GnuPG when cross-compiling, use --with-gpg=PATH
341 AC_DEFINE_UNQUOTED(GPG_PATH, "$GPG", [Path to the GnuPG binary.])
344 dnl Check for GnuPG version requirement.
347 if test -z "$GPG" -o "x$GPG" = "xno"; then
350 if test "$cross_compiling" = "yes"; then
351 AC_MSG_WARN([GnuPG version can not be checked when cross compiling])
354 if test ! -x "$GPG"; then
355 AC_MSG_WARN([GnuPG not executable, version check disabled])
360 if test "$ok" = "maybe"; then
361 AC_MSG_CHECKING(for GPG >= $NEED_GPG_VERSION)
362 req_major=`echo $NEED_GPG_VERSION | \
363 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
364 req_minor=`echo $NEED_GPG_VERSION | \
365 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
366 req_micro=`echo $NEED_GPG_VERSION | \
367 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
368 GPG_VERSION=`$GPG --version | sed -n '1 s/[[^0-9]]*\(.*\)/\1/p'`
369 major=`echo $GPG_VERSION | \
370 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
371 minor=`echo $GPG_VERSION | \
372 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
373 micro=`echo $GPG_VERSION | \
374 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
376 if test "$major" -gt "$req_major"; then
379 if test "$major" -eq "$req_major"; then
380 if test "$minor" -gt "$req_minor"; then
383 if test "$minor" -eq "$req_minor"; then
384 if test "$micro" -ge "$req_micro"; then
391 if test "$ok" = "yes"; then
395 AC_MSG_WARN([GPG must be at least version $NEED_GPG_VERSION])
399 AC_ARG_ENABLE(gpg-test,
400 AC_HELP_STRING([--disable-gpg-test], [disable GPG run test]),
401 run_gpg_test=$enableval)
402 AM_CONDITIONAL(RUN_GPG_TESTS, test "$run_gpg_test" = "yes")
407 AC_HELP_STRING([--with-gpgsm=PATH], [use GpgSM binary at PATH]),
408 GPGSM=$withval, NO_OVERRIDE=yes)
409 if test "$NO_OVERRIDE" = "yes" || test "$GPGSM" = "yes"; then
412 if test "$cross_compiling" != "yes"; then
413 AC_PATH_PROG(GPGSM, gpgsm)
415 if test -z "$GPGSM"; then
416 GPGSM="$GPGSM_DEFAULT"
419 if test "$GPGSM" = no; then
420 if test "$NO_OVERRIDE" = "yes"; then
421 if test "$cross_compiling" != "yes"; then
424 *** Could not find GpgSM, install GpgSM or use --with-gpgsm=PATH to enable it
429 *** Can not determine path to GpgSM when cross-compiling, use --with-gpgsm=PATH
434 AC_DEFINE_UNQUOTED(GPGSM_PATH, "$GPGSM", [Path to the GPGSM binary.])
435 AC_DEFINE(ENABLE_GPGSM,1,[Whether GPGSM support is enabled])
437 AM_CONDITIONAL(HAVE_GPGSM, test "$GPGSM" != "no")
440 dnl Check for GPGSM version requirement.
441 GPGSM_VERSION=unknown
443 if test -z "$GPGSM" -o "x$GPGSM" = "xno"; then
446 if test "$cross_compiling" = "yes"; then
447 AC_MSG_WARN([GPGSM version can not be checked when cross compiling])
450 if test ! -x "$GPGSM"; then
451 AC_MSG_WARN([GPGSM not executable, version check disabled])
456 if test "$ok" = "maybe"; then
457 AC_MSG_CHECKING(for GPGSM >= $NEED_GPGSM_VERSION)
458 req_major=`echo $NEED_GPGSM_VERSION | \
459 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
460 req_minor=`echo $NEED_GPGSM_VERSION | \
461 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
462 req_micro=`echo $NEED_GPGSM_VERSION | \
463 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
464 GPGSM_VERSION=`$GPGSM --version | sed -n '1 s/[[^0-9]]*\(.*\)/\1/p'`
465 major=`echo $GPGSM_VERSION | \
466 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
467 minor=`echo $GPGSM_VERSION | \
468 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
469 micro=`echo $GPGSM_VERSION | \
470 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
472 if test "$major" -gt "$req_major"; then
475 if test "$major" -eq "$req_major"; then
476 if test "$minor" -gt "$req_minor"; then
479 if test "$minor" -eq "$req_minor"; then
480 if test "$micro" -ge "$req_micro"; then
487 if test "$ok" = "yes"; then
491 AC_MSG_WARN([GPGSM must be at least version $NEED_GPGSM_VERSION])
495 AC_ARG_ENABLE(gpgsm-test,
496 AC_HELP_STRING([--disable-gpgsm-test], [disable GPGSM run test]),
497 run_gpgsm_test=$enableval)
498 AM_CONDITIONAL(RUN_GPGSM_TESTS, test "$run_gpgsm_test" = "yes")
503 AC_HELP_STRING([--with-gpgconf=PATH],
504 [use gpgconf binary at PATH]),
505 GPGCONF=$withval, NO_OVERRIDE=yes)
506 if test "$NO_OVERRIDE" = "yes" || test "$GPGCONF" = "yes"; then
509 if test "$cross_compiling" != "yes"; then
510 AC_PATH_PROG(GPGCONF, gpgconf)
512 if test -z "$GPGCONF"; then
513 GPGCONF="$GPGCONF_DEFAULT"
516 if test "$GPGCONF" = no; then
517 if test "$NO_OVERRIDE" = "yes"; then
518 if test "$cross_compiling" != "yes"; then
521 *** Could not find gpgconf, install gpgconf or use --with-gpgconf=PATH to enable it
526 *** Can not determine path to gpgconf when cross-compiling, use --with-gpgconf=PATH
531 AC_DEFINE_UNQUOTED(GPGCONF_PATH, "$GPGCONF", [Path to the GPGCONF binary.])
532 AC_DEFINE(ENABLE_GPGCONF,1,[Whether GPGCONF support is enabled])
534 AM_CONDITIONAL(HAVE_GPGCONF, test "$GPGCONF" != "no")
536 dnl Check for GPGCONF version requirement.
537 GPGCONF_VERSION=unknown
539 if test -z "$GPGCONF" -o "x$GPGCONF" = "xno"; then
542 if test "$cross_compiling" = "yes"; then
543 AC_MSG_WARN([GPGCONF version can not be checked when cross compiling])
546 if test ! -x "$GPGCONF"; then
547 AC_MSG_WARN([GPGCONF not executable, version check disabled])
552 if test "$ok" = "maybe"; then
553 AC_MSG_CHECKING(for GPGCONF >= $NEED_GPGCONF_VERSION)
554 req_major=`echo $NEED_GPGCONF_VERSION | \
555 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
556 req_minor=`echo $NEED_GPGCONF_VERSION | \
557 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
558 req_micro=`echo $NEED_GPGCONF_VERSION | \
559 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
560 GPGCONF_VERSION=`$GPGCONF --version | sed -n '1 s/[[^0-9]]*\(.*\)/\1/p'`
561 major=`echo $GPGCONF_VERSION | \
562 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
563 minor=`echo $GPGCONF_VERSION | \
564 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
565 micro=`echo $GPGCONF_VERSION | \
566 sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
568 if test "$major" -gt "$req_major"; then
571 if test "$major" -eq "$req_major"; then
572 if test "$minor" -gt "$req_minor"; then
575 if test "$minor" -eq "$req_minor"; then
576 if test "$micro" -ge "$req_micro"; then
583 if test "$ok" = "yes"; then
587 AC_MSG_WARN([GPGCONF must be at least version $NEED_GPGCONF_VERSION])
590 run_gpgconf_test="$ok"
591 AC_ARG_ENABLE(gpgconf-test,
592 AC_HELP_STRING([--disable-gpgconf-test], [disable GPGCONF run test]),
593 run_gpgconf_test=$enableval)
594 AM_CONDITIONAL(RUN_GPGCONF_TESTS, test "$run_gpgconf_test" = "yes")
596 # Only build if supported.
597 AM_CONDITIONAL(BUILD_GPGCONF, test "$GPGCONF" != "no")
598 if test "$GPGCONF" != "no"; then
599 AC_DEFINE(HAVE_GPGCONF, 1,
600 [Defined if we are building with gpgconf support.])
604 # FIXME: Only build if supported.
605 AM_CONDITIONAL(BUILD_ASSUAN, test "$GPGSM" != "no")
606 if test "$GPGSM" != "no"; then
607 AC_DEFINE(HAVE_ASSUAN_H, 1,
608 [Defined if we are building with assuan support.])
612 AC_CHECK_FUNCS(funopen)
613 if test $ac_cv_func_funopen != yes; then
614 # No funopen but we can implement that in terms of fopencookie.
615 AC_CHECK_FUNCS(fopencookie)
616 if test $ac_cv_func_fopencookie = yes; then
617 AC_REPLACE_FUNCS(funopen)
621 *** No implementation of fopencookie or funopen available
626 # More assuan replacement functions.
627 AC_REPLACE_FUNCS(isascii)
628 AC_REPLACE_FUNCS(putc_unlocked)
629 AC_REPLACE_FUNCS(memrchr)
630 AC_REPLACE_FUNCS(stpcpy)
631 # Check for unistd.h for setenv replacement function.
632 AC_CHECK_HEADERS(unistd.h)
633 AC_REPLACE_FUNCS(setenv)
635 # More assuan checks.
636 AC_CHECK_HEADERS([sys/uio.h])
638 # Assuan check for descriptor passing.
639 AC_CHECK_MEMBER(struct cmsghdr.cmsg_len,
640 [supports_descriptor_passing=yes],
641 [supports_descriptor_passing=no
644 *** Data structure for sending ancillary data missing.
645 *** Descriptor passing won't work.
650 #include <sys/types.h>
651 #include <sys/socket.h>
659 AC_ARG_ENABLE(fd-passing,
660 AC_HELP_STRING([--enable-fd-passing], [use FD passing if supported]),
661 use_descriptor_passing=$enableval)
663 if test "$supports_descriptor_passing" != "yes"; then
664 use_descriptor_passing=no
667 if test "$use_descriptor_passing" = "yes"; then
668 AC_DEFINE(USE_DESCRIPTOR_PASSING,1,
669 [Defined if descriptor passing is enabled and supported])
672 AM_CONDITIONAL(USE_DESCRIPTOR_PASSING, test "$use_descriptor_passing" = "yes")
674 # Assuan check for the getsockopt SO_PEERCRED
675 AC_MSG_CHECKING(for SO_PEERCRED)
676 AC_CACHE_VAL(assuan_cv_sys_so_peercred,
677 [AC_TRY_COMPILE([#include <sys/socket.h>],
680 getsockopt (1, SOL_SOCKET, SO_PEERCRED, &cr, &cl);],
681 assuan_cv_sys_so_peercred=yes,
682 assuan_cv_sys_so_peercred=no)
684 AC_MSG_RESULT($assuan_cv_sys_so_peercred)
685 if test $assuan_cv_sys_so_peercred = yes; then
686 AC_DEFINE(HAVE_SO_PEERCRED, 1,
687 [Defined if SO_PEERCRED is supported (Linux specific)])
690 if test "$have_w32_system" = yes; then
691 NETLIBS="-lws2_32 $NETLIBS"
694 # End of assuan checks.
696 AM_CONDITIONAL(BUILD_COMPLUS, test "$component_system" = "COM+")
698 # Generate values for the DLL version info
699 if test "$have_w32_system" = yes; then
700 BUILD_TIMESTAMP=`date --iso-8601=minutes`
702 BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./;s/\./,/g'`
704 BUILD_FILEVERSION="${BUILD_FILEVERSION}${BUILD_REVISION}"
706 AC_SUBST(BUILD_REVISION)
707 AC_SUBST(BUILD_TIMESTAMP)
708 AC_SUBST(BUILD_FILEVERSION)
710 # Add a few constants to help porting to W32
711 AH_VERBATIM([SEPCONSTANTS],
713 /* Separators as used in $PATH. */
714 #ifdef HAVE_DOSISH_SYSTEM
715 #define PATHSEP_C ';'
717 #define PATHSEP_C ':'
722 /* Definition of GCC specific attributes. */
724 # define GPGME_GCC_A_PURE __attribute__ ((__pure__))
726 # define GPGME_GCC_A_PURE
731 # Substitution used for gpgme-config
732 GPGME_CONFIG_LIBS="-lgpgme"
733 GPGME_CONFIG_CFLAGS=""
734 AC_SUBST(GPGME_CONFIG_API_VERSION)
735 AC_SUBST(GPGME_CONFIG_LIBS)
736 AC_SUBST(GPGME_CONFIG_CFLAGS)
739 LTLIBOBJS=`echo "$LIB@&t@OBJS" |
740 sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'`
744 # Create config files
746 AC_CONFIG_FILES(Makefile assuan/Makefile src/Makefile
750 tests/opassuan/Makefile
751 doc/Makefile complus/Makefile
754 AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config)
755 AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd])
759 GPGME v${VERSION} has been configured as follows:
762 GnuPG version: $GPG_VERSION, min. $NEED_GPG_VERSION
765 GpgSM version: $GPGSM_VERSION, min. $NEED_GPGSM_VERSION
767 GpgConf path: $GPGCONF
768 GpgConf version: $GPGCONF_VERSION, min. $NEED_GPGCONF_VERSION
770 GPGME Pthread: $have_pthread