[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bootstrapping issue finally resolved

From: Paul Hilfinger
Subject: Re: Bootstrapping issue finally resolved
Date: Thu, 27 Mar 2008 09:36:05 -0700

> > Specfically,
> > aclocal (in automake) looks for .m4 files in the directory under which
> > it is installed, and was therefore not finding the .m4 files
> > associated with gettext (also locally installed on my system, but in a
> > separate installation subdirectory).
> Exactly where are .m4 files looked for, and what was the workaround?  
> - I have experienced some similar problems with some programs (guile,  
> certain darcs downloads).


Well, I've appended what the aclocal info pages have to say on the
subject.   In my case, I rearranged my installation directories to be
more orthodox, but probably the 'dirlist' option at the bottom would
do as well or better.

Paul Hilfinger

    Macro search path

       By default, `aclocal' searches for `.m4' files in the following
    directories, in this order:

         This is where the `.m4' macros distributed with automake itself
         are stored.  APIVERSION depends on the automake release used; for
         automake 1.6.x, APIVERSION = `1.6'.

         This directory is intended for third party `.m4' files, and is
         configured when `automake' itself is built.  This is
         address@hidden@/aclocal/', which typically expands to
         `${prefix}/share/aclocal/'.  To find the compiled-in value of
         ACDIR, use the `--print-ac-dir' option (*note aclocal options::).

       As an example, suppose that automake-1.6.2 was configured with
    `--prefix=/usr/local'.  Then, the search path would be:

      1. `/usr/local/share/aclocal-1.6/'

      2. `/usr/local/share/aclocal/'

       As explained in (*note aclocal options::), there are several options
    that can be used to change or extend this search path.

    Modifying the macro search path: `--acdir'

       The most obvious option to modify the search path is `--acdir=DIR',
    which changes default directory and drops the APIVERSION directory.
    For example, if one specifies `--acdir=/opt/private/', then the search
    path becomes:

      1. `/opt/private/'

       Note that this option, `--acdir', is intended for use by the
    internal automake test suite only; it is not ordinarily needed by

    Modifying the macro search path: `-I DIR'

       Any extra directories specified using `-I' options (*note aclocal
    options::) are _prepended_ to this search list.  Thus, `aclocal -I /foo
    -I /bar' results in the following search path:

      1. `/foo'

      2. `/bar'


      4. ACDIR

    Modifying the macro search path: `dirlist'

       There is a third mechanism for customizing the search path.  If a
    `dirlist' file exists in ACDIR, then that file is assumed to contain a
    list of directories, one per line, to be added to the search list.
    These directories are searched _after_ all other directories.

       For example, suppose `ACDIR/dirlist' contains the following:


    and that `aclocal' was called with the `-I /foo -I /bar' options.
    Then, the search path would be

      1. `/foo'

      2. `/bar'


      4. ACDIR

      5. `/test1'

      6. `/test2'

       If the `--acdir=DIR' option is used, then `aclocal' will search for
    the `dirlist' file in DIR.  In the `--acdir=/opt/private/' example
    above, `aclocal' would look for `/opt/private/dirlist'.  Again,
    however, the `--acdir' option is intended for use by the internal
    automake test suite only; `--acdir' is not ordinarily needed by

       `dirlist' is useful in the following situation: suppose that
    `automake' version `1.6.2' is installed with $prefix=/usr by the system
    vendor. Thus, the default search directories are

      1. `/usr/share/aclocal-1.6/'

      2. `/usr/share/aclocal/'

       However, suppose further that many packages have been manually
    installed on the system, with $prefix=/usr/local, as is typical.  In
    that case, many of these "extra" `.m4' files are in
    `/usr/local/share/aclocal'.  The only way to force `/usr/bin/aclocal'
    to find these "extra" `.m4' files is to always call `aclocal -I
    /usr/local/share/aclocal'.  This is inconvenient.  With `dirlist', one
    may create the file


    which contains only the single line


       Now, the "default" search path on the affected system is

      1. `/usr/share/aclocal-1.6/'

      2. `/usr/share/aclocal/'

      3. `/usr/local/share/aclocal/'

       without the need for `-I' options; `-I' options can be reserved for
    project-specific needs (`my-source-dir/m4/'), rather than using it to
    work around local system-dependent tool installation directories.

       Similarly, `dirlist' can be handy if you have installed a local copy
    Automake on your account and want `aclocal' to look for macros
    installed at other places on the system.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]