Files
MINGW-packages/mingw-w64-ftgl/m4.gl.m4.patch
2014-02-27 07:39:39 +04:00

55 lines
2.1 KiB
Diff

--- /home/epsy/SOURCES/ftgl/src/ftgl-2.1.3~rc5/m4/gl.m4 2008-05-05 16:48:57.000000000 +0200
+++ m4/gl.m4 2010-02-22 00:38:09.000000000 +0100
@@ -54,19 +54,23 @@
AC_MSG_CHECKING([for GL library])
if test "x$with_gl_lib" != "x" ; then
- if test -d "$with_gl_lib" ; then
+ if test -d "$with_gl_lib" -a "x$host_os" != "xmingw32" ; then
LIBS="-L$with_gl_lib -lGL"
+ elif test -d "$with_gl_lib"; then
+ LIBS="-L$with_gl_lib -lopengl32"
else
LIBS="$with_gl_lib"
fi
-else
+elif test "x$host_os" != "xmingw32"; then
LIBS="-lGL"
+else
+ LIBS="-lopengl32"
fi
-AC_LINK_IFELSE([AC_LANG_CALL([],[glBegin])],[HAVE_GL=yes], [HAVE_GL=no])
+AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <GL/gl.h>],[glBegin(0)])],[HAVE_GL=yes], [HAVE_GL=no])
if test "x$HAVE_GL" = xno ; then
if test "x$GL_X_LIBS" != x ; then
LIBS="-lGL $GL_X_LIBS"
- AC_LINK_IFELSE([AC_LANG_CALL([],[glBegin])],[HAVE_GL=yes], [HAVE_GL=no])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <GL/gl.h>],[glBegin(0)])],[HAVE_GL=yes], [HAVE_GL=no])
fi
fi
if test "x$HAVE_GL" = xyes ; then
@@ -103,12 +107,19 @@
if test "x$FRAMEWORK_OPENGL" = "x" ; then
AC_MSG_CHECKING([for GLU library])
-LIBS="-lGLU $GL_LIBS"
-AC_LINK_IFELSE([AC_LANG_CALL([],[gluNewTess])],[HAVE_GLU=yes], [HAVE_GLU=no])
+if test "x$host_os" != "xmingw32" ; then
+ LIBS="-lGLU $GL_LIBS"
+else
+ LIBS="-lglu32 $GL_LIBS"
+fi
+AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <GL/glu.h>],[gluNewTess()])],[HAVE_GLU=yes], [HAVE_GLU=no])
if test "x$HAVE_GLU" = xno ; then
- if test "x$GL_X_LIBS" != x ; then
+ if test "x$GL_X_LIBS" != x -a "x$host_os" != "xmingw32" ; then
LIBS="-lGLU $GL_LIBS $GL_X_LIBS"
- AC_LINK_IFELSE([AC_LANG_CALL([],[gluNewTess])],[HAVE_GLU=yes], [HAVE_GLU=no])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <GL/glu.h>],[gluNewTess()])],[HAVE_GLU=yes], [HAVE_GLU=no])
+ elif test "x$GL_X_LIBS" != x; then
+ LIBS="-lglu32 $GL_LIBS $GL_X_LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <GL/glu.h>],[gluNewTess()])],[HAVE_GLU=yes], [HAVE_GLU=no])
fi
fi
if test "x$HAVE_GLU" = xyes ; then