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 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. dnl Process this file with autoconf to produce a configure script.
  2. AC_PREREQ(2.54)
  3. dnl remember to edit the .pc file name
  4. dnl and lqr/Makefile.am if you change these
  5. m4_define([library_base_name], [lqr])
  6. m4_define([api_version], [1])
  7. dnl Name of library
  8. m4_define([library_sname], [library_base_name-api_version])
  9. m4_define([library_name], [liblqr-api_version])
  10. dnl These three define the library version number
  11. m4_define([package_major_version], [0])
  12. m4_define([package_minor_version], [1])
  13. m4_define([package_micro_version], [0])
  14. m4_define([package_version],
  15. [package_major_version.package_minor_version.package_micro_version])
  16. m4_define([ltversion_current], [0])
  17. m4_define([ltversion_release], [0])
  18. m4_define([ltversion_age], [0])
  19. AC_INIT([library_name], [package_version])
  20. AC_DEFINE(LIBRARY_NAME, PACKAGE_NAME, [Library name])
  21. AC_DEFINE(PACKAGE_MAJOR_VERSION, package_major_version, [Package major version])
  22. AC_DEFINE(PACKAGE_MINOR_VERSION, package_minor_version, [Package minor version])
  23. AC_DEFINE(PACKAGE_MICRO_VERSION, package_micro_version, [Package micro version])
  24. AC_DEFINE(LTVERSION_CURRENT, ltversion_current, [Library current version])
  25. AC_DEFINE(LTVERSION_RELEASE, ltversion_release, [Library release])
  26. AC_DEFINE(LTVERSION_AGE, ltversion_age, [Library age])
  27. LIBRARY_BASE_NAME=library_base_name
  28. AC_SUBST(LIBRARY_BASE_NAME)
  29. API_VERSION=api_version
  30. AC_SUBST(API_VERSION)
  31. LIBRARY_NAME=library_name
  32. AC_SUBST(LIBRARY_NAME)
  33. LIBRARY_SNAME=library_sname
  34. AC_SUBST(LIBRARY_SNAME)
  35. PACKAGE_VERSION=package_major_version.package_minor_version.package_micro_version
  36. AC_SUBST(PACKAGE_VERSION)
  37. LTVERSION=ltversion_current:ltversion_release:ltversion_age
  38. AC_SUBST(LTVERSION)
  39. AC_CONFIG_SRCDIR([lqr/lqr_carver.c])
  40. AM_CONFIG_HEADER(config.h)
  41. AM_INIT_AUTOMAKE([-Wall -Werror])
  42. AC_ISC_POSIX
  43. AC_PROG_CC
  44. AM_PROG_CC_STDC
  45. AC_HEADER_STDC
  46. AC_DISABLE_STATIC
  47. AC_PROG_LIBTOOL
  48. ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
  49. AM_MAINTAINER_MODE
  50. dnl Use -Wall if we have gcc.
  51. changequote(,)dnl
  52. if test "x$GCC" = "xyes"; then
  53. case " $CFLAGS " in
  54. *[\ \ ]-Wall[\ \ ]*) ;;
  55. *) CFLAGS="$CFLAGS -Wall" ;;
  56. esac
  57. fi
  58. changequote([,])dnl
  59. GLIB_REQUIRED_VERSION=2.0.0
  60. PKG_CHECK_MODULES(GLIB,
  61. glib-2.0 >= $GLIB_REQUIRED_VERSION)
  62. GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0`
  63. AC_SUBST(GLIB_CFLAGS)
  64. GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0`
  65. AC_SUBST(GLIB_LIBS)
  66. GLIB_DIR=`$PKG_CONFIG --variable=libdir glib-2.0`
  67. AC_SUBST(GLIB_DIR)
  68. AC_CHECK_FUNCS(bind_textdomain_codeset)
  69. DATADIR="${datadir}/library_name"
  70. AC_SUBST(DATADIR)
  71. AC_CONFIG_FILES([
  72. Makefile
  73. lqr/Makefile
  74. lqr-1.pc
  75. ])
  76. AC_OUTPUT