configure.ac 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. dnl
  2. dnl Autoconf configuration file for UniMRCP.
  3. dnl
  4. dnl Use ./bootstrap to produce a configure script.
  5. dnl
  6. AC_PREREQ(2.59)
  7. AC_INIT([unimrcp],[1.2.0])
  8. AC_CONFIG_AUX_DIR([build])
  9. AC_CONFIG_MACRO_DIR([build/acmacros])
  10. dnl Set ac_macro_dir variable manually for autoconf 2.61 and above.
  11. ac_macro_dir="build/acmacros"
  12. AC_SUBST(ac_aux_dir)
  13. AC_SUBST(ac_macro_dir)
  14. dnl Include m4 macros for libtool 2.
  15. sinclude(build/acmacros/libtool.m4)
  16. sinclude(build/acmacros/ltoptions.m4)
  17. sinclude(build/acmacros/ltsugar.m4)
  18. sinclude(build/acmacros/ltversion.m4)
  19. sinclude(build/acmacros/lt~obsolete.m4)
  20. AC_PREFIX_DEFAULT(/usr/local/unimrcp)
  21. dnl Define the directory layout.
  22. APR_ENABLE_LAYOUT(classic, [plugindir logdir vardir])
  23. AC_SUBST(plugindir)
  24. AC_SUBST(logdir)
  25. AC_SUBST(vardir)
  26. dnl Reparse the configure arguments.
  27. APR_PARSE_ARGUMENTS
  28. dnl Generate ./config.nice to reuse ./configure command-line.
  29. APR_CONFIG_NICE(config.nice)
  30. AM_INIT_AUTOMAKE([no-define nostdinc foreign subdir-objects])
  31. dnl Enable silent build rules available since automake 1.11.
  32. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  33. dnl Set default language.
  34. AC_LANG_C
  35. AC_PROG_CC
  36. AC_PROG_CXX
  37. AM_PROG_CC_C_O
  38. AC_PROG_INSTALL
  39. dnl Skip detection of Fortran.
  40. m4_undefine([AC_PROG_F77])
  41. m4_defun([AC_PROG_F77],[])
  42. AC_PROG_LIBTOOL
  43. dnl Do not use autoconf generated compiler DEFS.
  44. rm confdefs.h
  45. touch confdefs.h
  46. dnl Check for C compiler vendor.
  47. AX_COMPILER_VENDOR
  48. dnl Search for pkg-config.
  49. AC_PATH_PROG(PKG_CONFIG, pkg-config)
  50. dnl Get version information.
  51. get_version="$srcdir/build/get-version.sh"
  52. version_hdr="$srcdir/build/uni_version.h"
  53. plugin_version_hdr="$srcdir/libs/mrcp-engine/include/mrcp_engine_plugin.h"
  54. UNI_DOTTED_VERSION="`$get_version all $version_hdr UNI`"
  55. UNI_LT_VERSION="-version-info `$get_version libtool $version_hdr UNI`"
  56. PLUGIN_LT_VERSION="-version-info `$get_version libtool $plugin_version_hdr PLUGIN`"
  57. AC_SUBST(UNI_DOTTED_VERSION)
  58. AC_SUBST(UNI_LT_VERSION)
  59. AC_SUBST(PLUGIN_LT_VERSION)
  60. echo "UniMRCP Version: ${UNI_DOTTED_VERSION}"
  61. dnl Check for the APR and APR-util libraries.
  62. UNIMRCP_CHECK_APR
  63. dnl Check for the Sofia-SIP library.
  64. UNIMRCP_CHECK_SOFIA
  65. dnl Enable inter-library dependencies.
  66. AC_ARG_ENABLE(interlib-deps,
  67. [AC_HELP_STRING([--disable-interlib-deps ],[disable inter-library dependencies (might break builds)])],
  68. [enable_interlib_deps="$enableval"],
  69. [enable_interlib_deps="yes"])
  70. AC_MSG_NOTICE([enable inter-library dependencies: $enable_interlib_deps])
  71. if test "${enable_interlib_deps}" == "yes"; then
  72. link_all_deplibs=yes
  73. link_all_deplibs_CXX=yes
  74. else
  75. link_all_deplibs=no
  76. link_all_deplibs_CXX=no
  77. fi
  78. dnl Enable maintainer mode.
  79. AC_ARG_ENABLE(maintainer-mode,
  80. [AC_HELP_STRING([--enable-maintainer-mode ],[turn on debugging and compile time warnings])],
  81. [enable_maintainer_mode="$enableval"],
  82. [enable_maintainer_mode="no"])
  83. AC_MSG_NOTICE([enable maintainer mode: $enable_maintainer_mode])
  84. if test "${enable_maintainer_mode}" != "no"; then
  85. APR_ADDTO(CFLAGS,-g)
  86. if test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then
  87. APR_ADDTO(CFLAGS,-Wall -Werror)
  88. fi
  89. fi
  90. dnl UniMRCP client library.
  91. AC_ARG_ENABLE(client-lib,
  92. [AC_HELP_STRING([--disable-client-lib ],[exclude unimrcpclient lib from build])],
  93. [enable_client_lib="$enableval"],
  94. [enable_client_lib="yes"])
  95. AM_CONDITIONAL([UNIMRCP_CLIENT_LIB],[test "${enable_client_lib}" = "yes"])
  96. dnl Sample UniMRCP client application in C.
  97. AC_ARG_ENABLE(client-app,
  98. [AC_HELP_STRING([--disable-client-app ],[exclude sample unimrcpclient app from build])],
  99. [enable_client_app="$enableval"],
  100. [enable_client_app="yes"])
  101. AM_CONDITIONAL([UNIMRCP_CLIENT_APP],[test "${enable_client_lib}" = "yes" && test "${enable_client_app}" = "yes"])
  102. dnl Sample UniMRCP client application in C++.
  103. AC_ARG_ENABLE(umc,
  104. [AC_HELP_STRING([--disable-umc ],[exclude sample unimrcpclient C++ app from build])],
  105. [enable_umc="$enableval"],
  106. [enable_umc="yes"])
  107. AM_CONDITIONAL([UMC],[test "${enable_client_lib}" = "yes" && test "${enable_umc}" = "yes"])
  108. dnl Miscellaneous ASR client library and application.
  109. AC_ARG_ENABLE(asr-client,
  110. [AC_HELP_STRING([--disable-asr-client ],[exclude misc ASR client lib and app from build])],
  111. [enable_asr_client="$enableval"],
  112. [enable_asr_client="yes"])
  113. AM_CONDITIONAL([ASR_CLIENT],[test "${enable_client_lib}" = "yes" && test "${enable_asr_client}" = "yes"])
  114. AM_CONDITIONAL([COMMON_CLIENT_DATA],[test "${enable_client_app}" = "yes" || test "${enable_umc}" = "yes" ||test "${enable_asr_client}" = "yes"])
  115. dnl UniMRCP server library.
  116. AC_ARG_ENABLE(server-lib,
  117. [AC_HELP_STRING([--disable-server-lib ],[exclude unimrcpserver lib from build])],
  118. [enable_server_lib="$enableval"],
  119. [enable_server_lib="yes"])
  120. AM_CONDITIONAL([UNIMRCP_SERVER_LIB],[test "${enable_server_lib}" = "yes"])
  121. dnl UniMRCP server application.
  122. AC_ARG_ENABLE(server-app,
  123. [AC_HELP_STRING([--disable-server-app ],[exclude unimrcpserver app from build])],
  124. [enable_server_app="$enableval"],
  125. [enable_server_app="yes"])
  126. AM_CONDITIONAL([UNIMRCP_SERVER_APP],[test "${enable_server_lib}" = "yes" && test "${enable_server_app}" = "yes"])
  127. dnl Demo synthesizer plugin.
  128. UNI_PLUGIN_ENABLED(demosynth)
  129. AM_CONDITIONAL([DEMOSYNTH_PLUGIN],[test "${enable_demosynth_plugin}" = "yes"])
  130. dnl Demo recognizer plugin.
  131. UNI_PLUGIN_ENABLED(demorecog)
  132. AM_CONDITIONAL([DEMORECOG_PLUGIN],[test "${enable_demorecog_plugin}" = "yes"])
  133. dnl Demo verifier plugin.
  134. UNI_PLUGIN_ENABLED(demoverifier)
  135. AM_CONDITIONAL([DEMOVERIFIER_PLUGIN],[test "${enable_demoverifier_plugin}" = "yes"])
  136. dnl Recorder plugin.
  137. UNI_PLUGIN_ENABLED(recorder)
  138. AM_CONDITIONAL([RECORDER_PLUGIN],[test "${enable_recorder_plugin}" = "yes"])
  139. dnl Enable test suites.
  140. AC_ARG_ENABLE(test-suites,
  141. [AC_HELP_STRING([--enable-test-suites ],[build test suites])],
  142. [enable_test_suites="$enableval"],
  143. [enable_test_suites="no"])
  144. AM_CONDITIONAL([TEST_SUITES],[test "${enable_test_suites}" != "no"])
  145. AM_CONDITIONAL(ISMAC, [test `uname -s` = Darwin])
  146. AC_CONFIG_FILES([
  147. Makefile
  148. libs/Makefile
  149. libs/apr-toolkit/Makefile
  150. libs/mpf/Makefile
  151. libs/mrcp/Makefile
  152. libs/mrcp-signaling/Makefile
  153. libs/mrcpv2-transport/Makefile
  154. libs/mrcp-engine/Makefile
  155. libs/mrcp-server/Makefile
  156. libs/mrcp-client/Makefile
  157. libs/uni-rtsp/Makefile
  158. modules/Makefile
  159. modules/mrcp-sofiasip/Makefile
  160. modules/mrcp-unirtsp/Makefile
  161. plugins/Makefile
  162. plugins/mrcp-recorder/Makefile
  163. plugins/demo-synth/Makefile
  164. plugins/demo-recog/Makefile
  165. plugins/demo-verifier/Makefile
  166. platforms/Makefile
  167. platforms/libunimrcp-server/Makefile
  168. platforms/libunimrcp-client/Makefile
  169. platforms/unimrcp-server/Makefile
  170. platforms/unimrcp-client/Makefile
  171. platforms/libasr-client/Makefile
  172. platforms/asr-client/Makefile
  173. platforms/umc/Makefile
  174. tests/Makefile
  175. tests/apttest/Makefile
  176. tests/mpftest/Makefile
  177. tests/mrcptest/Makefile
  178. tests/rtsptest/Makefile
  179. tests/strtablegen/Makefile
  180. build/Makefile
  181. build/pkgconfig/Makefile
  182. build/pkgconfig/unimrcpclient.pc
  183. build/pkgconfig/unimrcpserver.pc
  184. build/pkgconfig/unimrcpplugin.pc
  185. conf/Makefile
  186. data/Makefile
  187. docs/doxygen.conf
  188. ])
  189. AC_OUTPUT
  190. echo
  191. echo '****************************** REPORT ******************************'
  192. echo
  193. echo UniMRCP version............... : $UNI_DOTTED_VERSION
  194. echo
  195. echo APR version................... : $apr_version
  196. echo APR-util version.............. : $apu_version
  197. echo Sofia-SIP version............. : $sofia_version
  198. echo
  199. echo Compiler...................... : $CC
  200. echo Compiler flags................ : $CFLAGS
  201. echo Preprocessor definitions...... : $CPPFLAGS
  202. echo Linker flags.................. : $LDFLAGS
  203. echo
  204. echo UniMRCP client lib............ : $enable_client_lib
  205. echo Sample UniMRCP client app..... : $enable_client_app
  206. echo Sample UMC C++ client app..... : $enable_umc
  207. echo Misc ASR client lib and app... : $enable_asr_client
  208. echo
  209. echo UniMRCP server lib............ : $enable_server_lib
  210. echo UniMRCP server app............ : $enable_server_app
  211. echo
  212. echo Demo synthesizer plugin....... : $enable_demosynth_plugin
  213. echo Demo recognizer plugin........ : $enable_demorecog_plugin
  214. echo Demo verifier plugin.......... : $enable_demoverifier_plugin
  215. echo Recorder plugin............... : $enable_recorder_plugin
  216. echo
  217. echo Installation layout........... : $layout_name
  218. echo Installation directory........ : $prefix
  219. echo
  220. echo '********************************************************************'