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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 563 - (hide annotations) (download)
Tue Nov 25 22:55:58 2003 UTC (9 years, 6 months ago) by rousseau
File size: 5834 byte(s)
use a updated version of acx_pthread.m4 needed for FreeBSD
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 551 AC_INIT(ccid, 0.3.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     AC_SUBST(LIBUSB)
103 rousseau 436 AC_CHECK_HEADERS(usb.h, [],
104     [ AC_MSG_ERROR([usb.h not found, use --enable-libusb=PATH]) ])
105    
106 rousseau 402 ac_save_LIBS="$LIBS"
107     LIBS="$LIBS $COREFOUNDATION $IOKIT"
108     AC_CHECK_LIB(usb, usb_init, [LIBUSB="$LIBUSB -lusb"],
109 rousseau 436 [ AC_MSG_ERROR([libusb not found]) ])
110 rousseau 402 LIBS="$ac_save_LIBS"
111    
112 rousseau 556 ac_save_LIBS="$LIBS"
113     LIBS="$LIBS $COREFOUNDATION $IOKIT"
114     AC_CHECK_LIB(usb, usb_get_string_simple, [LIBUSB="$LIBUSB -lusb"],
115     [ AC_MSG_ERROR([your libusb is too old. install version 0.1.7 or above]) ])
116     LIBS="$ac_save_LIBS"
117    
118 rousseau 402 dnl check shat to use for dlopen
119     AC_SUBST(LIBDL)
120     AC_CHECK_LIB(dl, dlopen, [LIBDL="$LIBDL -ldl" ac_cv_func_dlopen_ldl=yes], ac_cv_func_dlopen_ldl=no)
121    
122 rousseau 460 dnl --enable-multi-thread
123     AC_ARG_ENABLE(multi-thread,
124     AC_HELP_STRING([--enable-multi-thread],[enable multi threading
125     (default=yes)]),
126     [ multithread="${enableval}" ], [ multithread=yes ] )
127    
128     if test "${multithread}" != no ; then
129 rousseau 563 ACX_PTHREAD(
130     [ AC_DEFINE(HAVE_PTHREAD, 1,
131     [Define if you have POSIX threads libraries and header files.])
132     ], [ AC_MSG_ERROR([POSIX thread support required]) ])
133 rousseau 460 fi
134     AC_MSG_RESULT([multi threading : $multithread])
135    
136 rousseau 402 dnl --enable-bundle=NAME
137     AC_ARG_ENABLE(bundle,
138 rousseau 460 AC_HELP_STRING([--enable-bundle=NAME],[bundle directory name
139     (default ifd-ccid.bundle)]),
140     [bundle="${enableval}"], [bundle=false])
141 rousseau 402 if test "${bundle}" = false ; then
142     bundle="ifd-ccid.bundle"
143     fi
144     AC_MSG_RESULT([bundle directory name : $bundle])
145     AC_DEFINE_UNQUOTED(BUNDLE, "$bundle", [bundle directory name])
146    
147     dnl --enable-usbdropdir=DIR
148     AC_ARG_ENABLE(usbdropdir,
149 rousseau 460 AC_HELP_STRING([--enable-usbdropdir=DIR],[directory containing USB
150     drivers (default /usr/local/pcsc/drivers)]),
151     [usbdropdir="${enableval}"], [usbdropdir=false])
152 rousseau 402 if test "${usbdropdir}" = false ; then
153     usbdropdir="/usr/local/pcsc/drivers"
154     fi
155     AC_MSG_RESULT([USB drop directory : $usbdropdir])
156     AC_DEFINE_UNQUOTED(PCSCLITE_HP_DROPDIR, "$usbdropdir", [directory containing USB drivers])
157    
158     dnl --enable-debugcritical
159     AC_ARG_ENABLE(debugcritical,
160 rousseau 460 AC_HELP_STRING([--enable-debugcritical],[print critical debug
161     messages (default yes)]), [ debugcritical="${enableval}" ],
162     [ debugcritical=yes ])
163 rousseau 402 dnl yes by default
164     if test "${debugcritical}" != yes
165     then
166     AC_MSG_RESULT([critical debug messages : no])
167     else
168     AC_MSG_RESULT([critical debug messages : yes])
169     AC_DEFINE_UNQUOTED(DEBUG_LEVEL_CRITICAL, 1, [print critical debug messages])
170     fi
171    
172     dnl --enable-debuginfo
173     AC_ARG_ENABLE(debuginfo,
174 rousseau 460 AC_HELP_STRING([--enable-debuginfo],[print info debug messages
175     (default yes)]),
176     [ debuginfo="${enableval}" ], [ debuginfo=yes ])
177 rousseau 402 dnl yes by default
178     if test "${debuginfo}" != yes
179     then
180     AC_MSG_RESULT([info debug messages : no])
181     else
182     AC_MSG_RESULT([info debug messages : yes])
183     AC_DEFINE_UNQUOTED(DEBUG_LEVEL_INFO, 1, [print info debug messages])
184     fi
185    
186     dnl --enable-debugperiodic
187     AC_ARG_ENABLE(debugperiodic,
188 rousseau 460 AC_HELP_STRING([--enable-debugperiodic],[print periodic debug
189     messages (default no)]),
190     [ debugperiodic="${enableval}" ], [ debugperiodic=no ])
191 rousseau 402 dnl no by default
192     if test "${debugperiodic}" != no
193     then
194     AC_MSG_RESULT([periodic debug messages : yes])
195     AC_DEFINE_UNQUOTED(DEBUG_LEVEL_PERIODIC, 1, [print periodic debug messages])
196     else
197     AC_MSG_RESULT([periodic debug messages : no])
198     fi
199    
200     dnl --enable-debugcomm
201     AC_ARG_ENABLE(debugcomm,
202 rousseau 460 AC_HELP_STRING([--enable-debugcomm],[print comm debug messages
203     (default no)]),
204     [ debugcomm="${enableval}" ], [ debugcomm=no ])
205 rousseau 402 dnl no by default
206     if test "${debugcomm}" != no
207     then
208     AC_MSG_RESULT([comm debug messages : yes])
209     AC_DEFINE_UNQUOTED(DEBUG_LEVEL_COMM, 1, [print comm debug messages])
210     else
211     AC_MSG_RESULT([comm debug messages : no])
212     fi
213    
214     dnl Setup dist stuff
215     AC_SUBST(ac_aux_dir)
216     AC_SUBST(bundle)
217     AC_SUBST(usbdropdir)
218    
219     dnl Write Makefiles.
220 rousseau 563 AC_CONFIG_FILES(Makefile aclocal/Makefile src/Makefile readers/Makefile)
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