1159b3361Sopenharmony_ciLAME 3.xx    January 2001  Mark Taylor (http://www.mp3dev.org)
2159b3361Sopenharmony_ci
3159b3361Sopenharmony_ci
4159b3361Sopenharmony_ci=======================================================================
5159b3361Sopenharmony_ciCompile time options
6159b3361Sopenharmony_ci=======================================================================
7159b3361Sopenharmony_ciThere are serveral targets which can be built from this
8159b3361Sopenharmony_cisource code:
9159b3361Sopenharmony_ci
10159b3361Sopenharmony_cilame, lame.exe  The command line encoder
11159b3361Sopenharmony_ci
12159b3361Sopenharmony_cimp3x            A GTK based graphical MP3 frame analyzer.  For debugging,
13159b3361Sopenharmony_ci                development, and studing MP3 frames produced by any
14159b3361Sopenharmony_ci                encoder.
15159b3361Sopenharmony_ci
16159b3361Sopenharmony_cilame_enc.dll    a Windows DLL used by many GUIs which support lame.
17159b3361Sopenharmony_ci                (Can only be compiled by MSVC???)
18159b3361Sopenharmony_ci
19159b3361Sopenharmony_cilame.acm        *** DEPRECATED ***
20159b3361Sopenharmony_ci                a Windows ACM codec which can be used by many windows programs, 
21159b3361Sopenharmony_ci                and any directshow program. See MSVC project files in ACM 
22159b3361Sopenharmony_ci                directory. Right click on lame.inf to install.
23159b3361Sopenharmony_ci
24159b3361Sopenharmony_cilame_enc.dshow  a Windows direct show filter for lame.  Potentially has
25159b3361Sopenharmony_ci                more flexability than the ACM codec, but code needs some
26159b3361Sopenharmony_ci                work.  See MSVC project files in dshow directory
27159b3361Sopenharmony_ci
28159b3361Sopenharmony_cilibmp3lame.a    the static encoding library used by all platforms, required
29159b3361Sopenharmony_ci                by all the above targets.
30159b3361Sopenharmony_ci
31159b3361Sopenharmony_cilibmp3lame.so   shared version of libmp3lame.a for *NIX platforms
32159b3361Sopenharmony_ci
33159b3361Sopenharmony_ci
34159b3361Sopenharmony_ciThe following compile time options can be used.  For libmp3lame.a and 
35159b3361Sopenharmony_cilame_enc.dll, none are required.  On non-unix systems, these options must 
36159b3361Sopenharmony_cibe set in config.h or in the IDE.  
37159b3361Sopenharmony_ciOn unix systems, they are set via ./configure.  
38159b3361Sopenharmony_ci
39159b3361Sopenharmony_ci
40159b3361Sopenharmony_ci#define HAVE_MPGLIB   compile in mpglib's mp3 *decoding* capibility
41159b3361Sopenharmony_ci#define HAVE_VORBIS   compile in Vorbis decoding capibility
42159b3361Sopenharmony_ci                      (you need libvorbis already built)
43159b3361Sopenharmony_ci#define NOANALYSIS    do not compile in hooks used by the 
44159b3361Sopenharmony_ci                      MP3 frame analyzer.
45159b3361Sopenharmony_ci
46159b3361Sopenharmony_ciOptions for the command line encoder:
47159b3361Sopenharmony_ci#define LIBSNDFILE    to use Erik de Castro Lopo's libsndfile
48159b3361Sopenharmony_ci                      for input.
49159b3361Sopenharmony_ci
50159b3361Sopenharmony_ci
51159b3361Sopenharmony_ci=======================================================================
52159b3361Sopenharmony_ciBuilding the software on *NIX platforms using configure:
53159b3361Sopenharmony_ci=======================================================================
54159b3361Sopenharmony_ciRun the following commands:
55159b3361Sopenharmony_ci
56159b3361Sopenharmony_ci% ./configure
57159b3361Sopenharmony_ci% make
58159b3361Sopenharmony_ci% make install
59159b3361Sopenharmony_ci
60159b3361Sopenharmony_ciFor a complete list of options, try "./configure --help"
61159b3361Sopenharmony_ciSome of the more usefull options:
62159b3361Sopenharmony_ci
63159b3361Sopenharmony_ciFor the encoding library:
64159b3361Sopenharmony_ci
65159b3361Sopenharmony_ci  --enable-mp3x               Build the mp3 frame analyzer, 'mp3x'
66159b3361Sopenharmony_ci
67159b3361Sopenharmony_ci  --enable-mp3rtp             Build the encode-to-RTP program, 'mp3rtp'
68159b3361Sopenharmony_ci                              (broken as of August 2001)
69159b3361Sopenharmony_ci 
70159b3361Sopenharmony_ci
71159b3361Sopenharmony_ciFor the LAME front end encoder:
72159b3361Sopenharmony_ci
73159b3361Sopenharmony_ci  --with-fileio=lame          Use lame's internal file io routines [default]
74159b3361Sopenharmony_ci               =sndfile       Use Erik de Castro Lopo's libsndfile (Supports 
75159b3361Sopenharmony_ci                              many more input formats, but no stdin possible 
76159b3361Sopenharmony_ci                              currently)
77159b3361Sopenharmony_ci
78159b3361Sopenharmony_ci  --with-sndfile-prefix=DIR   Alternate location for libsndfile
79159b3361Sopenharmony_ci                              (if --with-fileio=sndfile)
80159b3361Sopenharmony_ci
81159b3361Sopenharmony_ci
82159b3361Sopenharmony_ciOther usefull configure options:
83159b3361Sopenharmony_ci
84159b3361Sopenharmony_ci  --enable-debug              Build a debug version
85159b3361Sopenharmony_ci
86159b3361Sopenharmony_ci  --enable-expopt             Enable some more optimizations flags for
87159b3361Sopenharmony_ci                              the compiler, may or may not produce
88159b3361Sopenharmony_ci                              faster code
89159b3361Sopenharmony_ci
90159b3361Sopenharmony_ci  --prefix = PATH             default is /usr/local
91159b3361Sopenharmony_ci                              (LAME currently installs:
92159b3361Sopenharmony_ci                                /usr/local/bin/lame
93159b3361Sopenharmony_ci                                /usr/local/lib/libmp3lame.a
94159b3361Sopenharmony_ci                                /usr/local/lib/libmp3lame.so
95159b3361Sopenharmony_ci                                /usr/local/include/lame.h
96159b3361Sopenharmony_ci
97159b3361Sopenharmony_ci
98159b3361Sopenharmony_ci  --with-vorbis                Enable Ogg Vorbis decoding support
99159b3361Sopenharmony_ci  --with-vorbis-prefix = PATH  specify where to find Vorbis libs
100159b3361Sopenharmony_ci
101159b3361Sopenharmony_ci
102159b3361Sopenharmony_ciSome more advanced ways to influence the build procedure
103159b3361Sopenharmony_ci(experienced users only, use it at your own risk):
104159b3361Sopenharmony_ci
105159b3361Sopenharmony_ci  - If you want to use some custom defines for building (e.g. some out
106159b3361Sopenharmony_ci    of the file "DEFINES") use:
107159b3361Sopenharmony_ci
108159b3361Sopenharmony_ci     * bourne shell or compatible (ash, bash, zsh, ...):
109159b3361Sopenharmony_ci       CONFIG_DEFS="-Dmy_define" ./configure
110159b3361Sopenharmony_ci
111159b3361Sopenharmony_ci     * C shell or compatible (csh, tcsh, ...):
112159b3361Sopenharmony_ci       setenv CONFIG_DEFS "-Dmy_define"
113159b3361Sopenharmony_ci       ./configure
114159b3361Sopenharmony_ci
115159b3361Sopenharmony_ci  - If you want to use some additional options for the compiler:
116159b3361Sopenharmony_ci
117159b3361Sopenharmony_ci    * bourne shell or compatible (ash, bash, zsh, ...):
118159b3361Sopenharmony_ci      CFLAGS="--my_flag" ./configure
119159b3361Sopenharmony_ci
120159b3361Sopenharmony_ci    * C shell or compatible (csh, tcsh, ...):
121159b3361Sopenharmony_ci      setenv CFLAGS "--my_flag"
122159b3361Sopenharmony_ci      ./configure
123159b3361Sopenharmony_ci
124159b3361Sopenharmony_ci  Or some combination of the above.
125159b3361Sopenharmony_ci
126159b3361Sopenharmony_ci  Note:
127159b3361Sopenharmony_ci    If configure detects the presents of "nasm" some additional speed
128159b3361Sopenharmony_ci    improvements get compiled in (additional assembler code to detect
129159b3361Sopenharmony_ci    and use multimedia extensions of the used processor).
130159b3361Sopenharmony_ci
131159b3361Sopenharmony_ci
132159b3361Sopenharmony_ci=======================================================================
133159b3361Sopenharmony_ciBuilding the software on *NIX platforms without configure:
134159b3361Sopenharmony_ci=======================================================================
135159b3361Sopenharmony_ci% make -f Makefile.unix
136159b3361Sopenharmony_ci
137159b3361Sopenharmony_ci
138159b3361Sopenharmony_ci=======================================================================
139159b3361Sopenharmony_ciBuilding the software on Windows with MSVC:
140159b3361Sopenharmony_ci(or MSVC + 3rd party C compiler such as ICL)
141159b3361Sopenharmony_ci=======================================================================
142159b3361Sopenharmony_ciThere are MSVC project files, and a Makefile.MSVC included with the 
143159b3361Sopenharmony_ciproject.  For production use, be sure to compile a "Release" target, 
144159b3361Sopenharmony_ciwith the "maximum speed" compile option, and #define NDEBUG.   
145159b3361Sopenharmony_ci
146159b3361Sopenharmony_ciIt is possible to compile the GTK frame analyzer under windows, see
147159b3361Sopenharmony_ciREADME.WINGTK
148159b3361Sopenharmony_ci
149159b3361Sopenharmony_ciVarious build options can be set in configMS.h
150159b3361Sopenharmony_ci
151159b3361Sopenharmony_ciNote: project files for building lame.exe seem to be broken or not
152159b3361Sopenharmony_ciquite compatable with MSVC6.  The most reliable way to build lame and
153159b3361Sopenharmony_cilame_enc.dll is to run the .bat script (comes with MSVC6) which sets
154159b3361Sopenharmony_ciup your VC environment to work from the command line, and then:
155159b3361Sopenharmony_ci
156159b3361Sopenharmony_cicopy configMS.h config.h 
157159b3361Sopenharmony_cinmake -f Makefile.MSVC  comp=msvc  asm=no
158159b3361Sopenharmony_ci
159159b3361Sopenharmony_ciProject files for the dll, ACM codec and directshow filter 
160159b3361Sopenharmony_ciseem to be in better sahpe.  
161159b3361Sopenharmony_ci
162159b3361Sopenharmony_ci
163159b3361Sopenharmony_ci=======================================================================
164159b3361Sopenharmony_ciBuilding the software on Windows with free compilers:
165159b3361Sopenharmony_ci=======================================================================
166159b3361Sopenharmony_ciLAME can be compiled with various Windows ports (all free) of GCC (DJGPP, 
167159b3361Sopenharmony_ciMingw32).  See README.DJGPP.  
168159b3361Sopenharmony_ci
169159b3361Sopenharmony_ciFor Mingw32, you should now be able to use the Unix Makefile that
170159b3361Sopenharmony_cicomes with LAME.  Try: "make -f Makefile.unix UNAME=MSDOS"
171159b3361Sopenharmony_ciYou may need to remove these lines from brhist.c:
172159b3361Sopenharmony_ci
173159b3361Sopenharmony_ci#ifdef _WIN32
174159b3361Sopenharmony_ciCOORD Pos;
175159b3361Sopenharmony_ciHANDLE CH;
176159b3361Sopenharmony_ciCONSOLE_SCREEN_BUFFER_INFO CSBI;
177159b3361Sopenharmony_ci#endif
178159b3361Sopenharmony_ci
179159b3361Sopenharmony_ciMingw32 users may also try to use the unix configure script (explained
180159b3361Sopenharmony_ciabove), it has _untested_ support for Mingw32.
181159b3361Sopenharmony_ci
182159b3361Sopenharmony_ciCygwin users should use the unix configure script (explained above). If
183159b3361Sopenharmony_ciyou have problems with the configure script try:
184159b3361Sopenharmony_ci      CC=gcc ./configure
185159b3361Sopenharmony_ciPatches to enable the build of the lame_enc.dll with Cygwin and autoconf /
186159b3361Sopenharmony_ciautomake / libtool are welcome!
187159b3361Sopenharmony_ci
188159b3361Sopenharmony_ciTo use the Borland C compiler (now free!) see README.B32 and Makefile.B32.
189159b3361Sopenharmony_ciBorland can also compile the lame_enc.dll, but this is untested.
190159b3361Sopenharmony_ci
191159b3361Sopenharmony_ciCan DJGPP or Mingw32 produce lame_enc.dll?
192159b3361Sopenharmony_ci
193159b3361Sopenharmony_ciVarious build options can be set in configMS.h
194159b3361Sopenharmony_ci
195