Motion - Configure Script
You are here: Foswiki>Motion Web>MotionGuide>ConfigureScript (07 May 2008, AngelCarpintero)Edit Attach

Configure Script

Configure is script that you run to setup the build environment for the C-compiler. It generates the "Makefile" which the program "make" uses to compile and install the software.

To run configure your current directory must be the motion directory. You type

./configure

You can add the parameter ./configure --help to get help on the different switches.

This is walk through of the options.

Option Description
Defaults for the options
are specified in brackets [ ]
Editors comment
-h, --help display this help and exit  
--help=short display options specific to this package This command shows the options special to motion. Recommended
--help=recursive display the short help of all the included packages  
-V, --version display version information and exit Gives no useful information
-q, --quiet, --silent do not print `checking...' messages Not very useful. Output to screen is only a few lines anyway.
--cache-file=FILE cache test results in FILE. [disabled] No function
-C, --config-cach alias for `--cache-file=config.cache' No function
-n, --no-create do not create output files Used for testing if other switches produce error - without writing anything to the disk
--srcdir=DIR find the sources in DIR. [configure dir or `..'] DIR is a directory path. Editor recommends having the current directory being the motion installation directory and not using this switch. Then it defaults to the same directory as where the configure script is which is the current directory.
Installation directories:    
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
The default /usr/local means that the executable binary "motion" is installed in /usr/local/bin, the manual page in /usr/local/man/man1, the document files in /usr/local/docs/motion-version, configuration file in /usr/local/etc, and some examples config files in /usr/local/examples/motion-versionEditor recommends keeping this default setting.
If you are experimenting with many parallel versions it may be interesting to set the PREFIX to e.g. /usr/local/motion and then add /usr/local/motion/bin to your search path (or simply cd /usr/local/motion/bin before execution).
This way you can change version just by changing the symbolic link in /usr/local/motion as suggested earlier in this guide.
If you are installing the software on a machine where you have no access to the /usr/local but have write access to a home directory, then you should change this to point to a directory within your home tree.
Example: --prefix=$HOME
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
If you set this it only defines an alternative installation directory for the executable binary.
Note: The executable binary will be placed in a directory "bin" below the directory specified by this option
Editor recommends leaving this as default (i.e. not setting it).
--bindir=DIR user executables [EPREFIX/bin] With this option you can control exactly in which directory the executable binary is installed. The previous option automatically adds the bin directory. Here you are in fill control.
--sbindir=DIR System admin executables [EPREFIX/sbin] Not used by motion. Ignore it.
--libexecdir=DIR program executables [EPREFIX/libexec] Not used by motion. Ignore it.
--datadir=DIR read-only architecture-independent data [PREFIX/share] Not used by motion. Ignore it.
--sysconfdir=DIR read-only single-machine data [PREFIX/etc] This is where motion both installs the default configuration file and also where it later searches for it.
Motion searches for the configuration file "motion.conf" in the following order:

    1. Current directory from where motion was invoked
    2. $HOME/.motion
    3. The sysconfig directory set by this switch. If not defined the default is /usr/local/etc/

Editor recommends leaving this at default. Be careful if you run "make install" again. This will overwrite the motion.conf file that you have edited and experimented with for hours. Make sure to keep a copy in a safe place. Alternatively, copy the working file to the motion base install directory. Then make install will simply copy the same file back again.
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] Not used by motion. Ignore it.
--localstatedir=DIR modifiable single-machine data [PREFIX/var] Not used by motion. Ignore it.
--libdir=DIR object code libraries [EPREFIX/lib] Not used by motion. Ignore it.
--includedir=DIR C header files [PREFIX/include] Not used by motion. Ignore it.
--oldincludedir=DIR C header files for non-gcc [/usr/include] Not used by motion. Ignore it.
--infodir=DIR info documentation [PREFIX/info] Not used by motion. Ignore it.
--mandir=DIR man documentation [PREFIX/man] Editor recommends the default.
Optional Packages:    
--with-linuxthreads Use linuxthreads in BSD instead of native phtreads Only relevant for BSD. In Linux we always use this per default.
--with-pwcbsd Use pwcbsd based webcams ( only BSD ) This option allow to build motion to support V4L/V4L2 in BSD.
HowtoMotionPwcFreeBSD
--without-bktr Exclude to use bktr subsystem , that usually useful for devices as network cameras ONLY used in *BSD
--without-v4l Exclude using v4l (video4linux) subsystem. Makes Motion so it only supports network cameras. Can be used if you do not need V4L support and maybe lack some of the libraries for it.
--with-jpeg-mmx=DIR Specify the prefix for the install path for jpeg-mmx for optimized jpeg handling (optional). If this is not specified motion will try to find the library /usr/lib/libjpeg-mmx.a /usr/local/lib/libjpeg-mmx.a. Considered experimental
--with-ffmpeg=DIR Specify the path for the directory prefix in which the library and headers are installed.
If not specified configure will search in /usr/ and /usr/local/
DIR is the directory PREFIX in which the ffmpeg shared libraries and their headers are installed.
If you install ffmpeg from sources and use the default directories or if ffmpeg is installed as a binary package (RPM or deb) you do not need to specify the directory prefix. Configure will find the libraries automatically. If you installed ffmpeg from sources and specified a different --prefix when building ffmpeg you must use the same value for the DIR ( --with-ffmpeg=DIR).
For more information on FFmpeg see the FFmpeg project home page.
FFmpeg is a package that enables streamed video mpeg signal from your web camera to a browser.
Editor recommends installing ffmpeg from source and in the directory /usr/local/ffmpeg and build ffmpeg with ./configure --enable-shared.
This places libraries in /usr/local/lib and headers in /usr/local/include.
--without-ffmpeg Do not compile with ffmpeg Use this if you do not want to compile with ffmpeg. If ffmpeg is not installed you do not need to specify that Motion must build without ffmpeg.
--with-mysql-lib=DIR Lib directory of MySQL Normally, configure will scan all possible default installation paths for MySQL libs. When its fail, use this command to tell configure where MySQL libs installation root directory is.
--with-mysql-include=DIR Include directory with headers for MySQL Normally, configure will scan all possible default installation paths for MySQL include. When its fail, use this command to tell configure where MySQL include installation directory is. This is the directory with the MySQL header files.
--without-mysql Do not compile with MySQL support Use this if you do not want to include MySQL support in the package.
This can also be useful if you get compilation errors related to MySQL and you actually do not need the feature anyway.
--without-pgsql Do not compile with PostgreSQL support Use this if you do not want to include PostgreSQL support in the package.
This can also be useful if you get compilation errors related to PostgreSQL and you actually do not need the feature anyway.
--with-pgsql-include=DIR Normally, configure will scan all possible default installation paths for pgsql include. When it fails, use this command to tell configure where pgsql include installation root directory is.  
--with-pgsql-lib=DIR Normally, configure will scan all possible default installation paths for pgsql libs. When it fails, use
this command to tell configure where pgsql libs installation root directory is.
 
--without-optimizecpu Exclude autodetecting platform and cpu type. This will disable the compilation of gcc optimizing code by platform and cpu. Use this if the optimization causes problems. Typically if you build on some non X386 compatible CPU.
Developers options    
--with-developer-flags Add additional warning flags for the compiler. This option is for developers only. It produces a flood of warnings that helps the developer to write more robust code. These warnings are normally harmless but can sometimes be a latent defect.
For more information about these flags, see CompileWithDeveloperFlags

-- KennethLavrsen - 13 Aug 2005
Topic revision: r6 - 07 May 2008, AngelCarpintero
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.