configure.ac 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. #AC_PREREQ([2.65])
  4. AC_INIT([libccd], [1.0], [[email protected]])
  5. AC_CONFIG_SRCDIR([src/ccd.c])
  6. AC_CONFIG_HEADERS([src/config.h])
  7. AM_INIT_AUTOMAKE(foreign)
  8. # Checks for programs.
  9. AC_PROG_CXX
  10. AC_PROG_CC
  11. AC_PROG_INSTALL
  12. AC_DISABLE_SHARED
  13. LT_INIT
  14. # Checks for libraries.
  15. AC_CHECK_LIB([m], [main])
  16. # FIXME: Replace `main' with a function in `-lrt':
  17. AC_CHECK_LIB([rt], [main])
  18. # Checks for header files.
  19. AC_CHECK_HEADERS([float.h stdlib.h string.h unistd.h])
  20. # Checks for typedefs, structures, and compiler characteristics.
  21. AC_TYPE_SIZE_T
  22. # Checks for library functions.
  23. AC_FUNC_FORK
  24. AC_CHECK_FUNCS([clock_gettime])
  25. use_double=no
  26. AC_ARG_ENABLE(double-precision,
  27. AS_HELP_STRING([--enable-double-precision],
  28. [enable double precision computations instead of single precision]),
  29. [use_double=$enableval])
  30. if test x$use_double = xno
  31. then
  32. CCD_PRECISION=CCD_SINGLE
  33. else
  34. CCD_PRECISION=CCD_DOUBLE
  35. fi
  36. AC_SUBST(CCD_PRECISION)
  37. AC_CONFIG_FILES([Makefile
  38. src/Makefile
  39. src/ccd/precision.h
  40. src/testsuites/Makefile
  41. src/testsuites/cu/Makefile])
  42. AC_OUTPUT