[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CFLAGS for AC_COMPILE_IFELSE.
From: |
Edward Tomasz Napierala |
Subject: |
CFLAGS for AC_COMPILE_IFELSE. |
Date: |
Sun, 11 May 2008 11:57:19 +0200 |
User-agent: |
Mutt/1.5.16 (2007-06-09) |
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.
So, the question is, how to modify the above macro to use CFLAGS it got
(or should got) from pkg-config, for example?
--
If you cut off my head, what would I say? Me and my head, or me and my body?
- CFLAGS for AC_COMPILE_IFELSE.,
Edward Tomasz Napierala <=
Re: CFLAGS for AC_COMPILE_IFELSE., Brian Dessent, 2008/05/13