summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configs/autoconf.in3
-rw-r--r--configs/default3
-rw-r--r--configure.ac9
-rw-r--r--src/glu/Makefile1
-rw-r--r--src/glu/glu.pc.in2
-rw-r--r--src/mesa/Makefile20
-rw-r--r--src/mesa/osmesa.pc.in12
7 files changed, 40 insertions, 10 deletions
diff --git a/configs/autoconf.in b/configs/autoconf.in
index afd9f6a0c7..4a89716ab6 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -113,7 +113,6 @@ GL_PC_CFLAGS = @GL_PC_CFLAGS@
DRI_PC_REQ_PRIV = @DRI_PC_REQ_PRIV@
GLU_PC_REQ = @GLU_PC_REQ@
GLU_PC_REQ_PRIV = @GLU_PC_REQ_PRIV@
-GLU_PC_LIB = @GLU_PC_LIB@
GLU_PC_LIB_PRIV = @GLU_PC_LIB_PRIV@
GLU_PC_CFLAGS = @GLU_PC_CFLAGS@
GLUT_PC_REQ_PRIV = @GLUT_PC_REQ_PRIV@
@@ -122,3 +121,5 @@ GLUT_PC_CFLAGS = @GLUT_PC_CFLAGS@
GLW_PC_REQ_PRIV = @GLW_PC_REQ_PRIV@
GLW_PC_LIB_PRIV = @GLW_PC_LIB_PRIV@
GLW_PC_CFLAGS = @GLW_PC_CFLAGS@
+OSMESA_PC_REQ = @OSMESA_PC_REQ@
+OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@
diff --git a/configs/default b/configs/default
index 52ad61cb92..7b79cf2c1b 100644
--- a/configs/default
+++ b/configs/default
@@ -107,7 +107,6 @@ GL_PC_CFLAGS =
DRI_PC_REQ_PRIV =
GLU_PC_REQ = gl
GLU_PC_REQ_PRIV =
-GLU_PC_LIB =
GLU_PC_LIB_PRIV =
GLU_PC_CFLAGS =
GLUT_PC_REQ_PRIV =
@@ -116,3 +115,5 @@ GLUT_PC_CFLAGS =
GLW_PC_REQ_PRIV =
GLW_PC_LIB_PRIV =
GLW_PC_CFLAGS =
+OSMESA_PC_REQ =
+OSMESA_PC_LIB_PRIV =
diff --git a/configure.ac b/configure.ac
index 8026d9dca1..97cb298d39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -801,6 +801,7 @@ osmesa)
OSMESA_LIB_DEPS=""
fi
OSMESA_MESA_DEPS=""
+ OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS"
;;
*)
# Link OSMesa to libGL otherwise
@@ -811,13 +812,17 @@ osmesa)
else
OSMESA_MESA_DEPS=""
fi
+ OSMESA_PC_REQ="gl"
;;
esac
if test "$enable_static" = no; then
OSMESA_LIB_DEPS="$OSMESA_LIB_DEPS $OS_LIBS"
fi
+OSMESA_PC_LIB_PRIV="$OSMESA_PC_LIB_PRIV $OS_LIBS"
AC_SUBST([OSMESA_LIB_DEPS])
AC_SUBST([OSMESA_MESA_DEPS])
+AC_SUBST([OSMESA_PC_REQ])
+AC_SUBST([OSMESA_PC_LIB_PRIV])
dnl
dnl GLU configuration
@@ -840,8 +845,7 @@ if test "x$enable_glu" = xyes; then
# Link libGLU to libOSMesa instead of libGL
GLU_LIB_DEPS=""
- GLU_PC_LIB='-L$(INSTALL_LIB_DIR) -l$(OSMESA_LIB)'
- GLU_PC_CFLAGS='-I$(INSTALL_INC_DIR)'
+ GLU_PC_REQ="osmesa"
if test "$enable_static" = no; then
GLU_MESA_DEPS='-l$(OSMESA_LIB)'
else
@@ -871,7 +875,6 @@ AC_SUBST([GLU_LIB_DEPS])
AC_SUBST([GLU_MESA_DEPS])
AC_SUBST([GLU_PC_REQ])
AC_SUBST([GLU_PC_REQ_PRIV])
-AC_SUBST([GLU_PC_LIB])
AC_SUBST([GLU_PC_LIB_PRIV])
AC_SUBST([GLU_PC_CFLAGS])
diff --git a/src/glu/Makefile b/src/glu/Makefile
index 4351d23599..e519dfeec4 100644
--- a/src/glu/Makefile
+++ b/src/glu/Makefile
@@ -21,7 +21,6 @@ pcedit = sed \
-e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
-e 's,@GLU_PC_REQ@,$(GLU_PC_REQ),' \
-e 's,@GLU_PC_REQ_PRIV@,$(GLU_PC_REQ_PRIV),' \
- -e 's,@GLU_PC_LIB@,$(GLU_PC_LIB),' \
-e 's,@GLU_PC_LIB_PRIV@,$(GLU_PC_LIB_PRIV),' \
-e 's,@GLU_PC_CFLAGS@,$(GLU_PC_CFLAGS),'
glu.pc: glu.pc.in
diff --git a/src/glu/glu.pc.in b/src/glu/glu.pc.in
index 2c9bd955b8..bc2517e90e 100644
--- a/src/glu/glu.pc.in
+++ b/src/glu/glu.pc.in
@@ -8,6 +8,6 @@ Description: Mesa OpenGL Utility library
Requires: @GLU_PC_REQ@
Requires.private: @GLU_PC_REQ_PRIV@
Version: @VERSION@
-Libs: -L${libdir} -lGLU @GLU_PC_LIB@
+Libs: -L${libdir} -lGLU
Libs.private: @GLU_PC_LIB_PRIV@
Cflags: -I${includedir} @GLU_PC_CFLAGS@
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 42a8673f4d..6b4057030e 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -88,7 +88,7 @@ install: default
done
-pcedit = sed \
+gl_pcedit = sed \
-e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
-e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
-e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
@@ -98,7 +98,19 @@ pcedit = sed \
-e 's,@GL_PC_CFLAGS@,$(GL_PC_CFLAGS),'
gl.pc: gl.pc.in
- $(pcedit) $< > $@
+ $(gl_pcedit) $< > $@
+
+osmesa_pcedit = sed \
+ -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
+ -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
+ -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
+ -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
+ -e 's,@OSMESA_LIB@,$(OSMESA_LIB),' \
+ -e 's,@OSMESA_PC_REQ@,$(OSMESA_PC_REQ),' \
+ -e 's,@OSMESA_PC_LIB_PRIV@,$(OSMESA_PC_LIB_PRIV),'
+
+osmesa.pc: osmesa.pc.in
+ $(osmesa_pcedit) $< > $@
install-headers:
$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL
@@ -112,10 +124,12 @@ install-libgl: default gl.pc install-headers
$(DESTDIR)$(INSTALL_LIB_DIR)
$(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
-install-osmesa: default
+install-osmesa: default osmesa.pc
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
$(INSTALL) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_GLOB) \
$(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -m 644 osmesa.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
install-dri: default
cd drivers/dri && $(MAKE) install
diff --git a/src/mesa/osmesa.pc.in b/src/mesa/osmesa.pc.in
new file mode 100644
index 0000000000..05327f40aa
--- /dev/null
+++ b/src/mesa/osmesa.pc.in
@@ -0,0 +1,12 @@
+prefix=@INSTALL_DIR@
+exec_prefix=${prefix}
+libdir=@INSTALL_LIB_DIR@
+includedir=@INSTALL_INC_DIR@
+
+Name: osmesa
+Description: Mesa Off-screen Rendering library
+Requires: @OSMESA_PC_REQ@
+Version: @VERSION@
+Libs: -L${libdir} -l@OSMESA_LIB@
+Libs.private: @OSMESA_PC_LIB_PRIV@
+Cflags: -I${includedir}