configure: Remove some dead code.
[mesa.git] / configure.ac
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
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])
9
10 AM_INIT_AUTOMAKE
11 LT_INIT
12
13 AM_MAINTAINER_MODE
14
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
21
22 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
23
24 # Checks for libraries.
25
26 # Checks for header files.
27
28 # Checks for typedefs, structures, and compiler characteristics.
29
30 # Checks for library functions.
31 AC_HEADER_STDC
32
33 PKG_CHECK_MODULES([talloc], [talloc >= 2.0])
34
35 AC_ARG_ENABLE([debug],
36 [AS_HELP_STRING([--enable-debug],
37 [use debug compiler flags and macros @<:@default=disabled@:>@])],
38 [enable_debug="$enableval"],
39 [enable_debug=no]
40 )
41 if test "x$enable_debug" = xyes; then
42 DEFINES="$DEFINES -DDEBUG"
43 if test "x$GCC" = xyes; then
44 # Remove any -g or -O flags from the command line
45 CFLAGS=[`echo $CFLAGS | sed 's/-g[^ \t]*[ \t]*//g;s/-O[^ \t]*[ \t]*//g'`]
46 CFLAGS="$CFLAGS -O0 -ggdb3 -fstack-protector -D_FORTIFY_SOURCE=2"
47 fi
48 if test "x$GXX" = xyes; then
49 # Remove any -g flags from the command line
50 CXXFLAGS=[`echo $CXXFLAGS | sed 's/-g[^ \t]*[ \t]*//g;s/-O[^ \t]*[ \t]*//g'`]
51 CXXFLAGS="$CXXFLAGS -O0 -ggdb3 -fstack-protector -D_FORTIFY_SOURCE=2"
52 fi
53 fi
54
55 if test "x$GXX" = xyes ; then
56 WARN="-Wall -Wextra -Wunsafe-loop-optimizations -Wstack-protector"
57 else
58 WARN=""
59 fi
60
61 CFLAGS="$CFLAGS $WARN"
62 CXXFLAGS="$CXXFLAGS $WARN"
63 YFLAGS="-d -v"
64
65 AC_OUTPUT([Makefile])