From c262125b5af141223691bb45dba5afbb859bafc0 Mon Sep 17 00:00:00 2001 From: spanne Date: Fri, 1 Jul 2005 13:55:12 +0000 Subject: [PATCH] Some steps toward compilation under MinGW. Note that there are still linking troubles for the examples. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@655 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/ChangeLog | 3 +++ freeglut/freeglut/configure.ac | 20 +++++++++++++++++--- freeglut/freeglut/src/Makefile.am | 6 +++--- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/freeglut/freeglut/ChangeLog b/freeglut/freeglut/ChangeLog index 7b630b1..b3c9570 100644 --- a/freeglut/freeglut/ChangeLog +++ b/freeglut/freeglut/ChangeLog @@ -1081,3 +1081,6 @@ supply one in this case. Note that this should better be handled via autoconf than via cpp. (279) Silenced a signed/unsigned mismatched via a cast. + +(280) Some steps toward compilation under MinGW. Note that there are still +linking troubles for the examples. diff --git a/freeglut/freeglut/configure.ac b/freeglut/freeglut/configure.ac index d652cbe..e69114b 100644 --- a/freeglut/freeglut/configure.ac +++ b/freeglut/freeglut/configure.ac @@ -19,10 +19,24 @@ AC_SUBST([LIBTOOL_DEPS]) # Checks for libraries. AC_PATH_XTRA -AC_CHECK_LIB([Xxf86vm], [XF86VidModeSwitchToMode], - [LIBXXF86VM=-lXxf86vm], [LIBXXF86VM=], - [$X_LIBS -lXext -lX11]) + +if test x"$no_x" = xyes; then + GL_LIBS="-lopengl32 -lglu32 -lgdi32" + LIBXXF86VM= + VERSION_INFO= + EXPORT_FLAGS="-DFREEGLUT_EXPORTS" +else + GL_LIBS="-lGL -lGLU -lXext -lX11" + AC_CHECK_LIB([Xxf86vm], [XF86VidModeSwitchToMode], + [LIBXXF86VM=-lXxf86vm], [LIBXXF86VM=], + [$X_LIBS -lXext -lX11]) + VERSION_INFO="-version-info 11:0:8" + EXPORT_FLAGS= +fi +AC_SUBST([GL_LIBS]) AC_SUBST([LIBXXF86VM]) +AC_SUBST([VERSION_INFO]) +AC_SUBST([EXPORT_FLAGS]) # Checks for header files. AC_HEADER_STDC diff --git a/freeglut/freeglut/src/Makefile.am b/freeglut/freeglut/src/Makefile.am index 93195de..83dc437 100644 --- a/freeglut/freeglut/src/Makefile.am +++ b/freeglut/freeglut/src/Makefile.am @@ -42,9 +42,9 @@ lib@LIBRARY@_la_SOURCES = freeglut_callbacks.c \ # # Additional linker flags # -lib@LIBRARY@_la_LIBADD = $(LIBM) $(X_LIBS) -lGL -lGLU -lXext -lX11 $(LIBXXF86VM) -lib@LIBRARY@_la_LDFLAGS = -version-info 11:0:8 -lib@LIBRARY@_la_CFLAGS = $(X_CFLAGS) +lib@LIBRARY@_la_LIBADD = $(LIBM) $(X_LIBS) $(GL_LIBS) $(LIBXXF86VM) +lib@LIBRARY@_la_LDFLAGS = $(VERSION_INFO) +lib@LIBRARY@_la_CFLAGS = $(X_CFLAGS) $(EXPORT_FLAGS) INCLUDES = -I$(top_srcdir)/include