diff options
author | Ian Romanick <[email protected]> | 2010-02-25 17:17:23 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-02-25 17:17:23 -0800 |
commit | d59673c9de9f14e6aefcdb0b06751d935385c4aa (patch) | |
tree | 6b4540b0d65a3db3a281f42c366d1b9c0715caf8 /configure.ac | |
parent | e41a1cd4d534639272938210c5491077688ccd37 (diff) |
autoconf for the ...
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac new file mode 100644 index 00000000000..b97feb94407 --- /dev/null +++ b/configure.ac @@ -0,0 +1,71 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.61) +AC_INIT(glsl, XXXXX, [email protected], glsl) +AC_CONFIG_SRCDIR([Makefile.am]) +AM_CONFIG_HEADER([config.h]) + +AM_INIT_AUTOMAKE + +AM_MAINTAINER_MODE + +# Checks for programs. +AC_PROG_CXX +AC_PROG_CC +AC_PROG_MAKE_SET +AC_PROG_YACC +AC_PROG_LEX + +# Checks for libraries. + +# Checks for header files. + +# Checks for typedefs, structures, and compiler characteristics. + +# Checks for library functions. +AC_HEADER_STDC + + +AC_ARG_ENABLE([debug], + [AS_HELP_STRING([--enable-debug], + [use debug compiler flags and macros @<:@default=disabled@:>@])], + [enable_debug="$enableval"], + [enable_debug=no] +) +if test "x$enable_debug" = xyes; then + DEFINES="$DEFINES -DDEBUG" + if test "x$GCC" = xyes; then + # Remove any -g or -O flags from the command line + CFLAGS=[`echo $CFLAGS | sed 's/-g[^ \t]*[ \t]*//g;s/-O[^ \t]*[ \t]*//g'`] + CFLAGS="$CFLAGS -O0 -ggdb3 -fstack-protector -D_FORTIFY_SOURCE=2" + fi + if test "x$GXX" = xyes; then + # Remove any -g flags from the command line + CXXFLAGS=[`echo $CXXFLAGS | sed 's/-g[^ \t]*[ \t]*//g;s/-O[^ \t]*[ \t]*//g'`] + CXXFLAGS="$CXXFLAGS -O0 -ggdb3 -fstack-protector -D_FORTIFY_SOURCE=2" + fi +fi + + +if test "x$GCC" = xyes ; then + WARN="-Wall -Wextra -Wunsafe-loop-optimizations -Wstack-protector -Wunreadchable-code" +else + WARN="" +fi + +if test "x$GXX" = xyes ; then + WARN="-Wall -Wextra -Wunsafe-loop-optimizations -Wstack-protector" +else + WARN="" +fi + +if test "x$GCC" = xyes ; then + CFLAGS="$CFLAGS -std=c89 -ansi -pedantic" +fi + +CFLAGS="$CFLAGS $WARN" +CXXFLAGS="$CXXFLAGS $WARN" +YFLAGS="-d -v" + +AC_OUTPUT([Makefile]) |