Ammended a comment on fgCheckJoystickCallback().
[freeglut] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(Makefile.am)
3
4 AM_INIT_AUTOMAKE(freeglut,2.2.0)
5 AM_CONFIG_HEADER(config.h)
6
7 dnl Checks for programs.
8 AC_PROG_CC
9 AC_C_CONST
10 AC_EXEEXT
11 AC_LIBTOOL_DLOPEN
12 AM_PROG_LIBTOOL
13 AC_SUBST(LIBTOOL_DEPS)
14
15 dnl Checks for libraries.
16 AC_PATH_XTRA
17
18 AC_CHECK_LIB(Xxf86vm,XF86VidModeSwitchToMode,
19         LIBXXF86VM=-lXxf86vm,LIBXXF86VM=,$X_LIBS -lXext -lX11)
20 AC_SUBST(LIBXXF86VM)
21
22 dnl Checks for header files.
23 AC_STDC_HEADERS
24 AC_HAVE_HEADERS( GL/gl.h GL/glu.h GL/glx.h )
25
26 save_CFLAGS="$CFLAGS"
27 CFLAGS="$CFLAGS $X_CFLAGS"
28 AC_CHECK_HEADERS(X11/extensions/xf86vmode.h,,,[#include <X11/Xlib.h>])
29 CFLAGS="$save_CFLAGS"
30
31 dnl Checks for typedefs, structures, and compiler characteristics.
32
33 dnl Checks for library functions.
34
35 AC_CHECK_LIBM
36 AC_SUBST(LIBM)
37
38 dnl Build time configuration
39
40 AC_ARG_ENABLE(replace-glut,
41 [  --disable-replace-glut  Coexist with existing glut library])
42 if test "x$enable_replace_glut" != xno
43 then
44  LIBRARY=glut
45  HEADER=glut.h
46 else
47  LIBRARY=freeglut
48  HEADER=
49 fi
50 AC_SUBST(LIBRARY)
51 AC_SUBST(HEADER)
52
53 AC_ARG_ENABLE(warnings,
54 [  --enable-warnings       Enable gcc compiler warnings],
55 if test "x$GCC" == xyes
56 then
57  CFLAGS="$CFLAGS -Wall -Wno-parentheses -Werror"
58 fi)
59
60 AC_OUTPUT(\
61         Makefile \
62         doc/Makefile \
63         progs/Makefile \
64         progs/demos/Makefile \
65         progs/demos/CallbackMaker/Makefile \
66         progs/demos/Fractals/Makefile \
67         progs/demos/Fractals_random/Makefile \
68         progs/demos/Lorenz/Makefile \
69         progs/demos/One/Makefile \
70         progs/demos/shapes/Makefile \
71         src/Makefile \
72         include/Makefile \
73         include/GL/Makefile \
74         )