• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.61)
5AC_INIT(glsl, XXXXX, idr@freedesktop.org, glsl)
6AC_CONFIG_SRCDIR([Makefile.am])
7AM_CONFIG_HEADER([config.h])
8AC_CONFIG_FILES([glcpp/Makefile])
9
10AM_INIT_AUTOMAKE
11LT_INIT
12
13AM_MAINTAINER_MODE
14
15# Checks for programs.
16AC_PROG_CXX
17AC_PROG_CC
18AC_PROG_MAKE_SET
19AC_PROG_YACC
20AC_PROG_LEX
21
22m4_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.
31AC_HEADER_STDC
32
33AH_TOP([#ifndef GLSL_CONFIG_H
34#define GLSL_CONFIG_H])
35AH_BOTTOM([#endif /* GLSL_CONFIG_H */])
36
37PKG_CHECK_MODULES([talloc], [talloc >= 2.0])
38
39AC_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]
44)
45if 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
57fi
58
59if test "x$GXX" = xyes ; then
60	WARN="-Wall -Wextra -Wunsafe-loop-optimizations -Wstack-protector"
61else
62	WARN=""
63fi
64
65CFLAGS="$CFLAGS $WARN"
66CXXFLAGS="$CXXFLAGS $WARN"
67YFLAGS="-d -v"
68
69AC_OUTPUT([Makefile])
70