On Fri, 2004-12-31 at 07:48 +0200, dkouroun@xxxxxxxxx wrote: > > Hi all! > I am reading the autoconf manual and I > try to understand where AC_CHECK_HEADERS > searches to find the headers. > > ***Yes it does search. But WHERE and how can I change the > default search location???*** The "default" is whatever your compiler knows about. The normal way to add to this is to add -I flags to CPPFLAGS: $ ./configure CPPFLAGS="-I/your/include/dir" You can, of course, modify the CPPFLAGS variable in configure.ac before invoking the AC_CHECK_HEADERS macro. But you should not do that arbitrarily. > I have problems running configure > and stuff like that in my FreeBSD. > While it is working fine under SuSE > it cannot find GL/glut.h in checkheaders > AC_CHECK_HEADERS(GL/glut,, e.t.c) > > in Linux it can find it easily! > It is located in /usr/include/GL/glut.h > In FreeBSD it is located in > /usr/X11R6/include/GL/glut.h I suspect the AC_PATH_XTRA macro would help you; among other things it does, it should make available whatever -I flags you need for X11 headers in the X_CFLAGS output variable. It sounds like you might benefit even more from the GL detection macros I contributed to the Autoconf Macro Archive: <http://www.gnu.org/software/ac-archive/htmldoc/ax_check_gl.html> <http://www.gnu.org/software/ac-archive/htmldoc/ax_check_glu.html> <http://www.gnu.org/software/ac-archive/htmldoc/ax_check_glut.html> > Can you please help me with that? > Can anybody give me a sample configure.in for the following > case where I: > > > 1:) want to include some system libraries which are > not in the same directories for different OS. > e.g. Suppose I use FreeBSD and Linux but > the opengl libraries are located in different > directories. What macros should I add in configure > such it searches for that libraries and when it finds > them it automatically adds -L/dir/ -llib1, -llib2... > > 2:) how can I do the same for headeer files? You can look at the implementation of AC_PATH_X and AC_PATH_XTRA. The machinations there are not pretty. Fortunately, there is usually a Better Way. -- Braden McDaniel e-mail: <braden@xxxxxxxxxxxxx> <http://endoframe.com> Jabber: <braden@xxxxxxxxxx> _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf