X-Git-Url: http://pileus.org/git/?p=grits;a=blobdiff_plain;f=configure.ac;h=17f52098d0578195ef1c0297c222fe7fcca3f358;hp=363d30f5ca48169eb6f4a911d617d99f8548c87c;hb=2e58603f1dbf1a6368b241cc0393c060a69856e3;hpb=78a6414db9d6b0d912685478ef22c67dc1aa1ba4 diff --git a/configure.ac b/configure.ac index 363d30f..17f5209 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ -m4_define([grits_release], [0.6]) -m4_define([grits_version], [2:0:0]) +m4_define([grits_release], [0.6.3]) +m4_define([grits_version], [3:0:1]) m4_define([grits_subdir], [grits2]) # Init and options @@ -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