/[pcsclite]/trunk/Drivers/ccid/configure.in
ViewVC logotype

Contents of /trunk/Drivers/ccid/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 764 - (show annotations) (download)
Mon Apr 5 09:56:52 2004 UTC (9 years, 1 month ago) by rousseau
File size: 6574 byte(s)
version 0.4.2
1 dnl Process this file with autoconf to produce a configure script.
2 dnl You may need to use autoconf 2.56 or newer
3
4 dnl $Id$
5
6 dnl Require autoconf 2.52
7 AC_PREREQ(2.52)
8
9 AC_INIT(ccid, 0.4.2)
10 AC_CONFIG_SRCDIR(src/ifdhandler.c)
11 AC_CONFIG_AUX_DIR(build)
12 AM_INIT_AUTOMAKE
13
14 dnl Default install dir
15 AC_PREFIX_DEFAULT(/usr/local)
16
17 dnl Automake boilerplate.
18 AC_CANONICAL_HOST
19
20 dnl create a config.h file (Automake will add -DHAVE_CONFIG_H)
21 AM_CONFIG_HEADER(config.h)
22
23 dnl Options
24 AM_MAINTAINER_MODE
25
26 dnl Checks for programs.
27 AC_PROG_CC
28 AC_PROG_CPP
29 AC_PROG_INSTALL
30 AC_PROG_MAKE_SET
31 AC_PROG_LN_S
32 AM_PROG_LEX
33
34 AC_CHECK_FUNCS(strerror)
35 AC_CHECK_FUNCS(strncpy)
36
37 AC_CHECK_HEADERS(errno.h)
38
39 dnl Add libtool support.
40 AM_PROG_LIBTOOL
41
42 dnl Automatically update the libtool script if it becomes out-of-date.
43 AC_SUBST(LIBTOOL_DEPS)
44
45 dnl Checks for header files.
46 AC_HEADER_STDC
47 AC_CHECK_HEADERS(fcntl.h stdlib.h unistd.h termios.h string.h errno.h sys/time.h sys/types.h stdarg.h)
48
49 dnl Checks for typedefs, structures, and compiler characteristics.
50 AC_C_CONST
51 AC_TYPE_SIZE_T
52 AC_HEADER_TIME
53
54 dnl Checks for library functions.
55 AC_CHECK_FUNCS(select strerror strncpy memcpy)
56
57 dnl Select OS specific versions of source files.
58 AC_SUBST(BUNDLE_HOST)
59 AC_SUBST(DYN_LIB_EXT)
60 case "$host" in
61 *-*-darwin*)
62 BUNDLE_HOST="MacOS"
63 DYN_LIB_EXT="dylib"
64 AM_CONDITIONAL(NEED_PARSER, true)
65
66 AC_SUBST(COREFOUNDATION)
67 COREFOUNDATION="-Wl,-framework,CoreFoundation"
68
69 AC_SUBST(IOKIT)
70 IOKIT="-Wl,-framework,IOKit"
71 if test "$GCC" = "yes"; then
72 CFLAGS="$CFLAGS -no-cpp-precomp"
73 fi
74 ;;
75 *)
76 BUNDLE_HOST="Linux"
77 DYN_LIB_EXT="so"
78 AM_CONDITIONAL(NEED_PARSER, false)
79 esac
80
81 CFLAGS="$CFLAGS -Wall -fno-common"
82
83 dnl --enable-libusb=PATH
84 AC_ARG_ENABLE(libusb,
85 AC_HELP_STRING([--enable-libusb=PATH],[libusb path (default /usr)]),
86 [
87 case ${enableval} in
88 "" | "yes" | "YES")
89 ;;
90 "no" | "NO")
91 use_libusb=false
92 ;;
93 *)
94 CPPFLAGS="$CPPFLAGS -I${enableval}/include"
95 LDFLAGS="$LDFLAGS -L${enableval}/lib"
96 ;;
97 esac
98 ]
99 )
100
101 dnl check if libusb is available
102 if test "${use_libusb}" != false ; then
103 AC_SUBST(LIBUSB)
104 AC_CHECK_HEADERS(usb.h, [],
105 [ AC_MSG_ERROR([usb.h not found, use --enable-libusb=PATH]) ])
106
107 ac_save_LIBS="$LIBS"
108 LIBS="$LIBS $COREFOUNDATION $IOKIT"
109 AC_CHECK_LIB(usb, usb_init, [LIBUSB="$LIBUSB -lusb"],
110 [ AC_MSG_ERROR([libusb not found]) ])
111 LIBS="$ac_save_LIBS"
112
113 ac_save_LIBS="$LIBS"
114 LIBS="$LIBS $COREFOUNDATION $IOKIT"
115 AC_CHECK_LIB(usb, usb_get_string_simple, [LIBUSB="$LIBUSB -lusb"],
116 [ AC_MSG_ERROR([your libusb is too old. install version 0.1.7 or above]) ])
117 LIBS="$ac_save_LIBS"
118 fi
119
120 dnl check shat to use for dlopen
121 AC_SUBST(LIBDL)
122 AC_CHECK_LIB(dl, dlopen, [LIBDL="$LIBDL -ldl" ac_cv_func_dlopen_ldl=yes], ac_cv_func_dlopen_ldl=no)
123
124 dnl --enable-multi-thread
125 AC_ARG_ENABLE(multi-thread,
126 AC_HELP_STRING([--enable-multi-thread],[enable multi threading
127 (default=yes)]),
128 [ multithread="${enableval}" ], [ multithread=yes ] )
129
130 if test "${multithread}" != no ; then
131 ACX_PTHREAD(
132 [ AC_DEFINE(HAVE_PTHREAD, 1,
133 [Define if you have POSIX threads libraries and header files.])
134 ], [ AC_MSG_ERROR([POSIX thread support required]) ])
135 fi
136 AC_MSG_RESULT([multi threading : $multithread])
137
138 dnl --enable-bundle=NAME
139 AC_ARG_ENABLE(bundle,
140 AC_HELP_STRING([--enable-bundle=NAME],[bundle directory name
141 (default ifd-ccid.bundle)]),
142 [bundle="${enableval}"], [bundle=false])
143 if test "${bundle}" = false ; then
144 bundle="ifd-ccid.bundle"
145 fi
146 AC_MSG_RESULT([bundle directory name : $bundle])
147 AC_DEFINE_UNQUOTED(BUNDLE, "$bundle", [bundle directory name])
148
149 dnl --enable-usbdropdir=DIR
150 AC_ARG_ENABLE(usbdropdir,
151 AC_HELP_STRING([--enable-usbdropdir=DIR],[directory containing USB
152 drivers (default $(prefix)/pcsc/drivers)]),
153 [usbdropdir="${enableval}"], [usbdropdir=false])
154 if test "${usbdropdir}" = false ; then
155 if test "$prefix" = NONE ; then
156 usbdropdir="$ac_default_prefix/pcsc/drivers"
157 else
158 usbdropdir="$prefix/pcsc/drivers"
159 fi
160 fi
161 AC_MSG_RESULT([USB drop directory : $usbdropdir])
162 AC_DEFINE_UNQUOTED(PCSCLITE_HP_DROPDIR, "$usbdropdir", [directory containing USB drivers])
163
164 dnl --enable-ccidtwindir=DIR
165 AC_ARG_ENABLE(ccidtwindir,
166 AC_HELP_STRING([--enable-ccidtwindir=DIR],[directory to install the
167 serial Twin driver (default $(prefix)/pcsc/drivers/serial)]),
168 [ccidtwindir="${enableval}"], [ccidtwindir=false])
169 if test "${ccidtwindir}" = false ; then
170 if test "$prefix" = NONE ; then
171 ccidtwindir="$ac_default_prefix/pcsc/drivers/serial"
172 else
173 ccidtwindir="$prefix/pcsc/drivers/serial"
174 fi
175 fi
176 AC_MSG_RESULT([serial twin install dir : $ccidtwindir])
177 AC_DEFINE_UNQUOTED(PCSCLITE_HP_DROPDIR, "$ccidtwindir", [directory containing USB drivers])
178
179
180 dnl --enable-debugcritical
181 AC_ARG_ENABLE(debugcritical,
182 AC_HELP_STRING([--enable-debugcritical],[print critical debug
183 messages (default yes)]), [ debugcritical="${enableval}" ],
184 [ debugcritical=yes ])
185 dnl yes by default
186 if test "${debugcritical}" != yes
187 then
188 AC_MSG_RESULT([critical debug messages : no])
189 else
190 AC_MSG_RESULT([critical debug messages : yes])
191 AC_DEFINE_UNQUOTED(DEBUG_LEVEL_CRITICAL, 1, [print critical debug messages])
192 fi
193
194 dnl --enable-debuginfo
195 AC_ARG_ENABLE(debuginfo,
196 AC_HELP_STRING([--enable-debuginfo],[print info debug messages
197 (default yes)]),
198 [ debuginfo="${enableval}" ], [ debuginfo=yes ])
199 dnl yes by default
200 if test "${debuginfo}" != yes
201 then
202 AC_MSG_RESULT([info debug messages : no])
203 else
204 AC_MSG_RESULT([info debug messages : yes])
205 AC_DEFINE_UNQUOTED(DEBUG_LEVEL_INFO, 1, [print info debug messages])
206 fi
207
208 dnl --enable-debugperiodic
209 AC_ARG_ENABLE(debugperiodic,
210 AC_HELP_STRING([--enable-debugperiodic],[print periodic debug
211 messages (default no)]),
212 [ debugperiodic="${enableval}" ], [ debugperiodic=no ])
213 dnl no by default
214 if test "${debugperiodic}" != no
215 then
216 AC_MSG_RESULT([periodic debug messages : yes])
217 AC_DEFINE_UNQUOTED(DEBUG_LEVEL_PERIODIC, 1, [print periodic debug messages])
218 else
219 AC_MSG_RESULT([periodic debug messages : no])
220 fi
221
222 dnl --enable-debugcomm
223 AC_ARG_ENABLE(debugcomm,
224 AC_HELP_STRING([--enable-debugcomm],[print comm debug messages
225 (default no)]),
226 [ debugcomm="${enableval}" ], [ debugcomm=no ])
227 dnl no by default
228 if test "${debugcomm}" != no
229 then
230 AC_MSG_RESULT([comm debug messages : yes])
231 AC_DEFINE_UNQUOTED(DEBUG_LEVEL_COMM, 1, [print comm debug messages])
232 else
233 AC_MSG_RESULT([comm debug messages : no])
234 fi
235
236 dnl Setup dist stuff
237 AC_SUBST(ac_aux_dir)
238 AC_SUBST(bundle)
239 AC_SUBST(usbdropdir)
240 AC_SUBST(ccidtwindir)
241
242 dnl Write Makefiles.
243 AC_CONFIG_FILES(Makefile aclocal/Makefile src/Makefile readers/Makefile)
244 AC_OUTPUT
245

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.5