- fixed a few bugs in Autotools support

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@57 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
jey 2001-11-27 21:11:32 +00:00
parent e5d40ca03c
commit d277cf5d5c
6 changed files with 83 additions and 6 deletions

View File

@ -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

5
NEWS
View File

@ -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.

27
README
View File

@ -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/.

View File

@ -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)

View File

@ -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

View File

@ -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 <stdio.h>
@ -26,8 +27,8 @@
#include <assert.h>
#include <ctype.h>
#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)";