Desc: Configure options
File: configure.txt
Date: 25 February 2002
Auth: Russell Kroll <rkroll@exploits.org>

There are a few options that can be given to configure to tweak compiles:

 --prefix=PATH

   This is a fairly standard option with GNU autoconf, and it sets the
   base path for most of the other install directories.  The default
   is /usr/local/ups, which puts everything but the state files in one
   easy place.

   If you like having things to be at more of a "system" level, setting
   the prefix to /usr/local or even /usr might be better.

 --with-statepath=PATH

   Change the location of the state files created by the model programs.
   Default is /var/state/ups.

 --with-port=PORT

   Change the UDP and TCP ports used by the network code.  Default is 3305.

 --with-user=<username>

   Programs started as root will setuid() to this user for somewhat 
   safer operation.  The default user is nobody.  

   Warning: Running lots of daemons as 'nobody' on your system isn't
   such a good idea.  You should create different users.  See the FAQ.

   Note: upsmon does not totally drop root as it needs to invoke a 
   shutdown.  There is always at least a stub process remaining with
   root powers.

 --with-group=<groupname>

   Programs started as root will setgid() to this group for safety.
   The default group is nogroup.

 --with-logfacility=FACILITY

   Change the facility used when writing to the log file.  Read the man
   page for openlog to get some idea of what's available on your system.
   Default is LOG_DAEMON.

 --without-shared-memory

   Disables shared memory on the model drivers and upsd.  This is useful
   on systems where the automatic detection fails, or for debugging.

 --sysconfdir=PATH

   Changes the configuration path for the suite.  By default this path
   is $(prefix)/etc.  Setting this to /etc or /etc/ups might be useful.

 --mandir=PATH

   Sets the base directories for the man pages.  The default is
   $(prefix)/man, i.e. /usr/local/ups/man.

 --with-pidpath=PATH

   Changes the directory where pid files are stored.  By default this is
   /var/run.  Certain programs like upsmon will leave files here.

 --with-altpidpath=PATH

   Programs that normally don't have root powers like the model drivers
   and upsd write their pid files here.  By default this is whatever
   the statepath is, as those programs should be able to write there.

 --with-linux-hiddev=PATH

   Sets the directory to the hiddev.h for USB UPS support on Linux.
   This defaults to /usr/include/linux/hiddev.h, and is only used when
   building the experimental "hidups" driver.

 --with-modelpath=PATH

   The UPS model drivers will be installed to this path.  By default they
   install to "bin" under the prefix, giving a default path of
   /usr/local/ups/bin.

 --with-cgipath=PATH

   The CGI programs will be installed to this path.  By default, they
   install to "cgi-bin" under the prefix, which is usually /usr/local/ups.

   If you set the prefix to something like /usr, you should set the 
   cgipath to something else as /usr/cgi-bin is pretty ugly and 
   non-standard.

   The CGI programs are not built or installed by default.  Use "make cgi"
   to build them and "make install-cgi" to install them.

 --with-drivers=<driver>,<driver>,...

   As of the time of this writing, there are 30 UPS drivers available.
   Most users will only need one, a few will need two or three, and
   very few people will need all of them.

   To save time during the compile, and disk space later on, you can
   use this option to just build and install a subset of the drivers.
   To select apcsmart and hidups, do something like this:

   --with-drivers=apcsmart,hidups

   If you need to build more drivers later on, you will need to rerun
   configure with a different list.  To make it build all of the drivers
   again, run 'make distclean' before starting.
