40

I need to install autotools. When I search on the Internet, there are various method given that use commands like ./configure, for example.

Please guide me on how to install autoconf, autotools, and related packages on my system. A step by step guide would be very helpful.

4 Answers 4

43

To install autotools:

sudo apt-get install autotools-dev

To install autoconf

sudo apt-get install autoconf
1
  • 1
    combine the two in one line with a -y flag ftw sudo apt-get install -y autotools-dev autoconf. Now it can be run unattended
    – MrMesees
    Jul 25, 2018 at 10:15
16

Installing from repositories is always prefered unless you need the last version of autotools. In that case you will have to download it manually and install it manually. GNU autotools are three packages: Autoconf, Automake and Libtool. Here are the steps to manually install it:

cd /usr/local/src

Autoconf:

wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz 
tar xf autoconf*
cd autoconf-2.69
sh configure --prefix /usr/local
make install

Automake:

wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
tar xf automake*
cd automake-1.15
sh configure --prefix /usr/local
make install

Libtool:

wget http://mirror.jre655.com/GNU/libtool/libtool-2.4.6.tar.gz
tar xf libtool*
cd libtool-2.4.6
sh configure --prefix /usr/local
make install 

Most importantly You don't need autotools installed to run ./configure, that it's a key feature of autotools. On the other hand if you are not given the configure script you will need autotools installed to generate it.

Note make install will internally call make. Thus, there is no need in this case of calling make. Normally, Autotools expect you to call make without sudo privileges and make install with sudo. In this case for simplicity I skipped this guideline. It's (or is it?) fairly reasonable to trust there is no malware in the autotools generated Makefile.

5
  • i am absolutely green, I know about the tripartite invocation "./configure;make;make install". Why did you jumped "make" ?
    – sharkant
    May 10, 2017 at 11:40
  • make install invokes make all which is what is called when you call make without argumenrs May 10, 2017 at 12:27
  • They normall suggest to run make without sudo and make install with sudo. However if you are in a folder that requires sudo permissions, you will need to use a both commands with sudo or just sudo make install May 10, 2017 at 12:28
  • Autoconf, Automake and Libtools have 3 different version number, Do they work well? or Do I need to carefully download the corresponding version or just arbitrary version?
    – gfan
    Oct 13, 2017 at 9:35
  • I believe that there is some version interdependence among the packages. Rule of thumb will be to keep packages versions released in an interval of 5 years among each others. I have experience having to compile a fairly complex Autotools project released in 2003 as I remember. I had to download the automake, autoconf and libtool of that era to make it work. Oct 16, 2017 at 5:29
2

Installing autoconf is easy, type in the terminal:

sudo apt-get install autoconf
-1

After installing the packages autoconf, automake and libtool, what I did was reconfigure because the error persisted. Then after reconfiguring I was allowed to compile and install without errors.

$ sudo sh configure --prefix /usr/local
$ sudo make install

The justification of why to use /usr/local and not /usr/local/apache2 I leave you in the next publication

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .