1
Desc: Configure options
4
Auth: Russell Kroll <rkroll@exploits.org>
5
Auth: Peter Selinger <selinger@sourceforge.net>
6
Auth: Arnaud Quette <aquette.dev@gmail.com>
8
6
There are a few options that can be given to configure to tweak compiles.
9
7
See also "./configure --help" for a current and complete listing.
16
3. Other configuration options
17
4. Installation directories
18
5. Directories used by NUT at run-time
19
6. Things the compiler might need to find
26
Build and install the serial drivers (default: yes)
30
Build and install the USB drivers (default: auto-detect)
31
Note that you need to install the libusb development package or files.
35
Build and install the SNMP drivers (default: auto-detect)
36
Note that you need to install libsnmp development package or files.
38
--with-drivers=<driver>,<driver>,...
40
Specify exactly which driver or drivers to build and install (this
41
works for serial, usb, and snmp drivers, and overrides the
42
preceding three options).
44
As of the time of this writing (2006), there are 47 UPS drivers
45
available. Most users will only need one, a few will need two or
46
three, and very few people will need all of them.
48
To save time during the compile and disk space later on, you can
49
use this option to just build and install a subset of the drivers.
50
To select apcsmart and usbhid-ups, you'd do this:
14
Build and install the serial drivers (default: yes)
18
Build and install the USB drivers (default: auto-detect)
19
Note that you need to install the libusb development package or files.
23
Build and install the SNMP drivers (default: auto-detect)
24
Note that you need to install libsnmp development package or files.
28
Build and install the XML drivers (default: auto-detect)
29
Note that you need to install neon development package or files.
33
Build and install Powerman PDU client driver (default: auto-detect)
34
This allows to interact with the Powerman daemon, and the numerous
35
Power Distribution Units (PDU) supported by the project.
36
Note that you need to install powerman development package or files.
41
Build and install IPMI PSU driver (default: auto-detect)
42
This allows to monitor numerous Power Supply Units (PSU) found
44
Note that you need to install freeipmi (0.8.5 or higher) development package or
47
--with-drivers=<driver>,<driver>,...
49
Specify exactly which driver or drivers to build and install (this
50
works for serial, usb, and snmp drivers, and overrides the
51
preceding three options).
53
As of the time of this writing (2010), there are 46 UPS drivers
54
available. Most users will only need one, a few will need two or
55
three, and very few people will need all of them.
57
To save time during the compile and disk space later on, you can
58
use this option to just build and install a subset of the drivers.
59
To select mge-shut and usbhid-ups, you'd do this:
52
61
--with-drivers=apcsmart,usbhid-ups
54
If you need to build more drivers later on, you will need to rerun
55
configure with a different list. To make it build all of the
56
drivers from scratch again, run 'make clean' before starting.
61
--with-cgi (default: no)
63
Build and install the optional CGI programs, HTML files, and sample
64
CGI configuration files. This is not enabled by default, as they
65
are only useful on web servers. See data/html/README for additional
66
information on how to set up CGI programs.
68
--with-lib (default: no)
70
Build and install the upsclient library and header files.
72
--with-all (no default)
74
Build and install all of the above (the serial, USB, and SNMP
75
drivers, the CGI programs and HTML files, and the upsclient
80
Enable SSL development code (default: auto-detect)
84
Enable IPv6 support (default: auto-detect)
86
--with-hal (default: no)
88
Build and install Hardware Abstraction Layer support.
89
If you own a USB unit, only protect your local system and run the
90
Gnome or KDE desktop, this will enable a full Plug & Play usage.
91
See docs/nut-hal.txt for additional information on how to set up
94
--with-powerman (default: auto-detect)
96
Build and install Powerman PDU client driver.
97
This allows to interact with the Powerman daemon, and the numerous
98
Power Distribution Units (PDU) supported by the project.
100
3. Other configuration options:
101
===============================
105
Change the TCP port used by the network code. Default is 3493.
107
Ancient versions of upsd used port 3305. NUT 2.0 and up use a
108
substantially different network protocol and are not able to
109
communicate with anything older than the 1.4 series.
111
If you have to monitor a mixed environment, use the last 1.4 version,
112
as it contains compatibility code for both the old "REQ" and the new
113
"GET" versions of the protocol.
115
--with-user=<username>
116
--with-group=<groupname>
118
Programs started as root will setuid() to <username> for somewhat
119
safer operation. You can override this with -u <user> in several
120
programs, including upsdrvctl (and all drivers by extension), upsd,
121
and upsmon. The "user" directive in ups.conf overrides this at run
122
time for the drivers.
124
Note: upsmon does not totally drop root because it may need to
125
initiate a shutdown. There is always at least a stub process
126
remaining with root powers. The network code runs in another
127
(separate) process as the new user.
129
The <groupname> is used for the permissions of some files,
130
particularly the hotplugging rules for USB. The idea is that the
131
device files for any UPS devices should be readable and writable by
132
members of that group.
134
The default value for both the username and groupname is "nobody".
135
This was done since it's slightly better than staying around as
136
root. Running things as nobody is not a good idea, since it's a
137
hack for NFS access. You should create at least one separate user
140
If you use one of the --with-user and --with-group options, then
141
you have to use the other one too.
143
See the INSTALL document and the FAQ for more on this topic.
145
--with-logfacility=FACILITY
147
Change the facility used when writing to the log file. Read the man
148
page for openlog to get some idea of what's available on your system.
149
Default is LOG_DAEMON.
151
4. Installation directories:
152
============================
156
This is a fairly standard option with GNU autoconf, and it sets the
157
base path for most of the other install directories. The default
158
is /usr/local/ups, which puts everything but the state sockets in one
161
If you like having things to be at more of a "system" level, setting
162
the prefix to /usr/local or even /usr might be better.
166
This sets the base path for architecture dependent files. By
167
default, it is the same as <prefix>.
171
Changes the location where NUT's configuration files are stored.
172
By default this path is <prefix>/etc. Setting this to /etc or
173
/etc/ups might be useful.
175
The NUT_CONFPATH environment variable overrides this at run time.
180
Where executable files will be installed. Files that are normally
181
executed by root (upsd, upsmon, upssched) go to sbindir, all others
182
to bindir. The defaults are <exec_prefix>/bin and <exec_prefix>/sbin.
186
Change the data directory, i.e., where architecture independent
187
read-only data is installed. By default this is <prefix>/share,
188
i.e., /usr/local/ups/share. At the moment, this directory only
189
holds two files - the optional cmdvartab and driver.list.
193
Sets the base directories for the man pages. The default is
194
<prefix>/man, i.e., /usr/local/ups/man.
198
Sets the path for include files to be installed when --with-lib is
199
selected. For example, upsclient.h is installed here. The default
204
Sets the installation path for libraries. This is just the
205
upsclient library for now. The default is <exec_prefix>/lib.
209
The UPS drivers will be installed to this path. By default they
210
install to "<exec_prefix>/bin", i.e., /usr/local/ups/bin.
212
The "driverpath" global directive in the ups.conf file overrides this
217
The CGI programs will be installed to this path. By default, they
218
install to "<exec_prefix>/cgi-bin", which is usually /usr/local/ups/cgi-bin.
220
If you set the prefix to something like /usr, you should set the
221
cgipath to something else, because /usr/cgi-bin is pretty ugly and
224
The CGI programs are not built or installed by default. Use
225
"./configure --with-cgi" to request that they are built and
230
HTML files will be installed to this path. By default, this is
231
"<prefix>/html". Note that HTML files are only installed if
232
--with-cgi is selected.
234
--with-pkgconfig-dir=PATH
236
Where to install pkg-config *.pc files. This option only has an
237
effect if --with-lib is selected, and causes a pkg-config file to
238
be installed in the named location. The default is
239
<exec_prefix>/pkgconfig.
241
Use --without-pkgconfig-dir to disable this feature altogether.
243
--with-hotplug-dir=PATH
245
Where to install Linux 2.4 hotplugging rules. The default is
246
/etc/hotplug, if that directory exists, and not to install it
247
otherwise. Note that this installation directory is not a
248
subdirectory of <prefix> by default. When installing NUT as a
249
non-root user, you may have to override this option.
251
Use --without-hotplug-dir to disable this feature altogether.
255
Where to install Linux 2.6 hotplugging rules, for kernels that have
256
the "udev" mechanism. The default is /etc/udev, if that directory
257
exists, and not to install it otherwise. Note that this
258
installation directory is not a subdirectory of <prefix> by
259
default. When installing NUT as a non-root user, you may have to
260
override this option.
262
Use --without-udev-dir to disable this feature altogether.
264
5. Directories used by NUT at run-time:
265
=======================================
269
Changes the directory where pid files are stored. By default this is
270
/var/run. Certain programs like upsmon will leave files here.
272
--with-altpidpath=PATH
274
Programs that normally don't have root powers, like the drivers and
275
upsd, write their pid files here. By default this is whatever the
276
statepath is, as those programs should be able to write there.
278
--with-statepath=PATH
280
Change the default location of the state sockets created by the
283
The NUT_STATEPATH environment variable overrides this at run time.
285
Default is /var/state/ups.
287
6. Things the compiler might need to find:
288
==========================================
290
--with-gd-includes="-I/foo/bar"
292
If you installed gd in some place where your C preprocessor can't
293
find the header files, use this switch to add additional -I flags.
295
--with-gd-libs="-L/foo/bar -labcd -lxyz"
297
If your copy of gd isn't linking properly, use this to give the
298
proper -L and -l flags to make it work. See LIBS= in gd's Makefile.
300
Note: the --with-gd switches are not necessary if you have gd 2.0.8
301
or higher installed properly. The gdlib-config script will be
302
detected and used by default in that situation.
63
If you need to build more drivers later on, you will need to rerun
64
configure with a different list. To make it build all of the
65
drivers from scratch again, run 'make clean' before starting.
71
--with-cgi (default: no)
73
Build and install the optional CGI programs, HTML files, and sample
74
CGI configuration files. This is not enabled by default, as they
75
are only useful on web servers. See data/html/README for additional
76
information on how to set up CGI programs.
78
--with-doc=<output-format(s)> (default: no)
80
Build and install NUT documentation file(s).
81
The possible values are "html-single" for single page HTML, "html-chunked"
82
for multi pages HTML, "pdf" for a PDF file or "auto" to build all the
83
possible previous documentation formats.
84
Verbose output can be enabled using: ASCIIDOC_VERBOSE=-v make
86
This feature requires AsciiDoc 8.6.3 (http://www.methods.co.nz/asciidoc).
88
--with-lib (default: no)
90
Build and install the upsclient library and header files.
92
--with-all (no default)
94
Build and install all of the above (the serial, USB, SNMP, XML/HTTP and
95
PowerMan drivers, the CGI programs and HTML files, and the upsclient
98
--with-ssl (default: auto-detect)
100
Enable SSL development code. Read the section "Configuring SSL" in
101
docs/security.txt for instructions on SSL support.
103
--with-wrap (default: auto-detect)
105
Enable libwrap (tcp-wrappers) support. Refer to upsd man page for
108
--with-ipv6 (default: auto-detect)
112
--with-hal (default: no)
114
Build and install Hardware Abstraction Layer support.
115
If you own a USB unit, only protect your local system and run the
116
Gnome or KDE desktop, this will enable a full Plug & Play usage.
117
See docs/nut-hal.txt for additional information on how to set up
120
--with-avahi (default: auto-detect)
122
Build and install Avahi support, to publish NUT server availability
126
Other configuration options
127
---------------------------
131
Change the TCP port used by the network code. Default is 3493.
133
Ancient versions of upsd used port 3305. NUT 2.0 and up use a
134
substantially different network protocol and are not able to
135
communicate with anything older than the 1.4 series.
137
If you have to monitor a mixed environment, use the last 1.4 version,
138
as it contains compatibility code for both the old "REQ" and the new
139
"GET" versions of the protocol.
141
--with-user=<username>
142
--with-group=<groupname>
144
Programs started as root will setuid() to <username> for somewhat
145
safer operation. You can override this with -u <user> in several
146
programs, including upsdrvctl (and all drivers by extension), upsd,
147
and upsmon. The "user" directive in ups.conf overrides this at run
148
time for the drivers.
150
NOTE: upsmon does not totally drop root because it may need to
151
initiate a shutdown. There is always at least a stub process
152
remaining with root powers. The network code runs in another
153
(separate) process as the new user.
155
The <groupname> is used for the permissions of some files,
156
particularly the hotplugging rules for USB. The idea is that the
157
device files for any UPS devices should be readable and writable by
158
members of that group.
160
The default value for both the username and groupname is "nobody".
161
This was done since it's slightly better than staying around as
162
root. Running things as nobody is not a good idea, since it's a
163
hack for NFS access. You should create at least one separate user
166
If you use one of the --with-user and --with-group options, then
167
you have to use the other one too.
169
See the INSTALL document and the FAQ for more on this topic.
171
--with-logfacility=FACILITY
173
Change the facility used when writing to the log file. Read the man
174
page for openlog to get some idea of what's available on your system.
175
Default is LOG_DAEMON.
178
Installation directories
179
------------------------
183
This is a fairly standard option with GNU autoconf, and it sets the
184
base path for most of the other install directories. The default
185
is /usr/local/ups, which puts everything but the state sockets in one
188
If you like having things to be at more of a "system" level, setting
189
the prefix to /usr/local or even /usr might be better.
193
This sets the base path for architecture dependent files. By
194
default, it is the same as <prefix>.
198
Changes the location where NUT's configuration files are stored.
199
By default this path is <prefix>/etc. Setting this to /etc or
200
/etc/ups might be useful.
202
The NUT_CONFPATH environment variable overrides this at run time.
207
Where executable files will be installed. Files that are normally
208
executed by root (upsd, upsmon, upssched) go to sbindir, all others
209
to bindir. The defaults are <exec_prefix>/bin and <exec_prefix>/sbin.
213
Change the data directory, i.e., where architecture independent
214
read-only data is installed. By default this is <prefix>/share,
215
i.e., /usr/local/ups/share. At the moment, this directory only
216
holds two files - the optional cmdvartab and driver.list.
220
Sets the base directories for the man pages. The default is
221
<prefix>/man, i.e., /usr/local/ups/man.
225
Sets the path for include files to be installed when --with-lib is
226
selected. For example, upsclient.h is installed here. The default
231
Sets the installation path for libraries. This is just the
232
upsclient library for now. The default is <exec_prefix>/lib.
236
The UPS drivers will be installed to this path. By default they
237
install to "<exec_prefix>/bin", i.e., /usr/local/ups/bin.
239
The "driverpath" global directive in the ups.conf file overrides this
244
The CGI programs will be installed to this path. By default, they
245
install to "<exec_prefix>/cgi-bin", which is usually /usr/local/ups/cgi-bin.
247
If you set the prefix to something like /usr, you should set the
248
cgipath to something else, because /usr/cgi-bin is pretty ugly and
251
The CGI programs are not built or installed by default. Use
252
"./configure --with-cgi" to request that they are built and
257
HTML files will be installed to this path. By default, this is
258
"<prefix>/html". Note that HTML files are only installed if
259
--with-cgi is selected.
261
--with-pkgconfig-dir=PATH
263
Where to install pkg-config *.pc files. This option only has an
264
effect if --with-lib is selected, and causes a pkg-config file to
265
be installed in the named location. The default is
266
<exec_prefix>/pkgconfig.
268
Use --without-pkgconfig-dir to disable this feature altogether.
270
--with-hotplug-dir=PATH
272
Where to install Linux 2.4 hotplugging rules. The default is
273
/etc/hotplug, if that directory exists, and not to install it
274
otherwise. Note that this installation directory is not a
275
subdirectory of <prefix> by default. When installing NUT as a
276
non-root user, you may have to override this option.
278
Use --without-hotplug-dir to disable this feature altogether.
282
Where to install Linux 2.6 hotplugging rules, for kernels that have
283
the "udev" mechanism. The default is /etc/udev, if that directory
284
exists, and not to install it otherwise. Note that this
285
installation directory is not a subdirectory of <prefix> by
286
default. When installing NUT as a non-root user, you may have to
287
override this option.
289
Use --without-udev-dir to disable this feature altogether.
292
Directories used by NUT at run-time
293
-----------------------------------
297
Changes the directory where pid files are stored. By default this is
298
/var/run. Certain programs like upsmon will leave files here.
300
--with-altpidpath=PATH
302
Programs that normally don't have root powers, like the drivers and
303
upsd, write their pid files here. By default this is whatever the
304
statepath is, as those programs should be able to write there.
306
--with-statepath=PATH
308
Change the default location of the state sockets created by the
311
The NUT_STATEPATH environment variable overrides this at run time.
313
Default is /var/state/ups.
316
Things the compiler might need to find
317
--------------------------------------
319
--with-gd-includes="-I/foo/bar"
321
If you installed gd in some place where your C preprocessor can't
322
find the header files, use this switch to add additional -I flags.
324
--with-gd-libs="-L/foo/bar -labcd -lxyz"
326
If your copy of gd isn't linking properly, use this to give the
327
proper -L and -l flags to make it work. See LIBS= in gd's Makefile.
329
NOTE: the --with-gd switches are not necessary if you have gd 2.0.8
330
or higher installed properly. The gdlib-config script will be
331
detected and used by default in that situation.
333
--with-ssl-includes, --with-usb-includes, --with-snmp-includes,
334
--with-neon-includes, --with-powerman-includes="-I/foo/bar"
336
If your system doesn't have pkg-config and support for any of the above
337
libraries isn't found (but you know it is installed), you must specify the
338
compiler flags that are needed.
340
--with-ssl-libs, --with-usb-libs, --with-snmp-libs,
341
--with-neon-libs, --with-powerman-libs="-L/foo/bar -labcd -lxyz"
343
If your system doesn't have pkg-config and support for any of the above
344
libraries isn't found (but you know it is installed), you must specify the
345
linker flags that are needed.
347
HAL addons (deprecated)
348
-----------------------
350
--with-hal-includes="-DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/hal \
351
-I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include"
352
--with-hal-libs="-lhal -ldbus-1 -lpthread"
353
--with-hal-user="haldaemon"
354
--with-hal-device-match-key="info.bus"
355
--with-hal-callouts-path="${libdir}/hal"
356
--with-hal-fdi-path="${datarootdir}/hal/fdi/information/20thirdparty"
358
If system doesn't have pkg-config or it fails to provides hints for some of the
359
settings that are needed to set it up properly and the build in defaults are
360
not right, you can specify the right variables here.