summaryrefslogtreecommitdiff
blob: 3f4a1ae16f3e5820668fd3c4d688c4b75be4c773 (plain)
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
--- a/configure.in
+++ b/configure.in
@@ -29,6 +29,8 @@
 
 AM_PROG_LIBTOOL
 
+PKG_PROG_PKG_CONFIG
+
 AC_PROG_INSTALL
 AC_PROG_RANLIB
 AC_PROG_CC
@@ -97,33 +99,13 @@
       AC_ERROR([Can not find X11 development headers or libraries.])
 fi
 
-# AC_CHECK_HEADER(GL/gl.h)  
-# AC_CHECK_HEADER(GL/glut.h)  
-
-# configure seems to work best when tested arguments take no arguments
-AC_CHECK_LIB(GL, glGetError,
-        X_LIBS="-lGL $X_LIBS",
-        AC_MSG_ERROR([Cannot find required GL library]),
-        $X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS)
-
-AC_CHECK_LIB(GLU, gluNewQuadric,
-        X_LIBS="-lGLU $X_LIBS",
-        AC_MSG_ERROR([Cannot find required GLU library]),
-        $X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS)
+PKG_CHECK_MODULES([GLU], [glu])
 
 AC_CHECK_LIB(glut, glutSwapBuffers,
         X_LIBS="-lglut $X_LIBS",
         AC_MSG_ERROR([Cannot find required glut library]),
         $X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS)
 
-
-# This is how to use the variables set by AC_PATH_XTRA:
-#       cc @X_CFLAGS@ -c -o foo.o foo.c
-#       cc @X_LIBS@ (-lfoo...) @X_PRE_LIBS@ -lX11 @X_EXTRA_LIBS@
-# (Perhaps X_LIBS should have been called X_LDFLAGS.)
-
-X_LIBS="$X_LIBS -lgle -lXi -lXext -lXmu -lXt -lX11"
-
 AC_OUTPUT(
           Makefile
           src/Makefile
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -18,7 +18,8 @@
   urotate.c		\
   view.c
 
-
+libgle_la_LIBADD = $(X_PRE_LIBS) $(X_LIBS) $(GLU_LIBS) $(X_EXTRA_LIBS)
+libgle_la_CFLAGS = $(X_CFLAGS) $(GLU_CFLAGS)
 libgle_la_LDFLAGS = -version-info 3:0
 
 # make sure we install gle.h into /usr/include/GL/gle.h or thereabouts
@@ -42,7 +43,3 @@
   .cvsignore \
   README.gutil \
   gle.h
-
-INCLUDES = \
-  @X_CFLAGS@
-
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -20,7 +20,7 @@
 EXTRA_DIST = $(man_RAW) \
   Makefile.sgi
 
-SUFFIXES += .man .3gle
+SUFFIXES = .man .3gle
 
 # for the ordinary install, just copy the raw files ....
 .man.3gle:
@@ -36,4 +36,4 @@
 	psroff -t -man < $< > $*.ps
 
 
-CLEANFILES += $(man_MANS)
+CLEANFILES = $(man_MANS)
--- a/public_html/Makefile.am
+++ b/public_html/Makefile.am
@@ -82,5 +82,5 @@
 
 EXTRA_DIST = $(html_HTML) $(gif_HTML) $(giforig_HTML) gle-3.0.lsm README
 
-SUFFIXES += .html .gif .jpg
+SUFFIXES = .html .gif .jpg
 
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
 
-SUBDIRS = src examples man public_html
+SUBDIRS = src
 
 EXTRA_DIST = \
   .cvsignore