Hello,

I'm a novice user of the GNU autotools trying to create the appropriate
configuration for a small simulation library I'm writing, called Minga.

>From web tutorials, and examining configure.ac and Makefile.am files in
other free software projects, I've been able to put together something
that appears to allow the library to compile and install but there are a
couple of things that don't work.

First, I'm not sure how to add cflags and library flags to gcc as called
by libtool.  I've tried using AC_SUBST() but the requested flags don't
show up when make is called.  An example of what does show up is,

--------------------------
gcc -DHAVE_CONFIG_H -I. -g -O2 -MT minga_version.lo -MD -MP -MF
.deps/minga_version.Tpo -c minga_version.c  -fPIC -DPIC -o
.libs/minga_version.o
--------------------------

.... when I have been trying to add the flags -ansi -Wall and the
appropriate flags for the GNU Scientific Library (on which my program is
dependent).

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.

I've attached the configure.ac and Makefile.am files to this email and I
wonder if anyone can advise what's wrong?

Thanks for any advice,

    -- Joe
AC_INIT([minga],[0.0.1],[EMAIL PROTECTED])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])


AC_LANG(C)
AC_PROG_CC
AC_PROG_LIBTOOL

PKG_CHECK_MODULES([DEPS], [gsl >= 1.8])
AC_SUBST([DEPS_CFLAGS])
AC_SUBST([DEPS_LIBS])

MINGA_CFLAGS="-ansi -pedantic -Wall"

AC_SUBST([MINGA_CFLAGS])

AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile minga/Makefile agents/Makefile anal/Makefile 
error/Makefile games/Makefile])

AC_OUTPUT
MINGA_VERSION_INFO = "0:0:0"
SUBDIRS = minga agents anal error games
SUBLIBS = agents/libmingaagents.la anal/libmingaanal.la error/libmingaerror.la 
games/libmingagames.la
#pkginclude_HEADERS = minga_agents.h minga_agent_config.h minga_anal.h 
minga_error.h minga_game.h minga_game_config.h minga_rng.h

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = minga.pc

lib_LTLIBRARIES = libminga.la
libminga_la_SOURCES = minga_version.c
libminga_la_LIBADD = $(SUBLIBS)
libminga_la_LDFLAGS = -version-info $(MINGA_VERSION_INFO)
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to