From 53cf8b684c296a6353adb47e6a05d9be4603fddd Mon Sep 17 00:00:00 2001 From: frankmorgner Date: Sat, 8 May 2010 19:09:45 +0000 Subject: [PATCH] switched to autotools git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@102 96b47cad-a561-4643-ad3b-153ac7d7599c --- picc_to_pcsc/ChangeLog | 0 picc_to_pcsc/Makefile.am | 1 + picc_to_pcsc/NEWS | 0 picc_to_pcsc/configure.ac | 68 +++++++++++++++++++++++++++ picc_to_pcsc/src/Makefile.am | 6 +++ picc_to_pcsc/{ => src}/picc.py | 0 picc_to_pcsc/{ => src}/picc_to_pcsc.c | 0 picc_to_pcsc/{ => src}/picc_to_pcsc.h | 0 8 files changed, 75 insertions(+) create mode 100644 picc_to_pcsc/ChangeLog create mode 100644 picc_to_pcsc/Makefile.am create mode 100644 picc_to_pcsc/NEWS create mode 100644 picc_to_pcsc/configure.ac create mode 100644 picc_to_pcsc/src/Makefile.am rename picc_to_pcsc/{ => src}/picc.py (100%) rename picc_to_pcsc/{ => src}/picc_to_pcsc.c (100%) rename picc_to_pcsc/{ => src}/picc_to_pcsc.h (100%) diff --git a/picc_to_pcsc/ChangeLog b/picc_to_pcsc/ChangeLog new file mode 100644 index 0000000..e69de29 diff --git a/picc_to_pcsc/Makefile.am b/picc_to_pcsc/Makefile.am new file mode 100644 index 0000000..af437a6 --- /dev/null +++ b/picc_to_pcsc/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = src diff --git a/picc_to_pcsc/NEWS b/picc_to_pcsc/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/picc_to_pcsc/configure.ac b/picc_to_pcsc/configure.ac new file mode 100644 index 0000000..05a787f --- /dev/null +++ b/picc_to_pcsc/configure.ac @@ -0,0 +1,68 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.65]) +AC_INIT([libifdnfc], [0.1], [morgner@informatik.hu-berlin.de]) +AC_CONFIG_SRCDIR([src/picc_to_pcsc.c]) +AC_CONFIG_HEADERS([config.h]) +AM_INIT_AUTOMAKE + +# Checks for programs. +AC_PROG_CC +AM_PROG_CC_C_O +AM_PATH_PYTHON +PKG_PROG_PKG_CONFIG + +# Checks for libraries. +PKG_CHECK_EXISTS([libopensc], + [PKG_CHECK_MODULES([PCSC], [libpcsclite])], + [AC_MSG_WARN([libpcsclite not found by pkg-config])]) + +saved_CPPFLAGS="$CPPFLAGS" +saved_LIBS="$LIBS" +CPPFLAGS="$CPPFLAGS $PCSC_CFLAGS" +LIBS="$LDFLAGS $PCSC_LIBS" +AC_CHECK_HEADERS(winscard.h,, + [ AC_MSG_ERROR([winscard.h not found, install libpcsclite or use ./configure PCSC_CFLAGS=...]) ]) +AC_MSG_CHECKING([for SCardEstablishContext]) +AC_TRY_LINK_FUNC(SCardEstablishContext, [ AC_MSG_RESULT([yes]) ], + [ AC_MSG_ERROR([libpcsclite not found, use ./configure PCSC_LIBS=...]) ]) +CPPFLAGS="$saved_CPPFLAGS" +LIBS="$saved_LIBS" + + +# Checks for header files. +AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_TYPE_SIZE_T + +# Checks for library functions. +AC_FUNC_MALLOC + + +cat << EOF + +picc_to_pcsc has been configured with following options: + +Version: ${PACKAGE_VERSION} +User binaries: $(eval eval eval echo "${bindir}") +Configuration files: $(eval eval eval echo "${sysconfdir}") + + +Host: ${host} +Compiler: ${CC} +Preprocessor flags: ${CPPFLAGS} +Compiler flags: ${CFLAGS} +Preprocessor flags: ${CPPFLAGS} +Linker flags: ${LDFLAGS} +Libraries: ${LIBS} +PCSC_CFLAGS: ${PCSC_CFLAGS} +PCSC_LIBS: ${PCSC_LIBS} + +EOF + + +AC_CONFIG_FILES([Makefile + src/Makefile]) +AC_OUTPUT diff --git a/picc_to_pcsc/src/Makefile.am b/picc_to_pcsc/src/Makefile.am new file mode 100644 index 0000000..923b5b3 --- /dev/null +++ b/picc_to_pcsc/src/Makefile.am @@ -0,0 +1,6 @@ +bin_PROGRAMS = picc_to_pcsc +bin_SCRIPTS = picc.py + +picc_to_pcsc_SOURCES = picc_to_pcsc.c +picc_to_pcsc_LDADD = $(PCSC_LIBS) +picc_to_pcsc_CFLAGS = $(PCSC_CFLAGS) diff --git a/picc_to_pcsc/picc.py b/picc_to_pcsc/src/picc.py similarity index 100% rename from picc_to_pcsc/picc.py rename to picc_to_pcsc/src/picc.py diff --git a/picc_to_pcsc/picc_to_pcsc.c b/picc_to_pcsc/src/picc_to_pcsc.c similarity index 100% rename from picc_to_pcsc/picc_to_pcsc.c rename to picc_to_pcsc/src/picc_to_pcsc.c diff --git a/picc_to_pcsc/picc_to_pcsc.h b/picc_to_pcsc/src/picc_to_pcsc.h similarity index 100% rename from picc_to_pcsc/picc_to_pcsc.h rename to picc_to_pcsc/src/picc_to_pcsc.h