Use GL_LIBS and GLUT_LIBS instead of just LIBS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
diff --git a/unix/Make.conf.in b/unix/Make.conf.in
index 065a616..a3e3c4c 100644
--- a/unix/Make.conf.in
+++ b/unix/Make.conf.in
@@ -14,10 +14,14 @@ EXEEXT=@EXEEXT@
FT2_CFLAGS=@FT2_CFLAGS@
FT2_CONFIG=@FT2_CONFIG@
FT2_LIBS=@FT2_LIBS@
+GLUT_CFLAGS=@GLUT_CFLAGS@
+GLUT_LIBS=@GLUT_LIBS@
+GL_CFLAGS=@GL_CFLAGS@
+GL_LIBS=@GL_LIBS@
+HAVE_GLUT=@HAVE_GLUT@
INSTALL=@INSTALL@
LDFLAGS=@LDFLAGS@
LIBS=@LIBS@
-LIBGLUT=@LIBGLUT@
LIBTOOL=@LIBTOOL@
LN_S=@LN_S@
OBJEXT=@OBJEXT@
diff --git a/unix/demo/Makefile b/unix/demo/Makefile
index ed9e4a0..338a2db 100644
--- a/unix/demo/Makefile
+++ b/unix/demo/Makefile
@@ -24,14 +24,21 @@ ALL_OBJS = $(OBJS)
CPPFLAGS += $(FT2_CFLAGS)
CPPFLAGS += -I$(top_srcdir)/src
-LIBS += $(FT2_LIBS)
+LIBS += $(FT2_LIBS) $(GLUT_LIBS)
+ifeq ($(HAVE_GLUT),yes)
FTGLDemo: $(OBJS)
$(LIBTOOL) --mode=link $(CXX) $^ -o $@ $(top_builddir)/src/libftgl.la $(LIBGLUT) $(LIBS)
install-local: FTGLDemo
$(INSTALL) -d -m 0755 $(bindir)
$(LIBTOOL) --mode=install $(INSTALL) -m 0755 $(TARGET) $(bindir)
+else
+FTGLDemo:
+ @echo GLUT not available, demo won\'t be compiled
+
+install-local:
+endif
clean-local:
$(RM) $(ALL_OBJS)
diff --git a/unix/ftgl.pc.in b/unix/ftgl.pc.in
index b3e8e56..09c331d 100644
--- a/unix/ftgl.pc.in
+++ b/unix/ftgl.pc.in
@@ -7,5 +7,5 @@ Name: @PACKAGE_NAME@
Description: OpenGL frontend to Freetype 2
Version: @PACKAGE_VERSION@
Requires:
-Libs: @LIBS@ @FT2_LIBS@ -L${libdir} -lftgl
-Cflags: -I${includedir} @FT2_CFLAGS@
+Libs: @GL_LIBS@ @FT2_LIBS@ -L${libdir} -lftgl
+Cflags: -I${includedir} @GL_CFLAGS@ @FT2_CFLAGS@