Next: debug
Up: Misc.
Previous: using SVN in Window
The general relationship among the automake, autoconf, and configure script is shown as
- autoscan :
Scan the source directory and generate configure.scan,
which is the preliminary configure.in file.
Then you need to mv and edit this file to be the real confugure.ac file;
Basically this step is not mandatory.
- edit the configure.ac to make sure of the below macro are there:
AM_INIT_AUTOMAKE()
AC_PROG_CPP
AC_PROG_RANLIB
AC_PROG_LIBTOOL (NOTE: this is needed only if you are going to generate the library)
- cp /usr/share/libtool/libtool.m4 ./acinclude.m4
or
cp /usr/share/aclocal/libtool.m4 ./acinclude.m4
This command copy the necessary macros for the libtool to the current acinlucde.m4,
which is needed by the aclocal.m4;
It is useful only when you are working on the library,
and this will ensure when your package ships, there will be no mismatch error
between the M4 macros you provided in the version of libtool you built the distribution with,
versus the version of the libtool installation in the target host.
- aclocal
it generate the aclocal.m4 by scanning configure.ac
- libtoolize
Next, you should run libtoolize, which adds some files to your distribution that are required by the macros from `libtool.m4'. In particular, you will get `ltconfig'(20) and `ltmain.sh' which are used to create a custom libtool script on the installer's machine.
Sometimes you don't need to run libtoolize manually, since automake will run it for you when it sees the changes you have made to `configure.in',
- autoconf
generate the configure script from the configure.ac
- autoheader
I am not sure why it is needed; but if not, the configuration will complian the missing of config.h.in, which
is generated by the autoheader
- automake -add-missing
It will generate the Makefile.in, which is needed by the running of the script file configuration, from the Makefile.am
237 3:51 autoscan
238 3:51 mv configure.scan configure.ac
240 3:52 emacs configure.ac
245 3:54 libtoolize
246 3:54 aclocal
243 3:54 cat /usr/share/aclocal/libtool.m4 >> aclocal.m4
247 3:54 autoconf
251 3:55 autoheader --force
248 3:54 automake -a
252 3:55 ./configure --prefix=/local/new_world/foo
253 3:55 make
254 3:55 make install
for the Makefile.am for the library building, seems
libmsl_la_HEADERS = $(POST_PROCESSED_FILES) $(HDRS) $(HDRS2)
libmsl_ladir = $(includedir)/msl
has to be used as above , otherwise (only use one of them) will lead to either
distribution doesn't include the headers, or
automake complains for invalide variable of the libxxx_la_HEADERS
Subsections
Next: debug
Up: Misc.
Previous: using SVN in Window
Wei Lu
2007-11-06