]> Pileus Git - grits/blobdiff - configure.ac
Version bump for 0.6.3
[grits] / configure.ac
index b9843ed06f00ceea0ff04a8a9beb4f393b69efbe..17f52098d0578195ef1c0297c222fe7fcca3f358 100644 (file)
@@ -1,5 +1,5 @@
-m4_define([grits_release], [0.6.1])
-m4_define([grits_version], [2:1:0])
+m4_define([grits_release], [0.6.3])
+m4_define([grits_version], [3:0:1])
 m4_define([grits_subdir],  [grits2])
 
 # Init and options
@@ -36,29 +36,33 @@ AC_CHECK_LIB(glut, glutSolidTeapot, GLUT_LIBS="-lglut")
 AM_CONDITIONAL(HAVE_GLUT, test "$GLUT_LIBS" != "")
 AC_SUBST(GLUT_LIBS)
 
-# Test for Windows vs. Unix
+# Test for windowing system
 case "${host}" in
-       *mingw32*) WIN32="yes" ;;
-       *cygwin*)  WIN32="yes" ;;
-       *)         WIN32="no"  ;;
+       *mingw32*) SYS="WIN" ;;
+       *cygwin*)  SYS="WIN" ;;
+       *apple*)   SYS="MAC" ;;
+       *)         SYS="X11" ;;
 esac
-if test "$WIN32" = yes; then
-       ac_default_prefix="/"
-fi
-AM_CONDITIONAL([WIN32],    test "$WIN32" = "yes")
-AM_CONDITIONAL([NOTWIN32], test "$WIN32" = "no")
+AM_CONDITIONAL([SYS_WIN], test "$SYS" = "WIN")
+AM_CONDITIONAL([SYS_MAC], test "$SYS" = "MAC")
+AM_CONDITIONAL([SYS_X11], test "$SYS" = "X11")
 
-# Configure GL flags
-if test "$WIN32" = yes; then
-       GL_CFLAGS=""
-       GL_LIBS="-lglu32 -lopengl32"
-else
-       GL_CFLAGS=""
-       GL_LIBS="-lGL -lGLU"
-fi
+# OpenGL flags
+GL_CFLAGS="-DSYS_$SYS"
+case "$SYS" in
+       "WIN") GL_LIBS="-lglu32 -lopengl32" ;;
+       "MAC") GL_LIBS="-framework OpenGL" ;;
+       "X11") GL_LIBS="-lGL -lGLU" ;;
+esac
 AC_SUBST([GL_CFLAGS])
 AC_SUBST([GL_LIBS])
 
+# Check for relative build
+AC_ARG_ENABLE(relative, [AS_HELP_STRING([--enable-relative],
+       [enable runtime search paths @<:@default=no@:>@])],
+       [DOTS=".."; ac_default_prefix="/"])
+AC_SUBST([DOTS])
+
 # Output 
 AC_CONFIG_FILES([
        Makefile