Csound Csound-dev Csound-tekno Search About

[CSOUND-DEV:3294] RE: load_opcodes.c

Date2003-11-06 00:01
From"Michael Gogins"
Subject[CSOUND-DEV:3294] RE: load_opcodes.c
I'm afraid I find the GNU documentation all but impenetrable. I get lost
when I try to figure out how to do anything non-standard. A hint about how
to handle the "heavy lifting" in the configure.ac would be most appreciated.
All the documents seem to assume you've been using bash, awk, sed, and
programming in the GNU style for a few years. Even a pointer where to look
in the documentation. I'd be happy to be able to develop the same way on all
platforms. And according to John Fitch, the plugin opcodes should work on an
OS X build.

============================================
Michael Gogins
gogins at pipeline period com
Irreducible Productions
Silence, a language for programming music and sound
Available at http://sourceforge.net/projects/silencevst/
============================================


----- Original Message ----- 
From: "John D. Ramsdell" 
To: "Csound Developers Discussion List" 
Sent: Wednesday, November 05, 2003 11:05 AM
Subject: [CSOUND-DEV:3288] RE: load_opcodes.c


> "gogins@pipeline.com"  writes:
>
> > What would really be ideal here, and maybe with you and John
> > Ramsdell working on this maybe we can get there, is a single GNU
> > build system that would work for all 3 major platforms (Windows,
> > Linux, OS X).
>
> I see no reason to set our goals so low.  Surely we should support at
> least BSD and Solaris too.  After I finish addressing the "make
> install" problem, I promise to look at the dynamic loading problem. I
> have some travel approaching, so it may take me a little time to get
> to it.
>
> > But audio is the thorn in our side here. It might take custom build
> > rules in the Makefile.am's for the audio driver .o's to get the
> > audio drivers building.
>
> Actually this is best implemented with most of the heavy lifting done
> in configure.in, and just small adjustments in the Makefile.am's.  The
> tools are designed to handle this task.  I think I recall a section in
> the automake documentation specifically describing one solution.
>
> John
>

Date2003-11-06 20:13
Fromramsdell@mitre.org (John D. Ramsdell)
Subject[CSOUND-DEV:3303] RE: load_opcodes.c
"Michael Gogins"  writes:

> A hint about how to handle the "heavy lifting" in the configure.ac
> would be most appreciated.

I think John ffitch has already done the "heavy lifting".  His
configure.in file contains a big case dispatch based on the value of
the variable $host.  It starts with "case $host in".  In the cases, he
sets various variable of the form: RTAUTDIO_*.  Later, he uses them to
set AUD* variables, and finally, makes them available to you with:

AC_SUBST(AUDOBJ)
AC_SUBST(AUDSRC)
AC_SUBST(AUDHDR)
AC_SUBST(AUDLIBS)

When using automake, you must remember to be sure that all the right
files are included in a distribution.  This is done by mentioning all
the source files that may be left out of a specific configuration in
the value of EXTRA_DIST, or something like that.  If you search for
EXTRA_DIST in the automake documentation, I'm sure you'll find the
section that describes what to do when some files are not used by some
configurations.

In summary you do something like:

lib_LIBRARIES = libcsound.a
noinst_PROGRAMS = makedb
pkgdata_DATA = csound.xmg

libcsound_a_SOURCES = .... $(AUDSRC) $(AUDHDR)

EXTRA_libcsound_a_SOURCES = $(ALL_AUDSRC) $(ALL_AUDHDR)

makedb_SOURCES = makedb.c text.h

EXTRA_makedb_SOURCES = all_strings english-strings french-strings

csound.xmg:	english-strings makedb
	./makedb $(srcdir)/english-strings English
	mv English.xmg csound.xmg

John