Added man pages and pc file.
This commit is contained in:
parent
b5b865d76c
commit
10ef034125
66
INSTALL
66
INSTALL
@ -1,8 +1,8 @@
|
|||||||
Installation Instructions
|
Installation Instructions
|
||||||
*************************
|
*************************
|
||||||
|
|
||||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
|
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||||
Software Foundation, Inc.
|
2006 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is free documentation; the Free Software Foundation gives
|
This file is free documentation; the Free Software Foundation gives
|
||||||
unlimited permission to copy, distribute and modify it.
|
unlimited permission to copy, distribute and modify it.
|
||||||
@ -10,7 +10,10 @@ unlimited permission to copy, distribute and modify it.
|
|||||||
Basic Installation
|
Basic Installation
|
||||||
==================
|
==================
|
||||||
|
|
||||||
These are generic installation instructions.
|
Briefly, the shell commands `./configure; make; make install' should
|
||||||
|
configure, build, and install this package. The following
|
||||||
|
more-detailed instructions are generic; see the `README' file for
|
||||||
|
instructions specific to this package.
|
||||||
|
|
||||||
The `configure' shell script attempts to guess correct values for
|
The `configure' shell script attempts to guess correct values for
|
||||||
various system-dependent variables used during compilation. It uses
|
various system-dependent variables used during compilation. It uses
|
||||||
@ -23,9 +26,9 @@ debugging `configure').
|
|||||||
|
|
||||||
It can also use an optional file (typically called `config.cache'
|
It can also use an optional file (typically called `config.cache'
|
||||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||||
the results of its tests to speed up reconfiguring. (Caching is
|
the results of its tests to speed up reconfiguring. Caching is
|
||||||
disabled by default to prevent problems with accidental use of stale
|
disabled by default to prevent problems with accidental use of stale
|
||||||
cache files.)
|
cache files.
|
||||||
|
|
||||||
If you need to do unusual things to compile the package, please try
|
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
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
@ -35,20 +38,17 @@ some point `config.cache' contains results you don't want to keep, you
|
|||||||
may remove or edit it.
|
may remove or edit it.
|
||||||
|
|
||||||
The file `configure.ac' (or `configure.in') is used to create
|
The file `configure.ac' (or `configure.in') is used to create
|
||||||
`configure' by a program called `autoconf'. You only need
|
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||||
`configure.ac' if you want to change it or regenerate `configure' using
|
you want to change it or regenerate `configure' using a newer version
|
||||||
a newer version of `autoconf'.
|
of `autoconf'.
|
||||||
|
|
||||||
The simplest way to compile this package is:
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
1. `cd' to the directory containing the package's source code and type
|
1. `cd' to the directory containing the package's source code and type
|
||||||
`./configure' to configure the package for your system. If you're
|
`./configure' to configure the package for your system.
|
||||||
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
|
Running `configure' might take a while. While running, it prints
|
||||||
messages telling which features it is checking for.
|
some messages telling which features it is checking for.
|
||||||
|
|
||||||
2. Type `make' to compile the package.
|
2. Type `make' to compile the package.
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ details on some of the pertinent environment variables.
|
|||||||
by setting variables in the command line or in the environment. Here
|
by setting variables in the command line or in the environment. Here
|
||||||
is an example:
|
is an example:
|
||||||
|
|
||||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||||
|
|
||||||
*Note Defining Variables::, for more details.
|
*Note Defining Variables::, for more details.
|
||||||
|
|
||||||
@ -87,31 +87,29 @@ Compiling For Multiple Architectures
|
|||||||
|
|
||||||
You can compile the package for more than one kind of computer at the
|
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
|
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
|
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
|
||||||
directory where you want the object files and executables to go and run
|
directory where you want the object files and executables to go and run
|
||||||
the `configure' script. `configure' automatically checks for the
|
the `configure' script. `configure' automatically checks for the
|
||||||
source code in the directory that `configure' is in and in `..'.
|
source code in the directory that `configure' is in and in `..'.
|
||||||
|
|
||||||
If you have to use a `make' that does not support the `VPATH'
|
With a non-GNU `make', it is safer to compile the package for one
|
||||||
variable, you have to compile the package for one architecture at a
|
architecture at a time in the source code directory. After you have
|
||||||
time in the source code directory. After you have installed the
|
installed the package for one architecture, use `make distclean' before
|
||||||
package for one architecture, use `make distclean' before reconfiguring
|
reconfiguring for another architecture.
|
||||||
for another architecture.
|
|
||||||
|
|
||||||
Installation Names
|
Installation Names
|
||||||
==================
|
==================
|
||||||
|
|
||||||
By default, `make install' will install the package's files in
|
By default, `make install' installs the package's commands under
|
||||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||||
installation prefix other than `/usr/local' by giving `configure' the
|
can specify an installation prefix other than `/usr/local' by giving
|
||||||
option `--prefix=PREFIX'.
|
`configure' the option `--prefix=PREFIX'.
|
||||||
|
|
||||||
You can specify separate installation prefixes for
|
You can specify separate installation prefixes for
|
||||||
architecture-specific files and architecture-independent files. If you
|
architecture-specific files and architecture-independent files. If you
|
||||||
give `configure' the option `--exec-prefix=PREFIX', the package will
|
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||||
use PREFIX as the prefix for installing programs and libraries.
|
PREFIX as the prefix for installing programs and libraries.
|
||||||
Documentation and other data files will still use the regular prefix.
|
Documentation and other data files still use the regular prefix.
|
||||||
|
|
||||||
In addition, if you use an unusual directory layout you can give
|
In addition, if you use an unusual directory layout you can give
|
||||||
options like `--bindir=DIR' to specify different values for particular
|
options like `--bindir=DIR' to specify different values for particular
|
||||||
@ -159,7 +157,7 @@ where SYSTEM can have one of these forms:
|
|||||||
need to know the machine type.
|
need to know the machine type.
|
||||||
|
|
||||||
If you are _building_ compiler tools for cross-compiling, you should
|
If you are _building_ compiler tools for cross-compiling, you should
|
||||||
use the `--target=TYPE' option to select the type of system they will
|
use the option `--target=TYPE' to select the type of system they will
|
||||||
produce code for.
|
produce code for.
|
||||||
|
|
||||||
If you want to _use_ a cross compiler, that generates code for a
|
If you want to _use_ a cross compiler, that generates code for a
|
||||||
@ -190,12 +188,12 @@ them in the `configure' command line, using `VAR=value'. For example:
|
|||||||
./configure CC=/usr/local2/bin/gcc
|
./configure CC=/usr/local2/bin/gcc
|
||||||
|
|
||||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||||
overridden in the site shell script). Here is a another example:
|
overridden in the site shell script).
|
||||||
|
|
||||||
/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||||
|
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||||
|
|
||||||
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
|
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||||
configuration-related scripts to be executed by `/bin/bash'.
|
|
||||||
|
|
||||||
`configure' Invocation
|
`configure' Invocation
|
||||||
======================
|
======================
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
SUBDIRS = src tests examples
|
SUBDIRS = src tests examples man
|
||||||
EXTRA_DIST = cmph.spec configure.ac
|
EXTRA_DIST = cmph.spec configure.ac cmph.pc.in
|
||||||
|
|
||||||
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
pkgconfig_DATA = cmph.pc
|
||||||
|
12
cmph.pc
Normal file
12
cmph.pc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
url=http://cmph.sourceforge.net/
|
||||||
|
prefix=/usr
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=${exec_prefix}/lib
|
||||||
|
includedir=${prefix}/include
|
||||||
|
|
||||||
|
Name: alsa
|
||||||
|
Description: minimal perfect hashing library
|
||||||
|
Version: 0.7
|
||||||
|
Libs: -L${libdir} -lcmph
|
||||||
|
Cflags: -I${includedir}
|
||||||
|
URL: ${url}
|
@ -1,6 +1,6 @@
|
|||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
AC_INIT(Makefile.am)
|
AC_INIT(Makefile.am)
|
||||||
AM_INIT_AUTOMAKE(cmph, 0.6)
|
AM_INIT_AUTOMAKE(cmph, 0.7)
|
||||||
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
dnl Checks for programs.
|
dnl Checks for programs.
|
||||||
@ -35,4 +35,4 @@ dnl Checks for library functions.
|
|||||||
|
|
||||||
AC_CHECK_SPOON
|
AC_CHECK_SPOON
|
||||||
dnl AC_OUTPUT(Makefile tests/Makefile samples/Makefile)
|
dnl AC_OUTPUT(Makefile tests/Makefile samples/Makefile)
|
||||||
AC_OUTPUT(Makefile src/Makefile tests/Makefile examples/Makefile)
|
AC_OUTPUT(Makefile src/Makefile tests/Makefile examples/Makefile man/Makefile cmph.pc)
|
||||||
|
2
gendocs
2
gendocs
@ -1,3 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
txt2tags -t html --mask-email -i README.t2t -o index.html
|
txt2tags -t html --mask-email -i README.t2t -o index.html
|
||||||
txt2tags -t html -i BMZ.t2t -o bmz.html
|
txt2tags -t html -i BMZ.t2t -o bmz.html
|
||||||
txt2tags -t html -i BRZ.t2t -o brz.html
|
txt2tags -t html -i BRZ.t2t -o brz.html
|
||||||
|
2
man/Makefile.am
Normal file
2
man/Makefile.am
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
man_MANS = cmph.1
|
||||||
|
EXTRA_DIST=cmph.1
|
67
man/cmph.1
Normal file
67
man/cmph.1
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
.TH CMPH "1" "October 2007" "cmph 0.6" "User Commands"
|
||||||
|
.SH NAME
|
||||||
|
cmph \- minimum perfect hashing tool
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B cmph
|
||||||
|
[-v] [-h] [-V] [-k nkeys] [-f hash_function] [-g [-c value][-s seed] ] [-a algorithm] [-M memory_in_MB] [-b BRZ_parameter] [-d tmp_dir] [-m file.mph] keysfile
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.PP
|
||||||
|
Command line tool to generate and query minimal perfect hash functions.
|
||||||
|
.PP
|
||||||
|
Please refer to http://cmph.sf.net for full documentation.
|
||||||
|
.TP
|
||||||
|
\fB\-h\fR
|
||||||
|
Print an help message
|
||||||
|
.TP
|
||||||
|
\fB\-c\fR
|
||||||
|
This value determines: the number of vertices in the graph for the algorithms BMZ and CHM; the number of bits per key required in the FCH algorithm
|
||||||
|
.TP
|
||||||
|
\fB\-a\fR
|
||||||
|
Algorithm. Valid values are: bmz, bmz8, chm, brz, fch
|
||||||
|
.TP
|
||||||
|
\fB\-f\fR
|
||||||
|
hash function (may be used multiple times). valid values are: djb2, fnv, jenkins, sdbm
|
||||||
|
.TP
|
||||||
|
\fB\-V\fR
|
||||||
|
Print version number and exit
|
||||||
|
.TP
|
||||||
|
\fB\-v\fR
|
||||||
|
Increase verbosity (may be used multiple times)
|
||||||
|
.TP
|
||||||
|
\fB\-k\fR
|
||||||
|
Number of keys
|
||||||
|
.TP
|
||||||
|
\fB\-g\fR
|
||||||
|
Generation mode
|
||||||
|
.TP
|
||||||
|
\fB\-s\fR
|
||||||
|
Random seed
|
||||||
|
.TP
|
||||||
|
\fB\-m\fR
|
||||||
|
Minimum perfect hash function file
|
||||||
|
.TP
|
||||||
|
\fB\-M\fR
|
||||||
|
Main memory availability (in MB)
|
||||||
|
.TP
|
||||||
|
\fB\-d\fR
|
||||||
|
Temporary directory used in brz algorithm
|
||||||
|
.TP
|
||||||
|
\fB\-b\fR
|
||||||
|
Parameter of BRZ algorithm to make the maximal number of keys in a bucket lower than 256
|
||||||
|
.TP
|
||||||
|
\fBkeysfile\fR
|
||||||
|
Line separated file with keys
|
||||||
|
.SH EXAMPLE
|
||||||
|
$ # Using the default algorithm (chm) for constructing a mphf
|
||||||
|
.br
|
||||||
|
$ # for keys in file keys_file. Lines in keys_file _must_ be unique.
|
||||||
|
.br
|
||||||
|
$ ./cmph -v -g keys_file
|
||||||
|
.br
|
||||||
|
$ # Query id of keys in the file keys_query
|
||||||
|
.br
|
||||||
|
$ ./cmph -v -m keys_file.mph keys_query
|
||||||
|
.SH AUTHOR
|
||||||
|
This manual page was written by Enrico Tassi <gareuselesinge@users.sourceforge.net>,
|
||||||
|
for the Debian project (but may be used by others).
|
||||||
|
|
Loading…
Reference in New Issue
Block a user