diff --git a/Makefile.am b/Makefile.am index 11a67ac4..fe52bf4b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,18 @@ ## Makefile.am -- Process this file with automake to produce Makefile.in +AUX_DIST = $(ac_aux_dir)/config.guess \ + $(ac_aux_dir)/config.sub \ + $(ac_aux_dir)/install-sh \ + $(ac_aux_dir)/ltmain.sh \ + $(ac_aux_dir)/missing \ + $(ac_aux_dir)/mkinstalldirs +EXTRA_DIST = bootstrap + SUBDIRS = src +MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure config-h.in \ + stamp-h.in $(AUX_DIST) +dist-hook: + (cd $(distdir) && mkdir $(ac_aux_dir)) + for file in $(AUX_DIST); do \ + cp $$file $(distdir)/$$file; \ + done diff --git a/NEWS b/NEWS index e69de29b..35beaf83 100644 --- a/NEWS +++ b/NEWS @@ -0,0 +1,5 @@ +NEWS for libopensc -- History of user visible changes + +New in 0.3.2; 2001-11-27; Juha Yrjölä: +* Converted to Autotools. + diff --git a/README b/README index e69de29b..c4d41338 100644 --- a/README +++ b/README @@ -0,0 +1,27 @@ +README for libopensc, the library component of the OpenSC project + + +Introduction +============ + +libopensc is the core part of the OpenSC project. + + +Building and Installing libopensc +================================= + +See the INSTALL file for this. + + +Troubleshooting +=============== + +A mailing-list will be set up for support and discussion about the +OpenSC project. Meanwhile, contact the authors directly. (See the AUTHORS +file for email addresses) + + +Resources +========= + +See the OpenSC web site at http://www.hut.fi/~jyrjola/sc/. diff --git a/configure.in b/configure.in index 9d123006..b2685d34 100644 --- a/configure.in +++ b/configure.in @@ -2,7 +2,7 @@ AC_INIT(libopensc) AC_CONFIG_AUX_DIR(config) AC_CONFIG_SRCDIR(src/sc.c) -AM_CONFIG_HEADER(src/config.h:src/config.h.in) +AM_CONFIG_HEADER(config.h:config.h.in) AM_INIT_AUTOMAKE(libopensc, 0.3.2) @@ -11,8 +11,31 @@ AC_PROG_CC AC_PROG_LIBTOOL # Checks for libraries. -AC_CHECK_LIB(pcsclite, SCardEstablishContext) -AC_CHECK_LIB(pthread, pthread_mutex_lock) +AC_CHECK_LIB(pthread, pthread_mutex_lock, , AC_MSG_ERROR([*** libpthread not found])) +AC_ARG_WITH(pcsclite, + [ --with-pcsclite=PATH use PC/SC Lite in PATH], + [ + if test -d "$withval/lib"; then + if test -n "${need_dash_r}"; then + LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}" + else + LDFLAGS="-L${withval}/lib ${LDFLAGS}" + fi + else + if test -n "${need_dash_r}"; then + LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}" + else + LDFLAGS="-L${withval} ${LDFLAGS}" + fi + fi + if test -d "$withval/include"; then + CPPFLAGS="-I${withval}/include ${CPPFLAGS}" + else + CPPFLAGS="-I${withval} ${CPPFLAGS}" + fi + ] +) +AC_CHECK_LIB(pcsclite, SCardEstablishContext, , AC_MSG_ERROR([*** PC/SC Lite missing - please install first])) # Checks for header files. AC_HEADER_STDC @@ -28,4 +51,7 @@ AC_FUNC_MEMCMP AC_CHECK_FUNCS(memset strdup) #AC_CONFIG_FILES(Makefile) + +AC_SUBST(ac_aux_dir) + AC_OUTPUT(Makefile src/Makefile) diff --git a/src/libopensc/Makefile.am b/src/libopensc/Makefile.am index 3593b434..4dfa790a 100644 --- a/src/libopensc/Makefile.am +++ b/src/libopensc/Makefile.am @@ -1,8 +1,11 @@ ## Makefile.am -- Process this file with automake to produce Makefile.in + lib_LTLIBRARIES = libopensc.la libopensc_la_SOURCES = sc-asn1.c sc-base64.c sc-defaults.c \ sc-sec.c sc.c sc-pkcs15.c sc-pkcs15-cert.c \ sc-pkcs15-pin.c sc-pkcs15-prkey.c \ - sc-pkcs15-defaults.c + sc-pkcs15-defaults.c sc-pkcs15-sec.c libopensc_la_LDFLAGS = -version-info 0:1:0 +include_HEADERS = opensc.h opensc-pkcs15.h +noinst_HEADERS = sc-asn1.h diff --git a/src/libopensc/sc.c b/src/libopensc/sc.c index be3bcb42..309b4755 100644 --- a/src/libopensc/sc.c +++ b/src/libopensc/sc.c @@ -18,6 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "config.h" #include "opensc.h" #include "sc-asn1.h" #include @@ -26,8 +27,8 @@ #include #include -#ifdef OPENSC_VERSION -const char *sc_version = OPENSC_VERSION; +#ifdef VERSION +const char *sc_version = VERSION; #else #warning FIXME: version info const char *sc_version = "(undef)";