There are two sets of files in this directory;  m4 macros that are
supposed to be used by all packages and automake files that are
included by all of the Makefile.am's of each package.

M4 macros.  These macros are found in the file globus_package.m4.
They are as follows:

GLOBUS_INIT.  This macro is a catchall for the things that every
configure script for each package has to do.  Here's the list so far:

	- Process a required --with-flavor option to configure.

	- Set a WITHOUT_FLAVORS conditional for automake files.

	- Check for the GLOBUS_INSTALL_PATH variable.

	- Source the scripts globus-sh-tools.sh and
	globus-build-env-$GLOBUS_FLAVOR_NAME.sh.

	- Set $prefix and $exec_prefix

	- Perform AC_SUBST's on script variables found in
	globus-build-env-$GLOBUS_FLAVOR_NAME.sh.  Automake will
	convert these to make macros.

	- Add softlinks in the top build directory to the included
	automake files.  All though these aren't used by configure,
	Automake still sets them up as make targets which causes the
	build to fail if they don't exist.

	- Redefine the macro AM_PROG_LIBTOOL so that it softlinks the
	libtool for a particular flavor installed by globus core.

	- AC_SUBST FILELIST_FILE to an absolute path to the filelist
	file.  This is used by the recursive "make filelist" rules so
	that they don't have to keep track of where the top build
	directory is.

GLOBUS_SET_BUILD_DEPS. This macro accepts a space delimited list of
dependent package names.  After verifying that every package in the
list is installed, it stores the list in GLOBUS_BUILD_DEPS.

GLOBUS_ADD_XTRA_LIBS.  This macro keeps adds flags to a cummulative list
of library flags every time it is called.  The list is stored in
GLOBUS_XTRA_LIBS.

GLOBUS_GENERATE.  This macro needs to be called after
GLOBUS_SET_BUILD_DEPS and after all calls to GLOBUS_ADD_XTRA_LIBS.  It
AC_SUBST the two lists so that they will be set in the package's
build_parameters file.  It also executes the perl script
globus_build_config.pl and stores the results in GLOBUS_LINKLINE.
This AC_SUBST'ed variable can then be used by a package's
Makefile.am's for linking executables with the libraries of dependent
packages.

EXAMPLE.  Say we have package fee that uses the libraries of packages
foo and fum.  It also uses the external X and Xpm libraries.  The
following would be in fee's configure.in

GLOBUS_INIT

GLOBUS_SET_BUILD_DEPS([foo fum])

dnl some code to test the existance of X library.
GLOBUS_ADD_XTRA_LIBS([ -h/usr/lib/X11 -lX ])

dnl some code to test the existance of Xpm library.
GLOBUS_ADD_XTRA_LIBS([ -h/opt/xpm/lib -lXpm ])

GLOBUS_GENERATE

An automake program target for the package foo would look like this:

bin_PROGRAMS = foo

foo_LDADD = @GLOBUS_LINKLINE@

See the package gssapi_ssleay for a more comprehensive example.



Automake files.  There are three automake files that are installed in
the globus tree and then softlinked and included by the Makefile.am's
of each package.

	automake_targets - defines all of the special directories in
	the globus installation tree. IOW anything other than what GNU
	defines (ie. bin, lib, include, etc).

	automake_rules - contains "make link", "make unlink" and "make
	filelist" recursive rules.  make link is designed to create
	softlinks of install targets rather than copying them.  make
	unlink reverses a make link.  make filelist adds the install
	location of all of the install targets to a file called
	$(GLOBUS_FLAVOR_NAME)_filelist in the top build directory.

	automake_top_rules - contains the rule to kick off a make
	filelist.  It is supposed to remove the old filelist file
	before calling the other targets but that does not seem to be
	working right now.

Generating Automake files.  All of these automake files need to be modified
everytime the globus installation directory structure is changed.  The
changes to the two rules files are usually both redundant and
extensive. The perl script create_automake_rules.pl is used to
regenerate these rules files based on the directory structure defined
in automake_targets.  The *.am are rule templates used by
create_automake_rules.pl.  They are based on the make install
templates used by automake.





