~ubuntu-branches/ubuntu/jaunty/pcsc-lite/jaunty-security

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Ludovic Rousseau
  • Date: 2004-06-13 21:45:56 UTC
  • mfrom: (1.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040613214556-zio7hrzkz9wwtffx
Tags: 1.2.9-beta2-2
* debian/rules: add -lpthread to LDFLAGS so that pthread_* symbols are
  included in the library (problem only seen on mips and mipsel).
  Closes: #253629
* debian/control: make libpcsclite-dev and libpcsclite1 at Priority:
  optional so that other packages at Priority: optional can use them.
  Closes: #249374

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
dnl -*- mode: m4; -*-
2
 
dnl Process this file with autoconf to produce a configure script.
3
 
 
4
 
dnl Autoconf boilerplate/
5
 
AC_INIT(src/winscard.h)
6
 
AC_CONFIG_AUX_DIR(build)
7
 
 
8
 
dnl Default install dir
9
 
AC_PREFIX_DEFAULT(/usr/local/pcsc)
10
 
 
11
 
dnl Automake boilerplate.
12
 
AC_CANONICAL_SYSTEM
13
 
AM_INIT_AUTOMAKE(pcsc-lite, 1.0.2.beta5)
 
2
dnl Process this file with autoconf to produce a configure script
 
3
 
 
4
# Require autoconf 2.52
 
5
AC_PREREQ(2.52)
 
6
 
 
7
AC_INIT(COPYING)
 
8
AM_INIT_AUTOMAKE(pcsc-lite, 1.2.9-beta2)
14
9
AM_CONFIG_HEADER(config.h)
15
10
 
16
 
dnl Options.
17
 
#AC_DISABLE_FAST_INSTALL
18
 
#AC_DISABLE_SHARED
 
11
AC_CONFIG_SRCDIR(src/pcscdaemon.c)
 
12
 
 
13
AC_PREFIX_DEFAULT(/usr/local)
 
14
 
 
15
AC_CANONICAL_HOST
 
16
AC_PROG_CC
 
17
AC_C_BIGENDIAN
 
18
 
 
19
dnl Check for some target-specific stuff
 
20
case "$host" in
 
21
*-*-hpux*)
 
22
        CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE_EXTENDED"
 
23
        ;;
 
24
*-*-solaris*)
 
25
        CPPFLAGS="$CPPFLAGS -I/usr/local/include"
 
26
        LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib"
 
27
        need_dash_r=1
 
28
        ;;
 
29
*-*-sunos4*)
 
30
        CPPFLAGS="$CPPFLAGS -DSUNOS4"
 
31
        ;;
 
32
*-*-aix*)
 
33
        CPPFLAGS="$CPPFLAGS -I/usr/local/include"
 
34
        LDFLAGS="$LDFLAGS -L/usr/local/lib"
 
35
        if (test "$LD" != "gcc" && test -z "$blibpath"); then
 
36
                blibpath="/usr/lib:/lib:/usr/local/lib"
 
37
        fi
 
38
        ;;
 
39
*-*-osf*)
 
40
        CPPFLAGS="$CPPFLAGS -D_POSIX_PII_SOCKET"
 
41
        ;;
 
42
*-*-darwin*)
 
43
        AC_SUBST(COREFOUNDATION)
 
44
        COREFOUNDATION="-Wl,-framework,CoreFoundation"
 
45
        AC_SUBST(IOKIT)
 
46
        IOKIT="-Wl,-framework,IOKit"
 
47
        if test "$GCC" = "yes"; then
 
48
                CFLAGS="$CFLAGS -no-cpp-precomp"
 
49
        fi
 
50
        ;;
 
51
esac
 
52
 
 
53
dnl Options
19
54
AM_MAINTAINER_MODE
20
55
 
21
 
dnl Select OS specific versions of source files.
22
 
case "${build_os}" in
23
 
 linux-gnu)     arch=linux ;;
24
 
 *bsd*)         arch=bsd ;;
25
 
 *darwin*)      arch=darwin ;;
26
 
 *solaris*)     arch=solaris ;;
27
 
 *hpux*)        arch=hpux ;;
28
 
 *) AC_MSG_ERROR([Operating system ${build_os} not supported]) ;;
29
 
esac
30
 
 
31
 
AM_CONDITIONAL(PCSC_ARCH_LINUX, test x$arch = xlinux)
32
 
AM_CONDITIONAL(PCSC_ARCH_BSD, test x$arch = xbsd)
33
 
AM_CONDITIONAL(PCSC_ARCH_OSX, test x$arch = xdarwin)
34
 
AM_CONDITIONAL(PCSC_ARCH_SOLARIS, test x$arch = xsolaris)
35
 
AM_CONDITIONAL(PCSC_ARCH_HPUX, test x$arch = xhpux)
36
 
 
37
 
if test x$arch = xlinux ; then
38
 
  AC_DEFINE(PCSC_TARGET_LINUX, 1, [Linux])
39
 
fi
40
 
 
41
 
if test x$arch = xbsd ; then
42
 
  AC_DEFINE(PCSC_TARGET_BSD, 1, [BSD])
43
 
fi
44
 
 
45
 
if test x$arch = xdarwin ; then
46
 
  AC_DEFINE(PCSC_TARGET_OSX, 1, [OSX])
47
 
fi
48
 
 
49
 
if test x$arch = xsolaris ; then
50
 
  AC_DEFINE(PCSC_TARGET_SOLARIS, 1, [Solaris])
51
 
fi
52
 
 
53
 
if test x$arch = xhpux ; then
54
 
  AC_DEFINE(PCSC_TARGET_HPUX, 1, [HP-UX])
55
 
fi
56
 
 
57
 
 
58
 
dnl Checks for programs.
59
 
AC_PROG_CC
 
56
dnl Checks for programs
60
57
AC_PROG_CPP
61
58
AC_PROG_INSTALL
 
59
AC_PROG_LN_S
62
60
AC_PROG_MAKE_SET
63
 
AC_PROG_LN_S
64
61
AM_PROG_LEX
 
62
AC_PATH_PROG(TEST_MINUS_S_SH, bash)
 
63
AC_PATH_PROG(TEST_MINUS_S_SH, ksh)
 
64
AC_PATH_PROG(TEST_MINUS_S_SH, sh)
65
65
 
66
 
dnl Special check for pthread support.
 
66
dnl Special check for pthread support
67
67
ACX_PTHREAD(
68
68
[
69
 
 AC_DEFINE(HAVE_PTHREAD,1,
 
69
 AC_DEFINE(HAVE_PTHREAD, 1,
70
70
  [Define if you have POSIX threads libraries and header files.])
71
71
], [
72
72
 AC_MSG_ERROR([POSIX thread support required])
73
73
])
74
74
 
75
 
LIBS="$PTHREAD_LIBS $LIBS"
76
 
CFLAGS="$CFLAGS -Wall -fno-common $PTHREAD_CFLAGS"
77
 
CC="$PTHREAD_CC"
78
 
 
79
 
AC_CHECK_FUNCS(daemon)
80
 
 
81
 
 
82
 
dnl Add libtool support.
83
 
AM_PROG_LIBTOOL
84
 
dnl Automatically update the libtool script if it becomes out-of-date.
85
 
AC_SUBST(LIBTOOL_DEPS)
86
 
 
87
 
dnl Checks for header files.
88
 
#AC_HEADER_STDC
89
 
#AC_HEADER_SYS_WAIT
90
 
#AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h)
91
 
 
92
 
dnl Checks for typedefs, structures, and compiler characteristics.
93
 
#AC_C_CONST
94
 
#AC_HEADER_TIME
95
 
 
96
 
dnl Checks for library functions.
97
 
#AC_FUNC_MMAP
98
 
#AC_TYPE_SIGNAL
99
 
#AC_CHECK_FUNCS(gettimeofday strdup strtoul)
100
 
 
101
 
 
102
 
dnl Setup dist stuff
103
 
AC_SUBST(ac_aux_dir)
104
 
 
105
 
 
106
 
dnl --enable-usb option.
107
 
AC_ARG_ENABLE(usb,
108
 
[  --enable-usb            enable USB hotplug support (Linux only)],
109
 
[ case "${enableval}" in
110
 
  yes)
111
 
   case "${build_os}" in
112
 
    linux-gnu)  usb=true ;;
113
 
    *) AC_MSG_WARN([USB hotplug support only available on Linux])
114
 
                usb=false
115
 
     ;;
116
 
   esac
117
 
   ;;
118
 
  no)   usb=false ;;
119
 
  *) AC_MSG_ERROR([bad value ${enableval} for --enable-usb]) ;;
120
 
 esac], [usb=false])
121
 
 
122
 
AC_MSG_RESULT([enable linux usb capability: $usb])
123
 
 
124
 
AM_CONDITIONAL(PCSC_LINUX_USB, test x$usb = xtrue)
125
 
 
 
75
dnl --enable-threadsafe
126
76
AC_ARG_ENABLE(threadsafe,
127
 
[  --enable-threadsafe     enable client side thread safety.],
 
77
  AC_HELP_STRING([--enable-threadsafe],[enable client side thread safety]),
128
78
[case "${enableval}" in
129
79
  yes)  threadsafe=true ;;
130
80
  no)   threadsafe=false ;;
131
81
  *) AC_MSG_ERROR([bad value ${enableval} for --enable-threadsafe]) ;;
132
 
 esac], [threadsafe=false])
133
 
 
134
 
AC_MSG_RESULT([enable threadsafe client   : $threadsafe])
135
 
 
136
 
AM_CONDITIONAL(PCSC_THR_SAFE, test x$threadsafe = xtrue)
137
 
 
 
82
 esac], [threadsafe=true])
 
83
 
 
84
if test x${threadsafe} = xtrue ; then
 
85
  LIBS="$PTHREAD_LIBS $LIBS"
 
86
  CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 
87
  CC="$PTHREAD_CC"
 
88
fi
 
89
AC_SUBST(PTHREAD_LIBS)
 
90
AC_SUBST(PTHREAD_CFLAGS)
 
91
 
 
92
dnl Add libtool support
 
93
AM_PROG_LIBTOOL
 
94
dnl Automatically update the libtool script if it becomes out-of-date
 
95
#AC_SUBST(LIBTOOL_DEPS)
 
96
 
 
97
dnl Checks for header files
 
98
AC_HEADER_STDC
 
99
AC_HEADER_SYS_WAIT
 
100
AC_CHECK_HEADERS([dirent.h dl.h dlfcn.h errno.h fcntl.h getopt.h malloc.h stdlib.h string.h strings.h sys/filio.h sys/time.h syslog.h unistd.h smartcard/scf.h])
 
101
 
 
102
dnl Checks for typedefs, structures, and compiler characteristics
 
103
AC_C_CONST
 
104
AC_TYPE_UID_T
 
105
AC_TYPE_SIZE_T
 
106
AC_HEADER_TIME
 
107
 
 
108
dnl Checks for library functions
 
109
AC_FUNC_ERROR_AT_LINE
 
110
AC_FUNC_STAT
 
111
AC_FUNC_VPRINTF
 
112
AC_CHECK_FUNCS(daemon flock getopt_long nanosleep strerror strncpy vsnprintf)
 
113
 
 
114
dnl C Compiler features
 
115
AC_C_INLINE
 
116
if test "$GCC" = "yes"; then
 
117
        CFLAGS="-Wall -fno-common $CFLAGS"
 
118
fi
 
119
 
 
120
AC_SUBST(LIBDL)
 
121
AC_CHECK_LIB(dl, dlopen, [LIBDL="$LIBDL -ldl" ac_cv_func_dlopen_ldl=yes], ac_cv_func_dlopen_ldl=no)
 
122
 
 
123
dnl Use 'uname' output as an architecture define
 
124
uname=`uname`
 
125
case "$uname" in
 
126
Darwin)
 
127
        uname=MacOS
 
128
        ;;
 
129
esac
 
130
AC_DEFINE_UNQUOTED(PCSC_ARCH, "$uname", [PC/SC target architecture])
 
131
 
 
132
dnl See if socket() is found from libsocket
 
133
AC_CHECK_LIB(socket, socket, [LIBS="$LIBS -lsocket"])
 
134
 
 
135
dnl Probe for a proper flex library
 
136
AC_SUBST(LIBFL)
 
137
AC_CHECK_LIB(l, yywrap, [LIBFL="$LIBFL -ll"], AC_CHECK_LIB(fl, yywrap, [LIBFL="$LIBFL -lfl"]))
 
138
 
 
139
AC_SUBST(LIBUSB)
 
140
dnl --enable-libusb=DIR
 
141
AC_ARG_ENABLE(libusb,
 
142
  AC_HELP_STRING([--enable-libusb=PATH],[enable USB hotplug using libusb]),
 
143
        [
 
144
                case ${enableval} in
 
145
                        "" | "yes" | "YES")
 
146
                                ;;
 
147
                        "no" | "NO")
 
148
                                use_libusb=false
 
149
                                ;;
 
150
                        *)
 
151
                                use_libusb=false
 
152
                                libusb_prefix=${enableval}
 
153
                                AC_CHECK_LIB(usb, usb_init, [LIBUSB="$LIBUSB -lusb" use_libusb=true ], [ use_libusb=false ], "-L${libusb_prefix}/lib")
 
154
                                AC_CHECK_HEADERS(${libusb_prefix}/include/usb.h, [ use_libusb=true ], [ use_libusb=false ])
 
155
                                if test x$use_libusb = xtrue; then
 
156
                                        CPPFLAGS="$CPPFLAGS -I${libusb_prefix}/include"
 
157
                                        LDFLAGS="$LDFLAGS -L${libusb_prefix}/lib"
 
158
                                fi
 
159
                                ;;
 
160
                esac
 
161
        ]
 
162
)
 
163
 
 
164
dnl if use_libusb is not yet defined
 
165
if test x$use_libusb = x; then
 
166
        dnl check if libusb is available
 
167
        AC_CHECK_HEADERS(usb.h, [ use_libusb=true ], [ use_libusb=false ])
 
168
        AC_CHECK_LIB(usb, usb_init, [LIBUSB="$LIBUSB -lusb" use_libusb=true ], [ use_libusb=false ])
 
169
fi
 
170
 
 
171
AC_MSG_RESULT([enable libusb support         : $use_libusb])
 
172
 
 
173
AM_CONDITIONAL(PCSC_USE_LIBUSB, test x$use_libusb = xtrue)
 
174
if test x$use_libusb = xtrue; then
 
175
  AC_DEFINE(HAVE_LIBUSB,1, [Libusb is available])
 
176
fi
 
177
 
 
178
dnl --enable-usbdropdir=DIR
 
179
AC_ARG_ENABLE(usbdropdir,
 
180
  AC_HELP_STRING([--enable-usbdropdir=DIR],[directory containing USB
 
181
                                  drivers (default /usr/local/pcsc/drivers)]),
 
182
[usbdropdir="${enableval}"], [usbdropdir=false])
 
183
if test x${usbdropdir} = xfalse ; then
 
184
        usbdropdir="/usr/local/pcsc/drivers"
 
185
fi
 
186
AC_MSG_RESULT([enable USB drop directory     : $usbdropdir])
 
187
AC_DEFINE_UNQUOTED(PCSCLITE_HP_DROPDIR, "$usbdropdir", [directory containing USB drivers])
138
188
 
139
189
AC_ARG_ENABLE(debug,
140
 
[  --enable-debug          enable debug messages from pcscd.],
 
190
  AC_HELP_STRING([--enable-debug],[enable debug messages from pcscd]),
141
191
[ case "${enableval}" in
142
192
  yes)  
143
193
    debug=true ;;
144
194
  no)   
145
195
    debug=false ;;
146
196
  *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
147
 
 esac], [debug=false])
 
197
 esac], [debug=true])
148
198
 
149
 
AC_MSG_RESULT([enable debug messages      : $debug])
 
199
AC_MSG_RESULT([enable debug messages         : $debug])
150
200
 
151
201
if test x${debug} = xtrue ; then
152
202
  AC_DEFINE(PCSC_DEBUG, 1, [enable full PCSC debug messaging.])
 
203
  AC_DEFINE(MSC_DEBUG, 1, [enable full MuscleCard debug messaging.])
153
204
fi
154
205
 
155
 
 
 
206
dnl --enable-debugatr
156
207
AC_ARG_ENABLE(debugatr,
157
 
[  --enable-debugatr       enable ATR debug messages from pcscd.],
 
208
  AC_HELP_STRING([--enable-debugatr],[enable ATR debug messages from pcscd]),
158
209
[ case "${enableval}" in
159
210
  yes)  debugatr=true ;;
160
211
  no)   debugatr=false ;;
161
212
  *) AC_MSG_ERROR([bad value ${enableval} for --enable-debugatr]) ;;
162
213
esac], [debugatr=false])
163
214
 
164
 
AC_MSG_RESULT([enable ATR parsing messages: $debugatr])
 
215
AC_MSG_RESULT([enable ATR parsing messages   : $debugatr])
165
216
 
166
217
if test x${debugatr} = xtrue ; then
167
218
  AC_DEFINE(ATR_DEBUG, 1, [display ATR parsing debug messages.])
168
219
fi
169
220
 
170
 
AC_ARG_ENABLE(syslog,
171
 
[  --enable-syslog         send messages to syslog instead of stdout.],
172
 
[case "${enableval}" in
173
 
  yes)  syslog=true ;;
174
 
  no)   syslog=false ;;
175
 
  *) AC_MSG_ERROR([bad value ${enableval} for --enable-syslog]) ;;
176
 
 esac], [syslog=false])
177
 
 
178
 
AC_MSG_RESULT([enable debug out to syslog : $syslog])
179
 
 
180
 
if test x${syslog} = xtrue ; then
181
 
  AC_DEFINE(USE_SYSLOG, 1, [send messages to syslog instead of stdout])
182
 
fi
183
 
 
184
 
 
185
 
AC_ARG_ENABLE(daemon,
186
 
[  --enable-daemon         pcscd runs as a true daemon.],
187
 
[case "${enableval}" in
188
 
  yes)  daemon=true ;;
189
 
  no)   daemon=false ;;
190
 
  *) AC_MSG_ERROR([bad value ${enableval} for --enable-daemon]) ;;
191
 
 esac], [daemon=false])
192
 
 
193
 
AC_MSG_RESULT([enable pcscd forked daemon : $daemon])
194
 
 
195
 
if test x${daemon} = xtrue ; then
196
 
  AC_DEFINE(USE_DAEMON, 1, [pcsc runs as a daemon in the background.])
197
 
fi
198
 
 
199
 
 
 
221
dnl --enable-scf
 
222
AC_ARG_ENABLE(scf,
 
223
  AC_HELP_STRING([--enable-scf],[use SCF for reader support]),
 
224
[ case "${enableval}" in
 
225
  yes)  scf=true ;;
 
226
  no)   scf=false ;;
 
227
  *) AC_MSG_ERROR([bad value ${enableval} for --enable-scf]) ;;
 
228
esac], [scf=false])
 
229
 
 
230
AC_SUBST(LIBSMARTCARD)
 
231
if test x$scf = xtrue -a x$ac_cv_header_smartcard_scf_h = xyes; then
 
232
  AC_CHECK_LIB(smartcard, SCF_strerror, [LIBSMARTCARD="$LIBSMARTCARD -lsmartcard" scf=true], scf=false)
 
233
else
 
234
  scf=false
 
235
fi
 
236
AC_MSG_RESULT([enable SCF reader support     : $scf])
 
237
AM_CONDITIONAL(HAVE_SCF, test x$scf = xtrue)
 
238
 
 
239
dnl --disable-musclecard
 
240
AC_ARG_ENABLE(musclecard,
 
241
  AC_HELP_STRING([--disable-musclecard],[MuscleCard framework disabled]),
 
242
[case "${enableval}" in
 
243
  yes)  musclecard=true ;;
 
244
  no)   musclecard=false ;;
 
245
  *) AC_MSG_ERROR([bad value ${enableval} for --disable-musclecard]) ;;
 
246
 esac], [musclecard=true])
 
247
 
 
248
AC_MSG_RESULT([enable MuscleCard             : $musclecard])
 
249
 
 
250
AM_CONDITIONAL(HAVE_MUSCLECARD, test x$musclecard = xtrue)
 
251
 
 
252
dnl --enable-muscledropdir=DIR
 
253
AC_ARG_ENABLE(muscledropdir,
 
254
  AC_HELP_STRING([--enable-muscledropdir=DIR],[directory containing
 
255
                                  MuscleCard bundles (default /usr/local/pcsc/services)]),
 
256
[muscledropdir="${enableval}"], [muscledropdir=false])
 
257
if test x${muscledropdir} = xfalse ; then
 
258
        muscledropdir="/usr/local/pcsc/services"
 
259
fi
 
260
AC_MSG_RESULT([enable MuscleCard bundles dir : $muscledropdir])
 
261
AC_DEFINE_UNQUOTED(MSC_SVC_DROPDIR, "$muscledropdir", [directory containing MuscleCard bundles])
 
262
 
 
263
dnl --enable-confdir=DIR
200
264
AC_ARG_ENABLE(confdir,
201
 
[  --enable-confdir=DIR    directory containing reader.conf (default /etc)],
 
265
AC_HELP_STRING([--enable-confdir=DIR],[directory containing reader.conf
 
266
                                (default /etc)]),
202
267
[confdir="${enableval}"], [confdir=false])
203
268
 
204
269
if test x${confdir} != xfalse ; then
205
 
        AC_MSG_RESULT([enable confdir             : $confdir])
 
270
        AC_MSG_RESULT([enable confdir                : $confdir])
206
271
 
207
272
        AC_DEFINE_UNQUOTED(USE_READER_CONF, "$confdir", [directory containing reader.conf (default /etc)])
208
273
else
209
 
        AC_MSG_RESULT([enable confdir             : /etc (default)])
 
274
        confdir="/etc"
 
275
        AC_MSG_RESULT([enable confdir                : /etc (default)])
210
276
fi
211
277
 
212
 
 
 
278
dnl --enable-runpid=FILE
213
279
AC_ARG_ENABLE(runpid,
214
 
[  --enable-runpid=FILE    file containing pcscd pid],
 
280
  AC_HELP_STRING([--enable-runpid=FILE],[file containing pcscd pid]),
215
281
[runpid="${enableval}"], [runpid=false])
216
282
 
217
 
AC_MSG_RESULT([enable runpid              : $runpid])
 
283
AC_MSG_RESULT([enable runpid                 : $runpid])
218
284
 
219
285
if test x${runpid} != xfalse ; then
220
286
        AC_DEFINE_UNQUOTED(USE_RUN_PID, "$runpid", [file containing pcscd pid])
221
287
fi
222
288
 
223
 
 
 
289
dnl --enable-ipcdir=DIR
 
290
AC_ARG_ENABLE(ipcdir,
 
291
  AC_HELP_STRING([--enable-ipcdir=DIR],[directory containing IPC files
 
292
                                  (default /var/run)]),
 
293
[ipcdir="${enableval}"], [ipcdir=false])
 
294
 
 
295
if test x${ipcdir} != xfalse ; then
 
296
        AC_MSG_RESULT([enable ipcdir                 : $ipcdir])
 
297
 
 
298
        AC_DEFINE_UNQUOTED(USE_IPCDIR, "$ipcdir", [directory containing IPC files (default /var/run)])
 
299
else
 
300
        AC_MSG_RESULT([enable ipcdir                 : /var/run (default)])
 
301
fi
 
302
 
 
303
AC_MSG_RESULT([enable threadsafe client      : $threadsafe])
 
304
AM_CONDITIONAL(PCSC_THR_SAFE, test x$threadsafe = xtrue)
 
305
 
 
306
dnl --enable-extendedapdu
 
307
AC_ARG_ENABLE(extendedapdu,
 
308
        AC_HELP_STRING([--enable-extendedapdu], [support of extended APDU (for APDU  256B < size < 32KB)]),
 
309
        [ case "${enableval}" in
 
310
                yes) extendedapdu=true ;;
 
311
                no) extendedapdu=false ;;
 
312
                *) AC_MSG_ERROR([bad value ${enableval} for --enable-extendedapdu]) ;;
 
313
        esac], [extendedapdu=false])
 
314
 
 
315
AC_MSG_RESULT([enable extended APDU          : $extendedapdu])
 
316
 
 
317
if test x${extendedapdu} = xtrue ; then
 
318
  extended_apdu="#define PCSCLITE_ENHANCED_MESSAGING"
 
319
else
 
320
  extended_apdu="#undef PCSCLITE_ENHANCED_MESSAGING"
 
321
fi
 
322
 
 
323
dnl warning about pthread
224
324
if test x${threadsafe} = xtrue ; then
225
325
  AC_MSG_RESULT([NOTE :: You must link pthread libraries with your app.])
226
326
  AC_DEFINE(USE_THREAD_SAFETY, 1, [enable client side thread safety.])
227
327
fi
228
328
 
229
 
dnl Write Makefiles.
230
 
AC_OUTPUT(Makefile src/Makefile src/utils/Makefile etc/Makefile doc/Makefile)
231
 
 
 
329
CPPFLAGS="-I\${top_srcdir}/src $CPPFLAGS"
 
330
 
 
331
dnl Setup dist stuff
 
332
AC_SUBST(muscledropdir)
 
333
AC_SUBST(usbdropdir)
 
334
AC_SUBST(confdir)
 
335
AC_SUBST(runpid)
 
336
AC_SUBST(extended_apdu)
 
337
 
 
338
dnl Write Makefiles
 
339
AC_OUTPUT([
 
340
Makefile
 
341
aclocal/Makefile
 
342
doc/Makefile
 
343
doc/bundleTool.8
 
344
doc/pcscd.8
 
345
doc/reader.conf.5
 
346
doc/example/Makefile
 
347
etc/Makefile
 
348
etc/reader.conf
 
349
src/Makefile
 
350
src/libmusclecard.pc
 
351
src/libpcsclite.pc
 
352
src/pcsclite.h
 
353
src/utils/Makefile
 
354
win32/Makefile
 
355
])