configure.ac 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. AC_INIT([libcpuid CPU Identification library], [0.4.0], [libcpuid-devel@lists.sourceforge.net], [libcpuid])
  2. AC_CONFIG_SRCDIR([libcpuid/libcpuid.h])
  3. AC_CONFIG_HEADERS([config.h])
  4. AC_CONFIG_MACRO_DIR([m4])
  5. AM_INIT_AUTOMAKE([-Wall dist-bzip2 dist-zip foreign])
  6. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  7. dnl Versioning scheme shamelessly copied from libexif.
  8. dnl Short walkthrough. C means CURRENT, A mean AGE, R means REVISION
  9. dnl 1) When you make a change that breaks binary compatibility, increment CURRENT, reset REVISION to 0 and:
  10. dnl 1.1) If the change doesn't remove or change interfaces, increment AGE, otherwise reset to 0.
  11. dnl 2) When you make just a source change that doesn't break binary compatibility, increment REVISION.
  12. dnl When you make a change that adds features, increment AGE, and set REVISION to 0
  13. dnl C:A:R
  14. dnl 10:0:0 Version 0.1.0
  15. dnl 11:0:0 Version 0.1.1: four more fields to cpu_raw_data_t
  16. dnl 11:0:1 Version 0.1.2: added cpu_msr* functions
  17. dnl 11:0:2 Version 0.1.3: added cpu_clock_by_ic() function
  18. dnl 11:0:3 Version 0.1.4: just an identification change, to reflect the detection table upgrades
  19. dnl 12:1:0 Version 0.2.0: two more fields to cpu_id_t
  20. dnl 12:1:1 Version 0.2.1: more processors support
  21. dnl 12:1:2 Version 0.2.2: more processors support, *BSD/Solaris support, updates to MSR stuff
  22. dnl 13:0:0 Version 0.3.0: increment max Intel leaf 04 entries to 8
  23. dnl 14:0:0 Version 0.4.0: add one more field per cpu_raw_data_t and cpu_id_t
  24. LIBCPUID_CURRENT=14
  25. LIBCPUID_AGE=0
  26. LIBCPUID_REVISION=0
  27. AC_SUBST([LIBCPUID_AGE])
  28. AC_SUBST([LIBCPUID_REVISION])
  29. AC_SUBST([LIBCPUID_CURRENT])
  30. AC_SUBST([LIBCPUID_CURRENT_MIN],[`expr $LIBCPUID_CURRENT - $LIBCPUID_AGE`])
  31. LIBCPUID_VERSION_INFO="$LIBCPUID_CURRENT:$LIBCPUID_REVISION:$LIBCPUID_AGE"
  32. AC_SUBST([LIBCPUID_VERSION_INFO])
  33. AC_PROG_CC
  34. m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
  35. AC_C_CONST
  36. LT_INIT
  37. AM_CPPFLAGS="$CPPFLAGS"
  38. AC_CHECK_HEADERS([stdint.h])
  39. AC_CHECK_PROGS([DOXYGEN], [doxygen])
  40. AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
  41. AM_LDFLAGS="$LDFLAGS"
  42. if test "x$GCC" = "xyes"; then
  43. AM_CFLAGS="$AM_CFLAGS -ansi -pedantic-error"
  44. AM_CXXFLAGS="$AM_CXXFLAGS -ansi -pedantic-error"
  45. AM_CPPFLAGS="$AM_CPPFLAGS -g -Wall -Wmissing-declarations -Wmissing-prototypes"
  46. AM_LDFLAGS="$AM_LDFLAGS -g -Wall"
  47. fi
  48. AC_SUBST(AM_CPPFLAGS)
  49. AC_SUBST(AM_LDFLAGS)
  50. AC_CONFIG_FILES([
  51. Makefile
  52. libcpuid.pc
  53. libcpuid/Makefile
  54. cpuid_tool/Makefile
  55. tests/Makefile
  56. libcpuid/Doxyfile
  57. ])
  58. AC_OUTPUT