/[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 - (hide 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 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    
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 rousseau 436 dnl --enable-libusb=PATH
84 rousseau 460 AC_ARG_ENABLE(libusb,
85     AC_HELP_STRING([--enable-libusb=PATH],[libusb path (default /usr)]),
86 rousseau 436 [
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 rousseau 402 dnl check if libusb is available
102 rousseau 565 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 rousseau 436
107 rousseau 565 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 rousseau 402
113 rousseau 565 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 rousseau 556
120 rousseau 402 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 rousseau 460 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 rousseau 563 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 rousseau 460 fi
136     AC_MSG_RESULT([multi threading : $multithread])
137    
138 rousseau 402 dnl --enable-bundle=NAME
139     AC_ARG_ENABLE(bundle,
140 rousseau 460 AC_HELP_STRING([--enable-bundle=NAME],[bundle directory name
141     (default ifd-ccid.bundle)]),
142     [bundle="${enableval}"], [bundle=false])
143 rousseau 402 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 rousseau 460 AC_HELP_STRING([--enable-usbdropdir=DIR],[directory containing USB
152 rousseau 564 drivers (default $(prefix)/pcsc/drivers)]),
153 rousseau 460 [usbdropdir="${enableval}"], [usbdropdir=false])
154 rousseau 402 if test "${usbdropdir}" = false ; then
155 rousseau 564 if test "$prefix" = NONE ; then
156     usbdropdir="$ac_default_prefix/pcsc/drivers"
157     else
158     usbdropdir="$prefix/pcsc/drivers"
159     fi
160 rousseau 402 fi
161     AC_MSG_RESULT([USB drop directory : $usbdropdir])
162     AC_DEFINE_UNQUOTED(PCSCLITE_HP_DROPDIR, "$usbdropdir", [directory containing USB drivers])
163    
164 rousseau 564 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 rousseau 402 dnl --enable-debugcritical
181     AC_ARG_ENABLE(debugcritical,
182 rousseau 460 AC_HELP_STRING([--enable-debugcritical],[print critical debug
183     messages (default yes)]), [ debugcritical="${enableval}" ],
184     [ debugcritical=yes ])
185 rousseau 402 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 rousseau 460 AC_HELP_STRING([--enable-debuginfo],[print info debug messages
197     (default yes)]),
198     [ debuginfo="${enableval}" ], [ debuginfo=yes ])
199 rousseau 402 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 rousseau 460 AC_HELP_STRING([--enable-debugperiodic],[print periodic debug
211     messages (default no)]),
212     [ debugperiodic="${enableval}" ], [ debugperiodic=no ])
213 rousseau 402 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 rousseau 460 AC_HELP_STRING([--enable-debugcomm],[print comm debug messages
225     (default no)]),
226     [ debugcomm="${enableval}" ], [ debugcomm=no ])
227 rousseau 402 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 rousseau 564 AC_SUBST(ccidtwindir)
241 rousseau 402
242     dnl Write Makefiles.
243 rousseau 563 AC_CONFIG_FILES(Makefile aclocal/Makefile src/Makefile readers/Makefile)
244 rousseau 402 AC_OUTPUT
245    

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.5