configure.ac 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. # FLAC - Free Lossless Audio Codec
  2. # Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2008,2009 Josh Coalson
  3. #
  4. # This file is part the FLAC project. FLAC is comprised of several
  5. # components distributed under different licenses. The codec libraries
  6. # are distributed under Xiph.Org's BSD-like license (see the file
  7. # COPYING.Xiph in this distribution). All other programs, libraries, and
  8. # plugins are distributed under the GPL (see COPYING.GPL). The documentation
  9. # is distributed under the Gnu FDL (see COPYING.FDL). Each file in the
  10. # FLAC distribution contains at the top the terms under which it may be
  11. # distributed.
  12. #
  13. # Since this particular file is relevant to all components of FLAC,
  14. # it may be distributed under the Xiph.Org license, which is the least
  15. # restrictive of those mentioned above. See the file COPYING.Xiph in this
  16. # distribution.
  17. # NOTE that for many of the AM_CONDITIONALs we use the prefix FLaC__
  18. # instead of FLAC__ since autoconf triggers off 'AC_' in strings
  19. AC_PREREQ(2.60)
  20. AC_INIT([flac], [1.3.2], [[email protected]], [flac], [https://www.xiph.org/flac/])
  21. AC_CONFIG_HEADERS([config.h])
  22. AC_CONFIG_SRCDIR([src/flac/main.c])
  23. AC_CONFIG_MACRO_DIR([m4])
  24. AM_INIT_AUTOMAKE([foreign 1.10 -Wall tar-pax no-dist-gzip dist-xz subdir-objects])
  25. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  26. user_cflags=$CFLAGS
  27. #Prefer whatever the current ISO standard is.
  28. AC_PROG_CC_STDC
  29. AC_USE_SYSTEM_EXTENSIONS
  30. m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
  31. LT_INIT([win32-dll disable-static pic-only])
  32. AM_PROG_AS
  33. AC_PROG_CXX
  34. XIPH_C_COMPILER_IS_CLANG
  35. XIPH_GCC_REALLY_IS_GCC
  36. AC_PROG_MAKE_SET
  37. AC_PROG_MKDIR_P
  38. AC_SYS_LARGEFILE
  39. AC_FUNC_FSEEKO
  40. AC_CHECK_SIZEOF(off_t,1) # Fake default value.
  41. AC_CHECK_SIZEOF([void*])
  42. AC_SEARCH_LIBS([lround],[m], [AC_DEFINE(HAVE_LROUND,1,lround support)])
  43. AC_LANG_PUSH([C++])
  44. # c++ flavor first
  45. AC_C_VARARRAYS
  46. if test $ac_cv_c_vararrays = yes; then
  47. AC_DEFINE([HAVE_CXX_VARARRAYS], 1, [Define to 1 if C++ supports variable-length arrays.])
  48. fi
  49. AC_LANG_POP([C++])
  50. # c flavor
  51. AC_HEADER_STDC
  52. AM_PROG_CC_C_O
  53. AC_C_INLINE
  54. AC_C_VARARRAYS
  55. AC_C_TYPEOF
  56. AC_CHECK_HEADERS([stdint.h inttypes.h byteswap.h sys/param.h sys/ioctl.h termios.h x86intrin.h cpuid.h])
  57. XIPH_C_BSWAP32
  58. XIPH_C_BSWAP16
  59. ac_cv_c_big_endian=0
  60. ac_cv_c_little_endian=0
  61. AC_C_BIGENDIAN([ac_cv_c_big_endian=1], [ac_cv_c_little_endian=1], [
  62. AC_MSG_WARN([[*****************************************************************]])
  63. AC_MSG_WARN([[*** Not able to determine endian-ness of target processor. ]])
  64. AC_MSG_WARN([[*** The constants CPU_IS_BIG_ENDIAN and CPU_IS_LITTLE_ENDIAN in ]])
  65. AC_MSG_WARN([[*** config.h may need to be hand editied. ]])
  66. AC_MSG_WARN([[*****************************************************************]])
  67. ])
  68. AC_DEFINE_UNQUOTED(CPU_IS_BIG_ENDIAN, ${ac_cv_c_big_endian},
  69. [Target processor is big endian.])
  70. AC_DEFINE_UNQUOTED(CPU_IS_LITTLE_ENDIAN, ${ac_cv_c_little_endian},
  71. [Target processor is little endian.])
  72. AC_DEFINE_UNQUOTED(WORDS_BIGENDIAN, ${ac_cv_c_big_endian},
  73. [Target processor is big endian.])
  74. AC_ARG_ENABLE(asm-optimizations, AC_HELP_STRING([--disable-asm-optimizations], [Don't use any assembly optimization routines]), asm_opt=no, asm_opt=yes)
  75. dnl ' Terminate the damn single quote
  76. AM_CONDITIONAL(FLaC__NO_ASM, test "x$asm_opt" = xno)
  77. if test "x$asm_opt" = xno ; then
  78. AC_DEFINE(FLAC__NO_ASM)
  79. AH_TEMPLATE(FLAC__NO_ASM, [define to disable use of assembly code])
  80. fi
  81. # For the XMMS plugin.
  82. AC_CHECK_TYPES(socklen_t, [], [])
  83. dnl check for getopt in standard library
  84. dnl AC_CHECK_FUNCS(getopt_long , , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"] )
  85. AC_CHECK_FUNCS(getopt_long, [], [])
  86. AC_CHECK_SIZEOF(void*,1)
  87. asm_optimisation=no
  88. case "$host_cpu" in
  89. amd64|x86_64)
  90. case "$host" in
  91. *gnux32)
  92. # x32 user space and 64 bit kernel.
  93. cpu_x86_64=true
  94. AC_DEFINE(FLAC__CPU_X86_64)
  95. AH_TEMPLATE(FLAC__CPU_X86_64, [define if building for x86_64])
  96. asm_optimisation=$asm_opt
  97. ;;
  98. *)
  99. if test $ac_cv_sizeof_voidp = 4 ; then
  100. # This must be a 32 bit user space running on 64 bit kernel so treat
  101. # this as ia32.
  102. cpu_ia32=true
  103. AC_DEFINE(FLAC__CPU_IA32)
  104. AH_TEMPLATE(FLAC__CPU_IA32, [define if building for ia32/i386])
  105. else
  106. # x86_64 user space and kernel.
  107. cpu_x86_64=true
  108. AC_DEFINE(FLAC__CPU_X86_64)
  109. AH_TEMPLATE(FLAC__CPU_X86_64, [define if building for x86_64])
  110. fi
  111. asm_optimisation=$asm_opt
  112. ;;
  113. esac
  114. ;;
  115. i*86)
  116. cpu_ia32=true
  117. AC_DEFINE(FLAC__CPU_IA32)
  118. AH_TEMPLATE(FLAC__CPU_IA32, [define if building for ia32/i386])
  119. asm_optimisation=$asm_opt
  120. ;;
  121. powerpc|powerpc64)
  122. cpu_ppc=true
  123. AC_DEFINE(FLAC__CPU_PPC)
  124. AH_TEMPLATE(FLAC__CPU_PPC, [define if building for PowerPC])
  125. asm_optimisation=$asm_opt
  126. ;;
  127. sparc)
  128. cpu_sparc=true
  129. AC_DEFINE(FLAC__CPU_SPARC)
  130. AH_TEMPLATE(FLAC__CPU_SPARC, [define if building for SPARC])
  131. asm_optimisation=$asm_opt
  132. ;;
  133. esac
  134. AM_CONDITIONAL(FLAC__CPU_X86_64, test "x$cpu_x86_64" = xtrue)
  135. AM_CONDITIONAL(FLaC__CPU_IA32, test "x$cpu_ia32" = xtrue)
  136. AM_CONDITIONAL(FLaC__CPU_PPC, test "x$cpu_ppc" = xtrue)
  137. AM_CONDITIONAL(FLaC__CPU_SPARC, test "x$cpu_sparc" = xtrue)
  138. if test "x$ac_cv_header_x86intrin_h" = xyes; then
  139. AC_DEFINE([FLAC__HAS_X86INTRIN], 1, [Set to 1 if <x86intrin.h> is available.])
  140. else
  141. AC_DEFINE([FLAC__HAS_X86INTRIN], 0)
  142. fi
  143. case "$host" in
  144. i386-*-openbsd3.[[0-3]]) OBJ_FORMAT=aoutb ;;
  145. *-*-cygwin|*mingw*) OBJ_FORMAT=win32 ;;
  146. *-*-darwin*) OBJ_FORMAT=macho ;;
  147. *emx*) OBJ_FORMAT=aout ;;
  148. *) OBJ_FORMAT=elf ;;
  149. esac
  150. AC_SUBST(OBJ_FORMAT)
  151. case "$host" in
  152. *-gnuspe)
  153. abi_spe=true
  154. AC_DEFINE(FLAC__CPU_PPC_SPE)
  155. AH_TEMPLATE(FLAC__CPU_PPC_SPE, [define if building for PowerPC with SPE ABI])
  156. ;;
  157. esac
  158. AM_CONDITIONAL(FLaC__CPU_PPC_SPE, test "x$abi_spe" = xtrue)
  159. os_is_windows=no
  160. case "$host" in
  161. *-*-cygwin|*mingw*)
  162. CPPFLAGS="-D__MSVCRT_VERSION__=0x0601 $CPPFLAGS"
  163. os_is_windows=yes
  164. ;;
  165. esac
  166. AM_CONDITIONAL(OS_IS_WINDOWS, test "x$os_is_windows" = xyes)
  167. case "$host" in
  168. *-pc-linux-gnu)
  169. sys_linux=true
  170. AC_DEFINE(FLAC__SYS_LINUX)
  171. AH_TEMPLATE(FLAC__SYS_LINUX, [define if building for Linux])
  172. ;;
  173. *-*-darwin*)
  174. sys_darwin=true
  175. AC_DEFINE(FLAC__SYS_DARWIN)
  176. AH_TEMPLATE(FLAC__SYS_DARWIN, [define if building for Darwin / MacOS X])
  177. ;;
  178. esac
  179. AM_CONDITIONAL(FLaC__SYS_DARWIN, test "x$sys_darwin" = xtrue)
  180. AM_CONDITIONAL(FLaC__SYS_LINUX, test "x$sys_linux" = xtrue)
  181. if test "x$cpu_ia32" = xtrue || test "x$cpu_x86_64" = xtrue ; then
  182. AC_DEFINE(FLAC__ALIGN_MALLOC_DATA)
  183. AH_TEMPLATE(FLAC__ALIGN_MALLOC_DATA, [define to align allocated memory on 32-byte boundaries])
  184. fi
  185. AC_ARG_ENABLE(debug,
  186. AC_HELP_STRING([--enable-debug], [Turn on debugging]),
  187. [case "${enableval}" in
  188. yes) debug=true ;;
  189. no) debug=false ;;
  190. *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
  191. esac],[debug=false])
  192. AM_CONDITIONAL(DEBUG, test "x$debug" = xtrue)
  193. AC_ARG_ENABLE(sse,
  194. AC_HELP_STRING([--disable-sse], [Disable passing of -msse2 to the compiler]),
  195. [case "${enableval}" in
  196. yes) sse_os=yes ;;
  197. no) sse_os=no ;;
  198. *) AC_MSG_ERROR(bad value ${enableval} for --enable-sse) ;;
  199. esac],[sse_os=yes])
  200. AC_ARG_ENABLE(altivec,
  201. AC_HELP_STRING([--disable-altivec], [Disable Altivec optimizations]),
  202. [case "${enableval}" in
  203. yes) use_altivec=true ;;
  204. no) use_altivec=false ;;
  205. *) AC_MSG_ERROR(bad value ${enableval} for --enable-altivec) ;;
  206. esac],[use_altivec=true])
  207. AM_CONDITIONAL(FLaC__USE_ALTIVEC, test "x$use_altivec" = xtrue)
  208. if test "x$use_altivec" = xtrue ; then
  209. AC_DEFINE(FLAC__USE_ALTIVEC)
  210. AH_TEMPLATE(FLAC__USE_ALTIVEC, [define to enable use of Altivec instructions])
  211. fi
  212. AC_ARG_ENABLE(avx,
  213. AC_HELP_STRING([--disable-avx], [Disable AVX, AVX2 optimizations]),
  214. [case "${enableval}" in
  215. yes) use_avx=true ;;
  216. no) use_avx=false ;;
  217. *) AC_MSG_ERROR(bad value ${enableval} for --enable-avx) ;;
  218. esac],[use_avx=true])
  219. AM_CONDITIONAL(FLaC__USE_AVX, test "x$use_avx" = xtrue)
  220. if test "x$use_avx" = xtrue ; then
  221. AC_DEFINE(FLAC__USE_AVX)
  222. AH_TEMPLATE(FLAC__USE_AVX, [define to enable use of AVX instructions])
  223. fi
  224. AC_ARG_ENABLE(thorough-tests,
  225. AC_HELP_STRING([--disable-thorough-tests], [Disable thorough (long) testing, do only basic tests]),
  226. [case "${enableval}" in
  227. yes) thorough_tests=true ;;
  228. no) thorough_tests=false ;;
  229. *) AC_MSG_ERROR(bad value ${enableval} for --enable-thorough-tests) ;;
  230. esac],[thorough_tests=true])
  231. AC_ARG_ENABLE(exhaustive-tests,
  232. AC_HELP_STRING([--enable-exhaustive-tests], [Enable exhaustive testing (VERY long)]),
  233. [case "${enableval}" in
  234. yes) exhaustive_tests=true ;;
  235. no) exhaustive_tests=false ;;
  236. *) AC_MSG_ERROR(bad value ${enableval} for --enable-exhaustive-tests) ;;
  237. esac],[exhaustive_tests=false])
  238. if test "x$thorough_tests" = xfalse ; then
  239. FLAC__TEST_LEVEL=0
  240. elif test "x$exhaustive_tests" = xfalse ; then
  241. FLAC__TEST_LEVEL=1
  242. else
  243. FLAC__TEST_LEVEL=2
  244. fi
  245. AC_SUBST(FLAC__TEST_LEVEL)
  246. AC_ARG_ENABLE(werror,
  247. AC_HELP_STRING([--enable-werror], [Enable -Werror in all Makefiles]))
  248. AC_ARG_ENABLE(stack-smash-protection,
  249. AC_HELP_STRING([--enable-stack-smash-protection], [Enable GNU GCC stack smash protection]))
  250. AC_ARG_ENABLE(64-bit-words,
  251. AC_HELP_STRING([--enable-64-bit-words], [Set FLAC__BYTES_PER_WORD to 8 (4 is the default)]))
  252. if test "x$enable_64_bit_words" = xyes ; then
  253. AC_DEFINE_UNQUOTED([ENABLE_64_BIT_WORDS],1,[Set FLAC__BYTES_PER_WORD to 8 (4 is the default)])
  254. else
  255. AC_DEFINE_UNQUOTED([ENABLE_64_BIT_WORDS],0)
  256. fi
  257. AC_SUBST(ENABLE_64_BIT_WORDS)
  258. AC_ARG_ENABLE(valgrind-testing,
  259. AC_HELP_STRING([--enable-valgrind-testing], [Run all tests inside Valgrind]),
  260. [case "${enableval}" in
  261. yes) FLAC__TEST_WITH_VALGRIND=yes ;;
  262. no) FLAC__TEST_WITH_VALGRIND=no ;;
  263. *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind-testing) ;;
  264. esac],[FLAC__TEST_WITH_VALGRIND=no])
  265. AC_SUBST(FLAC__TEST_WITH_VALGRIND)
  266. AC_ARG_ENABLE(doxygen-docs,
  267. AC_HELP_STRING([--disable-doxygen-docs], [Disable API documentation building via Doxygen]),
  268. [case "${enableval}" in
  269. yes) enable_doxygen_docs=true ;;
  270. no) enable_doxygen_docs=false ;;
  271. *) AC_MSG_ERROR(bad value ${enableval} for --enable-doxygen-docs) ;;
  272. esac],[enable_doxygen_docs=true])
  273. if test "x$enable_doxygen_docs" != xfalse ; then
  274. AC_CHECK_PROGS(DOXYGEN, doxygen)
  275. fi
  276. AM_CONDITIONAL(FLaC__HAS_DOXYGEN, test -n "$DOXYGEN")
  277. AC_ARG_ENABLE(local-xmms-plugin,
  278. AC_HELP_STRING([--enable-local-xmms-plugin], [Install XMMS plugin to ~/.xmms/Plugins instead of system location]),
  279. [case "${enableval}" in
  280. yes) install_xmms_plugin_locally=true ;;
  281. no) install_xmms_plugin_locally=false ;;
  282. *) AC_MSG_ERROR(bad value ${enableval} for --enable-local-xmms-plugin) ;;
  283. esac],[install_xmms_plugin_locally=false])
  284. AM_CONDITIONAL(FLaC__INSTALL_XMMS_PLUGIN_LOCALLY, test "x$install_xmms_plugin_locally" = xtrue)
  285. AC_ARG_ENABLE(xmms-plugin,
  286. AC_HELP_STRING([--disable-xmms-plugin], [Do not build XMMS plugin]),
  287. [case "${enableval}" in
  288. yes) enable_xmms_plugin=true ;;
  289. no) enable_xmms_plugin=false ;;
  290. *) AC_MSG_ERROR(bad value ${enableval} for --enable-xmms-plugin) ;;
  291. esac],[enable_xmms_plugin=true])
  292. if test "x$enable_xmms_plugin" != xfalse ; then
  293. AM_PATH_XMMS(0.9.5.1, , AC_MSG_WARN([*** XMMS >= 0.9.5.1 not installed - XMMS support will not be built]))
  294. fi
  295. AM_CONDITIONAL(FLaC__HAS_XMMS, test -n "$XMMS_INPUT_PLUGIN_DIR")
  296. dnl build FLAC++ or not
  297. AC_ARG_ENABLE([cpplibs],
  298. AC_HELP_STRING([--disable-cpplibs], [Do not build libFLAC++]),
  299. [case "${enableval}" in
  300. yes) disable_cpplibs=false ;;
  301. no) disable_cpplibs=true ;;
  302. *) AC_MSG_ERROR(bad value ${enableval} for --enable-cpplibs) ;;
  303. esac], [disable_cpplibs=false])
  304. AM_CONDITIONAL(FLaC__WITH_CPPLIBS, [test "x$disable_cpplibs" != xtrue])
  305. dnl check for ogg library
  306. AC_ARG_ENABLE([ogg],
  307. AC_HELP_STRING([--disable-ogg], [Disable ogg support (default: test for libogg)]),
  308. [ want_ogg=$enableval ], [ want_ogg=yes ] )
  309. if test "x$want_ogg" != "xno"; then
  310. XIPH_PATH_OGG(have_ogg=yes, AC_MSG_WARN([*** Ogg development enviroment not installed - Ogg support will not be built]))
  311. fi
  312. FLAC__HAS_OGG=0
  313. AM_CONDITIONAL(FLaC__HAS_OGG, [test "x$have_ogg" = xyes])
  314. if test "x$have_ogg" = xyes ; then
  315. FLAC__HAS_OGG=1
  316. OGG_PACKAGE="ogg"
  317. else
  318. have_ogg=no
  319. fi
  320. AC_DEFINE_UNQUOTED([FLAC__HAS_OGG],$FLAC__HAS_OGG,[define if you have the ogg library])
  321. AC_SUBST(FLAC__HAS_OGG)
  322. AC_SUBST(OGG_PACKAGE)
  323. dnl check for i18n(internationalization); these are from libiconv/gettext
  324. AM_ICONV
  325. AM_LANGINFO_CODESET
  326. AC_CHECK_PROGS(DOCBOOK_TO_MAN, docbook-to-man docbook2man)
  327. AM_CONDITIONAL(FLaC__HAS_DOCBOOK_TO_MAN, test -n "$DOCBOOK_TO_MAN")
  328. if test -n "$DOCBOOK_TO_MAN" ; then
  329. AC_DEFINE(FLAC__HAS_DOCBOOK_TO_MAN)
  330. AH_TEMPLATE(FLAC__HAS_DOCBOOK_TO_MAN, [define if you have docbook-to-man or docbook2man])
  331. fi
  332. AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes)
  333. if test x$have_clock_gettime = xyes; then
  334. AC_DEFINE(HAVE_CLOCK_GETTIME)
  335. AH_TEMPLATE(HAVE_CLOCK_GETTIME, [define if you have clock_gettime])
  336. fi
  337. # only matters for x86
  338. AC_CHECK_PROGS(NASM, nasm)
  339. AM_CONDITIONAL(FLaC__HAS_NASM, test -n "$NASM")
  340. if test -n "$NASM" ; then
  341. AC_DEFINE(FLAC__HAS_NASM)
  342. AH_TEMPLATE(FLAC__HAS_NASM, [define if you are compiling for x86 and have the NASM assembler])
  343. fi
  344. if test "x$debug" = xtrue; then
  345. CPPFLAGS="-DDEBUG $CPPFLAGS"
  346. CFLAGS="-g $CFLAGS"
  347. else
  348. CPPFLAGS="-DNDEBUG $CPPFLAGS"
  349. CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//')
  350. CFLAGS="-O3 -funroll-loops $CFLAGS"
  351. fi
  352. XIPH_GCC_VERSION
  353. if test x$ac_cv_c_compiler_gnu = xyes ; then
  354. CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes -Waggregate-return -Wcast-align -Wnested-externs -Wshadow -Wundef -Wmissing-declarations -Winline " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Wconversion
  355. CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wcast-align -Wshadow -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Wsign-promo -Wundef " # -Wcast-qual -Wbad-function-cast -Wwrite-strings -Woverloaded-virtual -Wmissing-declarations
  356. XIPH_ADD_CFLAGS([-Wdeclaration-after-statement])
  357. XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2])
  358. AC_LANG_PUSH([C++])
  359. XIPH_ADD_CXXFLAGS([-Weffc++])
  360. AC_LANG_POP([C++])
  361. if test "$GCC_MAJOR_VERSION" -ge 4 && test "$OBJ_FORMAT" = elf; then
  362. CPPFLAGS="$CPPFLAGS -DFLAC__USE_VISIBILITY_ATTR"
  363. CFLAGS="$CFLAGS -fvisibility=hidden"
  364. CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
  365. fi
  366. if test "$GCC_MAJOR_VERSION" -ge 4 && test "$OBJ_FORMAT" = macho; then
  367. CPPFLAGS="$CPPFLAGS -DFLAC__USE_VISIBILITY_ATTR"
  368. CFLAGS="$CFLAGS -fvisibility=hidden"
  369. CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
  370. fi
  371. if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x42" ; then
  372. XIPH_ADD_CFLAGS([-fgnu89-inline])
  373. fi
  374. if test "x$GCC_MAJOR_VERSION$GCC_MINOR_VERSION" = "x47" ; then
  375. XIPH_ADD_CFLAGS([-fno-inline-small-functions])
  376. fi
  377. if test "x$asm_optimisation$sse_os" = "xyesyes" ; then
  378. XIPH_ADD_CFLAGS([-msse2])
  379. fi
  380. fi
  381. case "$host_os" in
  382. "mingw32"|"os2")
  383. if test "$host_cpu" = "i686"; then
  384. XIPH_ADD_CFLAGS([-mstackrealign])
  385. fi
  386. esac
  387. if test x$enable_werror = "xyes" ; then
  388. XIPH_ADD_CFLAGS([-Werror])
  389. AC_LANG_PUSH([C++])
  390. XIPH_ADD_CXXFLAGS([-Werror])
  391. AC_LANG_POP([C++])
  392. fi
  393. if test x$enable_stack_smash_protection = "xyes" ; then
  394. XIPH_GCC_STACK_PROTECTOR
  395. XIPH_GXX_STACK_PROTECTOR
  396. fi
  397. if test "x$sys_linux" = xtrue ; then
  398. LIB_CLOCK_GETTIME=-lrt
  399. fi
  400. AC_SUBST(LIB_CLOCK_GETTIME)
  401. AC_CONFIG_FILES([ \
  402. Makefile \
  403. src/Makefile \
  404. src/libFLAC/Makefile \
  405. src/libFLAC/flac.pc \
  406. src/libFLAC/ia32/Makefile \
  407. src/libFLAC/include/Makefile \
  408. src/libFLAC/include/private/Makefile \
  409. src/libFLAC/include/protected/Makefile \
  410. src/libFLAC++/Makefile \
  411. src/libFLAC++/flac++.pc \
  412. src/flac/Makefile \
  413. src/metaflac/Makefile \
  414. src/plugin_common/Makefile \
  415. src/plugin_xmms/Makefile \
  416. src/share/Makefile \
  417. src/test_grabbag/Makefile \
  418. src/test_grabbag/cuesheet/Makefile \
  419. src/test_grabbag/picture/Makefile \
  420. src/test_libs_common/Makefile \
  421. src/test_libFLAC/Makefile \
  422. src/test_libFLAC++/Makefile \
  423. src/test_seeking/Makefile \
  424. src/test_streams/Makefile \
  425. src/utils/Makefile \
  426. src/utils/flacdiff/Makefile \
  427. src/utils/flactimer/Makefile \
  428. examples/Makefile \
  429. examples/c/Makefile \
  430. examples/c/decode/Makefile \
  431. examples/c/decode/file/Makefile \
  432. examples/c/encode/Makefile \
  433. examples/c/encode/file/Makefile \
  434. examples/cpp/Makefile \
  435. examples/cpp/decode/Makefile \
  436. examples/cpp/decode/file/Makefile \
  437. examples/cpp/encode/Makefile \
  438. examples/cpp/encode/file/Makefile \
  439. include/Makefile \
  440. include/FLAC/Makefile \
  441. include/FLAC++/Makefile \
  442. include/share/Makefile \
  443. include/share/grabbag/Makefile \
  444. include/test_libs_common/Makefile \
  445. doc/Doxyfile \
  446. doc/Makefile \
  447. doc/html/Makefile \
  448. doc/html/images/Makefile \
  449. m4/Makefile \
  450. man/Makefile \
  451. test/common.sh \
  452. test/Makefile \
  453. test/cuesheets/Makefile \
  454. test/flac-to-flac-metadata-test-files/Makefile \
  455. test/metaflac-test-files/Makefile \
  456. test/pictures/Makefile \
  457. build/Makefile \
  458. objs/Makefile \
  459. objs/debug/Makefile \
  460. objs/debug/bin/Makefile \
  461. objs/debug/lib/Makefile \
  462. objs/release/Makefile \
  463. objs/release/bin/Makefile \
  464. objs/release/lib/Makefile \
  465. microbench/Makefile
  466. ])
  467. AC_OUTPUT
  468. AC_MSG_RESULT([
  469. -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=-
  470. Configuration summary :
  471. FLAC version : ........................ ${VERSION}
  472. Host CPU : ............................ ${host_cpu}
  473. Host Vendor : ......................... ${host_vendor}
  474. Host OS : ............................. ${host_os}
  475. ])
  476. echo " Compiler is GCC : ..................... ${ac_cv_c_compiler_gnu}"
  477. if test x$ac_cv_c_compiler_gnu = xyes ; then
  478. echo " GCC version : ......................... ${GCC_VERSION}"
  479. fi
  480. echo " Compiler is Clang : ................... ${xiph_cv_c_compiler_clang}"
  481. echo " SSE optimizations : ................... ${sse_os}"
  482. echo " Asm optimizations : ................... ${asm_optimisation}"
  483. echo " Ogg/FLAC support : .................... ${have_ogg}"
  484. echo