summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2007-01-06 14:39:59 +0000
committerlaforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede>2007-01-06 14:39:59 +0000
commitc013e93217b652cce1538a250bc348d1c8c75fdb (patch)
tree368405c586659998a889127f3b1f35326e436621 /configure.in
parentd7650b956f19c0bff282c81344c155f1c6018acb (diff)
- change --with-openct to --enable-openct
- try to be more intelligent to detect openct library location - add librfid.pc file (pkgconfig) (Andreas Jellinghaus <aj@dungeon.inka.de>) git-svn-id: https://svn.gnumonks.org/trunk/librfid@1955 e0336214-984f-0b4b-a45f-81c69e1f0ede
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in25
1 files changed, 19 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index 10d72be..895c7b3 100644
--- a/configure.in
+++ b/configure.in
@@ -17,11 +17,24 @@ AC_ARG_ENABLE(ccid,
# AC_SUBST(MY_CCID)
AM_CONDITIONAL(ENABLE_CCID, test "$MY_CCID" == "1")
-AC_ARG_WITH(openct,
- [ --with-openct Use (patched) OpenCT for CM5121 CCID access],
- [OPENCT_PATH="$withval"], [OPENCT_PATH=""])
-AC_SUBST(OPENCT_PATH)
-AM_CONDITIONAL(ENABLE_OPENCT, test "$OPENCT_PATH" != "")
+dnl Enable/disable openct
+AC_ARG_ENABLE(openct,
+ AC_HELP_STRING([--enable-openct], [Use (patched) OpenCT for CM5121 CCID access. [[default=no]]]),
+ [ENABLE_OPENCT="${enableval}"],
+ [ENABLE_OPENCT="no"])
+
+OPENCT_MSG=no
+if test "x${ENABLE_OPENCT}" = "xyes"; then
+ PKG_CHECK_MODULES(OPENCT, [libopenct], [
+ OPENCT_MSG=yes
+ AC_DEFINE(HAVE_OPENCT, 1, [Have OpenCT libraries and header files])
+ ], [
+ OPENCT_MSG=no
+ ])
+ AC_SUBST(OPENCT_CFLAGS)
+ AC_SUBST(OPENCT_LIBS)
+fi
+AM_CONDITIONAL(HAVE_OPENCT, test "x$OPENCT_MSG" = "xyes")
AC_ARG_WITH(firmware,
[ --with-firmware=PATH Compile for running inside firmware],
@@ -51,4 +64,4 @@ AC_CHECK_LIB(usb, usb_close,,)
AM_CONDITIONAL(HAVE_LIBUSB, test "x$have_libusb" = "xyes")
dnl Output the makefile
-AC_OUTPUT(Makefile src/Makefile include/Makefile include/librfid/Makefile utils/Makefile)
+AC_OUTPUT(Makefile src/Makefile include/Makefile include/librfid/Makefile utils/Makefile src/librfid.pc)
personal git repositories of Harald Welte. Your mileage may vary