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
|
--- gliv-1.9.7.orig/configure.ac
+++ gliv-1.9.7/configure.ac
@@ -17,18 +17,17 @@
# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
-
+AC_USE_SYSTEM_EXTENSIONS
# Default CFLAGS.
-if test "x$GCC" = "xyes" && test "$DEFAULT_CFLAGS" = "yes"; then
- CFLAGS="-Wall -O2 -fomit-frame-pointer -ffast-math"
-fi
-CFLAGS="$CFLAGS -I${srcdir}/../lib"
+#if test "x$GCC" = "xyes" && test "$DEFAULT_CFLAGS" = "yes"; then
+# CFLAGS="-Wall -O2 -fomit-frame-pointer -ffast-math"
+#fi
+#CFLAGS="$CFLAGS -I${srcdir}/../lib"
# Checks for LFS flags, we may not handle big files, but it doesn't hurt.
AC_SYS_LARGEFILE
-
AC_DEFUN([CHECK_MATH],
[OLD_CFLAGS="$CFLAGS"]
[CFLAGS="$CFLAGS -w"]
@@ -128,35 +127,22 @@
# Checks for X.
AC_PATH_XTRA
-CFLAGS="$X_CFLAGS $CFLAGS"
-LDFLAGS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS $LDFLAGS"
# Checks for GtkGLExt.
PKG_CHECK_MODULES(GTKGLEXT, [gtkglext-1.0 >= 0.7.0])
-CFLAGS="$GTKGLEXT_CFLAGS $CFLAGS"
-LDFLAGS="$GTKGLEXT_LIBS $LDFLAGS"
GTKGL_VERSION="$($PKG_CONFIG --modversion gtkglext-1.0)"
# Checks for OpenGL.
-AC_TRY_LINK([#include "GL/gl.h"],
- [glBegin(GL_QUADS);],
- [ogl="yes"],
- [ogl="no"])
-
+AC_SEARCH_LIBS([glBegin],[GL],[ogl="yes"],[ogl="no"],)
if test "x$ogl" = "xno"; then
AC_MSG_NOTICE([maybe libGL requires libpthread...])
- OLD_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -lpthread"
- AC_TRY_LINK([#include "GL/gl.h"],
- [glBegin(GL_QUADS);],
- [],
- AC_MSG_ERROR([cannot use -lGL]))
+ AC_SEARCH_LIBS([glBegin],[GL],[ogl="yes"],[ogl="no"],[-lpthread])
fi
# Checks for gtk.
AM_PATH_GTK_2_0([2.6.0], [
CFLAGS="$GTK_CFLAGS $CFLAGS"
- LDFLAGS="$GTK_LIBS $LDFLAGS"
+ LIBS="$LIBS $GTK_LIBS"
GTK_VERSION="$($PKG_CONFIG --modversion gtk+-2.0)"
], [exit 1], [gthread])
@@ -164,9 +150,6 @@
ALL_LINGUAS=$(echo po/*.po | sed -e 's|\.po||g' -e 's|po/||g')
AM_GNU_GETTEXT_VERSION
AM_GNU_GETTEXT
-CFLAGS="$CFLAGS -I../${srcdir}/intl"
-LIBS="$LIBS $LIBINTL"
-
AC_CONFIG_FILES([ intl/Makefile
Makefile
--- gliv-1.9.7.orig/src/Makefile.am
+++ gliv-1.9.7/src/Makefile.am
@@ -64,6 +64,9 @@
gliv_LDADD = -L../lib -lreplacements
endif
+gliv_CFLAGS = @GTKGLEXT_CFLAGS@
+gliv_LDADD = @GTKGLEXT_LIBS@
+
AM_CPPFLAGS = -I$(srcdir)/include -D_REENTRANT -D_THREAD_SAFE \
-DSYSCONFDIR=\"$(sysconfdir)\"
|