]> Pileus Git - grits/blobdiff - configure.ac
Version bump for 0.6.3
[grits] / configure.ac
index ad207452eb9c07c2cf5d3ae2b2e8e27bc46d7f69..17f52098d0578195ef1c0297c222fe7fcca3f358 100644 (file)
@@ -1,6 +1,6 @@
-m4_define([grits_release], [0.5.1])
-m4_define([grits_version], [1:1:1])
-m4_define([grits_subdir],  [grits0])
+m4_define([grits_release], [0.6.3])
+m4_define([grits_version], [3:0:1])
+m4_define([grits_subdir],  [grits2])
 
 # Init and options
 AC_INIT([grits], [grits_release], [andy753421@gmail.com])
@@ -15,6 +15,9 @@ GRITS_SUBDIR=grits_subdir
 AC_SUBST(LIB_VERSION)
 AC_SUBST(GRITS_SUBDIR)
 
+# Fix broken libtool
+lt_cv_sys_lib_dlsearch_path_spec="/lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64"
+
 # Check for required programs
 AC_PROG_CC
 AC_PROG_LIBTOOL
@@ -33,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