Mktemp uses a
configure script to probe the capabilities and type of the
system in question. Mktemp’s
configure script has a large number of options
that control its behavior and enable or disable optional functionality.
Be sure to read this document fully before configuring and building mktemp.
You may also wish to read the file INSTALL.configure which explains more
configure script itself.
To build mktemp from the source distribution you need a POSIX-compliant operating system (any modern version of BSD, Linux, or Unix should work), an ANSI/ISO C compiler and the make utility.
For most systems and configurations it is possible simply to:
If you previously ran
configureon a different host you will probably want to do a
make distcleanto remove the old
configurewill complain and refuse to run. Alternately, you can simply
cdto the source or build directory and type
./configureto generate a Makefile and config.h file suitable for building mktemp. Before you actually run configure you should read the “Available configure options” section to see if there are any special options you may want or need.
maketo compile mktemp.
make install(as root) to install mktemp and its manual page. You can also install various pieces the package via the install-binaries and install-man make targets.
This section describes flags accepted by the mktemp’s
Defaults are listed in brackets after the description.
- Cache test results in FILE
- Print the usage/help info
- Do not create output files
- Do not print “checking…” messages
- Install architecture-independent files in PREFIX. [/usr/local]
- Install architecture-dependent files in EPREFIX. [same as prefix]
- Where the mktemp executable will be installed. [EPREFIX/bin]
- Install man page in DIR [PREFIX/man]
- Find the sources in DIR [configure dir or ..]
- Specifies path to C compiler you wish to use.
- Adds the specified directories to CPPFLAGS so configure and the compiler will look there for include files. Multiple directories may be specified as long as they are space separated. Eg: –with-incpath="/usr/local/include /opt/include"
- Adds the specified directories to LDFLAGS so configure and the compiler will look there for libraries. Multiple directories may be specified as with –with-incpath.
- Adds the specified libaries to LIBS so mktemp will link against them. If the library doesn’t start with “-l” or end in “.a” or “.o” a “-l” will be prepended to it. Multiple libraries may be specified as long as they are space separated.
- When installing the manual page, install the one in man(7) format.
- When installing the manual page, install the one in mdoc(7) format.
- Mktemp with use “path” as the path to a device from which to read
random data. This defaults to
/dev/urandomif it exists.
- For systems without a random device, the prngd and egd daemons can be used as an entropy source. The argument to this option should either be the path to a Unix domain socket or an IP port number.
- Causes mktemp to use the mkstemp(3) and mkdtemp(3) (if it exists) in the system C library instead of mktemp’s own private version. You should only enable this option if you know that the version of mkstemp(3) your OS ships with is a good one.
NOTE: if your OS doesn’t have a mkdtemp(3) function, a rather simplistic implementation with be used.