i965: Request that returns be lowered in shader main
[mesa/nouveau-pmpeg.git] / src / glsl / configure.ac
blob73ce67de3d19206aa4b0420b782ded648d29b055
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ(2.61)
5 AC_INIT(glsl, XXXXX, idr@freedesktop.org, glsl)
6 AC_CONFIG_SRCDIR([Makefile.am])
7 AM_CONFIG_HEADER([config.h])
8 AC_CONFIG_FILES([glcpp/Makefile])
10 AM_INIT_AUTOMAKE
11 LT_INIT
13 AM_MAINTAINER_MODE
15 # Checks for programs.
16 AC_PROG_CXX
17 AC_PROG_CC
18 AC_PROG_MAKE_SET
19 AC_PROG_YACC
20 AC_PROG_LEX
22 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
24 # Checks for libraries.
26 # Checks for header files.
28 # Checks for typedefs, structures, and compiler characteristics.
30 # Checks for library functions.
31 AC_HEADER_STDC
33 AH_TOP([#ifndef GLSL_CONFIG_H
34 #define GLSL_CONFIG_H])
35 AH_BOTTOM([#endif /* GLSL_CONFIG_H */])
37 PKG_CHECK_MODULES([talloc], [talloc >= 2.0])
39 AC_ARG_ENABLE([debug],
40     [AS_HELP_STRING([--enable-debug],
41         [use debug compiler flags and macros @<:@default=disabled@:>@])],
42     [enable_debug="$enableval"],
43     [enable_debug=no]
45 if test "x$enable_debug" = xyes; then
46     DEFINES="$DEFINES -DDEBUG"
47     if test "x$GCC" = xyes; then
48         # Remove any -g or -O flags from the command line
49         CFLAGS=[`echo $CFLAGS | sed 's/-g[^ \t]*[ \t]*//g;s/-O[^ \t]*[ \t]*//g'`]
50         CFLAGS="$CFLAGS -O0 -ggdb3 -fstack-protector -D_FORTIFY_SOURCE=2"
51     fi
52     if test "x$GXX" = xyes; then
53         # Remove any -g flags from the command line
54         CXXFLAGS=[`echo $CXXFLAGS | sed 's/-g[^ \t]*[ \t]*//g;s/-O[^ \t]*[ \t]*//g'`]
55         CXXFLAGS="$CXXFLAGS -O0 -ggdb3 -fstack-protector -D_FORTIFY_SOURCE=2"
56     fi
59 if test "x$GXX" = xyes ; then
60         WARN="-Wall -Wextra -Wunsafe-loop-optimizations -Wstack-protector"
61 else
62         WARN=""
65 CFLAGS="$CFLAGS $WARN"
66 CXXFLAGS="$CXXFLAGS $WARN"
67 YFLAGS="-d -v"
69 AC_OUTPUT([Makefile])