[Pcsclite-cvs-commit] PCSC config.h.in,1.10,1.11 configure.in,1.27,1.28
aet-guest@quantz.debian.org
aet-guest@quantz.debian.org
Sun, 07 Sep 2003 19:34:43 +0200
Update of /cvsroot/pcsclite/PCSC
In directory quantz:/tmp/cvs-serv30235
Modified Files:
config.h.in configure.in
Log Message:
- Remove MSC/PCSC_TARGET_XYZ defines and the massive
use of unflexible automake conditionals. The main
reason why pcsc-lite requires "too much" work when
porting to another OS. Introduced define PCSC_ARCH,
which uses 'uname' as an input. Except Darwin->MacOS.
- Removed --enable-usb
- Preliminary rewrite of src/Makefile.am, doesn't work
yet.
- Use gcc specific compiler options only if
gcc detected.
Index: config.h.in
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/config.h.in,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- config.h.in 14 Aug 2003 16:36:00 -0000 1.10
+++ config.h.in 7 Sep 2003 17:34:41 -0000 1.11
@@ -69,27 +69,6 @@
/* directory containing MuscleCard bundles */
#undef MSC_SVC_DROPDIR
-/* AIX */
-#undef MSC_TARGET_AIX
-
-/* BSD */
-#undef MSC_TARGET_BSD
-
-/* HP-UX */
-#undef MSC_TARGET_HPUX
-
-/* Linux */
-#undef MSC_TARGET_LINUX
-
-/* OSX */
-#undef MSC_TARGET_OSX
-
-/* Solaris */
-#undef MSC_TARGET_SOLARIS
-
-/* TRU64 */
-#undef MSC_TARGET_TRU64
-
/* Name of package */
#undef PACKAGE
@@ -113,27 +92,6 @@
/* enable full PCSC debug messaging. */
#undef PCSC_DEBUG
-
-/* AIX */
-#undef PCSC_TARGET_AIX
-
-/* BSD */
-#undef PCSC_TARGET_BSD
-
-/* HP-UX */
-#undef PCSC_TARGET_HPUX
-
-/* Linux */
-#undef PCSC_TARGET_LINUX
-
-/* OSX */
-#undef PCSC_TARGET_OSX
-
-/* Solaris */
-#undef PCSC_TARGET_SOLARIS
-
-/* TRU64 */
-#undef PCSC_TARGET_TRU64
/* Define to the necessary symbol if this constant uses a non-standard name on
your system. */
Index: configure.in
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/configure.in,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- configure.in 4 Sep 2003 20:52:00 -0000 1.27
+++ configure.in 7 Sep 2003 17:34:41 -0000 1.28
@@ -67,61 +67,14 @@
#AC_TYPE_SIGNAL
#AC_CHECK_FUNCS(gettimeofday strdup strtoul)
-dnl Select OS specific versions of source files.
-case "${build_os}" in
- *linux*) arch=linux ;;
- *bsd*) arch=bsd ;;
- *darwin*) arch=darwin ;;
- *solaris*) arch=solaris ;;
- *hpux*) arch=hpux ;;
- *osf*) arch=tru64 ;;
- *aix*) arch=aix ;;
- *) AC_MSG_ERROR([Operating system ${build_os} not supported]) ;;
+dnl Use 'uname' output as an architecture define
+uname=`uname`
+case "$uname" in
+Darwin)
+ uname=MacOS
+ ;;
esac
-
-AM_CONDITIONAL(PCSC_ARCH_LINUX, test x$arch = xlinux)
-AM_CONDITIONAL(PCSC_ARCH_BSD, test x$arch = xbsd)
-AM_CONDITIONAL(PCSC_ARCH_OSX, test x$arch = xdarwin)
-AM_CONDITIONAL(PCSC_ARCH_SOLARIS, test x$arch = xsolaris)
-AM_CONDITIONAL(PCSC_ARCH_HPUX, test x$arch = xhpux)
-AM_CONDITIONAL(PCSC_ARCH_TRU64, test x$arch = xtru64)
-AM_CONDITIONAL(PCSC_ARCH_AIX, test x$arch = xaix)
-
-if test x$arch = xlinux ; then
- AC_DEFINE(PCSC_TARGET_LINUX, 1, [Linux])
- AC_DEFINE(MSC_TARGET_LINUX, 1, [Linux])
-fi
-
-if test x$arch = xbsd ; then
- AC_DEFINE(PCSC_TARGET_BSD, 1, [BSD])
- AC_DEFINE(MSC_TARGET_BSD, 1, [BSD])
-fi
-
-if test x$arch = xdarwin ; then
- AC_DEFINE(PCSC_TARGET_OSX, 1, [OSX])
- AC_DEFINE(MSC_TARGET_OSX, 1, [OSX])
-fi
-
-if test x$arch = xsolaris ; then
- AC_DEFINE(PCSC_TARGET_SOLARIS, 1, [Solaris])
- AC_DEFINE(MSC_TARGET_SOLARIS, 1, [Solaris])
-fi
-
-if test x$arch = xhpux ; then
- AC_DEFINE(PCSC_TARGET_HPUX, 1, [HP-UX])
- AC_DEFINE(MSC_TARGET_HPUX, 1, [HP-UX])
-fi
-
-if test x$arch = xtru64 ; then
- AC_DEFINE(PCSC_TARGET_TRU64, 1, [TRU64])
- AC_DEFINE(MSC_TARGET_TRU64, 1, [TRU64])
-fi
-
-if test x$arch = xaix ; then
- AC_DEFINE(PCSC_TARGET_AIX, 1, [AIX])
- AC_DEFINE(MSC_TARGET_AIX, 1, [AIX])
-fi
-
+AC_DEFINE_UNQUOTED(PCSC_ARCH, "$uname", [PC/SC target architecture])
dnl check if libusb is available
AC_CHECK_LIB(usb, usb_init, [ use_libusb=true ], [ use_libusb=false ])
@@ -168,35 +121,6 @@
AM_CONDITIONAL(PCSC_THR_SAFE, test x$threadsafe = xtrue)
-
-dnl --enable-usb option.
-AC_ARG_ENABLE(usb,
-[ --enable-usb enable USB hotplug support (Linux only), deprecated],
-[ case "${enableval}" in
- yes)
- AC_MSG_WARN([This option is deprecated. Use libusb instead.])
- case "${build_os}" in
- *linux*)
- usb=true
- libusb=false
- ;;
- *) AC_MSG_WARN([USB hotplug support only available on Linux])
- usb=false
- ;;
- esac
- ;;
- no) usb=false ;;
- *) AC_MSG_ERROR([bad value ${enableval} for --enable-usb]) ;;
- esac],
-[
- usb=false
-])
-
-AC_MSG_RESULT([enable linux usb capability : $usb (deprecated, use libusb)])
-
-AM_CONDITIONAL(PCSC_LINUX_USB, test x$usb = xtrue)
-
-
dnl --enable-usbdropdir=DIR
AC_ARG_ENABLE(usbdropdir,
[ --enable-usbdropdir=DIR directory containing USB drivers (default /usr/local/pcsc/drivers/)],
@@ -329,8 +253,9 @@
CC="$PTHREAD_CC"
fi
-
-CFLAGS="$CFLAGS -Wall -fno-common"
+if test "$GCC" = "yes"; then
+ CFLAGS="$CFLAGS -Wall -fno-common"
+fi
dnl Setup dist stuff
AC_SUBST(ac_aux_dir)