Open In App

autoreconf command in Linux with examples

autoreconf is a Autotool which is used to create automatically buildable source code for Unix-like systems. Autotool is a common name for autoconf, automake, etc. These all together are termed as Autotools

Important Points: 



 

Syntax: 



 

autoreconf [OPTION]... [DIRECTORY]...

Options: 

 

Note: Autotools are used to make automatically buildable source code for distribution purpose. 

Important Configuration Files: 

 

#include
void main()
{
   printf("Hello, World");
}
# initialize the process
AC_INIT([hello], [0.01])
# make config headers
AC_CONFIG_HEADERS([config.h])
#Auxiliary files go here
AC_CONFIG_AUX_DIR([build-aux])
# init automake
AM_INIT_AUTOMAKE([1.11])
#configure and create "Makefile"
AC_CONFIG_FILES([Makefile])
#find and probe C compiler
AC_PROG_CC
#End
AC_OUTPUT
#list of programs to be installed in bin directory
bin_PROGRAMS = hello
#sources for targets
hello_SOURCES = hello.c

Article Tags :