Commit 7c3588598a591f4ca23447ea61351daeac14c0b0

sammy 2008-04-04T12:43:38

* Generate a config.h file instead of passing all defines in the compiler command line. * "make install" now properly installs the includes, the documentation and the .pc file. * Generate a shared library.

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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
diff --git a/Makefile.am b/Makefile.am
index 0db92c4..cde7a5f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,8 +1,19 @@
 
-SUBDIRS = src demo docs
 ACLOCAL_AMFLAGS = -I m4
 
-install-data-local: ftgl.pc
-	$(INSTALL) -d -m 0755 $(libdir)/pkgconfig
-	$(INSTALL) -m 0644 ftgl.pc $(libdir)/pkgconfig/
+SUBDIRS = src demo docs
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = ftgl.pc
+
+DISTCLEANFILES = ftgl.pc
+
+EXTRA_DIST = \
+    bootstrap \
+    COPYING.txt \
+    HISTORY.txt \
+    INSTALL.txt \
+    license.txt \
+    README.txt \
+    $(NULL)
 
diff --git a/configure.ac b/configure.ac
index a4a28d1..0e99ac4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,13 +1,10 @@
 AC_INIT(ftgl, 2.0.5, henryj@paradise.net.nz)
 AC_CONFIG_AUX_DIR(.auto)
+AC_CONFIG_HEADER(config.h)
 AM_INIT_AUTOMAKE([no-define tar-ustar])
 
-AC_CONFIG_SRCDIR([Make.conf.in])
-dnl AC_CONFIG_HEADER([src/config.h])
-
 FTGL_PROG_CXX
 
-AC_DISABLE_SHARED
 AC_PROG_LIBTOOL
 
 # Checks for typedefs, structures, and compiler characteristics.
diff --git a/demo/FTGLDemo.cpp b/demo/FTGLDemo.cpp
index 0fc0b22..4a3ebb8 100644
--- a/demo/FTGLDemo.cpp
+++ b/demo/FTGLDemo.cpp
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include <stdlib.h>
 #include <stdio.h>
 
diff --git a/demo/tb.c b/demo/tb.c
index 7c4ad8e..d9526a5 100644
--- a/demo/tb.c
+++ b/demo/tb.c
@@ -4,8 +4,8 @@
  *  Advanced OpenGL course notes.
  */
 
+#include "config.h"
 
-/* includes */
 #include <math.h>
 #include <assert.h>
 #ifdef __APPLE_CC__
diff --git a/demo/trackball.c b/demo/trackball.c
index 4843457..e021d09 100644
--- a/demo/trackball.c
+++ b/demo/trackball.c
@@ -34,6 +34,7 @@
  *
  * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
  */
+
 /*
  * Trackball code:
  *
@@ -49,6 +50,8 @@
  * Much mucking with by:
  * Gavin Bell
  */
+#include "config.h"
+
 #include <math.h>
 #include "trackball.h"
 
diff --git a/docs/Makefile.am b/docs/Makefile.am
index a391c9f..dbf2128 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -10,8 +10,8 @@ doc-stamp: $(DOXYFILE)
 	touch $@
 
 install-data-local: doc
-	$(INSTALL) -d -m 0755 $(datadir)/doc/$(PACKAGE_NAME)/html
-	$(INSTALL) -m 0644 html/* $(datadir)/doc/$(PACKAGE_NAME)/html/
+	$(INSTALL) -d -m 0755 $(DESTDIR)$(datadir)/doc/$(PACKAGE_NAME)/html
+	$(INSTALL) -m 0644 html/* $(DESTDIR)$(datadir)/doc/$(PACKAGE_NAME)/html/
 
 distclean-local:
 	$(RM) -r $(DOCDIRS)
diff --git a/src/FTBitmapGlyph.cpp b/src/FTBitmapGlyph.cpp
index f37ef10..d466402 100644
--- a/src/FTBitmapGlyph.cpp
+++ b/src/FTBitmapGlyph.cpp
@@ -1,4 +1,6 @@
-#include    <string>
+#include "config.h"
+
+#include <string>
 
 #include "FTBitmapGlyph.h"
 
diff --git a/src/FTBufferGlyph.cpp b/src/FTBufferGlyph.cpp
index 2731010..a1bbde4 100644
--- a/src/FTBufferGlyph.cpp
+++ b/src/FTBufferGlyph.cpp
@@ -1,4 +1,6 @@
-#include    "FTBufferGlyph.h"
+#include "config.h"
+
+#include "FTBufferGlyph.h"
 
 FTBufferGlyph::FTBufferGlyph( FT_GlyphSlot glyph, unsigned char* b)
 :   FTGlyph( glyph),
diff --git a/src/FTCharmap.cpp b/src/FTCharmap.cpp
index 20cca4a..35146cf 100644
--- a/src/FTCharmap.cpp
+++ b/src/FTCharmap.cpp
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include "FTFace.h"
 #include "FTCharmap.h"
 
diff --git a/src/FTContour.cpp b/src/FTContour.cpp
index a9a9579..c2f1307 100644
--- a/src/FTContour.cpp
+++ b/src/FTContour.cpp
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include "FTContour.h"
 
 static const float BEZIER_STEP_SIZE = 0.2f;
diff --git a/src/FTExtrdGlyph.cpp b/src/FTExtrdGlyph.cpp
index 9539eec..ed111e8 100644
--- a/src/FTExtrdGlyph.cpp
+++ b/src/FTExtrdGlyph.cpp
@@ -1,9 +1,10 @@
-#include <iostream>
+#include "config.h"
 
-#include    <math.h>
+#include <iostream>
+#include <math.h>
 
-#include    "FTExtrdGlyph.h"
-#include    "FTVectoriser.h"
+#include "FTExtrdGlyph.h"
+#include "FTVectoriser.h"
 
 
 FTExtrdGlyph::FTExtrdGlyph( FT_GlyphSlot glyph, float depth, bool useDisplayList)
diff --git a/src/FTFace.cpp b/src/FTFace.cpp
index 2f081c0..28ddbdb 100644
--- a/src/FTFace.cpp
+++ b/src/FTFace.cpp
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include "FTFace.h"
 #include "FTLibrary.h"
 
diff --git a/src/FTFont.cpp b/src/FTFont.cpp
index f519f33..2f0cb0c 100644
--- a/src/FTFont.cpp
+++ b/src/FTFont.cpp
@@ -1,7 +1,9 @@
-#include    "FTFace.h"
-#include    "FTFont.h"
-#include    "FTGlyphContainer.h"
-#include    "FTBBox.h"
+#include "config.h"
+
+#include "FTFace.h"
+#include "FTFont.h"
+#include "FTGlyphContainer.h"
+#include "FTBBox.h"
 
 
 FTFont::FTFont( const char* fontFilePath)
diff --git a/src/FTGLBitmapFont.cpp b/src/FTGLBitmapFont.cpp
index 5844427..ef3bb6b 100644
--- a/src/FTGLBitmapFont.cpp
+++ b/src/FTGLBitmapFont.cpp
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include "FTGLBitmapFont.h"
 #include "FTBitmapGlyph.h"
 
diff --git a/src/FTGLBufferFont.cpp b/src/FTGLBufferFont.cpp
index b8af0fc..3f56963 100644
--- a/src/FTGLBufferFont.cpp
+++ b/src/FTGLBufferFont.cpp
@@ -1,5 +1,7 @@
-#include    "FTGLBufferFont.h"
-#include    "FTBufferGlyph.h"
+#include "config.h"
+
+#include "FTGLBufferFont.h"
+#include "FTBufferGlyph.h"
 
 
 FTGLBufferFont::FTGLBufferFont( const char* fontname)
diff --git a/src/FTGLExtrdFont.cpp b/src/FTGLExtrdFont.cpp
index 7bd0ff7..4f264ff 100644
--- a/src/FTGLExtrdFont.cpp
+++ b/src/FTGLExtrdFont.cpp
@@ -1,5 +1,7 @@
-#include    "FTGLExtrdFont.h"
-#include    "FTExtrdGlyph.h"
+#include "config.h"
+
+#include "FTGLExtrdFont.h"
+#include "FTExtrdGlyph.h"
 
 
 FTGLExtrdFont::FTGLExtrdFont( const char* fontFilePath)
diff --git a/src/FTGLOutlineFont.cpp b/src/FTGLOutlineFont.cpp
index 182eca0..714d38c 100644
--- a/src/FTGLOutlineFont.cpp
+++ b/src/FTGLOutlineFont.cpp
@@ -1,5 +1,7 @@
-#include    "FTGLOutlineFont.h"
-#include    "FTOutlineGlyph.h"
+#include "config.h"
+
+#include "FTGLOutlineFont.h"
+#include "FTOutlineGlyph.h"
 
 
 FTGLOutlineFont::FTGLOutlineFont( const char* fontFilePath)
diff --git a/src/FTGLPixmapFont.cpp b/src/FTGLPixmapFont.cpp
index cdb9908..135a0b2 100644
--- a/src/FTGLPixmapFont.cpp
+++ b/src/FTGLPixmapFont.cpp
@@ -1,5 +1,7 @@
-#include    "FTGLPixmapFont.h"
-#include    "FTPixmapGlyph.h"
+#include "config.h"
+
+#include "FTGLPixmapFont.h"
+#include "FTPixmapGlyph.h"
 
 
 FTGLPixmapFont::FTGLPixmapFont( const char* fontFilePath)
diff --git a/src/FTGLPolygonFont.cpp b/src/FTGLPolygonFont.cpp
index 47a8af4..1246ba5 100644
--- a/src/FTGLPolygonFont.cpp
+++ b/src/FTGLPolygonFont.cpp
@@ -1,5 +1,7 @@
-#include    "FTGLPolygonFont.h"
-#include    "FTPolyGlyph.h"
+#include "config.h"
+
+#include "FTGLPolygonFont.h"
+#include "FTPolyGlyph.h"
 
 
 FTGLPolygonFont::FTGLPolygonFont( const char* fontFilePath)
diff --git a/src/FTGLTextureFont.cpp b/src/FTGLTextureFont.cpp
index 3b8836e..3f180d4 100644
--- a/src/FTGLTextureFont.cpp
+++ b/src/FTGLTextureFont.cpp
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include <cassert>
 #include <string> // For memset
 
diff --git a/src/FTGlyph.cpp b/src/FTGlyph.cpp
index d969bdd..51c396d 100644
--- a/src/FTGlyph.cpp
+++ b/src/FTGlyph.cpp
@@ -1,4 +1,6 @@
-#include    "FTGlyph.h"
+#include "config.h"
+
+#include "FTGlyph.h"
 
 
 FTGlyph::FTGlyph( FT_GlyphSlot glyph, bool useList)
diff --git a/src/FTGlyphContainer.cpp b/src/FTGlyphContainer.cpp
index 7b088de..fbe7a6c 100644
--- a/src/FTGlyphContainer.cpp
+++ b/src/FTGlyphContainer.cpp
@@ -1,7 +1,9 @@
-#include    "FTGlyphContainer.h"
-#include    "FTGlyph.h"
-#include    "FTFace.h"
-#include    "FTCharmap.h"
+#include "config.h"
+
+#include "FTGlyphContainer.h"
+#include "FTGlyph.h"
+#include "FTFace.h"
+#include "FTCharmap.h"
 
 
 FTGlyphContainer::FTGlyphContainer( FTFace* f)
diff --git a/src/FTLibrary.cpp b/src/FTLibrary.cpp
index 06e4b45..0ac6ece 100644
--- a/src/FTLibrary.cpp
+++ b/src/FTLibrary.cpp
@@ -1,4 +1,6 @@
-#include    "FTLibrary.h"
+#include "config.h"
+
+#include "FTLibrary.h"
 
 
 const FTLibrary&  FTLibrary::Instance()
diff --git a/src/FTOutlineGlyph.cpp b/src/FTOutlineGlyph.cpp
index d642756..2cd33cd 100644
--- a/src/FTOutlineGlyph.cpp
+++ b/src/FTOutlineGlyph.cpp
@@ -1,5 +1,7 @@
-#include    "FTOutlineGlyph.h"
-#include    "FTVectoriser.h"
+#include "config.h"
+
+#include "FTOutlineGlyph.h"
+#include "FTVectoriser.h"
 
 
 FTOutlineGlyph::FTOutlineGlyph( FT_GlyphSlot glyph, bool useDisplayList)
diff --git a/src/FTPixmapGlyph.cpp b/src/FTPixmapGlyph.cpp
index a109587..42f61bb 100644
--- a/src/FTPixmapGlyph.cpp
+++ b/src/FTPixmapGlyph.cpp
@@ -1,4 +1,6 @@
-#include    "FTPixmapGlyph.h"
+#include "config.h"
+
+#include "FTPixmapGlyph.h"
 
 FTPixmapGlyph::FTPixmapGlyph( FT_GlyphSlot glyph)
 :   FTGlyph( glyph),
diff --git a/src/FTPoint.cpp b/src/FTPoint.cpp
index bf6c46c..3455c08 100644
--- a/src/FTPoint.cpp
+++ b/src/FTPoint.cpp
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include "FTPoint.h"
 
 
diff --git a/src/FTPolyGlyph.cpp b/src/FTPolyGlyph.cpp
index 1e69f40..927fb66 100644
--- a/src/FTPolyGlyph.cpp
+++ b/src/FTPolyGlyph.cpp
@@ -1,3 +1,5 @@
+#include "config.h"
+
 #include "FTPolyGlyph.h"
 #include "FTVectoriser.h"
 
diff --git a/src/FTSize.cpp b/src/FTSize.cpp
index 4259b69..3997cdd 100644
--- a/src/FTSize.cpp
+++ b/src/FTSize.cpp
@@ -1,4 +1,6 @@
-#include    "FTSize.h"
+#include "config.h"
+
+#include "FTSize.h"
 
 
 FTSize::FTSize()
diff --git a/src/FTTextureGlyph.cpp b/src/FTTextureGlyph.cpp
index 7bf6e32..9812bbc 100644
--- a/src/FTTextureGlyph.cpp
+++ b/src/FTTextureGlyph.cpp
@@ -1,4 +1,6 @@
-#include    "FTTextureGlyph.h"
+#include "config.h"
+
+#include "FTTextureGlyph.h"
 
 GLint FTTextureGlyph::activeTextureID = 0;
  
diff --git a/src/FTVectoriser.cpp b/src/FTVectoriser.cpp
index d7f8774..f6cc1de 100644
--- a/src/FTVectoriser.cpp
+++ b/src/FTVectoriser.cpp
@@ -1,5 +1,7 @@
-#include    "FTVectoriser.h"
-#include    "FTGL.h"
+#include "config.h"
+
+#include "FTVectoriser.h"
+#include "FTGL.h"
 
 #ifndef CALLBACK
 #define CALLBACK
diff --git a/src/Makefile.am b/src/Makefile.am
index c0221c7..e18633c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,37 +24,38 @@ libftgl_la_SOURCES = \
 	FTSize.cpp \
 	FTTextureGlyph.cpp \
 	FTVectoriser.cpp \
-	$(NULL)
+	$(ftgl_HEADERS)
 libftgl_la_CPPFLAGS = -I$(top_srcdir)/include
 libftgl_la_CXXFLAGS = $(FT2_CFLAGS) $(GL_CFLAGS)
 libftgl_la_LDFLAGS = $(FT2_LIBS) $(GL_LIBS)
 
-headers = \
-	FTBBox.h \
-	FTBitmapGlyph.h \
-	FTCharToGlyphIndexMap.h \
-	FTCharmap.h \
-	FTContour.h \
-	FTExtrdGlyph.h \
-	FTFace.h \
-	FTFont.h \
-	FTGL.h \
-	FTGLBitmapFont.h \
-	FTGLExtrdFont.h \
-	FTGLOutlineFont.h \
-	FTGLPixmapFont.h \
-	FTGLPolygonFont.h \
-	FTGLTextureFont.h \
-	FTGlyph.h \
-	FTGlyphContainer.h \
-	FTLibrary.h \
-	FTList.h \
-	FTOutlineGlyph.h \
-	FTPixmapGlyph.h \
-	FTPoint.h \
-	FTPolyGlyph.h \
-	FTSize.h \
-	FTTextureGlyph.h \
-	FTVector.h \
-	FTVectoriser.h
+ftgldir = $(includedir)/FTGL
+ftgl_HEADERS = \
+	../include/FTBBox.h \
+	../include/FTBitmapGlyph.h \
+	../include/FTCharToGlyphIndexMap.h \
+	../include/FTCharmap.h \
+	../include/FTContour.h \
+	../include/FTExtrdGlyph.h \
+	../include/FTFace.h \
+	../include/FTFont.h \
+	../include/FTGL.h \
+	../include/FTGLBitmapFont.h \
+	../include/FTGLExtrdFont.h \
+	../include/FTGLOutlineFont.h \
+	../include/FTGLPixmapFont.h \
+	../include/FTGLPolygonFont.h \
+	../include/FTGLTextureFont.h \
+	../include/FTGlyph.h \
+	../include/FTGlyphContainer.h \
+	../include/FTLibrary.h \
+	../include/FTList.h \
+	../include/FTOutlineGlyph.h \
+	../include/FTPixmapGlyph.h \
+	../include/FTPoint.h \
+	../include/FTPolyGlyph.h \
+	../include/FTSize.h \
+	../include/FTTextureGlyph.h \
+	../include/FTVector.h \
+	../include/FTVectoriser.h