How can I make an arbitrary directory of M4 macros available to autoconf?

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

 



Hello.

I am writing a source-based package manager incorporating autotools. I
have made a package for automake which installs to
/Users/olav/Developer/Packages/automake/pm_installation:

$ find  ~/Developer/Packages/automake/pm_installation -depth 2
/Users/olav/Developer/Packages/automake/pm_installation/bin/aclocal
/Users/olav/Developer/Packages/automake/pm_installation/bin/automake-1.16
/Users/olav/Developer/Packages/automake/pm_installation/bin/aclocal-1.16
/Users/olav/Developer/Packages/automake/pm_installation/bin/automake
/Users/olav/Developer/Packages/automake/pm_installation/share/man
/Users/olav/Developer/Packages/automake/pm_installation/share/aclocal
/Users/olav/Developer/Packages/automake/pm_installation/share/info
/Users/olav/Developer/Packages/automake/pm_installation/share/automake-1.16
/Users/olav/Developer/Packages/automake/pm_installation/share/aclocal-1.16
/Users/olav/Developer/Packages/automake/pm_installation/share/doc

I have /Users/olav/Developer/Packages/automake/pm_installation/bin in
my $PATH:

$ which automake
/Users/olav/Developer/Packages/automake/pm_installation/bin/automake

When I tried running autoconf in the GNU Hello Git repository I
realised that I have not made the M4 macros of automake available:

$ pwd
/Users/olav/Developer/Packages/hello
$ autoconf
configure.ac:18: error: possibly undefined macro: AM_INIT_AUTOMAKE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:42: error: possibly undefined macro: AM_CONDITIONAL
configure.ac:52: error: possibly undefined macro: AM_MISSING_PROG
configure.ac:61: error: possibly undefined macro: AM_GNU_GETTEXT_VERSION
configure.ac:62: error: possibly undefined macro: AM_GNU_GETTEXT

I found that the macros are defined in
/Users/olav/Developer/Packages/automake/pm_installation/share/aclocal-1.16/.

I tried making the macros available by setting $M4PATH, but that did
not work:

$ pwd
pwd
/Users/olav/Developer/Packages/hello
$ export M4PATH="/Users/olav/Developer/Packages/automake/pm_installation/share/aclocal-1.16/"
export M4PATH="/Users/olav/Developer/Packages/automake/pm_installation/share/aclocal-1.16/"
$ git clean -fdx
git clean -fdx
Removing autom4te.cache/
Removing configure
$ autoconf
autoconf
configure.ac:18: error: possibly undefined macro: AM_INIT_AUTOMAKE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:42: error: possibly undefined macro: AM_CONDITIONAL
configure.ac:52: error: possibly undefined macro: AM_MISSING_PROG
configure.ac:61: error: possibly undefined macro: AM_GNU_GETTEXT_VERSION
configure.ac:62: error: possibly undefined macro: AM_GNU_GETTEXT

How do I make the macros available?

As a follow up question, when I install an Autotools package to an
arbitrary directory $D:

$ ./configure --prefix="$D" --exec_prefix="$D" && make install

How do I make as much as posible of the files installed to $D
generally available in a shell environment as if it was installed to
system directories?

So:

$ export PATH="$D/bin:$PATH"

for binaries

$ export MANPATH="$D/share/man:$MANPATH"

for manuals, and so on. If some files cannot be made available via
environment variabled alone, an overview of typical flags used would
to make them available would be very much appreciated.

Thanks for reading and responding.

Happy Hacking!




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux