configure.ac 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. AC_INIT([freeswitch_standalone_module], [1.7.0], bugs@freeswitch.org)
  2. AM_INIT_AUTOMAKE
  3. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  4. AM_PROG_CC_C_O
  5. AC_PROG_LIBTOOL
  6. # backwards compat with older pkg-config
  7. # - pull in AC_DEFUN from pkg.m4
  8. m4_ifndef([PKG_CHECK_VAR], [
  9. # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
  10. # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  11. # -------------------------------------------
  12. # Retrieves the value of the pkg-config variable for the given module.
  13. AC_DEFUN([PKG_CHECK_VAR],
  14. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  15. AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
  16. _PKG_CONFIG([$1], [variable="][$3]["], [$2])
  17. AS_VAR_COPY([$1], [pkg_cv_][$1])
  18. AS_VAR_IF([$1], [""], [$5], [$4])dnl
  19. ])# PKG_CHECK_VAR
  20. ])
  21. AC_DEFUN([PKG_CHECK_VER],
  22. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  23. AC_ARG_VAR([$1], [version for $2, overriding pkg-config])dnl
  24. _PKG_CONFIG([$1], [modversion], [$2])
  25. AS_VAR_COPY([$1], [pkg_cv_][$1])
  26. AS_VAR_IF([$1], [""], [$4], [$3])dnl
  27. ])# PKG_CHECK_VAR
  28. PKG_CHECK_MODULES([FREESWITCH],[freeswitch],[],[])
  29. PKG_CHECK_VAR([moddir],[freeswitch],[modulesdir])
  30. PKG_CHECK_VAR([confdir],[freeswitch],[confdir])
  31. PKG_CHECK_VER([version],[freeswitch])
  32. SWITCH_VERSION_MAJOR=`echo $version|cut -d. -f1`
  33. SWITCH_VERSION_MINOR=`echo $version|cut -d. -f2`
  34. SWITCH_VERSION_MICRO=`echo $version|cut -d. -f3`
  35. AC_SUBST(SWITCH_VERSION_MAJOR, [$SWITCH_VERSION_MAJOR])
  36. AC_SUBST(SWITCH_VERSION_MINOR, [$SWITCH_VERSION_MINOR])
  37. AC_SUBST(SWITCH_VERSION_MICRO, [$SWITCH_VERSION_MICRO])
  38. AC_SUBST(FREESWITCH_CFLAGS)
  39. AC_SUBST(FREESWITCH_LDFLAGS)
  40. AC_SUBST(moddir)
  41. AC_SUBST(confdir)
  42. AC_CONFIG_FILES([Makefile])
  43. AC_OUTPUT