Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configure.ac 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ(2.61)
  4. AC_INIT(glsl, XXXXX, idr@freedesktop.org, glsl)
  5. AC_CONFIG_SRCDIR([Makefile.am])
  6. AM_CONFIG_HEADER([config.h])
  7. AM_INIT_AUTOMAKE
  8. AM_MAINTAINER_MODE
  9. # Checks for programs.
  10. AC_PROG_CXX
  11. AC_PROG_CC
  12. AC_PROG_MAKE_SET
  13. AC_PROG_YACC
  14. AC_PROG_LEX
  15. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  16. # Checks for libraries.
  17. # Checks for header files.
  18. # Checks for typedefs, structures, and compiler characteristics.
  19. # Checks for library functions.
  20. AC_HEADER_STDC
  21. AC_ARG_ENABLE([debug],
  22. [AS_HELP_STRING([--enable-debug],
  23. [use debug compiler flags and macros @<:@default=disabled@:>@])],
  24. [enable_debug="$enableval"],
  25. [enable_debug=no]
  26. )
  27. if test "x$enable_debug" = xyes; then
  28. DEFINES="$DEFINES -DDEBUG"
  29. if test "x$GCC" = xyes; then
  30. # Remove any -g or -O flags from the command line
  31. CFLAGS=[`echo $CFLAGS | sed 's/-g[^ \t]*[ \t]*//g;s/-O[^ \t]*[ \t]*//g'`]
  32. CFLAGS="$CFLAGS -O0 -ggdb3 -fstack-protector -D_FORTIFY_SOURCE=2"
  33. fi
  34. if test "x$GXX" = xyes; then
  35. # Remove any -g flags from the command line
  36. CXXFLAGS=[`echo $CXXFLAGS | sed 's/-g[^ \t]*[ \t]*//g;s/-O[^ \t]*[ \t]*//g'`]
  37. CXXFLAGS="$CXXFLAGS -O0 -ggdb3 -fstack-protector -D_FORTIFY_SOURCE=2"
  38. fi
  39. fi
  40. if test "x$GCC" = xyes ; then
  41. WARN="-Wall -Wextra -Wunsafe-loop-optimizations -Wstack-protector -Wunreadchable-code"
  42. else
  43. WARN=""
  44. fi
  45. if test "x$GXX" = xyes ; then
  46. WARN="-Wall -Wextra -Wunsafe-loop-optimizations -Wstack-protector"
  47. else
  48. WARN=""
  49. fi
  50. CFLAGS="$CFLAGS $WARN"
  51. CXXFLAGS="$CXXFLAGS $WARN"
  52. YFLAGS="-d -v"
  53. AC_OUTPUT([Makefile])