On Oct 31, 2008, at 10:33 AM, Steve Franks wrote:

On Fri, Oct 31, 2008 at 10:10 AM, Steve Franks <[EMAIL PROTECTED]> wrote:
(#1)

I seem to have a reoccurring problem getting oocd to build on freebsd,
because we keep our includes in /usr/local/include instead of
/usr/include.  Six months ago, configure
--includedir=/usr/local/include worked like a charm, but now it
doesn't.  If I manually add -I$(includedir) to INCLUDES in all the
makefiles, suddenly ftdi.h gets located correctly again.

If this is the correct fix (I'm no expert on configure), could I get
it committed to svn?  I assume that Makefile.in gets it, right?


--includedir sets the install directory for OpenOCD's include files. Setting that doesn't imply that the same directory should be used for locating includes when building OpenOCD. The fix is to set CFLAGS properly (e.g. CFLAGS="-I/usr/local/include") when running configure.

(#3)

same goes for $(libdir)


Similar to #1. --libdir sets the install directory for OpenOCD libraries. If you want an additional path to be searched for libraries when building OpenOCD, you want to set LDFLAGS (e.g. LDFLAGS="-L/usr/local/lib").

(#4)

In openocd.c alloca.h is included.  Freebsd keeps these functions in
stdlib.h, but I can't figure out which #ifdef to use at the moment so
alloca.h doesn't get included..perhaps #ifdef LINUX, then #include
<alloca.h>?



Typically this gets added as a test in configure.in. That in turn sets a #define in config.h. It doesn't appear that there is a test defined in configure.in for alloca in stdlib.h. Look at the autoconf manual for the macro to use for that type of test (function declared in header).

--
Rick Altherr
[EMAIL PROTECTED]

"He said he hadn't had a byte in three days. I had a short, so I split it with him."
 -- Slashdot signature


Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to