www.delorie.com/gnu/docs/gettext/gettext_180.html   search  
 
Buy GNU books!


GNU gettext utilities

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

12.4.4 `configure.in' at top level

`configure.in' or `configure.ac' - this is the source from which autoconf generates the `configure' script.

  1. Declare the package and version.

    This is done by a set of lines like these:

     
    PACKAGE=gettext
    VERSION=0.11.5
    AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
    AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
    AC_SUBST(PACKAGE)
    AC_SUBST(VERSION)
    

    or, if you are using GNU automake, by a line like this:

     
    AM_INIT_AUTOMAKE(gettext, 0.11.5)
    

    Of course, you replace `gettext' with the name of your package, and `0.11.5' by its version numbers, exactly as they should appear in the packaged tar file name of your distribution (`gettext-0.11.5.tar.gz', here).

  2. Check for internationalization support.

    Here is the main m4 macro for triggering internationalization support. Just add this line to `configure.in':

     
    AM_GNU_GETTEXT
    

    This call is purposely simple, even if it generates a lot of configure time checking and actions.

    If you have suppressed the `intl/' subdirectory by calling gettextize without `--intl' option, this call should read

     
    AM_GNU_GETTEXT([external])
    

  3. Have output files created.

    The AC_OUTPUT directive, at the end of your `configure.in' file, needs to be modified in two ways:

     
    AC_OUTPUT([existing configuration files intl/Makefile po/Makefile.in],
    [existing additional actions])
    

    The modification to the first argument to AC_OUTPUT asks for substitution in the `intl/' and `po/' directories. Note the `.in' suffix used for `po/' only. This is because the distributed file is really `po/Makefile.in.in'.

    If you have suppressed the `intl/' subdirectory by calling gettextize without `--intl' option, then you don't need to add intl/Makefile to the AC_OUTPUT line.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003