configure.ac 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. m4_define([MAJOR_VERSION], 1)
  4. m4_define([MINOR_VERSION], 0)
  5. m4_define([MICRO_VERSION], 0)
  6. AC_PREREQ(2.59)
  7. AC_INIT([birq],
  8. [MAJOR_VERSION.MINOR_VERSION.MICRO_VERSION],
  9. [serj.kalichev at gmail dot com])
  10. AC_CONFIG_AUX_DIR(aux_scripts)
  11. AC_CONFIG_MACRO_DIR([m4])
  12. # Checks for programs.
  13. AC_PROG_CC
  14. AC_PROG_LIBTOOL
  15. AC_CONFIG_HEADERS([config.h])
  16. AM_INIT_AUTOMAKE(subdir-objects)
  17. AM_PROG_CC_C_O
  18. # needed to handle 64-bit architecture
  19. AC_CHECK_SIZEOF(int)
  20. AC_CHECK_SIZEOF(long)
  21. AC_CHECK_SIZEOF(size_t)
  22. ################################
  23. # Deal with debugging options
  24. ################################
  25. AC_ARG_ENABLE(debug,
  26. [AS_HELP_STRING([--enable-debug],
  27. [Turn on debugging including asserts [default=no]])],
  28. [],
  29. [enable_debug=no])
  30. AM_CONDITIONAL(DEBUG,test x$enable_debug = xyes)
  31. ################################
  32. # Check for getopt_long()
  33. ################################
  34. AC_CHECK_HEADERS(getopt.h, [],
  35. AC_MSG_WARN([getopt.h not found: only short parameters can be used on command line]))
  36. ################################
  37. # Check for locale.h
  38. ################################
  39. AC_CHECK_HEADERS(locale.h, [],
  40. AC_MSG_WARN([locale.h not found: the locales is not supported]))
  41. ################################
  42. # Check for chroot
  43. ################################
  44. AC_CHECK_FUNCS(chroot, [],
  45. AC_MSG_WARN([chroot() not found: the choot is not supported]))
  46. AC_CONFIG_FILES(Makefile)
  47. AC_OUTPUT