autorun.sh : Set LIBTOOLIZE to libtoolize /glibtoolize ; This is used for versioning shared libs aclocal ; { Generate 'aclocal.m4' by scanning `configure.ac' or `configure.in' acinclude.m4 will be included if exists. These macros will be used by automake, autoconf and other auto* tools. } autoheader { Creates configure.h.in template file from configure.in } $LIBTOOLIZE --automake --force --copy { Run because configure.in specifies: AC_PROG_LIBTOOL Example uses of libtool. 1. compile to produce name.lo (shared obj) and name.o files. libtool --mode=compile gcc -c hello.c # This runs following commands: gcc -c -fPIC -DPIC hello.c mv hello.o hello.lo gcc -c hello.c Note: You don't need to insert -fPIC -DPIC calls! It typically creates binary in .libs/ dir and creates wrapper script in curdir. libtool --mode=execute gdb hell # executes hell script and invokes gdb } automake --add-missing --force --copy { Generate Makefile.in from Makefile.am ./configure generates Makefile from Makefile.in copies over files like config.guess to current dir. --foreign : Makes the global strictness -- to be compatible with non-gnu make automake calls autoconf to scan configure.ac and configure.in to recognize certain macros and then generate Makefile.in ; Note: However, you need to run autoconf separately to create configure script } autoconf { autoconf invokes m4 macro processor with built-in macros from /usr/share/autoconf/autom4te.cfg and ./aclocal.m4 (created by aclocal) and writes output to ./configure } Note: libtool -n (--dry-run) # dry run --config --mode=MODE : Note: run ranlib staticlib.a to optimize the library symbols access time. If you want to use libtool's versioning system, then you must specify the version information to libtool using the `-version-info' flag during link mode (*note Link mode::). This flag accepts an argument of the form `CURRENT[:REVISION[:AGE]]'. So, passing `-version-info 3:12:1' sets CURRENT to 3, REVISION to 12, and AGE to 1. If you dlopen a library libhello, then on some OSs, it must be linked with --module option : burger$ libtool --mode=link gcc -module -o libhello.la foo.lo \ hello.lo -rpath /usr/local/lib -lm If the symbols in exe file needed to satisfy your dlopen, then the exefile should be linked with -export-dynamic option in libtool. Note: GNU hello (ftp://prep.ai.mit.edu/pub/gnu/hello-1.3.tar.gz) is renowned for its classic simplicity and versatility. supports autoconfig framework. Packages you will need : aclocal libtool ncurses??? apt get g++