Mesa (master): Use variable library name in pkg-config output.

Dan Nicholson dbn at kemper.freedesktop.org
Wed Apr 29 19:16:01 UTC 2009


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

Author: Tom Fogal <tfogal at alumni.unh.edu>
Date:   Wed Apr 29 10:32:46 2009 -0600

Use variable library name in pkg-config output.

Previously the pkg-config output files would contain e.g. `-lGL'
and `-lGLU', even if the user modified their configuration to
build libraries with different names.  This modifies the
pkg-config inputs, and corresponding makery, so that modifying the
output library name will cause the appropriate updated name to
appear in the pkg-config `-l' option.

Signed-off-by: Dan Nicholson <dbn.lists at gmail.com>

---

 src/glu/Makefile         |    3 ++-
 src/glu/glu.pc.in        |    2 +-
 src/glut/glx/Makefile    |    3 ++-
 src/glut/glx/glut.pc.in  |    2 +-
 src/glut/mini/Makefile   |    3 ++-
 src/glut/mini/glut.pc.in |    2 +-
 src/glw/Makefile         |    3 ++-
 src/glw/glw.pc.in        |    2 +-
 src/mesa/Makefile        |    3 ++-
 src/mesa/gl.pc.in        |    2 +-
 10 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/src/glu/Makefile b/src/glu/Makefile
index e519dfe..5c26ead 100644
--- a/src/glu/Makefile
+++ b/src/glu/Makefile
@@ -22,7 +22,8 @@ pcedit = sed \
 	-e 's, at GLU_PC_REQ@,$(GLU_PC_REQ),' \
 	-e 's, at GLU_PC_REQ_PRIV@,$(GLU_PC_REQ_PRIV),' \
 	-e 's, at GLU_PC_LIB_PRIV@,$(GLU_PC_LIB_PRIV),' \
-	-e 's, at GLU_PC_CFLAGS@,$(GLU_PC_CFLAGS),'
+	-e 's, at GLU_PC_CFLAGS@,$(GLU_PC_CFLAGS),' \
+	-e 's, at GLU_LIB@,$(GLU_LIB),'
 glu.pc: glu.pc.in
 	$(pcedit) $< > $@
 
diff --git a/src/glu/glu.pc.in b/src/glu/glu.pc.in
index bc2517e..f7d9109 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
+Libs: -L${libdir} -l at GLU_LIB@
 Libs.private: @GLU_PC_LIB_PRIV@
 Cflags: -I${includedir} @GLU_PC_CFLAGS@
diff --git a/src/glut/glx/Makefile b/src/glut/glx/Makefile
index 9a975bb..1b07290 100644
--- a/src/glut/glx/Makefile
+++ b/src/glut/glx/Makefile
@@ -107,7 +107,8 @@ pcedit = sed \
 	-e 's, at VERSION@,$(GLUT_MAJOR).$(GLUT_MINOR).$(GLUT_TINY),' \
 	-e 's, at GLUT_PC_REQ_PRIV@,$(GLUT_PC_REQ_PRIV),' \
 	-e 's, at GLUT_PC_LIB_PRIV@,$(GLUT_PC_LIB_PRIV),' \
-	-e 's, at GLUT_PC_CFLAGS@,$(GLUT_PC_CFLAGS),'
+	-e 's, at GLUT_PC_CFLAGS@,$(GLUT_PC_CFLAGS),' \
+	-e 's, at GLUT_LIB@,$(GLUT_LIB),'
 glut.pc: glut.pc.in
 	$(pcedit) $< > $@
 
diff --git a/src/glut/glx/glut.pc.in b/src/glut/glx/glut.pc.in
index ae0689d..151dd0b 100644
--- a/src/glut/glx/glut.pc.in
+++ b/src/glut/glx/glut.pc.in
@@ -8,6 +8,6 @@ Description: Mesa OpenGL Utility Toolkit library
 Requires: gl glu
 Requires.private: @GLUT_PC_REQ_PRIV@
 Version: @VERSION@
-Libs: -L${libdir} -lglut
+Libs: -L${libdir} -l at GLUT_LIB@
 Libs.private: @GLUT_PC_LIB_PRIV@
 Cflags: -I${includedir} @GLUT_PC_CFLAGS@
diff --git a/src/glut/mini/Makefile b/src/glut/mini/Makefile
index 841a473..0e42436 100644
--- a/src/glut/mini/Makefile
+++ b/src/glut/mini/Makefile
@@ -81,7 +81,8 @@ pcedit = sed \
 	-e 's, at VERSION@,$(GLUT_MAJOR).$(GLUT_MINOR).$(GLUT_TINY),' \
 	-e 's, at GLUT_PC_REQ_PRIV@,$(GLUT_PC_REQ_PRIV),' \
 	-e 's, at GLUT_PC_LIB_PRIV@,$(GLUT_PC_LIB_PRIV),' \
-	-e 's, at GLUT_PC_CFLAGS@,$(GLUT_PC_CFLAGS),'
+	-e 's, at GLUT_PC_CFLAGS@,$(GLUT_PC_CFLAGS),' \
+	-e 's, at GLUT_LIB@,$(GLUT_LIB),'
 glut.pc: glut.pc.in
 	$(pcedit) $< > $@
 
diff --git a/src/glut/mini/glut.pc.in b/src/glut/mini/glut.pc.in
index ae0689d..151dd0b 100644
--- a/src/glut/mini/glut.pc.in
+++ b/src/glut/mini/glut.pc.in
@@ -8,6 +8,6 @@ Description: Mesa OpenGL Utility Toolkit library
 Requires: gl glu
 Requires.private: @GLUT_PC_REQ_PRIV@
 Version: @VERSION@
-Libs: -L${libdir} -lglut
+Libs: -L${libdir} -l at GLUT_LIB@
 Libs.private: @GLUT_PC_LIB_PRIV@
 Cflags: -I${includedir} @GLUT_PC_CFLAGS@
diff --git a/src/glw/Makefile b/src/glw/Makefile
index b153a6d..d88d773 100644
--- a/src/glw/Makefile
+++ b/src/glw/Makefile
@@ -33,7 +33,8 @@ pcedit = sed \
 	-e 's, at VERSION@,$(MAJOR).$(MINOR).$(TINY),' \
 	-e 's, at GLW_PC_REQ_PRIV@,$(GLW_PC_REQ_PRIV),' \
 	-e 's, at GLW_PC_LIB_PRIV@,$(GLW_PC_LIB_PRIV),' \
-	-e 's, at GLW_PC_CFLAGS@,$(GLW_PC_CFLAGS),'
+	-e 's, at GLW_PC_CFLAGS@,$(GLW_PC_CFLAGS),' \
+	-e 's, at GLW_LIB@,$(GLW_LIB),'
 glw.pc: glw.pc.in
 	$(pcedit) $< > $@
 
diff --git a/src/glw/glw.pc.in b/src/glw/glw.pc.in
index 5493093..19a7c30 100644
--- a/src/glw/glw.pc.in
+++ b/src/glw/glw.pc.in
@@ -8,6 +8,6 @@ Description: Mesa OpenGL widget library
 Requires: gl
 Requires.private: @GLW_PC_REQ_PRIV@
 Version: @VERSION@
-Libs: -L${libdir} -lGLw
+Libs: -L${libdir} -l at GLW_LIB@
 Libs.private: @GLW_PC_LIB_PRIV@
 Cflags: -I${includedir} @GLW_PC_CFLAGS@
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 4ff28da..bb18bee 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -103,7 +103,8 @@ gl_pcedit = sed \
 	-e 's, at VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
 	-e 's, at GL_PC_REQ_PRIV@,$(GL_PC_REQ_PRIV),' \
 	-e 's, at GL_PC_LIB_PRIV@,$(GL_PC_LIB_PRIV),' \
-	-e 's, at GL_PC_CFLAGS@,$(GL_PC_CFLAGS),'
+	-e 's, at GL_PC_CFLAGS@,$(GL_PC_CFLAGS),' \
+	-e 's, at GL_LIB@,$(GL_LIB),'
 
 gl.pc: gl.pc.in
 	$(gl_pcedit) $< > $@
diff --git a/src/mesa/gl.pc.in b/src/mesa/gl.pc.in
index 0462b9f..97b8659 100644
--- a/src/mesa/gl.pc.in
+++ b/src/mesa/gl.pc.in
@@ -7,6 +7,6 @@ Name: gl
 Description: Mesa OpenGL library
 Requires.private: @GL_PC_REQ_PRIV@
 Version: @VERSION@
-Libs: -L${libdir} -lGL
+Libs: -L${libdir} -l at GL_LIB@
 Libs.private: @GL_PC_LIB_PRIV@
 Cflags: -I${includedir} @GL_PC_CFLAGS@




More information about the mesa-commit mailing list