Mesa (7.8): st/egl: Fix build on FreeBSD.

Chia-I Wu olv at kemper.freedesktop.org
Fri Jul 16 12:25:46 UTC 2010


Module: Mesa
Branch: 7.8
Commit: d06e0117e302bc314baa75e02e8268936982e6c6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d06e0117e302bc314baa75e02e8268936982e6c6

Author: Chia-I Wu <olv at lunarg.com>
Date:   Fri Jul 16 20:09:29 2010 +0800

st/egl: Fix build on FreeBSD.

There is no libdl on FreeBSD.  Based on patch from Thinker
<thinker at branda.to>, which is against 7.8.

This fixes fdo bug #29093.
(cherry picked from commit 08f4bc07e424aaeb35eb58736fdca64b1398c190)

---

 configs/autoconf.in                 |    3 +++
 configs/default                     |    2 ++
 configure.ac                        |    1 +
 src/gallium/winsys/drm/Makefile.egl |    2 +-
 4 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/configs/autoconf.in b/configs/autoconf.in
index b6071f8..6218be9 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -29,6 +29,9 @@ X11_CFLAGS = @X11_CFLAGS@
 GLW_CFLAGS = @GLW_CFLAGS@
 GLUT_CFLAGS = @GLUT_CFLAGS@
 
+# dlopen
+DLOPEN_LIBS = @DLOPEN_LIBS@
+
 # Assembler
 MESA_ASM_SOURCES = @MESA_ASM_SOURCES@
 GLAPI_ASM_SOURCES = @GLAPI_ASM_SOURCES@
diff --git a/configs/default b/configs/default
index f12bec8..d4b45a3 100644
--- a/configs/default
+++ b/configs/default
@@ -121,6 +121,8 @@ APP_LIB_DEPS    = $(EXTRA_LIB_PATH) -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LI
 APP_LIB_DEPS = -lm
 X11_LIBS = -lX11
 
+DLOPEN_LIBS = -ldl
+
 # Installation directories (for make install)
 INSTALL_DIR = /usr/local
 INSTALL_LIB_DIR = $(INSTALL_DIR)/$(LIB_DIR)
diff --git a/configure.ac b/configure.ac
index 81fd320..e15371f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -398,6 +398,7 @@ dnl Check to see if dlopen is in default libraries (like Solaris, which
 dnl has it in libc), or if libdl is needed to get it.
 AC_CHECK_FUNC([dlopen], [],
     [AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])])
+AC_SUBST([DLOPEN_LIBS])
 
 dnl See if posix_memalign is available
 AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
diff --git a/src/gallium/winsys/drm/Makefile.egl b/src/gallium/winsys/drm/Makefile.egl
index 8363de6..c48967f 100644
--- a/src/gallium/winsys/drm/Makefile.egl
+++ b/src/gallium/winsys/drm/Makefile.egl
@@ -11,7 +11,7 @@
 
 EGL_DRIVER_OBJECTS = $(EGL_DRIVER_SOURCES:.c=.o)
 
-common_LIBS = -ldrm -lm -ldl
+common_LIBS = -ldrm -lm $(DLOPEN_LIBS)
 
 x11_ST = $(TOP)/src/gallium/state_trackers/egl/libeglx11.a
 x11_LIBS = $(common_LIBS) -lX11 -lXext -lXfixes




More information about the mesa-commit mailing list