Added support for checking libreadline and use it
for opensc-explorer if one is found. git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@235 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
d8de0c6da7
commit
4aa18a9ff9
|
@ -314,6 +314,14 @@ AM_CONDITIONAL(HAVE_PCSCLITE, test "x$ac_cv_lib_pcsclite_SCardEstablishContext"
|
|||
AC_SUBST(LIBDL)
|
||||
AC_CHECK_LIB(dl, dlopen, [LIBDL="$LIBDL -ldl" ac_cv_func_dlopen_ldl=yes], ac_cv_func_dlopen_ldl=no)
|
||||
|
||||
AC_SUBST(LIBREADLINE)
|
||||
AC_CHECK_LIB(readline, readline, [LIBREADLINE="$LIBREADLINE -lreadline" ac_cv_func_readline_lreadline=yes], ac_cv_func_readline_lreadline=no)
|
||||
|
||||
saved_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIBREADLINE"
|
||||
AC_CHECK_FUNCS(readline)
|
||||
LIBS="$saved_LIBS"
|
||||
|
||||
dnl The big search for OpenSSL
|
||||
AC_ARG_WITH(ssl-dir,
|
||||
[ --with-ssl-dir=PATH Specify path to OpenSSL installation],
|
||||
|
|
|
@ -13,8 +13,7 @@ bin_PROGRAMS = opensc-tool opensc-explorer pkcs15-crypt pkcs15-tool \
|
|||
opensc_tool_SOURCES = opensc-tool.c util.c
|
||||
opensc_tool_LDADD = @GETOPTSRC@
|
||||
opensc_explorer_SOURCES = opensc-explorer.c util.c
|
||||
## FIXME: conditionally add -lreadline
|
||||
opensc_explorer_LDADD = @GETOPTSRC@
|
||||
opensc_explorer_LDADD = @GETOPTSRC@ @LIBREADLINE@
|
||||
pkcs15_tool_SOURCES = pkcs15-tool.c util.c
|
||||
pkcs15_tool_LDADD = @GETOPTSRC@
|
||||
pkcs15_crypt_SOURCES = pkcs15-crypt.c util.c
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include "util.h"
|
||||
#include <opensc-pkcs15.h>
|
||||
#include <openssl/bn.h>
|
||||
|
|
|
@ -18,17 +18,16 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <opensc.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#undef USE_READLINE
|
||||
|
||||
#ifdef USE_READLINE
|
||||
#include <opensc.h>
|
||||
#ifdef HAVE_READLINE
|
||||
#include <readline/readline.h>
|
||||
#endif
|
||||
|
||||
#include "util.h"
|
||||
|
||||
int opt_reader = 0, opt_debug = 0;
|
||||
|
@ -804,7 +803,7 @@ static int parse_line(char *in, char **argv)
|
|||
return argc;
|
||||
}
|
||||
|
||||
#ifndef USE_READLINE
|
||||
#ifndef HAVE_READLINE
|
||||
char * readline(const char *prompt)
|
||||
{
|
||||
static char buf[128];
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include "util.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include "util.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
* Copyright (C) 2002 Olaf Kirch <okir@lst.de>
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
#include <openssl/bn.h>
|
||||
|
|
|
@ -15,6 +15,9 @@
|
|||
* Copyright (C) 2002, Olaf Kirch <okir@lst.de>
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include "util.h"
|
||||
#include <opensc-pkcs15.h>
|
||||
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
* Copyright (C) 2002 Olaf Kirch <okir@lst.de>
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <stdarg.h>
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "util.h"
|
||||
|
||||
void print_binary(FILE *f, const u8 *buf, int count)
|
||||
|
|
Loading…
Reference in New Issue