Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4358 Serge 1
2
3
4
  
5
  Compilation and Installation using Autoconf
6
  
7
8
9
 
10
11
  

The Mesa 3D Graphics Library

12
13
 
14
15
16
 
17

Compilation and Installation using Autoconf

18
 
19
    20
  1. Basic Usage

  2. 21
  3. Driver Options

  4. 22
      
      23
        
    • Xlib Driver Options
    • 24
        
    • DRI Driver Options
    • 25
        
    • OSMesa Driver Options
    • 26
        
      27
      28
       
      29
       
      30

      1. Basic Usage

      31
       
      32

      33
      The autoconf generated configure script can be used to guess your
      34
      platform and change various options for building Mesa. To use the
      35
      configure script, type:
      36

      37
       
      38
      39
          ./configure
      40
      41
       
      42

      43
      To see a short description of all the options, type ./configure
      44
      --help. If you are using a development snapshot and the configure
      45
      script does not exist, type ./autogen.sh to generate it
      46
      first. If you know the options you want to pass to
      47
      configure, you can pass them to autogen.sh. It
      48
      will run configure with these options after it is
      49
      generated. Once you have run configure and set the options
      50
      to your preference, type:
      51

      52
       
      53
      54
          make
      55
      56
       
      57

      58
      This will produce libGL.so and several other libraries depending on the
      59
      options you have chosen. Later, if you want to rebuild for a different
      60
      configuration run make realclean before rebuilding.
      61

      62
       
      63

      64
      Some of the generic autoconf options are used with Mesa:
      65

      66
      67
      --prefix=PREFIX
      68

      This is the root directory where

      69
      files will be installed by make install. The default is
      70
      /usr/local.

      71
      72
       
      73
      --exec-prefix=EPREFIX
      74

      This is the root directory

      75
      where architecture-dependent files will be installed. In Mesa, this is
      76
      only used to derive the directory for the libraries. The default is
      77
      ${prefix}.

      78
      79
       
      80
      --libdir=LIBDIR
      81

      This option specifies the directory

      82
      where the GL libraries will be installed. The default is
      83
      ${exec_prefix}/lib. It also serves as the name of the
      84
      library staging area in the source tree. For instance, if the option
      85
      --libdir=/usr/local/lib64 is used, the libraries will be
      86
      created in a lib64 directory at the top of the Mesa source
      87
      tree.

      88
      89
       
      90
      --enable-static, --disable-shared
      91

      By default, Mesa

      92
      will build shared libraries. Either of these options will force static
      93
      libraries to be built. It is not currently possible to build static and
      94
      shared libraries in a single pass.

      95
      96
       
      97
      CC, CFLAGS, CXX, CXXFLAGS
      98

      These environment variables

      99
      control the C and C++ compilers used during the build. By default,
      100
      gcc and g++ are used with the options
      101
      "-g -O2".

      102
      103
       
      104
      LDFLAGS
      105

      An environment variable specifying flags to

      106
      pass when linking programs. These are normally empty, but can be used
      107
      to direct the linker to use libraries in nonstandard directories. For
      108
      example, LDFLAGS="-L/usr/X11R6/lib".

      109
      110
       
      111
      PKG_CONFIG_PATH
      112

      When available, the

      113
      pkg-config utility is used to search for external libraries
      114
      on the system. This environment variable is used to control the search
      115
      path for pkg-config. For instance, setting
      116
      PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig will search for
      117
      package metadata in /usr/X11R6 before the standard
      118
      directories.

      119
      120
      121
       
      122

      123
      There are also a few general options for altering the Mesa build:
      124

      125
      126
      --with-x
      127

      When the X11 development libraries are

      128
      needed, the pkg-config utility will
      129
      be used for locating them. If they cannot be found through
      130
      pkg-config a fallback routing using imake will
      131
      be used. In this case, the --with-x,
      132
      --x-includes and --x-libraries options can
      133
      control the use of X for Mesa.

      134
      135
       
      136
      --enable-gl-osmesa
      137

      The OSMesa

      138
      library can be built on top of libGL for drivers that provide it.
      139
      This option controls whether to build libOSMesa. By default, this is
      140
      enabled for the Xlib driver and disabled otherwise. Note that this
      141
      option is different than using OSMesa as the driver.

      142
      143
       
      144
      --enable-debug
      145

      This option will enable compiler

      146
      options and macros to aid in debugging the Mesa libraries.

      147
      148
       
      149
      --disable-asm
      150

      There are assembly routines

      151
      available for a few architectures. These will be used by default if
      152
      one of these architectures is detected. This option ensures that
      153
      assembly will not be used.

      154
      155
       
      156
      --enable-32-bit
      157
      --enable-64-bit
      158

      By default, the

      159
      build will compile code as directed by the environment variables
      160
      CC, CFLAGS, etc. If the compiler is
      161
      gcc, these options offer a helper to add the compiler flags
      162
      to force 32- or 64-bit code generation as used on the x86 and x86_64
      163
      architectures.

      164
      165
      166
       
      167
       
      168

      2. Driver Options

      169
       
      170

      171
      There are several different driver modes that Mesa can use. These are
      172
      described in more detail in the basic
      173
      installation instructions. The Mesa driver is controlled through the
      174
      configure option --with-driver. There are currently three supported
      175
      options in the configure script.
      176

      177
       
      178

      Xlib

      This is the default mode for building Mesa.

      179
      It uses Xlib as a software renderer to do all rendering. It corresponds
      180
      to the option --with-driver=xlib. The libX11 and libXext
      181
      libraries, as well as the X11 development headers, will be need to
      182
      support the Xlib driver.
      183
       
      184

      DRI

      This mode uses the DRI hardware drivers for

      185
      accelerated OpenGL rendering. Enable the DRI drivers with the option
      186
      --with-driver=dri. See the basic
      187
      installation instructions for details on prerequisites for the DRI
      188
      drivers.
      189
       
      190
      191
      192
      --with-dri-driverdir=DIR
      193

      This option specifies the

      194
      location the DRI drivers will be installed to and the location libGL
      195
      will search for DRI drivers. The default is ${libdir}/dri.
      196
      --with-dri-drivers=DRIVER,DRIVER,...
      197

      This option

      198
      allows a specific set of DRI drivers to be built. For example,
      199
      --with-dri-drivers="swrast,i965,radeon,nouveau". By
      200
      default, the drivers will be chosen depending on the target platform.
      201
      See the directory src/mesa/drivers/dri in the source tree
      202
      for available drivers. Beware that the swrast DRI driver is used by both
      203
      libGL and the X.Org xserver GLX module to do software rendering, so you
      204
      may run into problems if it is not available.
      205
      206
      --disable-driglx-direct
      207

      Disable direct rendering in

      208
      GLX. Normally, direct hardware rendering through the DRI drivers and
      209
      indirect software rendering are enabled in GLX. This option disables
      210
      direct rendering entirely. It can be useful on architectures where
      211
      kernel DRM modules are not available.
      212
      --enable-glx-tls

      213
      Enable Thread Local Storage (TLS) in
      214
      GLX.
      215
      --with-expat=DIR
      The DRI-enabled libGL uses expat to
      216
      parse the DRI configuration files in /etc/drirc and
      217
      ~/.drirc. This option allows a specific expat installation
      218
      to be used. For example, --with-expat=/usr/local will
      219
      search for expat headers and libraries in /usr/local/include
      220
      and /usr/local/lib, respectively.
      221
      222
       
      223

      OSMesa

      No libGL is built in this

      224
      mode. Instead, the driver code is built into the Off-Screen Mesa
      225
      (OSMesa) library. See the Off-Screen Rendering
      226
      page for more details.
      227
       
      228
      229
      230
      --with-osmesa-bits=BITS
      231

      This option allows the size

      232
      of the color channel in bits to be specified. By default, an 8-bit
      233
      channel will be used, and the driver will be named libOSMesa. Other
      234
      options are 16- and 32-bit color channels, which will add the bit size
      235
      to the library name. For example, --with-osmesa-bits=16
      236
      will create the libOSMesa16 library with a 16-bit color channel.
      237
      238
       
      239
       
      240

      3. Library Options

      241
       
      242

      243
      The configure script provides more fine grained control over the GL
      244
      libraries that will be built. More details on the specific GL libraries
      245
      can be found in the basic installation
      246
      instructions.
      247
       
      248
      249
      250