configure.ac 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ([2.65])
  4. AC_INIT([question_authority], [0.1], [maker@tumbolandia.net])
  5. AM_INIT_AUTOMAKE
  6. AC_CONFIG_SRCDIR([src/qa.c])
  7. AC_CONFIG_HEADERS([config.h])
  8. # Checks for programs.
  9. AC_PROG_CC([clang gcc cc])
  10. AC_PROG_CC_C99
  11. AC_PROG_RANLIB
  12. # Checks for libraries.
  13. # Checks for header files.
  14. AC_CHECK_HEADERS([limits.h stdint.h stdlib.h string.h unistd.h])
  15. AC_CHECK_HEADERS([openssl/ssl.h])
  16. # Checks for typedefs, structures, and compiler characteristics.
  17. AC_TYPE_SIZE_T
  18. # Checks for library functions.
  19. AC_FUNC_ERROR_AT_LINE
  20. AC_FUNC_MALLOC
  21. #AC_CHECK_FUNCS([dup2 setlocale strdup])
  22. # Add compiler flags
  23. CFLAGS="$CFLAGS --std=c99 -I$(pwd)/src/include -Wall"
  24. # Adding package options
  25. AC_ARG_ENABLE(debug,
  26. AS_HELP_STRING([--enable-debug], [enable debugging, default: no]),
  27. CFLAGS+=" -DDEBUG -ggdb")
  28. AC_OUTPUT([Makefile
  29. src/Makefile src/questions/Makefile
  30. src/apps/Makefile
  31. src/tests/Makefile src/questions/tests/Makefile
  32. ])