kdtree library manual

installation guide

Setting up kdtree for use is extremely easy. There are two ways to use this library: you can either "properly" install it in the system, or you can just build the kdtree source files along with your program, since the library is very small.

proper installation

Just run: ./configure, make, and make install (the last one should be executed as root if you are installing the library system-wide).

Run ./configure --help for configuration options. The most important options are --prefix=<installation path prefix>, and --disable-fastalloc to disable the fast result node allocator, which depends on pthreads for locking.

kdtree source files in your program

Just copy kdtree.c and kdtree.h files and build them along with your program. Make sure you have USE_LIST_NODE_ALLOCATOR defined when compiling kdtree.c if you want the fast result node allocator. If you do so, remember to link with libpthread too.

Of course you need to keep the copyright notices intact if you merge the kdtree source files with your program in any way.