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 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
22 # Checks for libraries.
24 # Checks for header files.
26 # Checks for typedefs, structures, and compiler characteristics.
28 # Checks for library functions.
32 AC_ARG_ENABLE([debug],
33 [AS_HELP_STRING([--enable-debug],
34 [use debug compiler flags and macros @<:@default=disabled@:>@])],
35 [enable_debug="$enableval"],
38 if test "x$enable_debug" = xyes; then
39 DEFINES="$DEFINES -DDEBUG"
40 if test "x$GCC" = xyes; then
41 # Remove any -g or -O flags from the command line
42 CFLAGS=[`echo $CFLAGS | sed 's/-g[^ \t]*[ \t]*//g;s/-O[^ \t]*[ \t]*//g'`]
43 CFLAGS="$CFLAGS -O0 -ggdb3 -fstack-protector -D_FORTIFY_SOURCE=2"
45 if test "x$GXX" = xyes; then
46 # Remove any -g flags from the command line
47 CXXFLAGS=[`echo $CXXFLAGS | sed 's/-g[^ \t]*[ \t]*//g;s/-O[^ \t]*[ \t]*//g'`]
48 CXXFLAGS="$CXXFLAGS -O0 -ggdb3 -fstack-protector -D_FORTIFY_SOURCE=2"
53 if test "x$GCC" = xyes ; then
54 WARN="-Wall -Wextra -Wunsafe-loop-optimizations -Wstack-protector -Wunreadchable-code"
59 if test "x$GXX" = xyes ; then
60 WARN="-Wall -Wextra -Wunsafe-loop-optimizations -Wstack-protector"
65 if test "x$GCC" = xyes ; then
66 CFLAGS="$CFLAGS -std=c89 -ansi -pedantic"
69 CFLAGS="$CFLAGS $WARN"
70 CXXFLAGS="$CXXFLAGS $WARN"