autoreconf command in Linux with examples (original) (raw)

Last Updated : 3 Jun, 2021

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:

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

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