libpcp / pcp

PCP client library
BSD 2-Clause "Simplified" License
69 stars 30 forks source link

OSX compilation #12

Closed clemahieu closed 10 years ago

clemahieu commented 10 years ago

This doesn't seem to compile on OSX. When using autogen.sh it's looking for libtoolize which seems to be glibtoolize from macports. When using cmake the file pcp_app.c seems to include getopt.h which is in the win_utils directory which references windows.h. When moving getopt.h in to the #ifdef WIN32 section it seems pcp_gettimeofday.c still gets pulled in somehow which is also in the windows directory.

ptatrai commented 10 years ago

Cmake is currently used only for Windows build. Use autotools on OSX. Did you try to execute ./configure and make after ./autogen.sh? I've just tried it and it just works for me. If it still doesn't work, logs would be helpful.

ptatrai commented 10 years ago

Script autogen.sh tries to run libtoolize and if it fails it will run glibtoolize. It's on line 21. It will output an error with libtoolize error, but just ignore it.