Josh Coalson | 6b05bc5 | 2001-06-08 00:13:21 +0000 | [diff] [blame] | 1 | # FLAC - Free Lossless Audio Codec |
Josh Coalson | 0395dac | 2006-04-25 06:59:33 +0000 | [diff] [blame] | 2 | # Copyright (C) 2001,2002,2003,2004,2005,2006 Josh Coalson |
Josh Coalson | 6b05bc5 | 2001-06-08 00:13:21 +0000 | [diff] [blame] | 3 | # |
Josh Coalson | e8a7601 | 2003-02-07 00:14:32 +0000 | [diff] [blame] | 4 | # This file is part the FLAC project. FLAC is comprised of several |
| 5 | # components distributed under difference 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. |
Josh Coalson | 6b05bc5 | 2001-06-08 00:13:21 +0000 | [diff] [blame] | 12 | # |
Josh Coalson | e8a7601 | 2003-02-07 00:14:32 +0000 | [diff] [blame] | 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. |
Josh Coalson | 6b05bc5 | 2001-06-08 00:13:21 +0000 | [diff] [blame] | 17 | |
Josh Coalson | 0e3576e | 2001-05-25 00:07:51 +0000 | [diff] [blame] | 18 | # NOTE that for many of the AM_CONDITIONALs we use the prefix FLaC__ |
Josh Coalson | cf030c8 | 2001-05-23 20:59:48 +0000 | [diff] [blame] | 19 | # instead of FLAC__ since autoconf triggers off 'AC_' in strings |
| 20 | |
Josh Coalson | 9f429ba | 2001-01-19 22:39:39 +0000 | [diff] [blame] | 21 | AC_INIT(src/flac/main.c) |
Josh Coalson | 95b8968 | 2006-08-29 03:28:21 +0000 | [diff] [blame] | 22 | AM_INIT_AUTOMAKE(flac, 1.1.3) |
Josh Coalson | 9f429ba | 2001-01-19 22:39:39 +0000 | [diff] [blame] | 23 | |
Matt Zimmerman | 057b532 | 2002-10-05 14:41:19 +0000 | [diff] [blame] | 24 | # Don't automagically regenerate autoconf/automake generated files unless |
| 25 | # explicitly requested. Eases autobuilding -mdz |
| 26 | AM_MAINTAINER_MODE |
| 27 | |
Josh Coalson | 9f429ba | 2001-01-19 22:39:39 +0000 | [diff] [blame] | 28 | # We need two libtools, one that builds both shared and static, and |
| 29 | # one that builds only static. This is because the resulting libtool |
| 30 | # does not allow us to choose which to build at runtime. |
| 31 | AM_PROG_LIBTOOL |
| 32 | sed -e 's/^build_old_libs=yes/build_old_libs=no/' libtool > libtool-disable-static |
| 33 | chmod +x libtool-disable-static |
| 34 | |
Josh Coalson | 33f4ce5 | 2005-09-02 05:07:35 +0000 | [diff] [blame] | 35 | AC_SUBST(ACLOCAL_AMFLAGS, "-I m4") |
| 36 | |
Josh Coalson | 985dd8d | 2004-07-29 05:25:36 +0000 | [diff] [blame] | 37 | AM_PROG_AS |
Josh Coalson | 57ba6f4 | 2002-06-07 05:27:37 +0000 | [diff] [blame] | 38 | AC_PROG_CXX |
Josh Coalson | 9f429ba | 2001-01-19 22:39:39 +0000 | [diff] [blame] | 39 | AC_PROG_MAKE_SET |
| 40 | |
Josh Coalson | 6977bda | 2006-05-22 00:07:21 +0000 | [diff] [blame] | 41 | AC_SYS_LARGEFILE |
| 42 | AC_FUNC_FSEEKO |
| 43 | |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 44 | #@@@ new name is AC_CONFIG_HEADERS |
| 45 | AM_CONFIG_HEADER(config.h) |
| 46 | |
Josh Coalson | 27ae348 | 2005-01-27 03:59:55 +0000 | [diff] [blame] | 47 | AC_CHECK_TYPES(socklen_t, [], []) |
| 48 | |
Josh Coalson | 5a804ca | 2002-05-17 06:08:13 +0000 | [diff] [blame] | 49 | dnl check for getopt in standard library |
| 50 | dnl AC_CHECK_FUNCS(getopt_long , , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"] ) |
| 51 | AC_CHECK_FUNCS(getopt_long, [], []) |
| 52 | |
Josh Coalson | 5a804ca | 2002-05-17 06:08:13 +0000 | [diff] [blame] | 53 | case "$host_cpu" in |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 54 | i*86) |
| 55 | cpu_ia32=true |
| 56 | AC_DEFINE(FLAC__CPU_IA32) |
| 57 | AH_TEMPLATE(FLAC__CPU_IA32, [define if building for ia32/i386]) |
| 58 | ;; |
| 59 | powerpc) |
| 60 | cpu_ppc=true |
| 61 | AC_DEFINE(FLAC__CPU_PPC) |
| 62 | AH_TEMPLATE(FLAC__CPU_PPC, [define if building for PowerPC]) |
| 63 | ;; |
| 64 | sparc) |
| 65 | cpu_sparc=true |
| 66 | AC_DEFINE(FLAC__CPU_SPARC) |
| 67 | AH_TEMPLATE(FLAC__CPU_SPARC, [define if building for SPARC]) |
| 68 | ;; |
Josh Coalson | cf030c8 | 2001-05-23 20:59:48 +0000 | [diff] [blame] | 69 | esac |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 70 | AM_CONDITIONAL(FLaC__CPU_IA32, test "x$cpu_ia32" = xtrue) |
| 71 | AM_CONDITIONAL(FLaC__CPU_PPC, test "x$cpu_ppc" = xtrue) |
| 72 | AM_CONDITIONAL(FLaC__CPU_SPARC, test "x$cpu_sparc" = xtrue) |
Josh Coalson | da0adb2 | 2001-06-18 23:07:19 +0000 | [diff] [blame] | 73 | case "$host" in |
Josh Coalson | c085217 | 2003-04-27 08:32:41 +0000 | [diff] [blame] | 74 | i386-*-openbsd3.[[0-3]]) OBJ_FORMAT=aoutb ;; |
Josh Coalson | 91018c8 | 2005-12-02 05:31:29 +0000 | [diff] [blame] | 75 | *-*-cygwin|*mingw*) OBJ_FORMAT=win32 ;; |
Josh Coalson | da0adb2 | 2001-06-18 23:07:19 +0000 | [diff] [blame] | 76 | *) OBJ_FORMAT=elf ;; |
| 77 | esac |
Josh Coalson | 27ae348 | 2005-01-27 03:59:55 +0000 | [diff] [blame] | 78 | AC_SUBST(OBJ_FORMAT) |
| 79 | case "$host" in |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 80 | *-pc-linux-gnu) |
| 81 | sys_linux=true |
| 82 | AC_DEFINE(FLAC__SYS_LINUX) |
| 83 | AH_TEMPLATE(FLAC__SYS_LINUX, [define if building for Linux]) |
| 84 | ;; |
| 85 | *-*-darwin*) |
| 86 | sys_darwin=true |
| 87 | AC_DEFINE(FLAC__SYS_DARWIN) |
| 88 | AH_TEMPLATE(FLAC__SYS_DARWIN, [define if building for Darwin / MacOS X]) |
| 89 | ;; |
Josh Coalson | 27ae348 | 2005-01-27 03:59:55 +0000 | [diff] [blame] | 90 | esac |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 91 | AM_CONDITIONAL(FLaC__SYS_DARWIN, test "x$sys_darwin" = xtrue) |
| 92 | AM_CONDITIONAL(FLaC__SYS_LINUX, test "x$sys_linux" = xtrue) |
Josh Coalson | cf030c8 | 2001-05-23 20:59:48 +0000 | [diff] [blame] | 93 | |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 94 | if test "x$cpu_ia32" = xtrue ; then |
Josh Coalson | 0e3576e | 2001-05-25 00:07:51 +0000 | [diff] [blame] | 95 | AC_DEFINE(FLAC__ALIGN_MALLOC_DATA) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 96 | AH_TEMPLATE(FLAC__ALIGN_MALLOC_DATA, [define to align allocated memory on 32-byte boundaries]) |
Josh Coalson | 0e3576e | 2001-05-25 00:07:51 +0000 | [diff] [blame] | 97 | fi |
Josh Coalson | cf030c8 | 2001-05-23 20:59:48 +0000 | [diff] [blame] | 98 | |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 99 | AC_ARG_ENABLE(asm-optimizations, AC_HELP_STRING([--disable-asm-optimizations], [Don't use any assembly optimization routines]), asm_opt=no, asm_opt=yes) |
| 100 | AM_CONDITIONAL(FLaC__NO_ASM, test "x$asm_opt" = xno) |
| 101 | if test "x$asm_opt" = xno ; then |
Josh Coalson | 0e3576e | 2001-05-25 00:07:51 +0000 | [diff] [blame] | 102 | AC_DEFINE(FLAC__NO_ASM) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 103 | AH_TEMPLATE(FLAC__NO_ASM, [define to disable use of assembly code]) |
Josh Coalson | 0e3576e | 2001-05-25 00:07:51 +0000 | [diff] [blame] | 104 | fi |
Josh Coalson | cf030c8 | 2001-05-23 20:59:48 +0000 | [diff] [blame] | 105 | |
Josh Coalson | 9f429ba | 2001-01-19 22:39:39 +0000 | [diff] [blame] | 106 | AC_ARG_ENABLE(debug, |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 107 | AC_HELP_STRING([--enable-debug], [Turn on debugging]), |
Josh Coalson | da0adb2 | 2001-06-18 23:07:19 +0000 | [diff] [blame] | 108 | [case "${enableval}" in |
| 109 | yes) debug=true ;; |
| 110 | no) debug=false ;; |
| 111 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; |
| 112 | esac],[debug=false]) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 113 | AM_CONDITIONAL(DEBUG, test "x$debug" = xtrue) |
Josh Coalson | 9f429ba | 2001-01-19 22:39:39 +0000 | [diff] [blame] | 114 | |
Josh Coalson | bb14ae8 | 2001-12-04 06:46:35 +0000 | [diff] [blame] | 115 | AC_ARG_ENABLE(sse, |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 116 | AC_HELP_STRING([--enable-sse], [Enable SSE support by asserting that the OS supports SSE instructions]), |
Josh Coalson | d01b13a | 2001-07-18 00:27:06 +0000 | [diff] [blame] | 117 | [case "${enableval}" in |
| 118 | yes) sse_os=true ;; |
| 119 | no) sse_os=false ;; |
Josh Coalson | bb14ae8 | 2001-12-04 06:46:35 +0000 | [diff] [blame] | 120 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-sse) ;; |
Josh Coalson | d01b13a | 2001-07-18 00:27:06 +0000 | [diff] [blame] | 121 | esac],[sse_os=false]) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 122 | AM_CONDITIONAL(FLaC__SSE_OS, test "x$sse_os" = xtrue) |
| 123 | if test "x$sse_os" = xtrue ; then |
Josh Coalson | d01b13a | 2001-07-18 00:27:06 +0000 | [diff] [blame] | 124 | AC_DEFINE(FLAC__SSE_OS) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 125 | AH_TEMPLATE(FLAC__SSE_OS, [define if your operating system supports SSE instructions]) |
Josh Coalson | d01b13a | 2001-07-18 00:27:06 +0000 | [diff] [blame] | 126 | fi |
| 127 | |
Josh Coalson | 28311cf | 2002-12-26 19:35:19 +0000 | [diff] [blame] | 128 | AC_ARG_ENABLE(3dnow, |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 129 | AC_HELP_STRING([--disable-3dnow], [Disable 3DNOW! optimizations]), |
Josh Coalson | 28311cf | 2002-12-26 19:35:19 +0000 | [diff] [blame] | 130 | [case "${enableval}" in |
| 131 | yes) use_3dnow=true ;; |
| 132 | no) use_3dnow=false ;; |
| 133 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-3dnow) ;; |
| 134 | esac],[use_3dnow=true]) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 135 | AM_CONDITIONAL(FLaC__USE_3DNOW, test "x$use_3dnow" = xtrue) |
| 136 | if test "x$use_3dnow" = xtrue ; then |
Josh Coalson | c69f878 | 2001-11-13 23:08:22 +0000 | [diff] [blame] | 137 | AC_DEFINE(FLAC__USE_3DNOW) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 138 | AH_TEMPLATE(FLAC__USE_3DNOW, [define to enable use of 3Dnow! instructions]) |
Josh Coalson | c69f878 | 2001-11-13 23:08:22 +0000 | [diff] [blame] | 139 | fi |
| 140 | |
Josh Coalson | 3aadd10 | 2004-07-27 01:13:16 +0000 | [diff] [blame] | 141 | AC_ARG_ENABLE(altivec, |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 142 | AC_HELP_STRING([--disable-altivec], [Disable Altivec optimizations]), |
Josh Coalson | 3aadd10 | 2004-07-27 01:13:16 +0000 | [diff] [blame] | 143 | [case "${enableval}" in |
| 144 | yes) use_altivec=true ;; |
| 145 | no) use_altivec=false ;; |
| 146 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-altivec) ;; |
| 147 | esac],[use_altivec=true]) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 148 | AM_CONDITIONAL(FLaC__USE_ALTIVEC, test "x$use_altivec" = xtrue) |
| 149 | if test "x$use_altivec" = xtrue ; then |
Josh Coalson | 3aadd10 | 2004-07-27 01:13:16 +0000 | [diff] [blame] | 150 | AC_DEFINE(FLAC__USE_ALTIVEC) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 151 | AH_TEMPLATE(FLAC__USE_ALTIVEC, [define to enable use of Altivec instructions]) |
Josh Coalson | 3aadd10 | 2004-07-27 01:13:16 +0000 | [diff] [blame] | 152 | fi |
| 153 | |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 154 | AC_ARG_ENABLE(thorough-tests, |
| 155 | AC_HELP_STRING([--disable-thorough-tests], [Disable thorough (long) testing, do only basic tests]), |
| 156 | [case "${enableval}" in |
| 157 | yes) thorough_tests=true ;; |
| 158 | no) thorough_tests=false ;; |
| 159 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-thorough-tests) ;; |
| 160 | esac],[thorough_tests=true]) |
Josh Coalson | 9b14518 | 2002-08-30 05:39:36 +0000 | [diff] [blame] | 161 | AC_ARG_ENABLE(exhaustive-tests, |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 162 | AC_HELP_STRING([--enable-exhaustive-tests], [Enable exhaustive testing (VERY long)]), |
Josh Coalson | 9b14518 | 2002-08-30 05:39:36 +0000 | [diff] [blame] | 163 | [case "${enableval}" in |
| 164 | yes) exhaustive_tests=true ;; |
| 165 | no) exhaustive_tests=false ;; |
| 166 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-exhaustive-tests) ;; |
| 167 | esac],[exhaustive_tests=false]) |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 168 | if test "x$thorough_tests" = xfalse ; then |
| 169 | FLAC__TEST_LEVEL=0 |
| 170 | elif test "x$exhaustive_tests" = xfalse ; then |
| 171 | FLAC__TEST_LEVEL=1 |
| 172 | else |
| 173 | FLAC__TEST_LEVEL=2 |
Josh Coalson | 962bb3b | 2002-12-28 07:08:31 +0000 | [diff] [blame] | 174 | fi |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 175 | AC_SUBST(FLAC__TEST_LEVEL) |
Josh Coalson | d192362 | 2002-12-05 06:36:12 +0000 | [diff] [blame] | 176 | |
| 177 | AC_ARG_ENABLE(valgrind-testing, |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 178 | AC_HELP_STRING([--enable-valgrind-testing], [Run all tests inside Valgrind]), |
Josh Coalson | d192362 | 2002-12-05 06:36:12 +0000 | [diff] [blame] | 179 | [case "${enableval}" in |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 180 | yes) FLAC__TEST_WITH_VALGRIND=yes ;; |
| 181 | no) FLAC__TEST_WITH_VALGRIND=no ;; |
Josh Coalson | d192362 | 2002-12-05 06:36:12 +0000 | [diff] [blame] | 182 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind-testing) ;; |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 183 | esac],[FLAC__TEST_WITH_VALGRIND=no]) |
| 184 | AC_SUBST(FLAC__TEST_WITH_VALGRIND) |
Josh Coalson | 9b14518 | 2002-08-30 05:39:36 +0000 | [diff] [blame] | 185 | |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 186 | AC_ARG_ENABLE(doxygen-docs, |
| 187 | AC_HELP_STRING([--disable-doxygen-docs], [Disable API documentation building via Doxygen]), |
| 188 | [case "${enableval}" in |
| 189 | yes) enable_doxygen_docs=true ;; |
| 190 | no) enable_doxygen_docs=false ;; |
| 191 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-doxygen-docs) ;; |
| 192 | esac],[enable_doxygen_docs=true]) |
Josh Coalson | c933c93 | 2006-05-25 04:21:43 +0000 | [diff] [blame] | 193 | if test "x$enable_doxygen_docs" != xfalse ; then |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 194 | AC_CHECK_PROGS(DOXYGEN, doxygen) |
| 195 | fi |
| 196 | AM_CONDITIONAL(FLaC__HAS_DOXYGEN, test -n "$DOXYGEN") |
| 197 | |
Josh Coalson | c933c93 | 2006-05-25 04:21:43 +0000 | [diff] [blame] | 198 | AC_ARG_ENABLE(local-xmms-plugin, |
| 199 | AC_HELP_STRING([--enable-local-xmms-plugin], [Install XMMS plugin to ~/.xmms/Plugins instead of system location]), |
| 200 | [case "${enableval}" in |
| 201 | yes) install_xmms_plugin_locally=true ;; |
| 202 | no) install_xmms_plugin_locally=false ;; |
| 203 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-local-xmms-plugin) ;; |
| 204 | esac],[install_xmms_plugin_locally=false]) |
| 205 | AM_CONDITIONAL(FLaC__INSTALL_XMMS_PLUGIN_LOCALLY, test "x$install_xmms_plugin_locally" = xtrue) |
| 206 | |
| 207 | AC_ARG_ENABLE(xmms-plugin, |
| 208 | AC_HELP_STRING([--disable-xmms-plugin], [Do not build XMMS plugin]), |
| 209 | [case "${enableval}" in |
| 210 | yes) enable_xmms_plugin=true ;; |
| 211 | no) enable_xmms_plugin=false ;; |
| 212 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-xmms-plugin) ;; |
| 213 | esac],[enable_xmms_plugin=true]) |
| 214 | if test "x$enable_xmms_plugin" != xfalse ; then |
| 215 | AM_PATH_XMMS(0.9.5.1, , AC_MSG_WARN([*** XMMS >= 0.9.5.1 not installed - XMMS support will not be built])) |
| 216 | fi |
| 217 | AM_CONDITIONAL(FLaC__HAS_XMMS, test -n "$XMMS_INPUT_PLUGIN_DIR") |
| 218 | |
Josh Coalson | e2fece2 | 2002-09-09 21:54:28 +0000 | [diff] [blame] | 219 | dnl check for ogg library |
Josh Coalson | 3f6c998 | 2002-09-05 05:40:58 +0000 | [diff] [blame] | 220 | XIPH_PATH_OGG(have_ogg=yes, AC_MSG_WARN([*** Ogg development enviroment not installed - Ogg support will not be built])) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 221 | AM_CONDITIONAL(FLaC__HAS_OGG, [test "x$have_ogg" = xyes]) |
| 222 | if test "x$have_ogg" = xyes ; then |
Josh Coalson | c8a7d35 | 2001-11-11 03:59:46 +0000 | [diff] [blame] | 223 | AC_DEFINE(FLAC__HAS_OGG) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 224 | AH_TEMPLATE(FLAC__HAS_OGG, [define if you have the ogg library]) |
Josh Coalson | c8a7d35 | 2001-11-11 03:59:46 +0000 | [diff] [blame] | 225 | fi |
Josh Coalson | f7fc5c8 | 2001-10-31 18:31:36 +0000 | [diff] [blame] | 226 | |
Josh Coalson | 130cbb5 | 2002-07-16 16:12:27 +0000 | [diff] [blame] | 227 | dnl check for i18n(internationalization); these are from libiconv/gettext |
Josh Coalson | 412fa3b | 2002-07-11 06:15:30 +0000 | [diff] [blame] | 228 | AM_ICONV |
| 229 | AM_LANGINFO_CODESET |
| 230 | |
Josh Coalson | 90e5716 | 2004-07-30 00:46:39 +0000 | [diff] [blame] | 231 | AC_CHECK_PROGS(DOCBOOK_TO_MAN, docbook-to-man docbook2man) |
| 232 | AM_CONDITIONAL(FLaC__HAS_DOCBOOK_TO_MAN, test -n "$DOCBOOK_TO_MAN") |
| 233 | if test -n "$DOCBOOK_TO_MAN" ; then |
| 234 | AC_DEFINE(FLAC__HAS_DOCBOOK_TO_MAN) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 235 | AH_TEMPLATE(FLAC__HAS_DOCBOOK_TO_MAN, [define if you have docbook-to-man or docbook2man]) |
Josh Coalson | 90e5716 | 2004-07-30 00:46:39 +0000 | [diff] [blame] | 236 | fi |
| 237 | |
Josh Coalson | b990022 | 2004-12-30 01:13:03 +0000 | [diff] [blame] | 238 | # only matters for x86 |
Josh Coalson | cf030c8 | 2001-05-23 20:59:48 +0000 | [diff] [blame] | 239 | AC_CHECK_PROGS(NASM, nasm) |
| 240 | AM_CONDITIONAL(FLaC__HAS_NASM, test -n "$NASM") |
Josh Coalson | 0e3576e | 2001-05-25 00:07:51 +0000 | [diff] [blame] | 241 | if test -n "$NASM" ; then |
| 242 | AC_DEFINE(FLAC__HAS_NASM) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 243 | AH_TEMPLATE(FLAC__HAS_NASM, [define if you are compiling for x86 and have the NASM assembler]) |
Josh Coalson | 0e3576e | 2001-05-25 00:07:51 +0000 | [diff] [blame] | 244 | fi |
Josh Coalson | 9f429ba | 2001-01-19 22:39:39 +0000 | [diff] [blame] | 245 | |
Josh Coalson | b990022 | 2004-12-30 01:13:03 +0000 | [diff] [blame] | 246 | # only matters for PowerPC |
Josh Coalson | a02b73f | 2005-03-02 05:21:06 +0000 | [diff] [blame] | 247 | AC_CHECK_PROGS(AS, as, as) |
| 248 | AC_CHECK_PROGS(GAS, gas, gas) |
| 249 | |
| 250 | test "$AS" = "as" && as --version | grep GNU >/dev/null && AS=gas |
| 251 | |
| 252 | AM_CONDITIONAL(FLaC__HAS_AS, test "$AS" = "as") |
| 253 | AM_CONDITIONAL(FLaC__HAS_GAS, test "$AS" = "gas") |
| 254 | if test "$AS" = "as" ; then |
Josh Coalson | b990022 | 2004-12-30 01:13:03 +0000 | [diff] [blame] | 255 | AC_DEFINE(FLAC__HAS_AS) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 256 | AH_TEMPLATE(FLAC__HAS_AS, [define if you are compiling for PowerPC and have the 'as' assembler]) |
Josh Coalson | b990022 | 2004-12-30 01:13:03 +0000 | [diff] [blame] | 257 | fi |
Josh Coalson | a02b73f | 2005-03-02 05:21:06 +0000 | [diff] [blame] | 258 | if test "$AS" = "gas" ; then |
Josh Coalson | b990022 | 2004-12-30 01:13:03 +0000 | [diff] [blame] | 259 | # funniest. macro. ever. |
| 260 | AC_DEFINE(FLAC__HAS_GAS) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 261 | AH_TEMPLATE(FLAC__HAS_GAS, [define if you are compiling for PowerPC and have the 'gas' assembler]) |
Josh Coalson | b990022 | 2004-12-30 01:13:03 +0000 | [diff] [blame] | 262 | fi |
| 263 | |
Josh Coalson | 57ba6f4 | 2002-06-07 05:27:37 +0000 | [diff] [blame] | 264 | OUR_CFLAGS_HEAD='-I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include' |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 265 | if test "x$debug" = xtrue; then |
Josh Coalson | 2080974 | 2003-01-10 04:39:20 +0000 | [diff] [blame] | 266 | OUR_CFLAGS_HEAD="$OUR_CFLAGS_HEAD -g -O0 -DDEBUG" |
Josh Coalson | 9f429ba | 2001-01-19 22:39:39 +0000 | [diff] [blame] | 267 | else |
Josh Coalson | 1e70455 | 2003-05-19 23:59:49 +0000 | [diff] [blame] | 268 | OUR_CFLAGS_HEAD="$OUR_CFLAGS_HEAD -O2 -DNDEBUG" |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 269 | if test "x$GCC" = xyes; then |
Josh Coalson | 1e70455 | 2003-05-19 23:59:49 +0000 | [diff] [blame] | 270 | OUR_CFLAGS_HEAD="$OUR_CFLAGS_HEAD -O3 -fomit-frame-pointer -funroll-loops -finline-functions -Wall -W -Winline -DFLaC__INLINE=__inline__" |
Josh Coalson | da0adb2 | 2001-06-18 23:07:19 +0000 | [diff] [blame] | 271 | fi |
Josh Coalson | 9f429ba | 2001-01-19 22:39:39 +0000 | [diff] [blame] | 272 | fi |
Josh Coalson | 2080974 | 2003-01-10 04:39:20 +0000 | [diff] [blame] | 273 | CFLAGS="$OUR_CFLAGS_HEAD $CFLAGS" |
| 274 | CXXFLAGS="$OUR_CFLAGS_HEAD $CXXFLAGS" |
Josh Coalson | 9f429ba | 2001-01-19 22:39:39 +0000 | [diff] [blame] | 275 | |
Josh Coalson | 3c8d297 | 2005-01-30 18:44:04 +0000 | [diff] [blame] | 276 | #@@@@@@ |
| 277 | AM_CONDITIONAL(FLaC__HAS_AS__TEMPORARILY_DISABLED, test "yes" = "no") |
| 278 | AM_CONDITIONAL(FLaC__HAS_GAS__TEMPORARILY_DISABLED, test "yes" = "no") |
| 279 | |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 280 | AC_CONFIG_FILES([ \ |
Josh Coalson | 1d96b7e | 2002-07-24 06:13:33 +0000 | [diff] [blame] | 281 | Makefile \ |
| 282 | src/Makefile \ |
| 283 | src/libFLAC/Makefile \ |
| 284 | src/libFLAC/ia32/Makefile \ |
Josh Coalson | 3aadd10 | 2004-07-27 01:13:16 +0000 | [diff] [blame] | 285 | src/libFLAC/ppc/Makefile \ |
Josh Coalson | b990022 | 2004-12-30 01:13:03 +0000 | [diff] [blame] | 286 | src/libFLAC/ppc/as/Makefile \ |
| 287 | src/libFLAC/ppc/gas/Makefile \ |
Josh Coalson | 1d96b7e | 2002-07-24 06:13:33 +0000 | [diff] [blame] | 288 | src/libFLAC/include/Makefile \ |
| 289 | src/libFLAC/include/private/Makefile \ |
| 290 | src/libFLAC/include/protected/Makefile \ |
| 291 | src/libFLAC++/Makefile \ |
Josh Coalson | c49380d | 2002-08-07 17:38:08 +0000 | [diff] [blame] | 292 | src/libOggFLAC/Makefile \ |
| 293 | src/libOggFLAC/include/Makefile \ |
Josh Coalson | ce3dd36 | 2003-12-17 05:26:34 +0000 | [diff] [blame] | 294 | src/libOggFLAC/include/private/Makefile \ |
Josh Coalson | c49380d | 2002-08-07 17:38:08 +0000 | [diff] [blame] | 295 | src/libOggFLAC/include/protected/Makefile \ |
| 296 | src/libOggFLAC++/Makefile \ |
Josh Coalson | 1d96b7e | 2002-07-24 06:13:33 +0000 | [diff] [blame] | 297 | src/flac/Makefile \ |
| 298 | src/metaflac/Makefile \ |
Josh Coalson | 2080974 | 2003-01-10 04:39:20 +0000 | [diff] [blame] | 299 | src/monkeys_audio_utilities/Makefile \ |
Josh Coalson | 1f99eac | 2002-08-23 06:45:23 +0000 | [diff] [blame] | 300 | src/monkeys_audio_utilities/flac_mac/Makefile \ |
| 301 | src/monkeys_audio_utilities/flac_ren/Makefile \ |
Josh Coalson | 1f99eac | 2002-08-23 06:45:23 +0000 | [diff] [blame] | 302 | src/plugin_common/Makefile \ |
| 303 | src/plugin_winamp2/Makefile \ |
Josh Coalson | 2080974 | 2003-01-10 04:39:20 +0000 | [diff] [blame] | 304 | src/plugin_winamp2/include/Makefile \ |
| 305 | src/plugin_winamp2/include/winamp2/Makefile \ |
Josh Coalson | 1d96b7e | 2002-07-24 06:13:33 +0000 | [diff] [blame] | 306 | src/plugin_xmms/Makefile \ |
| 307 | src/share/Makefile \ |
Josh Coalson | 3c043fd | 2002-10-25 04:57:05 +0000 | [diff] [blame] | 308 | src/share/getopt/Makefile \ |
Josh Coalson | b8f8a07 | 2002-11-07 05:07:30 +0000 | [diff] [blame] | 309 | src/share/grabbag/Makefile \ |
Josh Coalson | 9c650a5 | 2003-12-17 04:51:06 +0000 | [diff] [blame] | 310 | src/share/replaygain_analysis/Makefile \ |
| 311 | src/share/replaygain_synthesis/Makefile \ |
Josh Coalson | e2999b7 | 2003-12-17 04:54:20 +0000 | [diff] [blame] | 312 | src/share/replaygain_synthesis/include/Makefile \ |
| 313 | src/share/replaygain_synthesis/include/private/Makefile \ |
Josh Coalson | 3c043fd | 2002-10-25 04:57:05 +0000 | [diff] [blame] | 314 | src/share/utf8/Makefile \ |
Josh Coalson | 1dca1c2 | 2002-12-03 06:30:14 +0000 | [diff] [blame] | 315 | src/test_grabbag/Makefile \ |
Josh Coalson | 2080974 | 2003-01-10 04:39:20 +0000 | [diff] [blame] | 316 | src/test_grabbag/cuesheet/Makefile \ |
Josh Coalson | 6b21f66 | 2006-09-13 01:42:27 +0000 | [diff] [blame] | 317 | src/test_libs_common/Makefile \ |
Josh Coalson | 1d96b7e | 2002-07-24 06:13:33 +0000 | [diff] [blame] | 318 | src/test_libFLAC/Makefile \ |
| 319 | src/test_libFLAC++/Makefile \ |
Josh Coalson | 1f99eac | 2002-08-23 06:45:23 +0000 | [diff] [blame] | 320 | src/test_libOggFLAC/Makefile \ |
| 321 | src/test_libOggFLAC++/Makefile \ |
Josh Coalson | 94b5499 | 2004-09-21 05:41:23 +0000 | [diff] [blame] | 322 | src/test_seeking/Makefile \ |
Josh Coalson | 1d96b7e | 2002-07-24 06:13:33 +0000 | [diff] [blame] | 323 | src/test_streams/Makefile \ |
Josh Coalson | da0adb2 | 2001-06-18 23:07:19 +0000 | [diff] [blame] | 324 | include/Makefile \ |
| 325 | include/FLAC/Makefile \ |
Josh Coalson | 5a804ca | 2002-05-17 06:08:13 +0000 | [diff] [blame] | 326 | include/FLAC++/Makefile \ |
Josh Coalson | 1f99eac | 2002-08-23 06:45:23 +0000 | [diff] [blame] | 327 | include/OggFLAC/Makefile \ |
| 328 | include/OggFLAC++/Makefile \ |
Josh Coalson | 5a804ca | 2002-05-17 06:08:13 +0000 | [diff] [blame] | 329 | include/share/Makefile \ |
Josh Coalson | b8f8a07 | 2002-11-07 05:07:30 +0000 | [diff] [blame] | 330 | include/share/grabbag/Makefile \ |
Josh Coalson | 6b21f66 | 2006-09-13 01:42:27 +0000 | [diff] [blame] | 331 | include/test_libs_common/Makefile \ |
Josh Coalson | 4c8f73a | 2001-07-22 07:27:45 +0000 | [diff] [blame] | 332 | doc/Makefile \ |
Josh Coalson | 130cbb5 | 2002-07-16 16:12:27 +0000 | [diff] [blame] | 333 | doc/html/Makefile \ |
| 334 | doc/html/images/Makefile \ |
| 335 | doc/html/ru/Makefile \ |
Josh Coalson | 4c8f73a | 2001-07-22 07:27:45 +0000 | [diff] [blame] | 336 | man/Makefile \ |
Josh Coalson | 1d96b7e | 2002-07-24 06:13:33 +0000 | [diff] [blame] | 337 | test/Makefile \ |
Josh Coalson | 2080974 | 2003-01-10 04:39:20 +0000 | [diff] [blame] | 338 | test/cuesheets/Makefile \ |
Josh Coalson | 6b21f66 | 2006-09-13 01:42:27 +0000 | [diff] [blame] | 339 | test/flac-to-flac-metadata-test-files/Makefile \ |
| 340 | test/metaflac-test-files/Makefile \ |
Josh Coalson | 1f99eac | 2002-08-23 06:45:23 +0000 | [diff] [blame] | 341 | build/Makefile \ |
Josh Coalson | 2080974 | 2003-01-10 04:39:20 +0000 | [diff] [blame] | 342 | obj/Makefile \ |
| 343 | obj/debug/Makefile \ |
Josh Coalson | b74fc98 | 2002-11-20 06:40:08 +0000 | [diff] [blame] | 344 | obj/debug/bin/Makefile \ |
| 345 | obj/debug/lib/Makefile \ |
Josh Coalson | 2080974 | 2003-01-10 04:39:20 +0000 | [diff] [blame] | 346 | obj/release/Makefile \ |
Josh Coalson | b74fc98 | 2002-11-20 06:40:08 +0000 | [diff] [blame] | 347 | obj/release/bin/Makefile \ |
| 348 | obj/release/lib/Makefile \ |
Josh Coalson | 1f99eac | 2002-08-23 06:45:23 +0000 | [diff] [blame] | 349 | flac.pbproj/Makefile \ |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 350 | ]) |
| 351 | AC_OUTPUT |