Commit 2e0e034e authored by Axel Beckert's avatar Axel Beckert

Imported Upstream version 1.3.1

parents
This diff is collapsed.
This diff is collapsed.
Those people contributed, intentionnally or not, to mp4h.
* Denis Barbier <barbier@mp4h.org>
Author of mp4h
* Brian J. Fox <bfox@ai.mit.edu>
Author of Meta-HTML
* Rene' Seindal <rene@seindal.dk>
Author of GNU m4
Special thanks to all authors of GNU m4, who wrote the major
part of mp4h sources.
And also in alphabetical order
Petr Andreyev ............... <petr@xanadu.ru>
Axel Beckert ................ <rse-wml@deuxchevaux.org>
Stephane Bortzmeyer ......... <bortzmeyer@pasteur.fr>
Anders Dinsen ............... <anders@dinsen.net>
Guido Draheim ............... <guidod-2002-@gmx.de>
Max H. Duenki ............... <duenki@isi.ee.ethz.ch>
Ralf S. Engelschall ......... <rse@engelschall.com>
Rajendra Gokhale ............ <rvg@creato.org>
Jan Holler .................. <jh@inetcom.ch>
Ghislaine Labouret .......... <Ghislaine.Labouret@hsc.fr>
Uwe Mindrup ................. <uwe@mindrup.de>
Tobias Oetiker .............. <oetiker@ee.ethz.ch>
Joerg Plate ................. <Joerg@Plate.cx>
Josip Rodin ................. <joy@cibalia.gkvk.hr>
Jean-Michel Sauvage ......... <jms.debian@club-internet.fr>
Nobuyuki Tsuchimura ......... <tutimura@nn.iij4u.or.jp>
Ralf Vissers ................ <ravis@web.de>
Fritz Zaucker ............... <zaucker@ee.ethz.ch>
and those I forgot to mention.
This diff is collapsed.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
AUTOMAKE_OPTIONS = foreign
DIST_SUBDIRS = intl pcre lib src po doc modules tests
if LOADABLE_MODULES
SUBDIRS = intl pcre lib src po doc modules tests
else
SUBDIRS = intl pcre lib src po doc tests
endif
EXTRA_DIST = CREDITS README README.pcre bootstrap.sh shtool
deb:
if test -f ../mp4h_$(VERSION).orig.tar.gz; then \
:; \
else \
$(MAKE) dist && mv mp4h-$(VERSION).tar.gz ../mp4h_$(VERSION).orig.tar.gz; \
fi
-rm -rf config.log autom4te.cache
$(MAKE) distclean && dpkg-buildpackage -i'/CVS|/\.cvsignore|/\.scvsrc|/tags' -rfakeroot
README: configure.ac src/readme.tmpl
@x='@'; sed -e "s/$${x}PACKAGE_VERSION$${x}/@PACKAGE_VERSION@/" -e "s/$${x}PACKAGE_DATE$${x}/@PACKAGE_DATE@/" src/readme.tmpl > $@
This diff is collapsed.
mp4h -- Macro Processor for HTML Documents
Version 1.3.1 (11-Jan-2003)
http://www.engelschall.com/sw/mp4h/
Copyright (C) 2000-2003, Denis Barbier
All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version. See the COPYING file for details.
----------------
Mp4h is a text processor specifically designed for HTML documents.
It has two ancestors: Meta-HTML <URL:http://www.metahtml.org/>
and GNU m4 <URL:http://www.gnu.org/software/m4/>. The former
inspired mp4h syntax whereas source code is derived from the
latter.
Mp4h syntax is immediately familiar to HTML programmers. Users
can define their own tags, and programming constructs like loops,
arrays, conditionals make mp4h very powerful.
Mp4h is extendable to fit every needs. It can of course load
new macro definitions put in package files, but also dynamically
load shared libraries containing compiled macro definitions.
--
Denis Barbier
<barbier@linuxfr.org>
Perl Regular Expressions within mp4h
Denis Barbier
21 July 2000
Mp4h is shipped with a minimal version of the Perl Compatible
Regular Expression library. This library is licensed by
University of Cambridge and you must take care to follow these
requirements when modifying or distributing these files.
Anyway you should better download the latest sources from
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
----------------
PCRE LICENCE
------------
PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.
Written by: Philip Hazel <ph10@cam.ac.uk>
University of Cambridge Computing Service,
Cambridge, England. Phone: +44 1223 334714.
Copyright (c) 1997-2000 University of Cambridge
Permission is granted to anyone to use this software for any purpose on any
computer system, and to redistribute it freely, subject to the following
restrictions:
1. This software is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
2. The origin of this software must not be misrepresented, either by
explicit claim or by omission. In practice, this means you must put
a sentence like this
Regular expression support is provided by the PCRE library package,
which is open source software, copyright by the University of
Cambridge.
somewhere reasonably visible in your documentation and in any relevant
files. A reference to the ftp site for the source should also be given
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
in the documentation.
3. Altered versions must be plainly marked as such, and must not be
misrepresented as being the original software.
4. If PCRE is embedded in any software that is released under the GNU
General Purpose Licence (GPL), then the terms of that licence shall
supersede any condition above with which it is incompatible.
End
# Written by Ren Seindal (rene@seindal.dk)
# Hacked by Denis Barbier for mp4h <barbier@engelschall.com>
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
# but which still want to provide support for the GNU gettext functionality.
# Please note that the actual code is *not* freely available.
# serial 1
AC_DEFUN(MP4H_LOADABLE_MODULES,
[AC_MSG_CHECKING(if support for loadable modules is requested)
AC_ARG_WITH(modules,
[ --with-modules=x,y,z select loadable modules to compile],
[with_modules=$withval], [with_modules=yes])
AC_MSG_RESULT($with_modules)
if test ".$with_modules" != .no; then
dnl We might no have it anyway, after all.
select_modules=$with_modules
with_modules=no
dnl Test for dlopen in libc
AC_CHECK_FUNCS([dlopen])
if test "$ac_cv_func_dlopen" = yes; then
with_modules=yes
fi
dnl Test for dlopen in libdl
if test "$with_modules" = no; then
AC_CHECK_LIB(dl, dlopen)
if test "$ac_cv_lib_dl_dlopen" = yes; then
with_modules=yes
# LIBS="$LIBS -ldl"
AC_DEFINE(HAVE_DLOPEN,1,
[Define to 1 if the -ldl library should be used])
fi
fi
# dnl Test for dld_link in libdld
# if test "$with_modules" = no; then
# AC_CHECK_LIB(dld, dld_link)
# if test "$ac_cv_lib_dld_dld_link" = "yes"; then
# with_modules=yes
# AC_DEFINE(HAVE_DLD,1)
# fi
# fi
dnl Test for shl_load in libdld
if test "$with_modules" = no; then
AC_CHECK_LIB(dld, shl_load)
if test "$ac_cv_lib_dld_shl_load" = yes; then
with_modules=yes
# LIBS="$LIBS -ldld"
AC_DEFINE(HAVE_SHL_LOAD, 1,
[Define to 1 if the -ldld library should be used])
fi
fi
if test "$with_modules" != no; then
dnl This is for libtool
DLLDFLAGS=-export-dynamic
AC_DEFINE([WITH_MODULES], 1,
[Define to 1 if there is support for dynamic loading of modules.])
fi
if test "$with_modules" = no; then
AC_MSG_WARN([Loadable modules have not been found on your computer, this feature is disabled])
select_modules=
fi
AC_SUBST(DLLDFLAGS)
with_modules=$select_modules
fi
])
This diff is collapsed.
#! /bin/sh
# Run this script when reconfiguring
aclocal-1.6
automake-1.6 -a
autoheader
autoconf
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
dnl As this file is called configure.ac, Autoconf 2.50 is required
AC_PREREQ([2.50])
AC_INIT([mp4h], [1.3.1])
PACKAGE_DATE="11-Jan-2003"
AC_CONFIG_SRCDIR([src/mp4h.c])
AM_CONFIG_HEADER([config.h])
dnl Now $srcdir is defined and can be used
shtool=$srcdir/shtool
AC_SUBST([PACKAGE_DATE])
AC_DEFINE_UNQUOTED([PACKAGE_DATE], ["$PACKAGE_DATE"], [Release date])
$shtool echo -e "Configuring for %B$PACKAGE_NAME $PACKAGE_VERSION ($PACKAGE_DATE)%b"
AM_INIT_AUTOMAKE([$PACKAGE_NAME], [$PACKAGE_VERSION])
AM_MAINTAINER_MODE
if test x$datadir = 'x${prefix}/share'; then
if test x$prefix = xNONE; then
MP4HDATADIR="$ac_default_prefix/share/mp4h"
else
MP4HDATADIR="$prefix/share/mp4h"
fi
else
MP4HDATADIR="$datadir/mp4h"
fi
if test x$libdir = 'x${exec_prefix}/lib'; then
if test x$prefix = xNONE; then
MP4HLIBDIR="$ac_default_prefix/lib/mp4h"
else
MP4HLIBDIR="$prefix/lib/mp4h"
fi
else
MP4HLIBDIR="$libdir/mp4h"
fi
AC_DEFINE_UNQUOTED([MP4HLIBDIR], ["$MP4HLIBDIR/$PACKAGE_VERSION:$MP4HDATADIR"],
[Default location for mp4h modules])
AC_PROG_CC
AC_PROG_CPP
AC_PROG_RANLIB
AC_PROG_MAKE_SET
AC_PROG_INSTALL
echo ''
$shtool echo -e "Checking for %Bheaders and libraries%b"
AC_AIX
AC_MINIX
AC_ISC_POSIX
AM_C_PROTOTYPES
AC_HEADER_STDC
AC_TYPE_SIZE_T
AC_C_CONST
AC_CHECK_HEADERS([limits.h locale.h memory.h stdarg.h string.h unistd.h time.h])
AC_CHECK_HEADERS([pwd.h grp.h dirent.h sys/param.h sys/stat.h sys/types.h sys/times.h])
AC_CHECK_FUNCS([mkstemp strchr strerror tmpfile getpwuid getgrgid bcopy memmove])
AC_FUNC_ALLOCA
AC_FUNC_VPRINTF
AC_REPLACE_FUNCS(strtol obstack xmalloc xstrdup)
AC_CHECK_FUNC(getopt_long, , [
AC_LIBOBJ([getopt1])
AC_LIBOBJ([getopt])
])
AC_MSG_CHECKING([for HTML postprocessing])
AC_ARG_WITH(tidy,dnl
[ --with-tidy=PATH post-process HTML documentation with tidy],[dnl
TIDY=$with_tidy
test "$TIDY" = yes && TIDY=tidy
AC_MSG_RESULT([$TIDY])
],[
TIDY="@:"
AC_MSG_RESULT([no])
])
AC_SUBST([TIDY])
ALL_LINGUAS=
AM_GNU_GETTEXT
if test ".$USE_INCLUDED_LIBINTL" = .yes; then
INTLINCL='-I$(top_srcdir)/intl'
AC_SUBST([INTLINCL])
fi
MP4H_LOADABLE_MODULES
dnl Must be called after MP4H_LOADABLE_MODULES
AM_WITH_DMALLOC
module_list='intl:gettext javascript:mozjs javascript:njs system test wml'
for m in $module_list
do
eval "_do_module_`echo $m | sed -e 's/[[^a-z]]/_/g'`=0"
done
test ".$with_modules" = .yes && with_modules=`echo $module_list | sed -e 's/ */,/g'`
if test ".$with_modules" != .no; then
echo ''
$shtool echo -e "Checking for %Bloadable modules%b support"
AC_LIBTOOL_WIN32_DLL
AC_LIBLTDL_CONVENIENCE
AC_ENABLE_SHARED
AC_DISABLE_STATIC
AC_LIBTOOL_DLOPEN
AC_LIBTOOL_SETUP
AC_PROG_LIBTOOL
case ,$with_modules, in
*,intl:gettext,* )
if test ".$nls_cv_use_gnu_gettext" = .yes; then
_do_module_intl_gettext=1
else
AC_CHECK_HEADER([libintl.h], [_do_module_intl_gettext=1])
fi
;;
esac
case ,$with_modules, in
*,javascript:mozjs,* )
AC_CHECK_HEADER([js/jsapi.h],
[AC_CHECK_LIB([js], [JS_NewRuntime],
[_do_module_javascript_mozjs=1])])
;;
esac
case ,$with_modules, in
*,javascript:njs,* )
AC_CHECK_HEADER([js.h],
[AC_CHECK_LIB([js], [js_free],
[_do_module_javascript_njs=1])])
;;
esac
case ,$with_modules, in
*,system,* ) _do_module_system=1 ;;
esac
case ,$with_modules, in
*,test,* ) _do_module_test=1 ;;
esac
case ,$with_modules, in
*,wml,* ) _do_module_wml=1 ;;
esac
for m in $module_list
do
eval "test .\$_do_module_`echo $m | sed -e 's/[[^a-z]]/_/g'` = .1" || with_modules=`echo ,$with_modules, | sed -e "s/,$m,/,/" -e 's/^,//' -e 's/,$//'`
done
with_modules=`echo $with_modules | sed -e 's/,/ /g'`
else
with_modules=
fi
test ".$with_modules" = . && with_modules=none
AC_LIB_LTDL
AC_SUBST(INCLTDL)
AC_SUBST(LIBLTDL)