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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 777 by rousseau, Tue Apr 6 13:32:54 2004 UTC revision 1556 by rousseau, Wed Jun 15 12:53:41 2005 UTC
# Line 6  dnl $Id$ Line 6  dnl $Id$
6  dnl Require autoconf 2.52  dnl Require autoconf 2.52
7  AC_PREREQ(2.52)  AC_PREREQ(2.52)
8    
9  AC_INIT(ccid, 0.4.2)  AC_INIT(ccid, 0.9.4)
10  AC_CONFIG_SRCDIR(src/ifdhandler.c)  AC_CONFIG_SRCDIR(src/ifdhandler.c)
11  AC_CONFIG_AUX_DIR(build)  AC_CONFIG_AUX_DIR(build)
12  AM_INIT_AUTOMAKE  AM_INIT_AUTOMAKE
# Line 31  AC_PROG_MAKE_SET Line 31  AC_PROG_MAKE_SET
31  AC_PROG_LN_S  AC_PROG_LN_S
32  AM_PROG_LEX  AM_PROG_LEX
33    
34  AC_CHECK_FUNCS(strerror)  dnl check pcsc-lite version
35  AC_CHECK_FUNCS(strncpy)  PKG_CHECK_MODULES(PCSC, libpcsclite >= 1.2.9-beta8, [],
36            [ if test -f /usr/local/lib/pkgconfig/libpcsclite.pc ; then
37  AC_CHECK_HEADERS(errno.h)                  AC_MSG_ERROR([use PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure])
38              else
39                    AC_MSG_WARN([install pcsc-lite 1.2.9-beta8 or later])
40              fi
41            ])
42    
43    OLD_CFLAGS="$CFLAGS"
44    CFLAGS="$CFLAGS $PCSC_CFLAGS"
45    AC_CHECK_HEADER(ifdhandler.h,,
46            [AC_MSG_ERROR([ifdhandler.h not found, install pcsc-lite 1.2.9-beta8 or later, or use CFLAGS=... ./configure])],
47            [ #include <ifdhandler.h> ])
48    AC_CHECK_HEADER(reader.h,,
49            [AC_MSG_ERROR([reader.h not found, install pcsc-lite 1.2.9-beta8 or later, or use CFLAGS=... ./configure])],
50            [ #include <reader.h> ])
51    CFLAGS="$OLD_CFLAGS"
52    
53  dnl Add libtool support.  dnl Add libtool support.
54  AM_PROG_LIBTOOL  AM_PROG_LIBTOOL
# Line 44  AC_SUBST(LIBTOOL_DEPS) Line 58  AC_SUBST(LIBTOOL_DEPS)
58    
59  dnl Checks for header files.  dnl Checks for header files.
60  AC_HEADER_STDC  AC_HEADER_STDC
61  AC_CHECK_HEADERS(fcntl.h stdlib.h unistd.h termios.h string.h errno.h sys/time.h sys/types.h stdarg.h)  AC_CHECK_HEADERS(errno.h fcntl.h stdlib.h unistd.h termios.h string.h errno.h sys/time.h sys/types.h stdarg.h,,
62            [AC_MSG_WARN([some header files not found])])
63    
64  dnl Checks for typedefs, structures, and compiler characteristics.  dnl Checks for typedefs, structures, and compiler characteristics.
65  AC_C_CONST  AC_C_CONST
# Line 78  case "$host" in Line 93  case "$host" in
93          AM_CONDITIONAL(NEED_PARSER, false)          AM_CONDITIONAL(NEED_PARSER, false)
94  esac  esac
95    
96  CFLAGS="$CFLAGS -Wall -fno-common"  CFLAGS="$CFLAGS -Wall"
97    
98  dnl --enable-libusb=PATH  dnl --enable-libusb=PATH
99  AC_ARG_ENABLE(libusb,  AC_ARG_ENABLE(libusb,
# Line 117  if test "${use_libusb}" != false ; then Line 132  if test "${use_libusb}" != false ; then
132          LIBS="$ac_save_LIBS"          LIBS="$ac_save_LIBS"
133  fi  fi
134    
135  dnl check shat to use for dlopen  dnl check what to use for dlopen
136  AC_SUBST(LIBDL)  AC_SUBST(LIBDL)
137  AC_CHECK_LIB(dl, dlopen, [LIBDL="$LIBDL -ldl" ac_cv_func_dlopen_ldl=yes], ac_cv_func_dlopen_ldl=no)  AC_CHECK_LIB(dl, dlopen, [LIBDL="$LIBDL -ldl" ac_cv_func_dlopen_ldl=yes], ac_cv_func_dlopen_ldl=no)
138    
# Line 149  AC_DEFINE_UNQUOTED(BUNDLE, "$bundle", [b Line 164  AC_DEFINE_UNQUOTED(BUNDLE, "$bundle", [b
164  dnl --enable-usbdropdir=DIR  dnl --enable-usbdropdir=DIR
165  AC_ARG_ENABLE(usbdropdir,  AC_ARG_ENABLE(usbdropdir,
166          AC_HELP_STRING([--enable-usbdropdir=DIR],[directory containing USB          AC_HELP_STRING([--enable-usbdropdir=DIR],[directory containing USB
167          drivers (default $(prefix)/pcsc/drivers)]),          drivers (default to pcscd config or $(prefix)/pcsc/drivers)]),
168          [usbdropdir="${enableval}"], [usbdropdir=false])          [usbdropdir="${enableval}"], [usbdropdir=false])
169  if test "${usbdropdir}" = false ; then  if test "${usbdropdir}" = false ; then
170          if test "$prefix" = NONE ; then          usbdropdir=`pkg-config libpcsclite --variable=usbdropdir`
                 usbdropdir="$ac_default_prefix/pcsc/drivers"  
         else  
                 usbdropdir="$prefix/pcsc/drivers"  
         fi  
171  fi  fi
172  AC_MSG_RESULT([USB drop directory      : $usbdropdir])  AC_MSG_RESULT([USB drop directory      : $usbdropdir])
173  AC_DEFINE_UNQUOTED(PCSCLITE_HP_DROPDIR, "$usbdropdir", [directory containing USB drivers])  AC_DEFINE_UNQUOTED(PCSCLITE_HP_DROPDIR, "$usbdropdir", [directory containing USB drivers])
174    if test "${usbdropdir}" = "" ; then
175            AC_MSG_ERROR([use --enable-usbdropdir=DIR])
176    fi
177    
178  dnl --enable-ccidtwindir=DIR  dnl --enable-ccidtwindir=DIR
179  AC_ARG_ENABLE(ccidtwindir,  AC_ARG_ENABLE(ccidtwindir,
180          AC_HELP_STRING([--enable-ccidtwindir=DIR],[directory to install the          AC_HELP_STRING([--enable-ccidtwindir=DIR],[directory to install the
181          serial Twin driver (default $(prefix)/pcsc/drivers/serial)]),          serial Twin driver (default to pcscd config or $(prefix)/pcsc/drivers/serial)]),
182          [ccidtwindir="${enableval}"], [ccidtwindir=false])          [ccidtwindir="${enableval}"], [ccidtwindir=false])
183  if test "${ccidtwindir}" = false ; then  if test "${ccidtwindir}" = false ; then
184          if test "$prefix" = NONE ; then          ccidtwindir=`pkg-config libpcsclite --variable=usbdropdir`/serial
                 ccidtwindir="$ac_default_prefix/pcsc/drivers/serial"  
         else  
                 ccidtwindir="$prefix/pcsc/drivers/serial"  
         fi  
185  fi  fi
186  AC_MSG_RESULT([serial twin install dir : $ccidtwindir])  AC_MSG_RESULT([serial twin install dir : $ccidtwindir])
187  AC_DEFINE_UNQUOTED(PCSCLITE_HP_DROPDIR, "$ccidtwindir", [directory containing USB drivers])  AC_DEFINE_UNQUOTED(PCSCLITE_HP_DROPDIR, "$ccidtwindir", [directory containing USB drivers])
188    
189    dnl --enable-pcsclite
190    AC_ARG_ENABLE(pcsclite,
191            AC_HELP_STRING([--enable-pcsclite],[compile for pcsc-lite (default=yes)]),
192            [ pcsclite=no ], [ pcsclite=yes ] )
193    
194    if test "${pcsclite}" = no ; then
195            AM_CONDITIONAL(WITHOUT_PCSC, true)
196            AM_CONDITIONAL(NEED_PARSER, true)
197    else
198            dnl check that pcsc-lite is installed
199            OLD_LDLIBS="$LDLIBS"
200            OLD_LIBS="$LIBS"
201            LDLIBS="$LDLIBS $PCSC_LIBS"
202            AC_CHECK_LIB(pcsclite, SCardEstablishContext, [],
203                    [AC_MSG_ERROR([SCardEstablishContext() not found, install pcsc-lite 1.2.9-beta8 or later, or use LDLIBS=... ./configure])])
204            LDLIBS="$OLD_LDLIBS"
205            LIBS="$OLD_LIBS"
206    
207            AM_CONDITIONAL(WITHOUT_PCSC, false)
208    fi
209    AC_MSG_RESULT([compiled for pcsc-lite  : $pcsclite])
210    
211    
212  dnl Setup dist stuff  dnl Setup dist stuff
213  AC_SUBST(ac_aux_dir)  AC_SUBST(ac_aux_dir)
# Line 184  AC_SUBST(usbdropdir) Line 216  AC_SUBST(usbdropdir)
216  AC_SUBST(ccidtwindir)  AC_SUBST(ccidtwindir)
217    
218  dnl Write Makefiles.  dnl Write Makefiles.
219  AC_CONFIG_FILES(Makefile aclocal/Makefile src/Makefile readers/Makefile)  AC_CONFIG_FILES(Makefile
220            aclocal/Makefile
221            src/Makefile
222            readers/Makefile
223            examples/Makefile)
224    
225  AC_OUTPUT  AC_OUTPUT
226    

Legend:
Removed from v.777  
changed lines
  Added in v.1556

  ViewVC Help
Powered by ViewVC 1.1.5