2
0

configure.ac 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. # Enable clang address sanitizer bit build
  36. AC_ARG_ENABLE(address_sanitizer,
  37. [AC_HELP_STRING([--enable-address-sanitizer],[build with address sanitizer])],
  38. [enable_address_sanitizer="$enable_address_sanitizer"],
  39. [enable_address_sanitizer="no"])
  40. if test "${enable_address_sanitizer}" = "yes"; then
  41. FREESWITCH_CFLAGS="$FREESWITCH_CFLAGS -fsanitize=address -fno-omit-frame-pointer -fstack-protector-strong"
  42. FREESWITCH_LDFLAGS="$FREESWITCH_LDFLAGS -fsanitize=address"
  43. fi
  44. AC_SUBST(SWITCH_VERSION_MAJOR, [$SWITCH_VERSION_MAJOR])
  45. AC_SUBST(SWITCH_VERSION_MINOR, [$SWITCH_VERSION_MINOR])
  46. AC_SUBST(SWITCH_VERSION_MICRO, [$SWITCH_VERSION_MICRO])
  47. AC_SUBST(FREESWITCH_CFLAGS)
  48. AC_SUBST(FREESWITCH_LDFLAGS)
  49. AC_SUBST(moddir)
  50. AC_SUBST(confdir)
  51. AC_CONFIG_FILES([Makefile])
  52. AC_OUTPUT