[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C flags and headers in a C library
From: |
Noah Misch |
Subject: |
Re: C flags and headers in a C library |
Date: |
Wed, 2 May 2007 11:31:05 -0700 |
User-agent: |
Mutt/1.5.9i |
On Wed, May 02, 2007 at 12:30:48AM +0100, Joseph Wakeling wrote:
> First, I'm not sure how to add cflags and library flags to gcc as called
> by libtool.
Given this from your configure.ac:
> MINGA_CFLAGS="-ansi -pedantic -Wall"
> AC_SUBST([MINGA_CFLAGS])
Add a line like this to Makefile.am:
AM_CFLAGS = $(MINGA_CFLAGS)
or simply:
AM_CFLAGS = -ansi -pedantic -Wall
Note that it's usually unwise to add such flags unconditionally; many compilers
do not support them.
> Second, I can't work out how to tell the program that it should copy
> header files to the $(prefix)/include directory. Adding an
> include_HEADERS line to Makefile.am, for example, results in an error
> that there is no rule to build the header files.
Adding such a line is generally correct. It sounds as though the headers do not
exist under the names you call them from Makefile.am. If you do generate these
headers during your build process, look at documentation for BUILT_SOURCES in
the GNU Automake manual.
If none of that seems to apply, please post a Makefile.am with your
include_HEADERS line and also the build error that arises with it.