1
dnl Process this file with autoconf to produce a configure script.
2
AC_INIT(gtkgl/gtkglarea.h)
7
#shared library versioning
8
GTKGL_LIBRARY_VERSION=1:0:0
12
# current:revision:age
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
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
24
AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
25
AC_SUBST(GTKGL_LIBRARY_VERSION)
26
AC_SUBST(LT_CURRENT_MINUS_AGE)
29
dnl Checks for programs.
37
AC_MSG_CHECKING([for Win32])
46
AC_MSG_RESULT([$native_win32])
47
AM_CONDITIONAL(OS_WIN32, test "$native_win32" = "yes")
49
if test "$native_win32" = "yes"; then
50
AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
52
AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
54
dnl Check for GTK libraries
55
AM_PATH_GTK_2_0(2.0.0)
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'])
63
if test "x$with_GL_prefix" = "x" ; then
67
GL_LDOPTS="-L$with_GL_prefix/lib"
68
GL_CFLAGS="-I$with_GL_prefix/include"
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>
79
[ glBegin(GL_TRIANGLES); ],
83
AC_MSG_RESULT($have_GL)
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)
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)
100
if test "x$with_lib_GL" = "xyes"; then
102
if test "x$have_GL" = "xyes"; then
103
GL_LIBS="$GL_LDOPTS -lGLU -lGL"
105
AC_MSG_ERROR([Missing GL library])
108
elif test "x$with_lib_MesaGL" = "xyes"; then
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"
115
AC_MSG_ERROR([Missing MesaGL library])
118
elif test "x$with_lib_opengl32" = "xyes"; then
120
if test "x$have_opengl32" = "xyes"; then
121
GL_LIBS="$GL_LDOPTS -lglu32 -lopengl32"
123
AC_MSG_ERROR([Missing OpenGL32 library])
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"
137
AC_MSG_ERROR([You need GL or MesaGL libraries])
146
CFLAGS="$CFLAGS $GTK_CFLAGS $GL_CFLAGS"
148
dnl Checks for header files.
152
dnl Checks for typedefs, structures, and compiler characteristics.
155
dnl Checks for library functions.
165
examples/makefile.mingw
168
build/win32/dirent/Makefile