This fixes building on OSX as well as config-updates for 89x on OSX.

-- 
Phil Dibowitz                             p...@ipom.com
Open Source software and tech docs        Insanity Palace of Metallica
http://www.phildev.net/                   http://www.ipom.com/

"Be who you are and say what you feel, because those who mind don't matter
 and those who matter don't mind."
 - Dr. Seuss

commit 87ea1e5dc93f1ef90029c3837fd954263457a11f
Author: Phil Dibowitz <p...@ipom.com>
Date:   Sun Dec 1 23:10:48 2013 -0800

    Various MacOSX fixes
    
    libconcord/configure.ac
    libconcord/Makefile.am
    libconcord/INSTALL
    * Start using pkg-config to find zlib - on OSX, some header files
      are in strange places
    
    libconcord/remote_z.cpp
    * For some reason the double-ack-read doesn't work in one instance
      on OSX. This is remote behavior, not host behavior, so I don't
      see how this is possible, but this is the only way I can make
      config updates on 890s work on OSX.
    
    Signed-off-by: Phil Dibowitz <p...@ipom.com>

diff --git a/libconcord/INSTALL.mac b/libconcord/INSTALL.mac
index 10d215a..d94e159 100644
--- a/libconcord/INSTALL.mac
+++ b/libconcord/INSTALL.mac
@@ -47,7 +47,13 @@ Finally, you will need to install libzip, which again is straight forward:
 1. BUILD THE LIBRARY
 
    As a normal user...
-     A. ***IF**** You are building from CVS, run "autoreconf --install"
+     A. ****IF**** You are building from git, run "autoreconf --install"
+        Note that if you're doing this on OSX, depending on your setup,
+        you may instead have to run:
+          aclocal -I /opt/pkgconfig/share/aclocal
+          autoheader
+          automake
+          autoconf
      B. Run "./configure"
      C. Run "make"
 
diff --git a/libconcord/Makefile.am b/libconcord/Makefile.am
index de6ae23..eda90d9 100644
--- a/libconcord/Makefile.am
+++ b/libconcord/Makefile.am
@@ -7,6 +7,7 @@ libconcord_la_SOURCES = remote.cpp remote_z.cpp libconcord.cpp binaryfile.cpp \
 	operationfile.cpp remote_mh.cpp libusbhid.cpp libhidapi.cpp
 include_HEADERS = libconcord.h
 libconcord_la_LDFLAGS = -version-info 3:0:0 $(LIBCONCORD_LDFLAGS) -lzip
+libconcord_la_CXXFLAGS = $(ZIP_CFLAGS)
 UDEVROOT ?= /
 UDEVLIBDIR ?= $(UDEVROOT)/lib
 
diff --git a/libconcord/configure.ac b/libconcord/configure.ac
index 48a453f..cc5898b 100644
--- a/libconcord/configure.ac
+++ b/libconcord/configure.ac
@@ -74,12 +74,7 @@ then
   fi
   AC_MSG_ERROR([$errorstr])
 fi
-AC_CHECK_HEADER(zip.h, [], [a=0])
-AC_CHECK_LIB(zip, zip_open, [], [a=0])
-if test $a == 0
-then
-    AC_MSG_ERROR([Error, libzip is missing!])
-fi
+PKG_CHECK_MODULES([ZIP], [libzip])
 AC_CONFIG_FILES([
     Makefile
 ])
diff --git a/libconcord/remote_z.cpp b/libconcord/remote_z.cpp
index 2c4ddc2..4e1fa45 100644
--- a/libconcord/remote_z.cpp
+++ b/libconcord/remote_z.cpp
@@ -1437,6 +1437,13 @@ int CRemoteZ_HID::UpdateConfig(const uint32_t len, const uint8_t *wr,
         return LC_ERROR;
     }
 
+/*
+ * For some strange reason on OSX, the second ACK read fails, but
+ * the second one is the only one that actually claims to be
+ * from COMMAND_FINISH_UPDATE, so we just don't do that read
+ * or that verify, and move on, and things seem to work.
+ */
+#ifndef __APPLE__
     /* And then we should have the response we want. */
     if ((err = TCP_Read(status, rlen, rsp))) {
         debug("Failed to read from remote");
@@ -1449,6 +1456,7 @@ int CRemoteZ_HID::UpdateConfig(const uint32_t len, const uint8_t *wr,
         debug("Failed to read finish-update ack");
         return LC_ERROR;
     }
+#endif
     cb(LC_CB_STAGE_FINALIZE_UPDATE, cb_count++, 5, 6, LC_CB_COUNTER_TYPE_STEPS,
        cb_arg, NULL);
 

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel

Reply via email to