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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 971 - (hide annotations) (download)
Wed Jun 23 13:27:17 2004 UTC (8 years, 10 months ago) by rousseau
File size: 5864 byte(s)
check for the presence of PCSC/ifdhandler.h instead of ifdhandler.h
1 rousseau 402 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 rousseau 764 AC_INIT(ccid, 0.4.2)
10 rousseau 402 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 rousseau 448 AC_PROG_CPP
29 rousseau 402 AC_PROG_INSTALL
30     AC_PROG_MAKE_SET
31     AC_PROG_LN_S
32     AM_PROG_LEX
33 rousseau 872 AC_CHECK_PROG([PKGCONFIG], [pkg-config], [yes])
34 rousseau 402
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 rousseau 876 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 rousseau 402
46 rousseau 971 AC_CHECK_HEADERS(PCSC/ifdhandler.h,,
47     [AC_MSG_ERROR([PCSC/ifdhandler.h not found, install pcsc-lite 1.2.9-beta3 or later])],
48     [ #include <PCSC/pcsclite.h> ])
49 rousseau 876
50    
51 rousseau 402 dnl Checks for typedefs, structures, and compiler characteristics.
52     AC_C_CONST
53     AC_TYPE_SIZE_T
54     AC_HEADER_TIME
55    
56     dnl Checks for library functions.
57     AC_CHECK_FUNCS(select strerror strncpy memcpy)
58    
59     dnl Select OS specific versions of source files.
60     AC_SUBST(BUNDLE_HOST)
61     AC_SUBST(DYN_LIB_EXT)
62     case "$host" in
63     *-*-darwin*)
64     BUNDLE_HOST="MacOS"
65     DYN_LIB_EXT="dylib"
66     AM_CONDITIONAL(NEED_PARSER, true)
67    
68     AC_SUBST(COREFOUNDATION)
69     COREFOUNDATION="-Wl,-framework,CoreFoundation"
70    
71     AC_SUBST(IOKIT)
72     IOKIT="-Wl,-framework,IOKit"
73     if test "$GCC" = "yes"; then
74     CFLAGS="$CFLAGS -no-cpp-precomp"
75     fi
76     ;;
77     *)
78     BUNDLE_HOST="Linux"
79     DYN_LIB_EXT="so"
80     AM_CONDITIONAL(NEED_PARSER, false)
81     esac
82    
83 rousseau 887 CFLAGS="$CFLAGS -Wall"
84 rousseau 402
85 rousseau 436 dnl --enable-libusb=PATH
86 rousseau 460 AC_ARG_ENABLE(libusb,
87     AC_HELP_STRING([--enable-libusb=PATH],[libusb path (default /usr)]),
88 rousseau 436 [
89     case ${enableval} in
90     "" | "yes" | "YES")
91     ;;
92     "no" | "NO")
93     use_libusb=false
94     ;;
95     *)
96     CPPFLAGS="$CPPFLAGS -I${enableval}/include"
97     LDFLAGS="$LDFLAGS -L${enableval}/lib"
98     ;;
99     esac
100     ]
101     )
102    
103 rousseau 402 dnl check if libusb is available
104 rousseau 565 if test "${use_libusb}" != false ; then
105     AC_SUBST(LIBUSB)
106     AC_CHECK_HEADERS(usb.h, [],
107     [ AC_MSG_ERROR([usb.h not found, use --enable-libusb=PATH]) ])
108 rousseau 436
109 rousseau 565 ac_save_LIBS="$LIBS"
110     LIBS="$LIBS $COREFOUNDATION $IOKIT"
111     AC_CHECK_LIB(usb, usb_init, [LIBUSB="$LIBUSB -lusb"],
112     [ AC_MSG_ERROR([libusb not found]) ])
113     LIBS="$ac_save_LIBS"
114 rousseau 402
115 rousseau 565 ac_save_LIBS="$LIBS"
116     LIBS="$LIBS $COREFOUNDATION $IOKIT"
117     AC_CHECK_LIB(usb, usb_get_string_simple, [LIBUSB="$LIBUSB -lusb"],
118     [ AC_MSG_ERROR([your libusb is too old. install version 0.1.7 or above]) ])
119     LIBS="$ac_save_LIBS"
120     fi
121 rousseau 556
122 rousseau 402 dnl check shat to use for dlopen
123     AC_SUBST(LIBDL)
124     AC_CHECK_LIB(dl, dlopen, [LIBDL="$LIBDL -ldl" ac_cv_func_dlopen_ldl=yes], ac_cv_func_dlopen_ldl=no)
125    
126 rousseau 460 dnl --enable-multi-thread
127     AC_ARG_ENABLE(multi-thread,
128     AC_HELP_STRING([--enable-multi-thread],[enable multi threading
129     (default=yes)]),
130     [ multithread="${enableval}" ], [ multithread=yes ] )
131    
132     if test "${multithread}" != no ; then
133 rousseau 563 ACX_PTHREAD(
134     [ AC_DEFINE(HAVE_PTHREAD, 1,
135     [Define if you have POSIX threads libraries and header files.])
136     ], [ AC_MSG_ERROR([POSIX thread support required]) ])
137 rousseau 460 fi
138     AC_MSG_RESULT([multi threading : $multithread])
139    
140 rousseau 402 dnl --enable-bundle=NAME
141     AC_ARG_ENABLE(bundle,
142 rousseau 460 AC_HELP_STRING([--enable-bundle=NAME],[bundle directory name
143     (default ifd-ccid.bundle)]),
144     [bundle="${enableval}"], [bundle=false])
145 rousseau 402 if test "${bundle}" = false ; then
146     bundle="ifd-ccid.bundle"
147     fi
148     AC_MSG_RESULT([bundle directory name : $bundle])
149     AC_DEFINE_UNQUOTED(BUNDLE, "$bundle", [bundle directory name])
150    
151     dnl --enable-usbdropdir=DIR
152     AC_ARG_ENABLE(usbdropdir,
153 rousseau 460 AC_HELP_STRING([--enable-usbdropdir=DIR],[directory containing USB
154 rousseau 871 drivers (default to pcscd config or $(prefix)/pcsc/drivers)]),
155 rousseau 460 [usbdropdir="${enableval}"], [usbdropdir=false])
156 rousseau 402 if test "${usbdropdir}" = false ; then
157 rousseau 910 if test "$PKGCONFIG" = yes ; then
158     usbdropdir=`pkg-config libpcsclite --variable=usbdropdir`
159     else
160     usbdropdir=""
161     fi
162     if test -z "$usbdropdir" ; then
163     if test "$prefix" = NONE ; then
164     usbdropdir="$ac_default_prefix/pcsc/drivers"
165 rousseau 872 else
166 rousseau 910 usbdropdir="$prefix/pcsc/drivers"
167 rousseau 872 fi
168 rousseau 564 fi
169 rousseau 402 fi
170     AC_MSG_RESULT([USB drop directory : $usbdropdir])
171     AC_DEFINE_UNQUOTED(PCSCLITE_HP_DROPDIR, "$usbdropdir", [directory containing USB drivers])
172    
173 rousseau 564 dnl --enable-ccidtwindir=DIR
174     AC_ARG_ENABLE(ccidtwindir,
175     AC_HELP_STRING([--enable-ccidtwindir=DIR],[directory to install the
176 rousseau 871 serial Twin driver (default to pcscd config or $(prefix)/pcsc/drivers/serial)]),
177 rousseau 564 [ccidtwindir="${enableval}"], [ccidtwindir=false])
178     if test "${ccidtwindir}" = false ; then
179 rousseau 910 if test "$PKGCONFIG" = yes ; then
180     ccidtwindir=`pkg-config libpcsclite --variable=usbdropdir`
181     else
182     AC_MSG_RESULT([You should install pkg-config to get this configured automatically from pcsc-lite installation])
183     ccidtwindir=""
184     fi
185     if test -z "$ccidtwindir" ; then
186     if test "$prefix" = NONE ; then
187     ccidtwindir="$ac_default_prefix/pcsc/drivers"
188 rousseau 872 else
189 rousseau 910 ccidtwindir="$prefix/pcsc/drivers"
190 rousseau 872 fi
191 rousseau 564 fi
192 rousseau 910 ccidtwindir="$ccidtwindir/serial"
193 rousseau 564 fi
194     AC_MSG_RESULT([serial twin install dir : $ccidtwindir])
195     AC_DEFINE_UNQUOTED(PCSCLITE_HP_DROPDIR, "$ccidtwindir", [directory containing USB drivers])
196    
197 rousseau 896 dnl --enable-pcsclite
198     AC_ARG_ENABLE(pcsclite,
199     AC_HELP_STRING([--enable-pcsclite],[compile for pcsc-lite (default=yes)]),
200     [ pcsclite=no ], [ pcsclite=yes ] )
201 rousseau 564
202 rousseau 896 if test "${pcsclite}" = no ; then
203     AM_CONDITIONAL(NEED_PARSER, true)
204     fi
205     AC_MSG_RESULT([compiled for pcsc-lite : $pcsclite])
206    
207    
208 rousseau 402 dnl Setup dist stuff
209     AC_SUBST(ac_aux_dir)
210     AC_SUBST(bundle)
211     AC_SUBST(usbdropdir)
212 rousseau 564 AC_SUBST(ccidtwindir)
213 rousseau 402
214     dnl Write Makefiles.
215 rousseau 887 AC_CONFIG_FILES(Makefile
216     aclocal/Makefile
217     src/Makefile
218     readers/Makefile
219     examples/Makefile)
220    
221 rousseau 402 AC_OUTPUT
222    

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.5