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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 871 - (hide annotations) (download)
Fri May 14 09:07:29 2004 UTC (9 years ago) by rousseau
File size: 5147 byte(s)
use `pkg-config libpcsclite --variable=usbdropdir` so you do not have to
use --enable-usbdropdir=DIR or --enable-ccidtwindir=DIR even if pcscd
does not use the default /usr/local/pcsc/drivers
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 871 drivers (default to pcscd config or $(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 rousseau 871 usbdropdir=`pkg-config libpcsclite --variable=usbdropdir`
157     if test -z "$usbdropdir" ; then
158     usbdropdir="$ac_default_prefix/pcsc/drivers"
159     fi
160 rousseau 564 else
161     usbdropdir="$prefix/pcsc/drivers"
162     fi
163 rousseau 402 fi
164     AC_MSG_RESULT([USB drop directory : $usbdropdir])
165     AC_DEFINE_UNQUOTED(PCSCLITE_HP_DROPDIR, "$usbdropdir", [directory containing USB drivers])
166    
167 rousseau 564 dnl --enable-ccidtwindir=DIR
168     AC_ARG_ENABLE(ccidtwindir,
169     AC_HELP_STRING([--enable-ccidtwindir=DIR],[directory to install the
170 rousseau 871 serial Twin driver (default to pcscd config or $(prefix)/pcsc/drivers/serial)]),
171 rousseau 564 [ccidtwindir="${enableval}"], [ccidtwindir=false])
172     if test "${ccidtwindir}" = false ; then
173     if test "$prefix" = NONE ; then
174 rousseau 871 ccidtwindir=`pkg-config libpcsclite --variable=usbdropdir`
175     if test -z "$ccidtwindir" ; then
176     ccidtwindir="$ac_default_prefix/pcsc/drivers"
177     fi
178     ccidtwindir="$ccidtwindir/serial"
179 rousseau 564 else
180     ccidtwindir="$prefix/pcsc/drivers/serial"
181     fi
182     fi
183     AC_MSG_RESULT([serial twin install dir : $ccidtwindir])
184     AC_DEFINE_UNQUOTED(PCSCLITE_HP_DROPDIR, "$ccidtwindir", [directory containing USB drivers])
185    
186    
187 rousseau 402 dnl Setup dist stuff
188     AC_SUBST(ac_aux_dir)
189     AC_SUBST(bundle)
190     AC_SUBST(usbdropdir)
191 rousseau 564 AC_SUBST(ccidtwindir)
192 rousseau 402
193     dnl Write Makefiles.
194 rousseau 563 AC_CONFIG_FILES(Makefile aclocal/Makefile src/Makefile readers/Makefile)
195 rousseau 402 AC_OUTPUT
196    

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.5