Prerequisite
aclocal
Extracting files from the downloaded package:
Now, enter the directory where the package is extracted.
Configuring m4:
Replace ā/usr/local/m4ā above with the directory path where you want to copy the files and folders. Note: check for any error message.
Compiling m4:
Autoconf
source : http://ftp.gnu.org/gnu/automake/
Autotools unifies the build process of C/C++ applications(and libraries) by auto-generating consistent Makefile.
1. Run $ autoscan
to generate and configure.scan and copy the file as configure.ac
Generated scan file looks like :
2. Edit configure.ac
Replace the FULL-PACKAGE-NAME
, VERSION
.
Insert a line AM_INIT_AUTOMAKE
.
Add following lines for:
AC_PROG_RANLIB
Library CompilesAC_LANG(C++)
Build C++ srcAC_PROG_CXX
Build C srcAC_PROG_CC
Build C src(alternative)
3. Run $ aclocal
to generate aclocal.m4 file.
4. For Each Directories for compilation, write Makefile.am
On top directory,
For sub-directories,
5. Create mandatory files.
6. Run $ autoconf
Generate configure file
7. For any edits, run $ autoreconf -fvi
This is the end of distribution
8. Users can compile the source by :
Install Troubleshoot
%n in writable segment detected ***
Search for the script where ā%nā was used.