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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 460 - (hide annotations) (download)
Mon Sep 22 14:21:57 2003 UTC (9 years, 8 months ago) by rousseau
File size: 5591 byte(s)
add --enable-multi-thread for thread safe support
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 438 AC_INIT(ccid, 0.3.1)
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    
21     dnl create a config.h file (Automake will add -DHAVE_CONFIG_H)
22     AM_CONFIG_HEADER(config.h)
23    
24     dnl Options
25     AM_MAINTAINER_MODE
26    
27     dnl Checks for programs.
28     AC_PROG_CC
29 rousseau 448 AC_PROG_CPP
30 rousseau 402 AC_PROG_INSTALL
31     AC_PROG_MAKE_SET
32     AC_PROG_LN_S
33     AM_PROG_LEX
34    
35     AC_CHECK_FUNCS(strerror)
36     AC_CHECK_FUNCS(strncpy)
37    
38     AC_CHECK_HEADERS(errno.h)
39    
40     dnl Add libtool support.
41     AM_PROG_LIBTOOL
42    
43     dnl Automatically update the libtool script if it becomes out-of-date.
44     AC_SUBST(LIBTOOL_DEPS)
45    
46     dnl Checks for header files.
47     AC_HEADER_STDC
48     AC_CHECK_HEADERS(fcntl.h stdlib.h unistd.h termios.h string.h errno.h sys/time.h sys/types.h stdarg.h)
49    
50     dnl Checks for typedefs, structures, and compiler characteristics.
51     AC_C_CONST
52     AC_TYPE_SIZE_T
53     AC_HEADER_TIME
54    
55     dnl Checks for library functions.
56     AC_CHECK_FUNCS(select strerror strncpy memcpy)
57    
58     dnl Select OS specific versions of source files.
59     AC_SUBST(BUNDLE_HOST)
60     AC_SUBST(DYN_LIB_EXT)
61     case "$host" in
62     *-*-darwin*)
63     BUNDLE_HOST="MacOS"
64     DYN_LIB_EXT="dylib"
65     AM_CONDITIONAL(NEED_PARSER, true)
66    
67     AC_SUBST(COREFOUNDATION)
68     COREFOUNDATION="-Wl,-framework,CoreFoundation"
69    
70     AC_SUBST(IOKIT)
71     IOKIT="-Wl,-framework,IOKit"
72     if test "$GCC" = "yes"; then
73     CFLAGS="$CFLAGS -no-cpp-precomp"
74     fi
75     ;;
76     *)
77     BUNDLE_HOST="Linux"
78     DYN_LIB_EXT="so"
79     AM_CONDITIONAL(NEED_PARSER, false)
80     esac
81    
82     CFLAGS="$CFLAGS -Wall -fno-common"
83    
84 rousseau 436 dnl --enable-libusb=PATH
85 rousseau 460 AC_ARG_ENABLE(libusb,
86     AC_HELP_STRING([--enable-libusb=PATH],[libusb path (default /usr)]),
87 rousseau 436 [
88     case ${enableval} in
89     "" | "yes" | "YES")
90     ;;
91     "no" | "NO")
92     use_libusb=false
93     ;;
94     *)
95     CPPFLAGS="$CPPFLAGS -I${enableval}/include"
96     LDFLAGS="$LDFLAGS -L${enableval}/lib"
97     ;;
98     esac
99     ]
100     )
101    
102 rousseau 402 dnl check if libusb is available
103     AC_SUBST(LIBUSB)
104 rousseau 436 AC_CHECK_HEADERS(usb.h, [],
105     [ AC_MSG_ERROR([usb.h not found, use --enable-libusb=PATH]) ])
106    
107 rousseau 402 ac_save_LIBS="$LIBS"
108     LIBS="$LIBS $COREFOUNDATION $IOKIT"
109     AC_CHECK_LIB(usb, usb_init, [LIBUSB="$LIBUSB -lusb"],
110 rousseau 436 [ AC_MSG_ERROR([libusb not found]) ])
111 rousseau 402 LIBS="$ac_save_LIBS"
112    
113     dnl check shat to use for dlopen
114     AC_SUBST(LIBDL)
115     AC_CHECK_LIB(dl, dlopen, [LIBDL="$LIBDL -ldl" ac_cv_func_dlopen_ldl=yes], ac_cv_func_dlopen_ldl=no)
116    
117 rousseau 460 dnl --enable-multi-thread
118     AC_ARG_ENABLE(multi-thread,
119     AC_HELP_STRING([--enable-multi-thread],[enable multi threading
120     (default=yes)]),
121     [ multithread="${enableval}" ], [ multithread=yes ] )
122    
123     if test "${multithread}" != no ; then
124     AC_CHECK_HEADERS(pthread.h, [], [ AC_MSG_ERROR([pthread.h not found]) ])
125     AC_CHECK_LIB(pthread, pthread_mutex_lock, [ LIBS="$LIBS -lpthread" ],
126     [ multithread=no ])
127     fi
128     AC_MSG_RESULT([multi threading : $multithread])
129    
130 rousseau 402 dnl --enable-bundle=NAME
131     AC_ARG_ENABLE(bundle,
132 rousseau 460 AC_HELP_STRING([--enable-bundle=NAME],[bundle directory name
133     (default ifd-ccid.bundle)]),
134     [bundle="${enableval}"], [bundle=false])
135 rousseau 402 if test "${bundle}" = false ; then
136     bundle="ifd-ccid.bundle"
137     fi
138     AC_MSG_RESULT([bundle directory name : $bundle])
139     AC_DEFINE_UNQUOTED(BUNDLE, "$bundle", [bundle directory name])
140    
141     dnl --enable-usbdropdir=DIR
142     AC_ARG_ENABLE(usbdropdir,
143 rousseau 460 AC_HELP_STRING([--enable-usbdropdir=DIR],[directory containing USB
144     drivers (default /usr/local/pcsc/drivers)]),
145     [usbdropdir="${enableval}"], [usbdropdir=false])
146 rousseau 402 if test "${usbdropdir}" = false ; then
147     usbdropdir="/usr/local/pcsc/drivers"
148     fi
149     AC_MSG_RESULT([USB drop directory : $usbdropdir])
150     AC_DEFINE_UNQUOTED(PCSCLITE_HP_DROPDIR, "$usbdropdir", [directory containing USB drivers])
151    
152     dnl --enable-debugcritical
153     AC_ARG_ENABLE(debugcritical,
154 rousseau 460 AC_HELP_STRING([--enable-debugcritical],[print critical debug
155     messages (default yes)]), [ debugcritical="${enableval}" ],
156     [ debugcritical=yes ])
157 rousseau 402 dnl yes by default
158     if test "${debugcritical}" != yes
159     then
160     AC_MSG_RESULT([critical debug messages : no])
161     else
162     AC_MSG_RESULT([critical debug messages : yes])
163     AC_DEFINE_UNQUOTED(DEBUG_LEVEL_CRITICAL, 1, [print critical debug messages])
164     fi
165    
166     dnl --enable-debuginfo
167     AC_ARG_ENABLE(debuginfo,
168 rousseau 460 AC_HELP_STRING([--enable-debuginfo],[print info debug messages
169     (default yes)]),
170     [ debuginfo="${enableval}" ], [ debuginfo=yes ])
171 rousseau 402 dnl yes by default
172     if test "${debuginfo}" != yes
173     then
174     AC_MSG_RESULT([info debug messages : no])
175     else
176     AC_MSG_RESULT([info debug messages : yes])
177     AC_DEFINE_UNQUOTED(DEBUG_LEVEL_INFO, 1, [print info debug messages])
178     fi
179    
180     dnl --enable-debugperiodic
181     AC_ARG_ENABLE(debugperiodic,
182 rousseau 460 AC_HELP_STRING([--enable-debugperiodic],[print periodic debug
183     messages (default no)]),
184     [ debugperiodic="${enableval}" ], [ debugperiodic=no ])
185 rousseau 402 dnl no by default
186     if test "${debugperiodic}" != no
187     then
188     AC_MSG_RESULT([periodic debug messages : yes])
189     AC_DEFINE_UNQUOTED(DEBUG_LEVEL_PERIODIC, 1, [print periodic debug messages])
190     else
191     AC_MSG_RESULT([periodic debug messages : no])
192     fi
193    
194     dnl --enable-debugcomm
195     AC_ARG_ENABLE(debugcomm,
196 rousseau 460 AC_HELP_STRING([--enable-debugcomm],[print comm debug messages
197     (default no)]),
198     [ debugcomm="${enableval}" ], [ debugcomm=no ])
199 rousseau 402 dnl no by default
200     if test "${debugcomm}" != no
201     then
202     AC_MSG_RESULT([comm debug messages : yes])
203     AC_DEFINE_UNQUOTED(DEBUG_LEVEL_COMM, 1, [print comm debug messages])
204     else
205     AC_MSG_RESULT([comm debug messages : no])
206     fi
207    
208     dnl Setup dist stuff
209     AC_SUBST(ac_aux_dir)
210     AC_SUBST(bundle)
211     AC_SUBST(usbdropdir)
212    
213     dnl Write Makefiles.
214 rousseau 418 AC_CONFIG_FILES(Makefile src/Makefile readers/Makefile)
215 rousseau 402 AC_OUTPUT
216    

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.5