Configure

From VideoLAN Wiki
Revision as of 23:58, 27 June 2006 by H2g2bob (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

configure (also known as ./configure) is a BASH script used to gather information about your computer and select options on what to link to and how. Before running make (which compiles vlc), you should run configure.

If you are compiling source from CVS, then you should run bootstrap before running configure.

You can run configure like this:

./configure

Options

Below are some common options for configure:

option meaning
--prefix=/home/user/vlc/ Sets the location of where to install vlc
--enable-flac Turns on support for FLAC audio files

Examples

Windows

From http://developers.videolan.org/vlc/vlc/INSTALL.win32

If you are cross-compiling from Debian, you can use something along those lines:

 ./bootstrap && \
 PKG_CONFIG_LIBDIR=/usr/win32/lib/pkgconfig \
 CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml" \
 LDFLAGS=-L/usr/win32/lib \
 CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g++ \
 ./configure --host=i586-mingw32msvc --build=i386-linux \
     --disable-gtk \
     --enable-nls --enable-sdl --with-sdl-config-path=/usr/win32/bin \
     --enable-ffmpeg --with-ffmpeg-mp3lame --with-ffmpeg-faac \
     --with-ffmpeg-zlib --enable-faad --enable-flac --enable-theora \
     --with-wx-config-path=/usr/win32/bin \
     --with-freetype-config-path=/usr/win32/bin \
     --with-fribidi-config-path=/usr/win32/bin \
     --enable-live555 --with-live555-tree=/usr/win32/live.com \
     --enable-caca --with-caca-config-path=/usr/win32/bin \
     --with-xml2-config-path=/usr/win32/bin \
     --with-dvdnav-config-path=/usr/win32/bin \
     --disable-cddax --disable-vcdx --enable-goom \
     --enable-twolame --enable-dvdread \
     --enable-debug

If you are using cygwin, you can build VLC with or without the POSIX emulation layer. Without is usually better and with POSIX emulation hasn't been tested in about a year or so. So to build without the emulation layer, use something like this:

 ./bootstrap && \
 PKG_CONFIG_PATH=/usr/win32/lib/pkgconfig \
 CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml" \
 LDFLAGS=-L/usr/win32/lib \
 CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin" \
 ./configure \
     --disable-gtk \
     --enable-nls --enable-sdl --with-sdl-config-path=/usr/win32/bin \
     --enable-ffmpeg --with-ffmpeg-mp3lame --with-ffmpeg-faac \
     --with-ffmpeg-zlib --enable-faad --enable-flac --enable-theora \
     --with-wx-config-path=/usr/win32/bin \
     --with-freetype-config-path=/usr/win32/bin \
     --with-fribidi-config-path=/usr/win32/bin \
     --enable-live555 --with-live555-tree=/usr/win32/live.com \
     --enable-caca --with-caca-config-path=/usr/win32/bin \
     --with-xml2-config-path=/usr/win32/bin \
     --with-dvdnav-config-path=/usr/win32/bin \
     --disable-cddax --disable-vcdx --enable-goom \
     --enable-twolame --enable-dvdread \
     --enable-debug

If you want to use the emulation layer, then just omit the CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin" line. You're on your own though.

If you are compiling with MSYS/MINGW, then you can use something along those lines:

 ./bootstrap && \
 PKG_CONFIG_PATH=/usr/win32/lib/pkgconfig \
 CPPFLAGS="-I/usr/win32/include -I/usr/win32/include/ebml" \
 LDFLAGS=-L/usr/win32/lib \
 ./configure \
     --disable-gtk \
     --enable-nls --enable-sdl --with-sdl-config-path=/usr/win32/bin \
     --enable-ffmpeg --with-ffmpeg-mp3lame --with-ffmpeg-faac \
     --with-ffmpeg-zlib --enable-faad --enable-flac --enable-theora \
     --with-wx-config-path=/usr/win32/bin \
     --with-freetype-config-path=/usr/win32/bin \
     --with-fribidi-config-path=/usr/win32/bin \
     --enable-caca --with-caca-config-path=/usr/win32/bin \
     --with-xml2-config-path=/usr/win32/bin \
     --with-dvdnav-config-path=/usr/win32/bin \
     --disable-cddax --disable-vcdx --enable-goom \
     --enable-twolame --enable-dvdread \
     --disable-mkv \
     --enable-debug

If you have used the "extras/contrib" way, you don't need to precise the CFLAGS, LDFLAGS and --with-foo-config-path=.

./bootstrap && \
 ./configure \
     --disable-gtk \
     --enable-nls --enable-sdl \
     --enable-ffmpeg --enable-faad --enable-flac --enable-theora \
     --disable-cddax --disable-vcdx --enable-goom \
     --enable-twolame --enable-dvdread \
     --enable-mkv --enable-caca --enable-live555\
     --enable-debug


See `./configure --help' for more information.