aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
blob: c1fde710678ec3ab5baecf6f5e4557cf25fa1e72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# configure.in  for GPGME
# 
dnl (Process this file with autoconf to produce a configure script.)
AC_REVISION($Revision$)dnl

AC_INIT(gpgme/gpgme.h)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
#############################################
# Version numbers (Remember to change them just before a release)
# 1. No interfaces changed, only implementations (good): Increment REVISION.
# 2. Interfaces added, none removed (good): Increment CURRENT, increment
#    AGE, set REVISION to 0.
# 3. Interfaces removed (BAD, breaks upward compatibility): Increment
#    CURRENT, set AGE and REVISION to 0.
AM_INIT_AUTOMAKE(gpgme,0.1.0)
LIBGPGME_LT_CURRENT=0
LIBGPGME_LT_AGE=0
LIBGPGME_LT_REVISION=2
##############################################

AC_SUBST(LIBGPGME_LT_CURRENT)
AC_SUBST(LIBGPGME_LT_AGE)
AC_SUBST(LIBGPGME_LT_REVISION)


dnl
dnl Checks for programs
dnl
AC_ARG_PROGRAM

dnl Don't default to build static libs
AM_DISABLE_STATIC
AM_PROG_LIBTOOL

if test "$GCC" = yes; then
    CFLAGS="$CFLAGS -Wall -Wcast-align -Wshadow -Wstrict-prototypes"
fi

GPG=
case "${target}" in
    *-*-mingw32* | i?86-emx-os2 | i?86-*-os2*emx | i?86-*-msdosdjgpp* )
        # special stuff for Windoze NT
        # OS/2 with the EMX environment
        # DOS with the DJGPP environment
        AC_DEFINE(HAVE_DRIVE_LETTERS)
        AC_DEFINE(HAVE_DOSISH_SYSTEM)
        GPG='c:\\gnupg\\gpg.exe'
        ;;
    *)
       ;;
esac




dnl
dnl Checks for libraries
dnl

dnl
dnl Checks for header files
dnl


dnl
dnl Checks for typedefs and structures
dnl

dnl
dnl Checks for compiler features
dnl

dnl
dnl Checks for library functions
dnl
AC_CHECK_FUNCS(stpcpy)


dnl
dnl Checks for system services
dnl

if test -z "GPG"; then
  AC_PATH_PROG(GPG, gpg)
  if test -z "$GPG"; then
       AC_MSG_ERROR([[
***
*** GnuPG not found. Please install GnuPG first. 
*** See   http://www.gnupg.org/download.html
***
  ]])
  fi
fi
AC_DEFINE_UNQUOTED(GPG_PATH, "$GPG")


dnl
dnl Create config files 
dnl
dnl

dnl Make the version number in gpgme/gpgme.h the same as the one here.
dnl (this is easier than to have a *.in file just for one substitution)
GNUPG_FIX_HDR_VERSION(gpgme/gpgme.h, GPGME_VERSION)

dnl Substitution used for gpgme-config 
GPGME_LIBS="-L${libdir} -lgpgme"
GPGME_CFLAGS=""
AC_SUBST(GPGME_LIBS)
AC_SUBST(GPGME_CFLAGS)

AC_OUTPUT_COMMANDS([
chmod +x gpgme/gpgme-config
])

AC_OUTPUT([
Makefile
gpgme/Makefile
gpgme/gpgme-config
tests/Makefile
])