/[pcsclite]/tags/ccid/rel-1.3.3/configure.in
ViewVC logotype

Contents of /tags/ccid/rel-1.3.3/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 876 - (show annotations) (download)
Mon May 17 14:32:56 2004 UTC (9 years ago) by rousseau
Original Path: trunk/Drivers/ccid/configure.in
File size: 5658 byte(s)
check for pcsclite.h and ifdhandler.h installed by recent pcsc-lite
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 AC_CHECK_PROG([PKGCONFIG], [pkg-config], [yes])
34
35 dnl Add libtool support.
36 AM_PROG_LIBTOOL
37
38 dnl Automatically update the libtool script if it becomes out-of-date.
39 AC_SUBST(LIBTOOL_DEPS)
40
41 dnl Checks for header files.
42 AC_HEADER_STDC
43 AC_CHECK_HEADERS(errno.h fcntl.h stdlib.h unistd.h termios.h string.h errno.h sys/time.h sys/types.h stdarg.h,,
44 [AC_MSG_WARN([some header files not found])])
45
46 AC_CHECK_HEADERS(pcsclite.h,,
47 [AC_MSG_ERROR([pcsclite.h not found, install pcsc-lite])])
48
49 AC_CHECK_HEADERS(ifdhandler.h,,
50 [AC_MSG_ERROR([ifdhandler.h not found, install pcsc-lite 1.2.9-beta3 or later])],
51 [ #include <pcsclite.h> ])
52
53
54 dnl Checks for typedefs, structures, and compiler characteristics.
55 AC_C_CONST
56 AC_TYPE_SIZE_T
57 AC_HEADER_TIME
58
59 dnl Checks for library functions.
60 AC_CHECK_FUNCS(select strerror strncpy memcpy)
61
62 dnl Select OS specific versions of source files.
63 AC_SUBST(BUNDLE_HOST)
64 AC_SUBST(DYN_LIB_EXT)
65 case "$host" in
66 *-*-darwin*)
67 BUNDLE_HOST="MacOS"
68 DYN_LIB_EXT="dylib"
69 AM_CONDITIONAL(NEED_PARSER, true)
70
71 AC_SUBST(COREFOUNDATION)
72 COREFOUNDATION="-Wl,-framework,CoreFoundation"
73
74 AC_SUBST(IOKIT)
75 IOKIT="-Wl,-framework,IOKit"
76 if test "$GCC" = "yes"; then
77 CFLAGS="$CFLAGS -no-cpp-precomp"
78 fi
79 ;;
80 *)
81 BUNDLE_HOST="Linux"
82 DYN_LIB_EXT="so"
83 AM_CONDITIONAL(NEED_PARSER, false)
84 esac
85
86 CFLAGS="$CFLAGS -Wall -fno-common"
87
88 dnl --enable-libusb=PATH
89 AC_ARG_ENABLE(libusb,
90 AC_HELP_STRING([--enable-libusb=PATH],[libusb path (default /usr)]),
91 [
92 case ${enableval} in
93 "" | "yes" | "YES")
94 ;;
95 "no" | "NO")
96 use_libusb=false
97 ;;
98 *)
99 CPPFLAGS="$CPPFLAGS -I${enableval}/include"
100 LDFLAGS="$LDFLAGS -L${enableval}/lib"
101 ;;
102 esac
103 ]
104 )
105
106 dnl check if libusb is available
107 if test "${use_libusb}" != false ; then
108 AC_SUBST(LIBUSB)
109 AC_CHECK_HEADERS(usb.h, [],
110 [ AC_MSG_ERROR([usb.h not found, use --enable-libusb=PATH]) ])
111
112 ac_save_LIBS="$LIBS"
113 LIBS="$LIBS $COREFOUNDATION $IOKIT"
114 AC_CHECK_LIB(usb, usb_init, [LIBUSB="$LIBUSB -lusb"],
115 [ AC_MSG_ERROR([libusb not found]) ])
116 LIBS="$ac_save_LIBS"
117
118 ac_save_LIBS="$LIBS"
119 LIBS="$LIBS $COREFOUNDATION $IOKIT"
120 AC_CHECK_LIB(usb, usb_get_string_simple, [LIBUSB="$LIBUSB -lusb"],
121 [ AC_MSG_ERROR([your libusb is too old. install version 0.1.7 or above]) ])
122 LIBS="$ac_save_LIBS"
123 fi
124
125 dnl check shat to use for dlopen
126 AC_SUBST(LIBDL)
127 AC_CHECK_LIB(dl, dlopen, [LIBDL="$LIBDL -ldl" ac_cv_func_dlopen_ldl=yes], ac_cv_func_dlopen_ldl=no)
128
129 dnl --enable-multi-thread
130 AC_ARG_ENABLE(multi-thread,
131 AC_HELP_STRING([--enable-multi-thread],[enable multi threading
132 (default=yes)]),
133 [ multithread="${enableval}" ], [ multithread=yes ] )
134
135 if test "${multithread}" != no ; then
136 ACX_PTHREAD(
137 [ AC_DEFINE(HAVE_PTHREAD, 1,
138 [Define if you have POSIX threads libraries and header files.])
139 ], [ AC_MSG_ERROR([POSIX thread support required]) ])
140 fi
141 AC_MSG_RESULT([multi threading : $multithread])
142
143 dnl --enable-bundle=NAME
144 AC_ARG_ENABLE(bundle,
145 AC_HELP_STRING([--enable-bundle=NAME],[bundle directory name
146 (default ifd-ccid.bundle)]),
147 [bundle="${enableval}"], [bundle=false])
148 if test "${bundle}" = false ; then
149 bundle="ifd-ccid.bundle"
150 fi
151 AC_MSG_RESULT([bundle directory name : $bundle])
152 AC_DEFINE_UNQUOTED(BUNDLE, "$bundle", [bundle directory name])
153
154 dnl --enable-usbdropdir=DIR
155 AC_ARG_ENABLE(usbdropdir,
156 AC_HELP_STRING([--enable-usbdropdir=DIR],[directory containing USB
157 drivers (default to pcscd config or $(prefix)/pcsc/drivers)]),
158 [usbdropdir="${enableval}"], [usbdropdir=false])
159 if test "${usbdropdir}" = false ; then
160 if test "$prefix" = NONE ; then
161 if test "$PKGCONFIG" = yes ; then
162 usbdropdir=`pkg-config libpcsclite --variable=usbdropdir`
163 else
164 usbdropdir=""
165 fi
166 if test -z "$usbdropdir" ; then
167 usbdropdir="$ac_default_prefix/pcsc/drivers"
168 fi
169 else
170 usbdropdir="$prefix/pcsc/drivers"
171 fi
172 fi
173 AC_MSG_RESULT([USB drop directory : $usbdropdir])
174 AC_DEFINE_UNQUOTED(PCSCLITE_HP_DROPDIR, "$usbdropdir", [directory containing USB drivers])
175
176 dnl --enable-ccidtwindir=DIR
177 AC_ARG_ENABLE(ccidtwindir,
178 AC_HELP_STRING([--enable-ccidtwindir=DIR],[directory to install the
179 serial Twin driver (default to pcscd config or $(prefix)/pcsc/drivers/serial)]),
180 [ccidtwindir="${enableval}"], [ccidtwindir=false])
181 if test "${ccidtwindir}" = false ; then
182 if test "$prefix" = NONE ; then
183 if test "$PKGCONFIG" = yes ; then
184 ccidtwindir=`pkg-config libpcsclite --variable=usbdropdir`
185 else
186 AC_MSG_RESULT([You should install pkg-config to get this configured automatically from pcsc-lite installation])
187 ccidtwindir=""
188 fi
189 if test -z "$ccidtwindir" ; then
190 ccidtwindir="$ac_default_prefix/pcsc/drivers"
191 fi
192 ccidtwindir="$ccidtwindir/serial"
193 else
194 ccidtwindir="$prefix/pcsc/drivers/serial"
195 fi
196 fi
197 AC_MSG_RESULT([serial twin install dir : $ccidtwindir])
198 AC_DEFINE_UNQUOTED(PCSCLITE_HP_DROPDIR, "$ccidtwindir", [directory containing USB drivers])
199
200
201 dnl Setup dist stuff
202 AC_SUBST(ac_aux_dir)
203 AC_SUBST(bundle)
204 AC_SUBST(usbdropdir)
205 AC_SUBST(ccidtwindir)
206
207 dnl Write Makefiles.
208 AC_CONFIG_FILES(Makefile aclocal/Makefile src/Makefile readers/Makefile)
209 AC_OUTPUT
210

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.5