help-gnu-utils
[Top][All Lists]
Advanced

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

configure.in: how to add an include search path


From: Mik
Subject: configure.in: how to add an include search path
Date: Thu, 6 Jan 2005 03:49:52 +0100

Hi,

I know this is a really lame question but I have been searching here and 
there and I can't find an explicit answer. The question is... how do I add 
in configure.in (or wherever) a new include search path for a library if 
it's detected ?. For example, I add those lines to configure.in :

AH_TEMPLATE(C_MT32,[Define to 1 to enable Roland MT32 emulation, requires 
mt32emu])

AC_ARG_ENABLE(mt32emu,AC_HELP_STRING([--disable-mt32],[Disable Roland MT32 
emulation support]),,enable_mt32emu=yes)

AC_CHECK_LIB(mt32emu, open, have_mt32emu_lib=yes, have_mt32emu_lib=no, )

AC_CHECK_HEADER(mt32emu/mt32emu.h,have_mt32emu_h=yes,have_mt32emu_h=no,)

if test x$enable_mt32emu = xyes -a x$have_mt32emu_lib = xyes -a 
x$have_mt32emu_h = xyes ; then

AC_MSG_RESULT(yes)

LIBS="$LIBS -lmt32emu"

AC_DEFINE(C_MT32,1)

else

AC_MSG_WARN([Can't find mt32emu, Roland MT32 emulation support disabled])

fi


And it correctly detects the new include and library added to the project. 
But the includes are located at <mt32emu/*.h> and the sources must call them 
this way: #include "*.h", so the path $(prefix)/include/mt32emu must be 
added to the default include search path in all Makefiles. How can I tell 
autoconf to add this new default search path ? I have been trying to know 
how SDL library adds its path in the same configure.in, but I can't find any 
clue.

Another question is that, although ./configure finds the mt32emu includes, 
it says "mt32emu.h present but cannot be compiled".

Can you help me ? Thanks in advance.
-- 
Mik



reply via email to

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