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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 448 - (show annotations) (download)
Tue Sep 16 16:51:02 2003 UTC (9 years, 8 months ago) by rousseau
File size: 5068 byte(s)
Put back AC_PROG_CPP, it has nothing to do with C++ but with C preprocessor
1 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 AC_INIT(ccid, 0.3.1)
10 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 AC_PROG_CPP
30 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 dnl --enable-libusb=PATH
85 AC_ARG_ENABLE(libusb, [ --enable-libusb=PATH libusb path (default /usr)],
86 [
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 dnl check if libusb is available
102 AC_SUBST(LIBUSB)
103 AC_CHECK_HEADERS(usb.h, [],
104 [ AC_MSG_ERROR([usb.h not found, use --enable-libusb=PATH]) ])
105
106 ac_save_LIBS="$LIBS"
107 LIBS="$LIBS $COREFOUNDATION $IOKIT"
108 AC_CHECK_LIB(usb, usb_init, [LIBUSB="$LIBUSB -lusb"],
109 [ AC_MSG_ERROR([libusb not found]) ])
110 LIBS="$ac_save_LIBS"
111
112 dnl check shat to use for dlopen
113 AC_SUBST(LIBDL)
114 AC_CHECK_LIB(dl, dlopen, [LIBDL="$LIBDL -ldl" ac_cv_func_dlopen_ldl=yes], ac_cv_func_dlopen_ldl=no)
115
116 dnl --enable-bundle=NAME
117 AC_ARG_ENABLE(bundle,
118 [ --enable-bundle=NAME bundle directory name (default ifd-ccid.bundle)],
119 [bundle="${enableval}"], [bundle=false])
120 if test "${bundle}" = false ; then
121 bundle="ifd-ccid.bundle"
122 fi
123 AC_MSG_RESULT([bundle directory name : $bundle])
124 AC_DEFINE_UNQUOTED(BUNDLE, "$bundle", [bundle directory name])
125
126 dnl --enable-usbdropdir=DIR
127 AC_ARG_ENABLE(usbdropdir,
128 [ --enable-usbdropdir=DIR directory containing USB drivers (default /usr/local/pcsc/drivers)],
129 [usbdropdir="${enableval}"], [usbdropdir=false])
130 if test "${usbdropdir}" = false ; then
131 usbdropdir="/usr/local/pcsc/drivers"
132 fi
133 AC_MSG_RESULT([USB drop directory : $usbdropdir])
134 AC_DEFINE_UNQUOTED(PCSCLITE_HP_DROPDIR, "$usbdropdir", [directory containing USB drivers])
135
136 dnl --enable-debugcritical
137 AC_ARG_ENABLE(debugcritical,
138 [ --enable-debugcritical print critical debug messages (default yes)],
139 [ debugcritical="${enableval}" ], [ debugcritical=yes ])
140 dnl yes by default
141 if test "${debugcritical}" != yes
142 then
143 AC_MSG_RESULT([critical debug messages : no])
144 else
145 AC_MSG_RESULT([critical debug messages : yes])
146 AC_DEFINE_UNQUOTED(DEBUG_LEVEL_CRITICAL, 1, [print critical debug messages])
147 fi
148
149 dnl --enable-debuginfo
150 AC_ARG_ENABLE(debuginfo,
151 [ --enable-debuginfo print info debug messages (default yes)],
152 [ debuginfo="${enableval}" ], [ debuginfo=yes ])
153 dnl yes by default
154 if test "${debuginfo}" != yes
155 then
156 AC_MSG_RESULT([info debug messages : no])
157 else
158 AC_MSG_RESULT([info debug messages : yes])
159 AC_DEFINE_UNQUOTED(DEBUG_LEVEL_INFO, 1, [print info debug messages])
160 fi
161
162 dnl --enable-debugperiodic
163 AC_ARG_ENABLE(debugperiodic,
164 [ --enable-debugperiodic print periodic debug messages (default no)],
165 [ debugperiodic="${enableval}" ], [ debugperiodic=no ])
166 dnl no by default
167 if test "${debugperiodic}" != no
168 then
169 AC_MSG_RESULT([periodic debug messages : yes])
170 AC_DEFINE_UNQUOTED(DEBUG_LEVEL_PERIODIC, 1, [print periodic debug messages])
171 else
172 AC_MSG_RESULT([periodic debug messages : no])
173 fi
174
175 dnl --enable-debugcomm
176 AC_ARG_ENABLE(debugcomm,
177 [ --enable-debugcomm print comm debug messages (default no)],
178 [ debugcomm="${enableval}" ], [ debugcomm=no ])
179 dnl no by default
180 if test "${debugcomm}" != no
181 then
182 AC_MSG_RESULT([comm debug messages : yes])
183 AC_DEFINE_UNQUOTED(DEBUG_LEVEL_COMM, 1, [print comm debug messages])
184 else
185 AC_MSG_RESULT([comm debug messages : no])
186 fi
187
188 dnl Setup dist stuff
189 AC_SUBST(ac_aux_dir)
190 AC_SUBST(bundle)
191 AC_SUBST(usbdropdir)
192
193 dnl Write Makefiles.
194 AC_CONFIG_FILES(Makefile src/Makefile readers/Makefile)
195 AC_OUTPUT
196

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.5