autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFLAGS for AC_COMPILE_IFELSE.


From: Ralf Corsepius
Subject: Re: CFLAGS for AC_COMPILE_IFELSE.
Date: Tue, 13 May 2008 18:00:06 +0200

On Tue, 2008-05-13 at 18:01 +0200, Edward Tomasz Napierala wrote:
> On 0512T0631, Ralf Corsepius wrote:
> > > I need the configure script to figure out how many parameters one 
> > > particular
> > > library function requires, due to API change.  I've found a macro to do 
> > > that,
> > > it looks like this:
> > > 
> > > AC_DEFUN([AC_JACK_MIDI_NFRAMES_CHECK], [
> > > AC_MSG_CHECKING([whether JACK MIDI functions need nframes parameter])
> > > AC_LANG_PUSH(C)
> > > AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[
> > > #include <jack/jack.h>
> > > #include <jack/midiport.h>
> > > ]], [[
> > > jack_midi_event_get(0, 0, 0, 0);
> > > ]]), [jackmidi_nframes='yes'], [jackmidi_nframes='no'])
> > > AC_MSG_RESULT([$jackmidi_nframes])
> > > AC_LANG_POP()
> > > ])
> > > 
> > > Problem is, it does not work for me.  Probable reason is this
> > > (from config.log):
> > > 
> > > configure:5138: checking whether JACK MIDI functions need nframes 
> > > parameter
> > > configure:5172: gcc -c -g -O2  conftest.c >&5
> > > conftest.c:32:23: error: jack/jack.h: No such file or directory
> > > conftest.c:33:27: error: jack/midiport.h: No such file or directory
> > > 
> > > It does not work, because it does not use the proper CFLAGS - this
> > > is FreeBSD, includes live in /usr/local/include and it's neccessary
> > > to pass -I/usr/local/include.
> > Are you saying, they modified their GCC in such a way that it doesn't
> > look into /usr/local/include?
> 
> Yes, it seems so.
Really? This would seem rather stupid to me ... ;)

> > GCC's default behavior is to
> > use /usr/local/include implicitly, as part of GCC's system-include path,
> > in a similar way it treats /usr/include.
> 
> What about systems that put external libraries somewhere under
> /opt or /usr/pkg?

/usr/include (and /usr/lib) + /usr/local/include (and /usr/local/lib)
are special to GCC, they are on the system-default (include, library)
search paths, and are treated differently than other directories by GCC 

Any other directory, by default is not on GCC's default search paths and
must be manually added to calls to GCC.

Ralf






reply via email to

[Prev in Thread] Current Thread [Next in Thread]