1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
1) First use of autoconf and automake
----------------------------------
1.1) Use autoscan, to build a configure.scan file, which can
be edited and renamed to configure.in
1.2) Edit Makefile.am files in main and subdirectories
1.3) Call aclocal, with no arguments; this generates an aclocal.m4 file.
Call autoconf, also without arguments, so as to build the
configure script.
1.4) Call autoheader to create the config.h.in file
1.5) If they do not exist, create (or touch) the following files:
NEWS, README, AUTHORS, ChangeLog
1.6) Finally, call automake -a -c (or automake -a after the first time)
2) Continued use of autoconf and automake
--------------------------------------
2.1) Every time configure.in is modified, autoconf must be run
2.2) Every time a Makefile.am file is modified, automake -a must be run
3) Use in source files
-------------------
3.1) Use the PACKAGE and VERSION macros in source code; The values are
defined in the AM_INIT_AUTOMAKE(package, version) in configure.in
3.2) When adding a library dependency, one should add a test in
configure.in, and refer to that library in the corresponding
Makefile.am files
3) Using a library
---------------
3.1) in configure.in, use AC_CHECK_LIB (for example, using the zlib
library, which provides the gzopen function, we could use
AC_CHECK_LIB(z, gzopen).
4) Internationalization
--------------------
4.1) Create po/ and intl/ subdirectories
4.2) In po/POTFILES.in, list all files that may contain translateable
strings.
4.3) In configure.in, add the following lines before the last line:
ALL_LINGUAS=""
AM_GNU_GETTEXT
4.4) In the last line, add the following files to those in AC_OUTPUT:
intl/Makefile and po/Makefile
|