#pragma message is only understood my MS compiler
[freeglut] / configure.in
index be9d6ce..e0b811f 100644 (file)
@@ -1,14 +1,13 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_INIT(Makefile.am)
 
-AM_INIT_AUTOMAKE(freeglut,2.0.0)
+AM_INIT_AUTOMAKE(freeglut,2.2.0)
 AM_CONFIG_HEADER(config.h)
 
 dnl Checks for programs.
 AC_PROG_CC
 AC_C_CONST
 AC_EXEEXT
-AC_PROG_RANLIB
 AC_LIBTOOL_DLOPEN
 AM_PROG_LIBTOOL
 AC_SUBST(LIBTOOL_DEPS)
@@ -26,7 +25,7 @@ AC_HAVE_HEADERS( GL/gl.h GL/glu.h GL/glx.h )
 
 save_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS $X_CFLAGS"
-AC_CHECK_HEADERS( X11/extensions/xf86vmode.h )
+AC_CHECK_HEADERS(X11/extensions/xf86vmode.h,,,[#include <X11/Xlib.h>])
 CFLAGS="$save_CFLAGS"
 
 dnl Checks for typedefs, structures, and compiler characteristics.
@@ -36,15 +35,39 @@ dnl Checks for library functions.
 AC_CHECK_LIBM
 AC_SUBST(LIBM)
 
+dnl Build time configuration
+
+AC_ARG_ENABLE(replace-glut,
+[  --disable-replace-glut  Coexist with existing glut library])
+if test "x$enable_replace_glut" != xno
+then
+ LIBRARY=glut
+ HEADER=glut.h
+else
+ LIBRARY=freeglut
+ HEADER=
+fi
+AC_SUBST(LIBRARY)
+AC_SUBST(HEADER)
+
+AC_ARG_ENABLE(warnings,
+[  --enable-warnings       Enable gcc compiler warnings],
+if test "x$GCC" == xyes
+then
+ CFLAGS="$CFLAGS -Wall -Wno-parentheses -Werror"
+fi)
+
 AC_OUTPUT(\
        Makefile \
        doc/Makefile \
        progs/Makefile \
        progs/demos/Makefile \
+       progs/demos/CallbackMaker/Makefile \
        progs/demos/Fractals/Makefile \
        progs/demos/Fractals_random/Makefile \
        progs/demos/Lorenz/Makefile \
        progs/demos/One/Makefile \
+       progs/demos/shapes/Makefile \
        src/Makefile \
        include/Makefile \
        include/GL/Makefile \