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])
8 AC_CONFIG_FILES([glcpp/Makefile])
15 # Checks for programs.
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.
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"],
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"
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"
59 if test "x$GXX" = xyes ; then
60 WARN="-Wall -Wextra -Wunsafe-loop-optimizations -Wstack-protector"
65 CFLAGS="$CFLAGS $WARN"
66 CXXFLAGS="$CXXFLAGS $WARN"