1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3CR2//EN" "http://www.docbook.org/xml/4.3CR2/docbookx.dtd" [
3 <!ENTITY % flex-entities SYSTEM "../ent/flex.ent">
7 <title>Installing Flex-&flex-version;</title>
8 <?dbhtml filename="flex.html"?>
10 <screen>Estimated build time: 0.1 SBU
11 Estimated required disk space: 3.4 MB</screen>
13 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../appendixa/flex-contents.xml"/>
17 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="../appendixa/flex-deps.xml"/>
22 <title>Installation of Flex</title>
24 <para>Prepare Flex for compilation:</para>
26 <screen><userinput>./configure --prefix=/usr</userinput></screen>
28 <para>Compile the package:</para>
30 <screen><userinput>make</userinput></screen>
32 <para>This package has a test suite available which can perform a number of
33 checks to ensure it built correctly. Should you choose to run it, the
34 following command will do so:</para>
36 <screen><userinput>make bigcheck</userinput></screen>
38 <para>And install the package:</para>
40 <screen><userinput>make install</userinput></screen>
42 <para>There are some packages that expect to find the Lex library in
43 <filename>/usr/lib</filename>. Create a symlink to account for this:</para>
45 <screen><userinput>ln -s libfl.a /usr/lib/libl.a</userinput></screen>
47 <para>A few programs don't know about <userinput>flex</userinput> yet and try
48 to run its predecessor <userinput>lex</userinput>. To support those programs,
49 create a shell script named <filename>lex</filename> that calls
50 <userinput>flex</userinput> in Lex emulation mode:</para>
52 <screen><userinput>cat > /usr/bin/lex << "EOF"</userinput>
56 exec /usr/bin/flex -l "$@"
60 chmod 755 /usr/bin/lex</userinput></screen>