error copmpiling openocd with libftd2xx

I have r1938 of openocd, and downloaded [libftd2xx v 0.4.16 for 64bit systems.

I have install libftd2xx following instruction in README.

I configure openocd after bootstrap as follows:

./configure --enable-ft2232_ftd2xx --disable-werror --enable-maintainer-mode --with-ftd2xx-linux-tardir=/home/POWERSOFT/massimiliano/download/openocd/libftd2xx0.4.16_x86_64

but make stops with an error:

libtool: link: gcc -std=gnu99 -g -O2 -I/home/POWERSOFT/massimiliano/download/openocd/libftd2xx0.4.16_x86_64 -Wall -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -o .libs/openocd main.o /home/POWERSOFT/massimiliano/download/openocd/libftd2xx0.4.16_x86_64/static_lib/libftd2xx.a.0.4.16  ./.libs/libopenocd.so -ldl -lpthread
./.libs/libopenocd.so: undefined reference to `FT_GetLatencyTimer'
./.libs/libopenocd.so: undefined reference to `FT_Close'
./.libs/libopenocd.so: undefined reference to `FT_SetBitMode'
./.libs/libopenocd.so: undefined reference to `FT_OpenEx'
./.libs/libopenocd.so: undefined reference to `FT_Read'
./.libs/libopenocd.so: undefined reference to `FT_SetTimeouts'
./.libs/libopenocd.so: undefined reference to `FT_SetVIDPID'
./.libs/libopenocd.so: undefined reference to `FT_Write'
./.libs/libopenocd.so: undefined reference to `FT_SetLatencyTimer'
./.libs/libopenocd.so: undefined reference to `FT_ListDevices'
./.libs/libopenocd.so: undefined reference to `FT_Purge'
collect2: ld returned 1 exit status

what is wrong? where is the mistake?

thanks](http://www.ftdichip.com/Drivers/D2XX/Linux/libftd2xx0.4.16_x86_64.tar.gz)

Openocd defaults to a 32-bit build. You can’t link 32-bit code against a 64-bit library…

Edit: it defaults to -m32 on Linux x86_64 and -m64 on OS X.