The attached patch allows ccid-1.0.0 to build and work on Solaris
(or is that SunOS?:) with Sun Studio compilers.

Tweaks:

* Removed "-Wall" from CFLAGS in configure - it's a gcc thing

* Set BUNDLE_HOST to "SunOS" (configure.in -> configure)

* Solaris' usb.h doesn't define __USB_H__, but it does define
  _SYS_USB_LIBUSB_USB_H, so I made ccid_usb.h check for both.

    ~Iain



diff -cur ccid-1.0.0.orig/configure ccid-1.0.0/configure
--- ccid-1.0.0.orig/configure	Fri Mar  3 09:24:17 2006
+++ ccid-1.0.0/configure	Sat Mar  4 15:55:22 2006
@@ -20027,12 +20027,16 @@
 	BUNDLE_HOST="OpenBSD"
 	DYN_LIB_EXT="so.0.0"
 	;;
+*-*-solaris*)
+	BUNDLE_HOST="SunOS"
+	DYN_LIB_EXT="so"
+	;;
 *)
 	BUNDLE_HOST="Linux"
 	DYN_LIB_EXT="so"
 esac
 
-CFLAGS="$CFLAGS -Wall"
+CFLAGS="$CFLAGS"
 
 # --enable-libusb
 # Check whether --enable-libusb or --disable-libusb was given.
diff -cur ccid-1.0.0.orig/configure.in ccid-1.0.0/configure.in
--- ccid-1.0.0.orig/configure.in	Fri Mar  3 09:21:42 2006
+++ ccid-1.0.0/configure.in	Sat Mar  4 16:02:08 2006
@@ -91,12 +91,16 @@
 	BUNDLE_HOST="OpenBSD"
 	DYN_LIB_EXT="so.0.0"
 	;;
+*-*-solaris*)
+	BUNDLE_HOST="SunOS"
+	DYN_LIB_EXT="so"
+	;;
 *)
 	BUNDLE_HOST="Linux"
 	DYN_LIB_EXT="so"
 esac
 
-CFLAGS="$CFLAGS -Wall"
+CFLAGS="$CFLAGS"
 
 # --enable-libusb
 AC_ARG_ENABLE(libusb,
diff -cur ccid-1.0.0.orig/src/ccid_usb.h ccid-1.0.0/src/ccid_usb.h
--- ccid-1.0.0.orig/src/ccid_usb.h	Mon Aug  8 12:58:23 2005
+++ ccid-1.0.0/src/ccid_usb.h	Sat Mar  4 15:55:22 2006
@@ -33,7 +33,7 @@
 
 status_t CloseUSB(unsigned int reader_index);
 
-#ifdef __USB_H__
+#if defined (__USB_H__) || defined (_SYS_USB_LIBUSB_USB_H)
 int get_desc(int lun, usb_dev_handle **handle, struct usb_device **dev);
 
 /[EMAIL PROTECTED]@*/ struct usb_interface *get_ccid_usb_interface(struct usb_device *dev);
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to