37

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.

Kevin Bowen
  • 19,395
  • 55
  • 76
  • 81
abkds
  • 565
  • 2
  • 6
  • 10

4 Answers4

40

To install autotools:

sudo apt-get install autotools-dev

To install autoconf

sudo apt-get install autoconf
Maythux
  • 82,867
  • 54
  • 239
  • 271
  • 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 '18 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.

Vicente Bolea
  • 347
  • 1
  • 3
  • 13
  • i am absolutely green, I know about the tripartite invocation "./configure;make;make install". Why did you jumped "make" ? – sharkant May 10 '17 at 11:40
  • `make install` invokes `make all` which is what is called when you call `make` without argumenrs – Vicente Bolea May 10 '17 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` – Vicente Bolea May 10 '17 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 '17 at 09: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. – Vicente Bolea Oct 16 '17 at 05:29
2

Installing autoconf is easy, type in the terminal:

sudo apt-get install autoconf
Stormvirux
  • 4,446
  • 29
  • 35
-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

Braian Coronel
  • 355
  • 3
  • 6