X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=configure.in;h=b770b55d969c3c1f052abd94bdf354a8cbe48b5f;hb=0c26580b96f8e2f431489049be61077bd24dd21d;hp=c53d2a7761524e67b45d7e3848e80c207f4da64d;hpb=0299b8ec2aafba355ef04cec2d1445e5ce8079d8;p=freeglut diff --git a/configure.in b/configure.in index c53d2a7..b770b55 100644 --- a/configure.in +++ b/configure.in @@ -1,14 +1,13 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.am) -AM_INIT_AUTOMAKE(freeglut,0.1) +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) @@ -16,10 +15,19 @@ AC_SUBST(LIBTOOL_DEPS) dnl Checks for libraries. AC_PATH_XTRA +AC_CHECK_LIB(Xxf86vm,XF86VidModeSwitchToMode, + LIBXXF86VM=-lXxf86vm,LIBXXF86VM=,$X_LIBS -lXext -lX11) +AC_SUBST(LIBXXF86VM) + dnl Checks for header files. AC_STDC_HEADERS 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,,,[#include ]) +CFLAGS="$save_CFLAGS" + dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for library functions. @@ -27,4 +35,41 @@ dnl Checks for library functions. AC_CHECK_LIBM AC_SUBST(LIBM) -AC_OUTPUT(Makefile freeglut-1.3/Makefile include/Makefile include/GL/Makefile genfonts/Makefile tests/Makefile ) +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/offscreen/Makefile \ + progs/demos/shapes/Makefile \ + src/Makefile \ + include/Makefile \ + include/GL/Makefile \ + )