xref: /third_party/lame/INSTALL (revision 159b3361)
1LAME 3.xx    January 2001  Mark Taylor (http://www.mp3dev.org)
2
3
4=======================================================================
5Compile time options
6=======================================================================
7There are serveral targets which can be built from this
8source code:
9
10lame, lame.exe  The command line encoder
11
12mp3x            A GTK based graphical MP3 frame analyzer.  For debugging,
13                development, and studing MP3 frames produced by any
14                encoder.
15
16lame_enc.dll    a Windows DLL used by many GUIs which support lame.
17                (Can only be compiled by MSVC???)
18
19lame.acm        *** DEPRECATED ***
20                a Windows ACM codec which can be used by many windows programs, 
21                and any directshow program. See MSVC project files in ACM 
22                directory. Right click on lame.inf to install.
23
24lame_enc.dshow  a Windows direct show filter for lame.  Potentially has
25                more flexability than the ACM codec, but code needs some
26                work.  See MSVC project files in dshow directory
27
28libmp3lame.a    the static encoding library used by all platforms, required
29                by all the above targets.
30
31libmp3lame.so   shared version of libmp3lame.a for *NIX platforms
32
33
34The following compile time options can be used.  For libmp3lame.a and 
35lame_enc.dll, none are required.  On non-unix systems, these options must 
36be set in config.h or in the IDE.  
37On unix systems, they are set via ./configure.  
38
39
40#define HAVE_MPGLIB   compile in mpglib's mp3 *decoding* capibility
41#define HAVE_VORBIS   compile in Vorbis decoding capibility
42                      (you need libvorbis already built)
43#define NOANALYSIS    do not compile in hooks used by the 
44                      MP3 frame analyzer.
45
46Options for the command line encoder:
47#define LIBSNDFILE    to use Erik de Castro Lopo's libsndfile
48                      for input.
49
50
51=======================================================================
52Building the software on *NIX platforms using configure:
53=======================================================================
54Run the following commands:
55
56% ./configure
57% make
58% make install
59
60For a complete list of options, try "./configure --help"
61Some of the more usefull options:
62
63For the encoding library:
64
65  --enable-mp3x               Build the mp3 frame analyzer, 'mp3x'
66
67  --enable-mp3rtp             Build the encode-to-RTP program, 'mp3rtp'
68                              (broken as of August 2001)
69 
70
71For the LAME front end encoder:
72
73  --with-fileio=lame          Use lame's internal file io routines [default]
74               =sndfile       Use Erik de Castro Lopo's libsndfile (Supports 
75                              many more input formats, but no stdin possible 
76                              currently)
77
78  --with-sndfile-prefix=DIR   Alternate location for libsndfile
79                              (if --with-fileio=sndfile)
80
81
82Other usefull configure options:
83
84  --enable-debug              Build a debug version
85
86  --enable-expopt             Enable some more optimizations flags for
87                              the compiler, may or may not produce
88                              faster code
89
90  --prefix = PATH             default is /usr/local
91                              (LAME currently installs:
92                                /usr/local/bin/lame
93                                /usr/local/lib/libmp3lame.a
94                                /usr/local/lib/libmp3lame.so
95                                /usr/local/include/lame.h
96
97
98  --with-vorbis                Enable Ogg Vorbis decoding support
99  --with-vorbis-prefix = PATH  specify where to find Vorbis libs
100
101
102Some more advanced ways to influence the build procedure
103(experienced users only, use it at your own risk):
104
105  - If you want to use some custom defines for building (e.g. some out
106    of the file "DEFINES") use:
107
108     * bourne shell or compatible (ash, bash, zsh, ...):
109       CONFIG_DEFS="-Dmy_define" ./configure
110
111     * C shell or compatible (csh, tcsh, ...):
112       setenv CONFIG_DEFS "-Dmy_define"
113       ./configure
114
115  - If you want to use some additional options for the compiler:
116
117    * bourne shell or compatible (ash, bash, zsh, ...):
118      CFLAGS="--my_flag" ./configure
119
120    * C shell or compatible (csh, tcsh, ...):
121      setenv CFLAGS "--my_flag"
122      ./configure
123
124  Or some combination of the above.
125
126  Note:
127    If configure detects the presents of "nasm" some additional speed
128    improvements get compiled in (additional assembler code to detect
129    and use multimedia extensions of the used processor).
130
131
132=======================================================================
133Building the software on *NIX platforms without configure:
134=======================================================================
135% make -f Makefile.unix
136
137
138=======================================================================
139Building the software on Windows with MSVC:
140(or MSVC + 3rd party C compiler such as ICL)
141=======================================================================
142There are MSVC project files, and a Makefile.MSVC included with the 
143project.  For production use, be sure to compile a "Release" target, 
144with the "maximum speed" compile option, and #define NDEBUG.   
145
146It is possible to compile the GTK frame analyzer under windows, see
147README.WINGTK
148
149Various build options can be set in configMS.h
150
151Note: project files for building lame.exe seem to be broken or not
152quite compatable with MSVC6.  The most reliable way to build lame and
153lame_enc.dll is to run the .bat script (comes with MSVC6) which sets
154up your VC environment to work from the command line, and then:
155
156copy configMS.h config.h 
157nmake -f Makefile.MSVC  comp=msvc  asm=no
158
159Project files for the dll, ACM codec and directshow filter 
160seem to be in better sahpe.  
161
162
163=======================================================================
164Building the software on Windows with free compilers:
165=======================================================================
166LAME can be compiled with various Windows ports (all free) of GCC (DJGPP, 
167Mingw32).  See README.DJGPP.  
168
169For Mingw32, you should now be able to use the Unix Makefile that
170comes with LAME.  Try: "make -f Makefile.unix UNAME=MSDOS"
171You may need to remove these lines from brhist.c:
172
173#ifdef _WIN32
174COORD Pos;
175HANDLE CH;
176CONSOLE_SCREEN_BUFFER_INFO CSBI;
177#endif
178
179Mingw32 users may also try to use the unix configure script (explained
180above), it has _untested_ support for Mingw32.
181
182Cygwin users should use the unix configure script (explained above). If
183you have problems with the configure script try:
184      CC=gcc ./configure
185Patches to enable the build of the lame_enc.dll with Cygwin and autoconf /
186automake / libtool are welcome!
187
188To use the Borland C compiler (now free!) see README.B32 and Makefile.B32.
189Borland can also compile the lame_enc.dll, but this is untested.
190
191Can DJGPP or Mingw32 produce lame_enc.dll?
192
193Various build options can be set in configMS.h
194
195