#!/sbin/sh
#
# Sets up PC/SC lite's ccid ifdh
#
# Prerequisites:
#   Solaris 10 Companion software (/opt/sfw)
#   SUNWspro version 11+ compilers (/opt/SUNWspro)
#
#
# Configure for building libccid.so.0 on Solaris
#
# Prerequisites:
#
#   Solaris 10 Companion Software (/opt/sfw)
#   SUNWspro Version 11+ Compilers (/opt/SUNWspro)
#   PCSClite header files in /usr/include/smartcard
#

PROTO_ROOT=$1
chmod 777 $PROTO_ROOT/..
cd ccid-1.3.10

# This is required to find libusb-config
PATH=${PATH}:/usr/sfw/bin
export PATH

echo "Executing configure $PWD/configure"
./configure \
	PCSC_CFLAGS=-I/usr/include/smartcard \
	PCSC_LIBS=-lpcsclite \
	LIBUSB_LIBS=/usr/sfw/lib/libusb.so.1 \
	--enable-libusb=/usr/sfw \
	--prefix=$PROTO_ROOT \
	--exec-prefix=$PROTO_ROOT \
	--libdir=$PROTO_ROOT/usr/lib \
	--bindir=$PROTO_ROOT/usr/lib/smartcard \
	--sysconfdir=$PROTO_ROOT/etc/smartcard \
	--sbindir=$PROTO_ROOT/usr/lib/smartcard \
	--includedir=$PROTO_ROOT/usr/include/smartcard \
	--datadir=$PROTO_ROOT/usr/share/doc/smartcard \
	--localedir=$PROTO_ROOT/usr/share/locale \
	--infodir=$PROTO_ROOT/usr/share/doc/smartcard \
	--docdir=$PROTO_ROOT/usr/share/doc/smartcard \
	--pdfdir=$PROTO_ROOT/usr/share/doc/smartcard \
	--mandir=$PROTO_ROOT/usr/man \
	--enable-usbdropdir=$PROTO_ROOT/usr/lib/smartcard

