Blame INSTALL

Packit 47f805
LAME 3.xx    January 2001  Mark Taylor (http://www.mp3dev.org)
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Compile time options
Packit 47f805
=======================================================================
Packit 47f805
There are serveral targets which can be built from this
Packit 47f805
source code:
Packit 47f805
Packit 47f805
lame, lame.exe  The command line encoder
Packit 47f805
Packit 47f805
mp3x            A GTK based graphical MP3 frame analyzer.  For debugging,
Packit 47f805
                development, and studing MP3 frames produced by any
Packit 47f805
                encoder.
Packit 47f805
Packit 47f805
lame_enc.dll    a Windows DLL used by many GUIs which support lame.
Packit 47f805
                (Can only be compiled by MSVC???)
Packit 47f805
Packit 47f805
lame.acm        *** DEPRECATED ***
Packit 47f805
                a Windows ACM codec which can be used by many windows programs, 
Packit 47f805
                and any directshow program. See MSVC project files in ACM 
Packit 47f805
                directory. Right click on lame.inf to install.
Packit 47f805
Packit 47f805
lame_enc.dshow  a Windows direct show filter for lame.  Potentially has
Packit 47f805
                more flexability than the ACM codec, but code needs some
Packit 47f805
                work.  See MSVC project files in dshow directory
Packit 47f805
Packit 47f805
libmp3lame.a    the static encoding library used by all platforms, required
Packit 47f805
                by all the above targets.
Packit 47f805
Packit 47f805
libmp3lame.so   shared version of libmp3lame.a for *NIX platforms
Packit 47f805
Packit 47f805
Packit 47f805
The following compile time options can be used.  For libmp3lame.a and 
Packit 47f805
lame_enc.dll, none are required.  On non-unix systems, these options must 
Packit 47f805
be set in config.h or in the IDE.  
Packit 47f805
On unix systems, they are set via ./configure.  
Packit 47f805
Packit 47f805
Packit 47f805
#define HAVE_MPGLIB   compile in mpglib's mp3 *decoding* capibility
Packit 47f805
#define HAVE_VORBIS   compile in Vorbis decoding capibility
Packit 47f805
                      (you need libvorbis already built)
Packit 47f805
#define NOANALYSIS    do not compile in hooks used by the 
Packit 47f805
                      MP3 frame analyzer.
Packit 47f805
Packit 47f805
Options for the command line encoder:
Packit 47f805
#define LIBSNDFILE    to use Erik de Castro Lopo's libsndfile
Packit 47f805
                      for input.
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Building the software on *NIX platforms using configure:
Packit 47f805
=======================================================================
Packit 47f805
Run the following commands:
Packit 47f805
Packit 47f805
% ./configure
Packit 47f805
% make
Packit 47f805
% make install
Packit 47f805
Packit 47f805
For a complete list of options, try "./configure --help"
Packit 47f805
Some of the more usefull options:
Packit 47f805
Packit 47f805
For the encoding library:
Packit 47f805
Packit 47f805
  --enable-mp3x               Build the mp3 frame analyzer, 'mp3x'
Packit 47f805
Packit 47f805
  --enable-mp3rtp             Build the encode-to-RTP program, 'mp3rtp'
Packit 47f805
                              (broken as of August 2001)
Packit 47f805
 
Packit 47f805
Packit 47f805
For the LAME front end encoder:
Packit 47f805
Packit 47f805
  --with-fileio=lame          Use lame's internal file io routines [default]
Packit 47f805
               =sndfile       Use Erik de Castro Lopo's libsndfile (Supports 
Packit 47f805
                              many more input formats, but no stdin possible 
Packit 47f805
                              currently)
Packit 47f805
Packit 47f805
  --with-sndfile-prefix=DIR   Alternate location for libsndfile
Packit 47f805
                              (if --with-fileio=sndfile)
Packit 47f805
Packit 47f805
Packit 47f805
Other usefull configure options:
Packit 47f805
Packit 47f805
  --enable-debug              Build a debug version
Packit 47f805
Packit 47f805
  --enable-expopt             Enable some more optimizations flags for
Packit 47f805
                              the compiler, may or may not produce
Packit 47f805
                              faster code
Packit 47f805
Packit 47f805
  --prefix = PATH             default is /usr/local
Packit 47f805
                              (LAME currently installs:
Packit 47f805
                                /usr/local/bin/lame
Packit 47f805
                                /usr/local/lib/libmp3lame.a
Packit 47f805
                                /usr/local/lib/libmp3lame.so
Packit 47f805
                                /usr/local/include/lame.h
Packit 47f805
Packit 47f805
Packit 47f805
  --with-vorbis                Enable Ogg Vorbis decoding support
Packit 47f805
  --with-vorbis-prefix = PATH  specify where to find Vorbis libs
Packit 47f805
Packit 47f805
Packit 47f805
Some more advanced ways to influence the build procedure
Packit 47f805
(experienced users only, use it at your own risk):
Packit 47f805
Packit 47f805
  - If you want to use some custom defines for building (e.g. some out
Packit 47f805
    of the file "DEFINES") use:
Packit 47f805
Packit 47f805
     * bourne shell or compatible (ash, bash, zsh, ...):
Packit 47f805
       CONFIG_DEFS="-Dmy_define" ./configure
Packit 47f805
Packit 47f805
     * C shell or compatible (csh, tcsh, ...):
Packit 47f805
       setenv CONFIG_DEFS "-Dmy_define"
Packit 47f805
       ./configure
Packit 47f805
Packit 47f805
  - If you want to use some additional options for the compiler:
Packit 47f805
Packit 47f805
    * bourne shell or compatible (ash, bash, zsh, ...):
Packit 47f805
      CFLAGS="--my_flag" ./configure
Packit 47f805
Packit 47f805
    * C shell or compatible (csh, tcsh, ...):
Packit 47f805
      setenv CFLAGS "--my_flag"
Packit 47f805
      ./configure
Packit 47f805
Packit 47f805
  Or some combination of the above.
Packit 47f805
Packit 47f805
  Note:
Packit 47f805
    If configure detects the presents of "nasm" some additional speed
Packit 47f805
    improvements get compiled in (additional assembler code to detect
Packit 47f805
    and use multimedia extensions of the used processor).
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Building the software on *NIX platforms without configure:
Packit 47f805
=======================================================================
Packit 47f805
% make -f Makefile.unix
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Building the software on Windows with MSVC:
Packit 47f805
(or MSVC + 3rd party C compiler such as ICL)
Packit 47f805
=======================================================================
Packit 47f805
There are MSVC project files, and a Makefile.MSVC included with the 
Packit 47f805
project.  For production use, be sure to compile a "Release" target, 
Packit 47f805
with the "maximum speed" compile option, and #define NDEBUG.   
Packit 47f805
Packit 47f805
It is possible to compile the GTK frame analyzer under windows, see
Packit 47f805
README.WINGTK
Packit 47f805
Packit 47f805
Various build options can be set in configMS.h
Packit 47f805
Packit 47f805
Note: project files for building lame.exe seem to be broken or not
Packit 47f805
quite compatable with MSVC6.  The most reliable way to build lame and
Packit 47f805
lame_enc.dll is to run the .bat script (comes with MSVC6) which sets
Packit 47f805
up your VC environment to work from the command line, and then:
Packit 47f805
Packit 47f805
copy configMS.h config.h 
Packit 47f805
nmake -f Makefile.MSVC  comp=msvc  asm=no
Packit 47f805
Packit 47f805
Project files for the dll, ACM codec and directshow filter 
Packit 47f805
seem to be in better sahpe.  
Packit 47f805
Packit 47f805
Packit 47f805
=======================================================================
Packit 47f805
Building the software on Windows with free compilers:
Packit 47f805
=======================================================================
Packit 47f805
LAME can be compiled with various Windows ports (all free) of GCC (DJGPP, 
Packit 47f805
Mingw32).  See README.DJGPP.  
Packit 47f805
Packit 47f805
For Mingw32, you should now be able to use the Unix Makefile that
Packit 47f805
comes with LAME.  Try: "make -f Makefile.unix UNAME=MSDOS"
Packit 47f805
You may need to remove these lines from brhist.c:
Packit 47f805
Packit 47f805
#ifdef _WIN32
Packit 47f805
COORD Pos;
Packit 47f805
HANDLE CH;
Packit 47f805
CONSOLE_SCREEN_BUFFER_INFO CSBI;
Packit 47f805
#endif
Packit 47f805
Packit 47f805
Mingw32 users may also try to use the unix configure script (explained
Packit 47f805
above), it has _untested_ support for Mingw32.
Packit 47f805
Packit 47f805
Cygwin users should use the unix configure script (explained above). If
Packit 47f805
you have problems with the configure script try:
Packit 47f805
      CC=gcc ./configure
Packit 47f805
Patches to enable the build of the lame_enc.dll with Cygwin and autoconf /
Packit 47f805
automake / libtool are welcome!
Packit 47f805
Packit 47f805
To use the Borland C compiler (now free!) see README.B32 and Makefile.B32.
Packit 47f805
Borland can also compile the lame_enc.dll, but this is untested.
Packit 47f805
Packit 47f805
Can DJGPP or Mingw32 produce lame_enc.dll?
Packit 47f805
Packit 47f805
Various build options can be set in configMS.h
Packit 47f805