odt2txt for osx

07 May 2009
Posted by luciferous
luciferous's picture

odt2txt is a utility to extract text out of Open Office documents. The extracted text can be useful if you want to find out if the text in two documents differ. Well, that's what I was looking to do.

But, it didn't build on OSX; maybe there was a way to do this by passing arguments to make–I don't know–I had to add the following to the Makefile to get it to recognize my Macports.

ifeq ($(UNAME_S),Darwin)
  CFLAGS += -DICONV_CHAR="const char" -I/opt/local/include
  LDFLAGS += -L/opt/local/lib
  LIBS += -liconv
endif

It built fine after that.