opensc/configure.in

58 lines
1.4 KiB
Plaintext

# Process this file with autoconf to produce a configure script.
AC_INIT(libopensc)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_SRCDIR(src/sc.c)
AM_CONFIG_HEADER(config.h:config.h.in)
AM_INIT_AUTOMAKE(libopensc, 0.3.2)
# Checks for programs.
AC_PROG_CC
AC_PROG_LIBTOOL
# Checks for libraries.
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
AC_CHECK_HEADERS(stdlib.h string.h unistd.h assert.h strings.h)
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MEMCMP
AC_CHECK_FUNCS(memset strdup)
#AC_CONFIG_FILES(Makefile)
AC_SUBST(ac_aux_dir)
AC_OUTPUT(Makefile src/Makefile)