Commit Graph

271 Commits

Author SHA1 Message Date
Dan Nicholson 8be02fc8c6 Add OSMesa pkg-config file
This makes the GLU .pc file a little simpler, too.
2008-12-14 09:35:29 -08:00
Dan Nicholson 71e208bafe Add more package metadata to the pkg-config files
The pkg-config files have been filled in more thoroughly to allow users
to use mesa more effectively. By adding metadata to Requires.private,
Libs.private and Cflags, we can ensure that all the libraries and
headers will be found in all situations. However, the full substitutions
are only done when using the configure script.

This also fixes the glu pkg-config file to account for using GL or
OSMesa.

Fixes bug 18161.
2008-12-14 08:47:03 -08:00
Kristian Høgsberg 154a9e5317 Bump dri2proto requirement to 1.99.3, drop CopyRegion bitmask from protocol. 2008-12-01 21:44:03 -05:00
RALOVICH, Kristóf 5f19f5c586 configure.ac: advertise XCB 2008-11-26 10:02:11 -07:00
Julien Cristau 98fcdf3f49 configure.ac: Add support for gnu/kfreebsd
Check for *-gnu instead of linux* to set DEFINES.
Change some freebsd* checks to *freebsd*.
2008-10-28 11:45:05 -07:00
Kristian Høgsberg 4a32f0c638 configure.ac: bump dri2proto requirement, drop TTM_API define. 2008-09-04 06:23:14 -04:00
Florent Thoumie b5095ab97f autoconf: disable dri drivers build if being asked
Allow --with-dri-drivers={,no} to disable DRI drivers build.

Signed-off-by: Florent Thoumie <flz@FreeBSD.org>
Signed-off-by: Robert Noland <rnoland@2hip.net>
2008-07-28 11:04:41 -04:00
Dan Nicholson 776c60d3c3 autoconf: Support Motif widgets in GLw with --enable-motif
Add an --enable-motif option, which will enable the Motif widgets in
libGLw and link it with libXm. The Motif installation information will
be gathered from the motif-config script (this comes with LessTif) or
fallback to the standard autoconf checks.

To allow the location of the Motif headers to be set from configure, the
default setting of -I/usr/include/Motif1.2 has been moved into
configs/default and then passed to the Makefile through the MOTIF_CFLAGS
variable.
2008-07-18 08:07:07 -07:00
Dan Nicholson bfb27b5fc0 autoconf: Subsitute SHELL for all platforms
Establish the shell that make will use from configure. This is exactly
how autoconf/automake operate, with the environment variable
CONFIG_SHELL respected to override the autoconf checks. In the usual
case where the user just executes `./configure', autoconf will pick a
shell from the current shell, sh, bash, ksh or sh5 that meets its base
criteria.

The special Solaris case of looking for a POSIX shell has been changed
to just set the SHELL variable since autoconf substitutes this already.
The EXTRA_CONFIG_LINES substitution is dropped as it should no longer be
needed.
2008-07-12 10:25:40 -07:00
Dan Nicholson 99803a4ec9 autoconf: Add information about the --x-* options to --help output
Try to tell the user that the --x-* options are only used when the X
libraries can't be found by pkg-config.
2008-07-11 10:04:46 -07:00
Dan Nicholson e97ab72b59 autoconf: Tell the user about docs/autoconf.html in --help output
The documentation in autoconf.html is much more explicit about how the
different configure options control the build. This adds a notice at the
end of the `./configure --help' output to tell the user about it.
2008-07-11 10:04:46 -07:00
Dan Nicholson e6e4f25aa5 autoconf: Allow commas or spaces to separate DRI drivers
Explicitly allow the argument to --with-dri-drivers to contain
comma-separated or space-separated drivers. A space-separated driver
list worked by chance before.
2008-07-06 14:17:54 -07:00
Dan Nicholson 11ac5b2456 Set library and header installation directories from configuration
Currently the installation directories for libraries and headers are
resolved within the install commands. For instance, the libraries will
be installed to $(INSTALL_DIR)/$(LIB_DIR). This limits the flexibility
of the installation, such as when the libraries should be installed to a
subdirectory like /usr/lib/tls.

This adds the make variables $(INSTALL_LIB_DIR) and $(INSTALL_INC_DIR)
to define the locations that the libraries and headers are installed.
For the static configs, this resolves exactly as before to
$(INSTALL_DIR)/include and $(INSTALL_DIR)/$(LIB_DIR). For autoconf, they
are derived directly from the --libdir and --includedir settings.
2008-07-06 14:15:40 -07:00
Dan Nicholson 5cae1b747b autoconf: Improve the visibility of the swrast DRI driver
Improve the --with-dri-drivers help text so that users are aware that
they should install the swrast DRI driver.
2008-06-30 11:16:09 -07:00
Dan Nicholson 985e1cdfe8 autoconf: Check for posix_memalign
Rather than just defining HAVE_POSIX_MEMALIGN on Linux, check whether
the function exists on all platforms and define the macro if it is.
2008-06-27 16:24:42 -07:00
Alan Coopersmith e1f9adc274 Solaris port of Mesa 7.1 with autoconf support
Signed-off-by: Brian Paul <brian.paul@tungstengraphics.com>
2008-06-21 10:19:45 -06:00
Dave Airlie 41bdb88f27 sparc: add swrast to dri drivers 2008-06-12 16:26:46 +10:00
Dave Airlie 2b0e75ea7a sparc: add DRI drivers for sparc patch from Fedora 2008-06-12 12:06:50 +10:00
Dan Nicholson 871125a68d autoconf: Collect arch/platform settings in one location
The architecture- and platorm-specific settings were scattered
throughout the configure script. This moves them near the beginning
before any of the driver-specific settings.
2008-06-04 13:00:35 -07:00
Dave Airlie 0b734bd7cf mesa/drm/ttm: allow build against non-TTM aware libdrm
I'll release a libdrm 2.3.1 without TTM apis included from a special
drm branch that should allow mesa 7.1 to build against it.

I've had to turn off DRI2 stuff.
2008-06-04 14:08:27 +10:00
George Sapountzis d4510e53d8 drop GLcore 2008-05-23 22:48:55 +03:00
George Sapountzis 280bf89bd4 Add DRI driver that uses the mesa swrast module. 2008-05-20 16:03:44 -04:00
Dan Nicholson 2d709fe272 autoconf: Allow XCB to be used for GLX
Adds an --enable-xcb switch to use XCB in GLX. This only has an effect
when the driver is DRI.
2008-05-09 07:10:24 -07:00
Dan Nicholson 5dbbde5b22 Default DRI driver directory to match X.Org xserver
Since the only valid consumer of the DRI drivers is the X.Org xserver,
this changes the default DRI driver directory to match xorg-server:
${libdir}/dri. The old default of /usr/X11R6/modules/dri was wrong for
nearly all current systems.
2008-05-09 07:06:52 -07:00
Dan Nicholson d368eed9c7 autoconf: Attempt to figure out the PIC flags for the platform
This commit adds an autoconf macro, MESA_PIC_FLAGS, which sets the
PIC flags according to platform and static/shared setting. The platform
specifics are taken straight from libtool.m4 and stripped down to just
the flags and platforms we cover in Mesa. This should hopefully make it
possible to use autoconf on non-GCC platforms.

The macro is added external to configure.ac in acinclude.m4 since it's
pretty bloated.

Note to BSDers: Previously, x86 defaulted to non-PIC on FreeBSD. I
didn't carry that preference into this macro. Instead, you can just use
--disable-pic where desired.
2008-05-09 07:05:16 -07:00
Dan Nicholson e14ebbce41 autoconf: Replace the configs/current symlink from config.status
Minor tweak so that running config.status will entirely recreate the
configure settings by replacing the configs/current symlink.
2008-05-06 11:28:43 -07:00
Dan Nicholson 7d016b76e2 autoconf: Sanitize asm build for cross-compiling and --enable-*-bit
Two fixes to the asm configuration:
 - Disable when the user is cross-compiling for x86 or x86_64 since it
   requires running an executable compiled for the target host.
 - If the user has specified --enable-32-bit on x86_64 or --enable-64-bit
   on x86, respect that and choose the correct asm architecture.
2008-05-05 16:57:07 -07:00
Dan Nicholson cc77e8f113 autoconf: Error for incompatible version of libdrm
The DRI modules can only be built against libdrm master (currently
version 2.3.1), so this should be enforced to save people from trying to
build against older versions.

Added a section at the top of the script to consolidate all required
versions.
2008-05-05 15:45:20 -07:00
Dan Nicholson 297e16cc7a autoconf: More quoting, just to be safe 2008-05-05 15:42:53 -07:00
Dan Nicholson e6a0609f2e autoconf: Allow non-pkg-config builds to succeed
The variable no_x was being set to yes when libX11 was not found through
pkg-config. This causes AC_PATH_XTRA to skip its search for the X11
libraries, which was not the intended effect. Also switched to using the
PKG_CHECK_EXISTS autoconf macro.
2008-05-05 15:16:22 -07:00
Dan Nicholson 00994ac08c autoconf: Scrape the version from configs/default
Added the make script version.mk to print the various version numbers
from configs/default. This is used to substitute the version in autoconf
rather than duplicating it in both places.
2008-05-05 14:21:28 -07:00
George Sapountzis 2ed0f7278e glcore: Set all external variables in configuration
based on patch by Dan Nicholson <dbn.lists@gmail.com>
2008-05-05 18:14:52 +03:00
Dan Nicholson 7154d661a6 autoconf: Fail from autoconf if the pkg-config macros aren't defined
Instead of postponing the error from missing pkg-config macros to when
configure is run, make autoconf exit by using m4 macros.
2008-04-30 14:05:57 -07:00
Dan Nicholson 80f68e1b6a autoconf: Don't substitute MESA_MAJOR and friends
Since the autoconf config inherits from default, we don't need to
duplicate and substitute the MESA_* version numbers in configure.ac.
The version number is only needed in configure for the help text.
2008-04-30 13:31:44 -07:00
George Sapountzis 32a2a095f4 glcore: build from mesa 2008-04-23 11:12:30 +03:00
Eric Anholt 711222bb7b autoconf: Default the build to DRI on OS+CPU combos where it's expected. 2008-04-18 15:04:21 -07:00
Hasso Tepper 9f8df2d07f autoconf: Add dfbsd support. 2008-04-09 10:51:21 -07:00
Kristian Høgsberg e786924bf0 Pick up dri2proto from the standard proto header include path. 2008-04-02 19:17:31 -04:00
Dan Nicholson b645942df9 Use AC_CHECK_PROGS to find alternate make programs
The autoconf macro AC_PATH_PROGS handles the case of searching for
multiple program names already, so we don't need to open code it. Also
changed the search to AC_CHECK_PROGS so that it doesn't set the full
path unless the user specified. Finally, report back the found value at
the end for what the user should run.
2008-03-31 17:00:00 -07:00
Kristian Høgsberg e82dd8c6e1 DRI interface changes and DRI2 direct rendering support.
Add DRI2 direct rendering support to libGL and add DRI2 client side
protocol code.  Extend the GLX 1.3 create drawable functions in
glx_pbuffer.c to call into the DRI driver when possible.

Introduce __DRIconfig, opaque struct that represents a DRI driver
configuration.  Get's rid of the open coded __GLcontextModes in the
DRI driver interface and the context modes create and destroy
functions that the loader was requires to provide.  glcore.h is no
longer part of the DRI driver interface.  The DRI config is GL binding
agnostic, that is, not specific to GLX, EGL or other bindings.

The core API is now also an extension, and the driver exports a list
of extensions as the symbol __driDriverExtensions, which the loader
must dlsym() for.  The list of extension will always include the DRI
core extension, which allows creating and manipulating DRI screens,
drawables and contexts.  The DRI legacy extension, when available,
provides alternative entry points for creating the DRI objects that
work with the XF86DRI infrastructure.

Change DRI2 client code to not use drm drawables or contexts.  We
never used drm_drawable_t's and the only use for drm_context_t was as
a unique identifier when taking the lock.  We now just allocate a
unique lock ID out of the DRILock sarea block.  Once we get rid of the
lock entirely, we can drop this hack.

Change the interface between dri_util.c and the drivers, so that the
drivers now export the DriverAPI struct as driDriverAPI instead of the
InitScreen entry point.  This lets us avoid dlsym()'ing for the DRI2
init screen function to see if DRI2 is supported by the driver.
2008-03-31 16:51:26 -04:00
Eric Anholt c986421694 autoconf: Add a workaround for second AC_PROG_PATH not overwriting results. 2008-03-22 11:03:16 -07:00
Eric Anholt 050c533cbf autoconf: automatically detect if -ldl is required.
This logic was copied from the xserver.
2008-03-21 14:19:30 -07:00
Eric Anholt 5ad06156b2 Fix autoconf build on FreeBSD: detect gmake, and put -D*_SOURCE under linux. 2008-03-21 14:19:29 -07:00
Dan Nicholson b957655a91 autoconf: Enable xdemos by default when we build libGL
Since the xdemos only link to libGL now, we can enable them for all but
the osmesa driver target.
2008-03-10 16:11:04 -07:00
Dan Nicholson db7fc63110 autoconf: Print GCC include path directly and be more robust using it
Rather than constructing the GCC include path from `-print-search-dirs',
we can get the path directly from `-print-file-name=include'. This is
used in the Linux kernel build, for example. If no output is returned
from the command, then we don't append a -I path the the makedepend
options.
2008-03-07 11:48:09 -08:00
Kristian Høgsberg bcecea6ea6 autoconf: Add gcc search patch to MKDEP_OPTIONS to eliminate warnings.
Also, use -include to avoid error message when make initially fails to
include the non-existent depend file.
2008-02-25 19:02:07 -05:00
Dan Nicholson 758b998941 autoconf: Fix thinko when checking freebsd CPU types 2008-02-21 10:32:04 -08:00
Dan Nicholson 112a40ec02 autoconf: Set the default drivers after checking platform specifics
The platform-specific overrides to the DRI drivers were being ignored
because the default was being set first. Instead, have the default be a
fallback after the platform checks.
2008-02-21 10:19:55 -08:00
Adam Jackson 66611f2298 Trivial SELinux awareness. Enable with --enable-selinux.
Avoids AVC warnings when allocating executable memory by first checking
if the current process has permission to do so.
2008-02-15 13:49:12 -05:00
Dan Nicholson 0c275b6a41 autoconf: Use -fno-strict-aliasing on GCC
This change adds -fno-strict-aliasing when using gcc and g++, just like
the existing configs.
2008-01-15 22:53:18 -08:00
Dan Nicholson 544ab209e7 Allow osmesa to be enabled or disabled
The conditional in src/mesa/Makefile currently hardcodes the cases where
libOSMesa can be built on libGL. Likewise, the xlib case always includes
libOSMesa in the stand-alone target.

This changes the conditional to a loop over the DRIVER_DIRS variable.
This means that any driver configuration can enable or disable osmesa.
The current "stand-alone" rule is changed so that DRIVER_DIRS=x11 and
DRIVER_DIRS="x11 osmesa" are both respected.

The configure option is changed to --enable-gl-osmesa as this change
allows libOSMesa to be built upon any of the libGL-enabling drivers.
2008-01-11 08:25:15 -08:00
Dan Nicholson ab57cbaccc autoconf: Helper options for adding GCC 32/64 bit flags
Two new configure options to add -m32 or -m64 to the CFLAGS and CXXFLAGS
when GCC is in use. By default, the user supplied options are
environment variables are respected, but these options are quick helps
for the common case of x86/x86_64 using GCC.
2007-12-26 15:38:30 -06:00
Dan Nicholson c79c93c0ac autoconf: Improve help text for demos and DRI drivers
Changed the text for the default demos to be "auto" instead of "yes"
since that didn't make much sense in this context. Added an example
value for the --with-dri-drivers option as suggested by Brian.
2007-12-12 18:13:04 -08:00
Dan Nicholson f64d6fe0d3 autoconf: Update bug address and fix some autoconf warnings
Point bug reports to Bugzilla like bugs.html. Also, a warning from
autoconf w.r.t. AC_OUTPUT was cleaned up.
2007-12-12 17:57:45 -08:00
Dan Nicholson a130718f44 autoconf: Consistently use xlib for the driver name
Brian suggested that there should be more consistency using xlib vs. x11
in the configure script. Changed the options and variables to suit.
2007-12-12 17:49:49 -08:00
Dan Nicholson 3e288627cb autoconf: Optional assembly usage with --disable-asm
Allow the user to disable use of assembly code through the --disable-asm
option. This is only relevant on the platforms where assembly is
normally enabled such as Linux and FreeBSD.
2007-12-12 17:39:21 -08:00
Dan Nicholson 16a07fb556 autoconf: Report the compiler options in the summary
Report the compiler flags and macros that will be used in the build.
This just provides a quick way to see what configure has silently been
doing.
2007-12-12 09:12:15 -08:00
Dan Nicholson 23656c47c9 autoconf: Optional debug build with --enable-debug
Allow the user to set the compiler debug flags and macros through the
option --enable-debug. This addes -DDEBUG to the macros and -g to the
CFLAGS and CXXFLAGS if gcc and g++ are in use.
2007-12-12 09:02:31 -08:00
Dan Nicholson 41b00707e2 autoconf: More informative errors when pkg-config macros undefined
Added a check that PKG_PROG_PKG_CONFIG is defined before calling it so
the user can see a proper error. Without it, the generated configure
script will just pass on to the next statement and bomb with a strange
shell syntax error.
2007-12-12 08:48:30 -08:00
Dan Nicholson aab38cfc43 autoconf: Replace configs/current symlink from configure
Rather than having the user run `make autoconf' and have the Makefile
setup the configs/current -> autoconf symlink, we can just do that in
configure. This allows the user to just run `make' to build.
2007-12-11 08:24:27 -08:00
Dan Nicholson 79ad458ec6 autoconf: Clearer help text for the enable/disable options
Make it clearer what the defaults for the AC_ARG_ENABLE options are and
how to change them.
2007-12-11 08:24:27 -08:00
Dan Nicholson a76e2452d2 autoconf: Since default DRI drivers to build with master
Sync the default DRI_DIRS with the configs in master. Added some of the
comments from there, too.
2007-12-11 08:24:27 -08:00
Dan Nicholson 70d0c83890 autoconf: glut doesn't need Xt
Don't link glut with libXt since it's not needed.
(see commit ce98779571)
2007-12-11 08:24:27 -08:00
Dan Nicholson 9cad8e312f autoconf: Output summary information from configure
Report some of the common settings back to the user after configure
has completed.
2007-12-07 14:34:27 -08:00
Dan Nicholson af3d2f292d autoconf: Configurable DRI drivers
The user can request specific DRI drivers to build rather than the
default of "all that build on this platform". This allows the list of
drivers to be easily slimmed down.

This is controlled through the option --with-dri-drivers. For example:

    ./configure --with-driver=dri --with-dri-drivers="i965,nouveau"

Unfortunately, using this setting means the DRI drivers aren't filtered
by platform anymore and you might try to build something that doesn't
work.
2007-12-07 14:34:27 -08:00
Dan Nicholson 88586332d3 autoconf: Allow static library builds
Allow the user to specify that they want static libraries through the
--{enable,disable}-{static,shared} switches like libtool. The mesa build
only allows for one at a time, so static will be chosen if someone has
passed --enable-static or --disable-shared.

This also allows the mklib options to be set at build time. This allows
-static to be set for mklib, but any platform specific settings are
allowed by setting MKLIB_OPTIONS for configure.

Handling of the program libraries through the APP_LIB_DEPS variable is
pretty ugly, but it seems to work.
2007-12-07 14:34:27 -08:00
Dan Nicholson 8e4d147430 autoconf: Configurable demos directories
The user can request specific demos directories to build in. For
example:

    ./configure --with-demos="demos,xdemos"

The drawback is that we don't check for the necessary libararies in
that case, only that the directory in progs/ exists.
2007-12-07 14:34:27 -08:00
Dan Nicholson 6689f9ebcb autoconf: Configure the osmesa channel size for OSMesa16 and OSMesa32
Allow the user to specify channel bits of 16 or 32 to enable OSMesa16 or
OSMesa32 instead of the default OSMesa. This option is controlled
through the option --with-osmesa-bits=BITS and is only honored when the
driver is osmesa.

The osdemos are not enabled in the 16 or 32 bit case because the
Makefile is currently hardcoded to link to -lOSMesa.
2007-12-07 14:34:27 -08:00
Dan Nicholson 979ff5153d autoconf: Add support for osmesa-only builds
Added autoconf support for using OSMesa as the driver instead linking
it to libGL. This is enabled through --with-driver=osmesa.

To differentiate these cases, another option --enable-x11-osmesa is used
to enable or disable building OSMesa when the driver is x11.
2007-12-07 14:34:27 -08:00
Dan Nicholson 44d9914b29 autoconf: Add support for shared DRI build on linux and freebsd
Added autoconf bits to allow using DRI as the driver through the option
--with-dri-driver=DRIVER. The options are x11 (default) and dri. Three
DRI specific options for controlling the driver directory, direct
rendering and TLS are also added.

The DRI will probably not work for platforms besides linux and freebsd.
2007-12-07 14:34:27 -08:00
Dan Nicholson dca1b796b7 autoconf: Initial support for an autoconf configuration
This adds the initial support for using autoconf configuration. Support
is available for shared Xlib driver builds. Later this will be extended
to dri and osmesa-only builds and possibly targetting non-X backends.
Support for static library builds will also be added.

The configure script fills in the autoconf config. This is then used by
running `make autoconf' after ./configure.

Testing has been done on Linux/GNU. The configure script tries to
faithfully reproduce the current configs/linux* and configs/freebsd*.
Other platforms can be handled later by adding similar statements and
feature tests.

Pkg-config is used to search for packages when possible. This makes the
build much more flexible and robust to the user's configuration. This
requires that the pkg-config autoconf macros pkg.m4 are included in
aclocal.m4. This requires autoconf and aclocal from autoconf and
automake, respectively.
2007-12-07 14:34:27 -08:00