~ubuntu-branches/ubuntu/karmic/gtkgl2/karmic

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hocevar (Debian packages)
  • Date: 2007-12-17 17:52:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20071217175221-ps623f1vd38elehr
Tags: 2.0.0-1
* New maintainer (with permission from the QA team: more than 4 years
  since the last maintainer upload; also, I now maintain this upstream).
* Pulled new upstream version from SVN. This snapshot has new config.guess
  and config.sub files (Closes: #414608).
* Acknowledge previous NMUs (Closes: #376447, #318631, #181876).

* debian/control:
  + Set policy to 3.7.3.
  + Drop the autoconf/automake/libtool build-dependencies (Closes: #376447).
  + Add Vcs control fields.
  + Set the library package section to "libs" and the -dev package section
    to "libdevel" (Closes: #156412, #372598).
  + Improved package description (Closes: #209747).
  + Build-depend on libx11-dev because the code uses XFree().

* debian/copyright:
  + Added missing copyright holders.
  + Convert this file to UTF-8.

* debian/rules:
  + Explicitly link the library with -lX11.

* debian/README.Debian:
  + Removed mention of GTK+1.2 (Closes: #343501).
  + Updated example to use pkg-config instead of gtk-config and -lGL instead
    of -lMesaGL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl Process this file with autoconf to produce a configure script.
2
 
AC_INIT(gtkgl/gtkglarea.h)
3
 
 
4
 
VERSION=1.99.0
5
 
PACKAGE=gtkglarea
6
 
 
7
 
#shared library versioning
8
 
GTKGL_LIBRARY_VERSION=1:0:0
9
 
#                     | | |
10
 
#              +------+ | +---+
11
 
#              |        |     |
12
 
#           current:revision:age
13
 
#              |        |     |
14
 
#              |        |     +- increment if interfaces have been added
15
 
#              |        |        set to zero if interfaces have been removed or changed
16
 
#              |        +- increment if source code has changed
17
 
#              |           set to zero if current is incremented
18
 
#              +- increment if interfaces have been added, removed or changed
19
 
20
 
# Value of current - age. Used by libtool in Win32 DLL names. We need
21
 
# to know the DLL name to build MSVC import libraries.
22
 
LT_CURRENT_MINUS_AGE=1
23
 
 
24
 
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
25
 
AC_SUBST(GTKGL_LIBRARY_VERSION)
26
 
AC_SUBST(LT_CURRENT_MINUS_AGE)
27
 
AC_SUBST(VERSION)
28
 
 
29
 
dnl Checks for programs.
30
 
AC_PROG_CC
31
 
AC_PROG_CPP
32
 
AC_LIBTOOL_WIN32_DLL
33
 
AM_PROG_LIBTOOL
34
 
AM_SANITY_CHECK
35
 
AM_MAINTAINER_MODE
36
 
 
37
 
AC_MSG_CHECKING([for Win32])
38
 
case "$host" in
39
 
  *-*-mingw*)
40
 
    native_win32=yes
41
 
    ;;
42
 
  *)
43
 
    native_win32=no
44
 
    ;;
45
 
esac
46
 
AC_MSG_RESULT([$native_win32])
47
 
AM_CONDITIONAL(OS_WIN32, test "$native_win32" = "yes")
48
 
 
49
 
if test "$native_win32" = "yes"; then
50
 
  AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
51
 
fi
52
 
AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
53
 
 
54
 
dnl Check for GTK libraries
55
 
AM_PATH_GTK_2_0(2.0.0)
56
 
 
57
 
dnl Check for GL/MesaGL libraries
58
 
AC_ARG_WITH(GL-prefix,  [  --with-GL-prefix=DIR    Prefix where GL/MesaGL is installed])
59
 
AC_ARG_WITH(lib-GL,     [  --with-lib-GL           use '-lGL'])
60
 
AC_ARG_WITH(lib-MesaGL, [  --with-lib-MesaGL       use '-lMesaGL'])
61
 
AC_ARG_WITH(lib-opengl32,[ --with-lib-opengl32     use '-lopengl32'])
62
 
 
63
 
if test "x$with_GL_prefix" = "x" ; then
64
 
 GL_LDOPTS=""
65
 
 GL_CFLAGS=""
66
 
else
67
 
 GL_LDOPTS="-L$with_GL_prefix/lib"
68
 
 GL_CFLAGS="-I$with_GL_prefix/include"
69
 
fi
70
 
 
71
 
saved_LIBS="$LIBS"
72
 
 
73
 
AC_MSG_CHECKING([OpenGL])
74
 
LIBS="$saved_LIBS $GTK_LIBS $GL_LDOPTS -lGL"
75
 
AC_TRY_LINK( ,[ char glBegin(); glBegin(); ], have_GL=yes, 
76
 
  LIBS="$saved_LIBS $GTK_LIBS $GL_LDOPTS -lopengl32"
77
 
  [AC_TRY_LINK([ #include <windows.h>
78
 
                 #include <GL/gl.h>], 
79
 
               [ glBegin(GL_TRIANGLES); ], 
80
 
    [have_opengl32=yes
81
 
     have_GL=yes],
82
 
    have_GL=no)])
83
 
AC_MSG_RESULT($have_GL)
84
 
 
85
 
AC_MSG_CHECKING([Mesa])
86
 
LIBS="$saved_LIBS $GTK_LIBS $GL_LDOPTS -lMesaGL"
87
 
AC_TRY_LINK( ,[ char glBegin(); glBegin(); ], have_MesaGL=yes, have_MesaGL=no)
88
 
AC_MSG_RESULT($have_MesaGL)
89
 
 
90
 
if test "x$have_MesaGL" = "xno"; then
91
 
 AC_MSG_CHECKING([Mesa with pthreads])
92
 
 LIBS="$saved_LIBS $GTK_LIBS $GL_LDOPTS -lMesaGL -lpthread"
93
 
 AC_TRY_LINK( ,[ char glBegin(); glBegin(); ], have_MesaGL_pthread=yes, have_MesaGL_pthread=no)
94
 
 AC_MSG_RESULT($have_MesaGL_pthread)
95
 
fi
96
 
 
97
 
LIBS="$saved_LIBS"
98
 
 
99
 
 
100
 
if test "x$with_lib_GL" = "xyes"; then
101
 
 
102
 
 if test "x$have_GL" = "xyes"; then
103
 
  GL_LIBS="$GL_LDOPTS -lGLU -lGL"
104
 
 else
105
 
  AC_MSG_ERROR([Missing GL library])
106
 
 fi
107
 
 
108
 
elif test "x$with_lib_MesaGL" = "xyes"; then
109
 
 
110
 
 if test "x$have_MesaGL" = "xyes"; then
111
 
  GL_LIBS="$GL_LDOPTS -lMesaGLU -lMesaGL"
112
 
 elif test "x$have_MesaGL_pthread" = "xyes"; then
113
 
  GL_LIBS="$GL_LDOPTS -lMesaGLU -lMesaGL -lpthread"
114
 
 else
115
 
  AC_MSG_ERROR([Missing MesaGL library])
116
 
 fi
117
 
 
118
 
elif test "x$with_lib_opengl32" = "xyes"; then
119
 
 
120
 
 if test "x$have_opengl32" = "xyes"; then
121
 
  GL_LIBS="$GL_LDOPTS -lglu32 -lopengl32"
122
 
 else
123
 
  AC_MSG_ERROR([Missing OpenGL32 library])
124
 
 fi
125
 
 
126
 
else
127
 
 
128
 
 if test "x$have_opengl32" = "xyes"; then
129
 
  GL_LIBS="$GL_LDOPTS -lglu32 -lopengl32"
130
 
 elif test "x$have_GL" = "xyes"; then
131
 
  GL_LIBS="$GL_LDOPTS -lGLU -lGL"
132
 
 elif test "x$have_MesaGL" = "xyes"; then
133
 
  GL_LIBS="$GL_LDOPTS -lMesaGLU -lMesaGL"
134
 
 elif test "x$have_MesaGL_pthread" = "xyes"; then
135
 
  GL_LIBS="$GL_LDOPTS -lMesaGLU -lMesaGL -lpthread"
136
 
 else
137
 
  AC_MSG_ERROR([You need GL or MesaGL libraries])
138
 
 fi
139
 
 
140
 
fi
141
 
 
142
 
AC_SUBST(GL_CFLAGS)
143
 
AC_SUBST(GL_LIBS)
144
 
 
145
 
 
146
 
CFLAGS="$CFLAGS $GTK_CFLAGS $GL_CFLAGS"
147
 
 
148
 
dnl Checks for header files.
149
 
AC_HEADER_STDC
150
 
 
151
 
 
152
 
dnl Checks for typedefs, structures, and compiler characteristics.
153
 
AC_C_CONST
154
 
 
155
 
dnl Checks for library functions.
156
 
 
157
 
AC_OUTPUT(
158
 
  Makefile
159
 
  gtkgl-2.0.pc
160
 
  gtkglarea.spec
161
 
  gtkgl/Makefile
162
 
  gtkgl/makefile.mingw
163
 
  docs/Makefile
164
 
  examples/Makefile
165
 
  examples/makefile.mingw
166
 
  build/Makefile
167
 
  build/win32/Makefile
168
 
  build/win32/dirent/Makefile
169
 
)