2 # Process this file with autoconf to produce a configure script.
5 AC_INIT(glsl, XXXXX, idr@freedesktop.org, glsl)
6 AC_CONFIG_SRCDIR([Makefile.am])
7 AM_CONFIG_HEADER([config.h])
13 # Checks for programs.
20 # Checks for libraries.
22 # Checks for header files.
24 # Checks for typedefs, structures, and compiler characteristics.
26 # Checks for library functions.
30 AC_ARG_ENABLE([debug],
31 [AS_HELP_STRING([--enable-debug],
32 [use debug compiler flags and macros @<:@default=disabled@:>@])],
33 [enable_debug="$enableval"],
36 if test "x$enable_debug" = xyes; then
37 DEFINES="$DEFINES -DDEBUG"
38 if test "x$GCC" = xyes; then
39 # Remove any -g or -O flags from the command line
40 CFLAGS=[`echo $CFLAGS | sed 's/-g[^ \t]*[ \t]*//g;s/-O[^ \t]*[ \t]*//g'`]
41 CFLAGS="$CFLAGS -O0 -ggdb3 -fstack-protector -D_FORTIFY_SOURCE=2"
43 if test "x$GXX" = xyes; then
44 # Remove any -g flags from the command line
45 CXXFLAGS=[`echo $CXXFLAGS | sed 's/-g[^ \t]*[ \t]*//g;s/-O[^ \t]*[ \t]*//g'`]
46 CXXFLAGS="$CXXFLAGS -O0 -ggdb3 -fstack-protector -D_FORTIFY_SOURCE=2"
51 if test "x$GCC" = xyes ; then
52 WARN="-Wall -Wextra -Wunsafe-loop-optimizations -Wstack-protector -Wunreadchable-code"
57 if test "x$GXX" = xyes ; then
58 WARN="-Wall -Wextra -Wunsafe-loop-optimizations -Wstack-protector"
63 if test "x$GCC" = xyes ; then
64 CFLAGS="$CFLAGS -std=c89 -ansi -pedantic"
67 CFLAGS="$CFLAGS $WARN"
68 CXXFLAGS="$CXXFLAGS $WARN"