X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=configure.ac;h=8110e0f86922bde94d1ae04a5b835763059342fa;hb=467f18f7a5375af9a31031063536c927df3ea70c;hp=2f3f0beff10798561a88a6a72225b9df42281526;hpb=857ac1e817808f4b6bf985679162d0e3d709e5b5;p=mesa.git diff --git a/configure.ac b/configure.ac index 2f3f0beff10..8110e0f8692 100644 --- a/configure.ac +++ b/configure.ac @@ -5,12 +5,8 @@ AC_PREREQ([2.59]) dnl Versioning - scrape the version from configs/default m4_define([mesa_version], [m4_esyscmd([${MAKE-make} -s -f bin/version.mk version | tr -d '\n'])]) -m4_ifval(mesa_version,[],[ - m4_errprint([Error: Failed to get the Mesa version from the output of - running `make -f bin/version.mk version' -]) - m4_exit([1]) -]) +m4_ifval(mesa_version,, + [m4_fatal([Failed to get the Mesa version from `make -f bin/version.mk version`])]) dnl Tell the user about autoconf.html in the --help output m4_divert_once([HELP_END], [ @@ -58,15 +54,11 @@ fi AC_SUBST([MKDEP_OPTIONS]) dnl Make sure the pkg-config macros are defined -m4_ifdef([PKG_PROG_PKG_CONFIG],[],[ - m4_errprint([Error: Could not locate the pkg-config autoconf macros. - These are usually located in /usr/share/aclocal/pkg.m4. If your - macros are in a different location, try setting the environment - variable ACLOCAL="aclocal -I/other/macro/dir" before running - autoreconf. -]) - m4_exit([1]) -]) +m4_ifndef([PKG_PROG_PKG_CONFIG], + [m4_fatal([Could not locate the pkg-config autoconf macros. + These are usually located in /usr/share/aclocal/pkg.m4. If your macros + are in a different location, try setting the environment variable + ACLOCAL="aclocal -I/other/macro/dir" before running autoreconf.])]) PKG_PROG_PKG_CONFIG() dnl LIB_DIR - library basename @@ -87,7 +79,7 @@ dnl Compiler macros DEFINES="" AC_SUBST([DEFINES]) case "$host_os" in -*-gnu*) +linux*|*-gnu*|gnu*) DEFINES="$DEFINES -D_GNU_SOURCE -DPTHREADS" ;; solaris*) @@ -375,17 +367,6 @@ if test "x$enable_selinux" = "xyes"; then DEFINES="$DEFINES -DMESA_SELINUX" fi -dnl OS-specific libraries -OS_LIBS="" -case "$host_os" in -solaris*) - OS_LIBS="-lc" - if test "x$GXX" != xyes; then - OS_CPLUSPLUS_LIBS="-lCrun $OS_LIBS" - fi - ;; -esac - dnl dnl Driver configuration. Options are xlib, dri and osmesa right now. dnl More later: directfb, fbdev, ... @@ -400,7 +381,7 @@ linux*) ;; *freebsd* | dragonfly*) case "$host_cpu" in - i*86|x86_64) default_driver="dri";; + i*86|x86_64|powerpc*|sparc*) default_driver="dri";; esac ;; esac @@ -422,25 +403,26 @@ esac dnl dnl Driver specific build directories dnl -SRC_DIRS="mesa egl glew" +SRC_DIRS="mesa glew" GLU_DIRS="sgi" WINDOW_SYSTEM="" GALLIUM_DIRS="auxiliary drivers state_trackers" GALLIUM_WINSYS_DIRS="" GALLIUM_WINSYS_DRM_DIRS="" -GALLIUM_AUXILIARY_DIRS="draw translate cso_cache pipebuffer tgsi sct rtasm util" +GALLIUM_AUXILIARY_DIRS="draw translate cso_cache pipebuffer tgsi sct rtasm util indices" GALLIUM_DRIVERS_DIRS="softpipe failover trace" GALLIUM_STATE_TRACKERS_DIRS="" case "$mesa_driver" in xlib) DRIVER_DIRS="x11" + GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS xlib" ;; dri) SRC_DIRS="glx/x11 $SRC_DIRS" DRIVER_DIRS="dri" WINDOW_SYSTEM="dri" - GALLIUM_WINSYS_DIRS="drm $GALLIUM_WINSYS_DIRS" + GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS drm" ;; osmesa) DRIVER_DIRS="osmesa" @@ -561,8 +543,8 @@ xlib) GL_PC_LIB_PRIV="$GL_LIB_DEPS" GL_PC_CFLAGS="$X11_INCLUDES" fi - GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread $OS_LIBS" - GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread $OS_LIBS" + GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread" + GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread" # if static, move the external libraries to the programs # and empty the libraries for libGL @@ -612,12 +594,12 @@ dri) fi # need DRM libs, -lpthread, etc. - GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS $OS_LIBS" - GL_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS $OS_LIBS" + GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS" + GL_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS" ;; osmesa) # No libGL for osmesa - GL_LIB_DEPS="$OS_LIBS" + GL_LIB_DEPS="" ;; esac AC_SUBST([GL_LIB_DEPS]) @@ -752,6 +734,10 @@ if test "$mesa_driver" = dri; then unichrome savage sis swrast" fi ;; + gnu*) + DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" + DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS" + ;; solaris*) DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING" @@ -860,9 +846,9 @@ osmesa) ;; esac if test "$enable_static" = no; then - OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS $OS_LIBS" + OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS" fi -OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV $OS_LIBS" +OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV" AC_SUBST([OSMESA_LIB_DEPS]) AC_SUBST([OSMESA_MESA_DEPS]) AC_SUBST([OSMESA_PC_REQ]) @@ -871,14 +857,23 @@ AC_SUBST([OSMESA_PC_LIB_PRIV]) dnl dnl EGL configuration dnl -if test "$x11_pkgconfig" = yes; then - PKG_CHECK_MODULES([EGL],[x11]) - EGL_LIB_DEPS="$EGL_LIBS" -else - # should check these... - EGL_LIB_DEPS="$X_LIBS -lX11" +AC_ARG_ENABLE([egl], + [AS_HELP_STRING([--disable-egl], + [disable EGL library @<:@default=enabled@:>@])], + [enable_egl="$enableval"], + [enable_egl=yes]) +if test "x$enable_egl" = xyes; then + SRC_DIRS="$SRC_DIRS egl" + + if test "$x11_pkgconfig" = yes; then + PKG_CHECK_MODULES([EGL], [x11]) + EGL_LIB_DEPS="$EGL_LIBS" + else + # should check these... + EGL_LIB_DEPS="$X_LIBS -lX11" + fi + EGL_LIB_DEPS="$EGL_LIB_DEPS $DLOPEN_LIBS" fi -EGL_LIB_DEPS="$EGL_LIB_DEPS $DLOPEN_LIBS $OS_LIBS" AC_SUBST([EGL_LIB_DEPS]) dnl @@ -988,10 +983,10 @@ if test "x$enable_glw" = xyes; then fi # If static, empty GLW_LIB_DEPS and add libs for programs to link - GLW_PC_LIB_PRIV="$GLW_PC_LIB_PRIV $OS_LIBS" + GLW_PC_LIB_PRIV="$GLW_PC_LIB_PRIV" if test "$enable_static" = no; then GLW_MESA_DEPS='-l$(GL_LIB)' - GLW_LIB_DEPS="$GLW_LIB_DEPS $OS_LIBS" + GLW_LIB_DEPS="$GLW_LIB_DEPS" else APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS" GLW_LIB_DEPS="" @@ -1047,8 +1042,8 @@ if test "x$enable_glut" = xyes; then GLUT_PC_LIB_PRIV="$GLUT_LIB_DEPS" GLUT_PC_CFLAGS="$X11_INCLUDES" fi - GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm $OS_LIBS" - GLUT_PC_LIB_PRIV="$GLUT_PC_LIB_PRIV -lm $OS_LIBS" + GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm" + GLUT_PC_LIB_PRIV="$GLUT_PC_LIB_PRIV -lm" # If glut is available, we can build most programs if test "$with_demos" = yes; then @@ -1118,8 +1113,11 @@ no) yes) # look at what else is built case "$mesa_driver" in + xlib) + GALLIUM_STATE_TRACKERS_DIRS=glx + ;; dri) - GALLIUM_STATE_TRACKERS_DIRS=egl + test "x$enable_egl" = xyes && GALLIUM_STATE_TRACKERS_DIRS=egl ;; esac ;; @@ -1129,11 +1127,22 @@ yes) for tracker in $state_trackers; do test -d "$srcdir/src/gallium/state_trackers/$tracker" || \ AC_MSG_ERROR([state tracker '$tracker' doesn't exist]) + + if test "$tracker" = egl && test "x$enable_egl" != xyes; then + AC_MSG_ERROR([cannot build egl state tracker without EGL library]) + fi done GALLIUM_STATE_TRACKERS_DIRS="$state_trackers" ;; esac +AC_ARG_WITH([xorg-driver-dir], + [AS_HELP_STRING([--with-xorg-driver-dir=DIR], + [Default xorg driver directory[[default=${libdir}/xorg/modules/drivers]]])], + [XORG_DRIVER_INSTALL_DIR="$withval"], + [XORG_DRIVER_INSTALL_DIR="${libdir}/xorg/modules/drivers"]) +AC_SUBST([XORG_DRIVER_INSTALL_DIR]) + dnl dnl Gallium Intel configuration dnl @@ -1237,6 +1246,7 @@ dnl Libraries echo "" echo " Shared libs: $enable_shared" echo " Static libs: $enable_static" +echo " EGL: $enable_egl" echo " GLU: $enable_glu" echo " GLw: $enable_glw (Motif: $enable_motif)" echo " glut: $enable_glut"