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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
|
# Copyright (C) 2006-2007 International Business Machines Corp.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
AC_PREREQ([2.59])
AC_INIT([ecryptfs-utils],[29])
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE([${PACKAGE_NAME}], [${PACKAGE_VERSION}])
AC_CONFIG_SRCDIR([src/libecryptfs])
AM_CONFIG_HEADER([config.h])
LIBECRYPTFS_LT_CURRENT="0"
LIBECRYPTFS_LT_REVISION="0"
LIBECRYPTFS_LT_AGE="0"
AC_SUBST([LIBECRYPTFS_LT_CURRENT])
AC_SUBST([LIBECRYPTFS_LT_REVISION])
AC_SUBST([LIBECRYPTFS_LT_AGE])
AC_ARG_ENABLE(
[openssl],
[AC_HELP_STRING([--disable-openssl], [Build OpenSSL key module])],
,
[enable_openssl="detect"]
)
AC_ARG_ENABLE(
[pkcs11-helper],
[AC_HELP_STRING([--enable-pkcs11-helper], [Build pkcs11-helper key module])],
,
enable_pkcs11_helper="no"
)
AC_ARG_ENABLE(
[tspi],
[AC_HELP_STRING([--enable-tspi], [Build TrouSerS key module])],
,
[enable_tspi="no"]
)
AC_ARG_ENABLE(
[gpg],
[AC_HELP_STRING([--enable-gpg], [Build GnuPG key module])],
,
[enable_gpg="no"]
)
AC_ARG_ENABLE(
[pam],
[AC_HELP_STRING([--disable-pam], [Build PAM module])],
,
[enable_pam="yes"]
)
AC_ARG_ENABLE(
[gui],
[AC_HELP_STRING([--enable-gui], [Enable building of GUI components])],
,
[enable_gui="no"]
)
AC_ARG_ENABLE(
[docs],
[AC_HELP_STRING([--enable-docs], [Enable installing document])],
,
[enable_docs="no"]
)
AC_ARG_ENABLE(
[docs-gen],
[AC_HELP_STRING([--enable-docs-gen], [Enable generating documents])],
,
[enable_docs_gen="no"]
)
test "${enable_docs_gen}" = "yes" && enable_docs="yes"
AC_ARG_ENABLE(
[mudflap],
[AC_HELP_STRING([--enable-mudflap], [Build with -fmudflap gcc option])],
[
if "${enableval}" = "yes"; then
CFLAGS="$CFLAGS -fmudflap"
LDFLAGS="$LDFLAGS -lmudflap"
fi
]
)
AC_ARG_WITH(
[pamdir],
[AC_HELP_STRING([--with-pamdir=PATH], [Specify the directory where PAM modules are stored])],
[pamdir="${withval}"],
[
case $target in
*64* | *s390x)
if test "${prefix}" != "/usr" ; then
pamdir="\$(prefix)/lib64/security"
else
pamdir="/lib64/security"
fi
;;
*)
if test "${prefix}" != "/usr" ; then
pamdir="\$(prefix)/lib/security"
else
pamdir="/lib/security"
fi
;;
esac
]
)
AC_ARG_WITH(
[ecryptfskeymoddir],
[AC_HELP_STRING([--with-ecryptfskeymoddir=PATH], [Specify the directory where key modules are stored])],
[
ecryptfskeymoddir="${withval}"
full_ecryptfskeymoddir="${ecryptfskeymoddir}"
],
[
full_ecryptfskeymoddir=`eval eval eval eval eval echo "${libdir}/ecryptfs" | sed "s#NONE#${prefix}#" | sed "s#NONE#${ac_default_prefix}#"`
ecryptfskeymoddir="\$(libdir)/ecryptfs"
]
)
AC_DEFINE_UNQUOTED([ECRYPTFS_DEFAULT_KEY_MOD_DIR], ["$full_ecryptfskeymoddir"], "Location of key modules")
AC_PROG_CC
AC_MINIX
AC_PROG_LIBTOOL
AM_PROG_CC_C_O
PKG_PROG_PKG_CONFIG
AC_PATH_PROGS([POD2MAN], [pod2man])
test -z "${POD2MAN}" && AC_MSG_ERROR([I couldn't find pod2man; make sure it's installed and in your path])
AC_PATH_PROGS([TAR], [tar])
AC_PATH_PROGS([PS2PDF], [ps2pdf])
AC_PATH_PROGS([DVIPS], [dvips])
AC_PATH_PROGS([LATEX2HTML], [latex2html])
AC_PATH_PROGS([LATEX], [latex])
if test "${enable_docs_gen}" = "yes"; then
test -z "${TAR}" && AC_MSG_ERROR([Couldn't find tar])
test -z "${PS2PDF}" && AC_MSG_ERROR([Couldn't find ps2pdf])
test -z "${DVIPS}" && AC_MSG_ERROR([Couldn't find dvips])
test -z "${LATEX2HTML}" && AC_MSG_ERROR([Couldn't find latex2html])
test -z "${LATEX}" && AC_MSG_ERROR([Couldn't find latex])
fi
AC_ISC_POSIX
AC_STDC_HEADERS
AC_CHECK_LIB([dl], [dlopen])
# Verify gcrypt
AC_MSG_CHECKING([for libgcrypt])
AM_PATH_LIBGCRYPT(,,[AC_MSG_ERROR([eCryptfs userspace tools require libgcrypt
You might find the package at:
http://directory.fsf.org/security/libgcrypt.html
])]
)
# Verify keyutils version 1.0 or higher
if test -z "${KEYUTILS_LIBS}"; then
AC_ARG_VAR([KEYUTILS_CFLAGS], [C compiler flags for keyutils])
AC_ARG_VAR([KEYUTILS_LIBS], [linker flags for keyutils])
AC_CHECK_LIB(
[keyutils],
[keyctl_search],
[KEYUTILS_LIBS="-lkeyutils"],
[AC_MSG_ERROR([eCryptfs userspace tools require Keyutils version 1.0 or higher.
You might find the package at:
http://people.redhat.com/~dhowells/keyutils/
])
]
)
fi
if test -z "${OPENSSL_LIBS}"; then
PKG_CHECK_MODULES(
[OPENSSL],
[libcrypto >= 0.9.7],
[have_openssl="yes"],
[PKG_CHECK_MODULES(
[OPENSSL],
[openssl >= 0.9.7],
[have_openssl="yes"],
[AC_CHECK_LIB(
[crypto],
[RSA_version],
[
have_openssl="yes"
OPENSSL_LIBS="-lcrypto"
],
[have_openssl="no"]
)]
)]
)
else
have_openssl="yes"
fi
OLD_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} ${OPENSSL_CFLAGS}"
AC_CHECK_HEADER([openssl/rsa.h],, [have_openssl="no"])
CFLAGS="${OLD_CFLAGS}"
test "${enable_openssl}" = "detect" && enable_openssl="${have_openssl}"
if test "${enable_openssl}" = "yes" ; then
test "${have_openssl}" != "yes" && AC_MSG_ERROR([OpenSSL not found])
fi
if test "${enable_pkcs11_helper}" = "yes" ; then
test "${have_openssl}" != "yes" && AC_MSG_ERROR([OpenSSL not found])
PKG_CHECK_MODULES([PKCS11_HELPER], [libpkcs11-helper-1 >= 1.04],, [AC_MSG_ERROR([Cannot locate pkcs11-helper])])
fi
if test "${enable_tspi}" = "yes" ; then
if test -z "${TSPI_LIBS}"; then
AC_ARG_VAR([TSPI_CFLAGS], [C compiler flags for tspi])
AC_ARG_VAR([TSPI_LIBS], [linker flags for tspi])
AC_CHECK_LIB(
[tspi],
[Tspi_Context_Create],
[TSPI_LIBS="-ltspi"],
[AC_MSG_ERROR([Cannot find tspi])]
)
fi
fi
if test "${enable_gpg}" = "yes" ; then
if test -z "${GPGME_LIBS}"; then
AC_ARG_VAR([GPGME_CFLAGS], [C compiler flags for gpg])
AC_ARG_VAR([GPGME_LIBS], [linker flags for gpg])
AC_CHECK_LIB(
[gpgme],
[gpgme_new],
[GPGME_LIBS="-lgpgme"],
[AC_MSG_ERROR([Cannot find gpgme])]
)
fi
fi
if test "${enable_pam}" = "yes" ; then
if test -z "${PAM_LIBS}"; then
AC_ARG_VAR([PAM_CFLAGS], [C compiler flags for pam])
AC_ARG_VAR([PAM_LIBS], [linker flags for pam])
AC_CHECK_LIB(
[pam],
[pam_authenticate],
[PAM_LIBS="-lpam"],
[AC_MSG_ERROR([Cannot find pam])]
)
AC_CHECK_LIB(
[pam_misc],
[pam_misc_setenv],
[PAM_LIBS="${TSPI_LIBS} -lpam_misc"],
[AC_MSG_ERROR([Cannot find pam_misc])]
)
fi
fi
if test "${enable_gui}" = "yes"; then
PKG_CHECK_MODULES([GTK], [gtk+ >= 1.0],, AC_MSG_ERROR([Cannot locate gtk+]))
fi
pkgconfigdir="\$(libdir)/pkgconfig"
if test "${prefix}" = "/usr"; then
rootsbindir="/sbin"
else
rootsbindir="\$(sbindir)"
fi
CFLAGS="${CFLAGS} -D_GNU_SOURCE"
AC_SUBST([pamdir])
AC_SUBST([pamlibdir])
AC_SUBST([pkgconfigdir])
AC_SUBST([rootsbindir])
AC_SUBST([ecryptfskeymoddir])
AM_CONDITIONAL([BUILD_OPENSSL], [test "${enable_openssl}" = "yes"])
AM_CONDITIONAL([BUILD_PKCS11_HELPER], [test "${enable_pkcs11_helper}" = "yes"])
AM_CONDITIONAL([BUILD_TSPI], [test "${enable_tspi}" = "yes"])
AM_CONDITIONAL([BUILD_GPG], [test "${enable_gpg}" = "yes"])
AM_CONDITIONAL([BUILD_PAM], [test "${enable_pam}" = "yes"])
AM_CONDITIONAL([BUILD_GUI], [test "${enable_gui}" = "yes"])
AM_CONDITIONAL([BUILD_DOCS], [test "${enable_docs}" = "yes"])
AM_CONDITIONAL([BUILD_DOCS_GEN], [test "${enable_docs_gen}" = "yes"])
# workaround for <autoconf-2.60
if test -z "${docdir}"; then
docdir="\$(datarootdir)/doc/\$(PACKAGE_NAME)"
AC_SUBST([docdir])
fi
if test -z "${htmldir}"; then
htmldir="\$(docdir)"
AC_SUBST([htmldir])
fi
# end workaround
AC_CONFIG_FILES([
Makefile
doc/Makefile
doc/design_doc/Makefile
doc/beginners_guide/Makefile
src/Makefile
src/libecryptfs/Makefile
src/utils/Makefile
src/key_mod/Makefile
src/daemon/Makefile
src/include/Makefile
doc/manpage/Makefile
src/pam_ecryptfs/Makefile
src/libecryptfs/libecryptfs.pc
])
AC_OUTPUT
if test "${prefix}" != "/usr"; then
echo
echo "Warning: install prefix is $prefix"
echo
echo "Most mount applications expect the mount helper to install to"
echo "/sbin. You can install the mount helper to that location by "
echo "running the configure script again with --prefix=/usr:"
echo
echo "./configure --prefix=/usr"
echo
fi
|