Josh Coalson | 6b05bc5 | 2001-06-08 00:13:21 +0000 | [diff] [blame] | 1 | # FLAC - Free Lossless Audio Codec |
Josh Coalson | e74bd95 | 2007-02-02 06:58:19 +0000 | [diff] [blame] | 2 | # Copyright (C) 2001,2002,2003,2004,2005,2006,2007 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 | 7329697 | 2007-07-07 06:10:35 +0000 | [diff] [blame] | 22 | AM_INIT_AUTOMAKE(flac, 1.2.0) |
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 | 833bdac | 2007-06-16 00:37:42 +0000 | [diff] [blame] | 44 | AC_CHECK_SIZEOF(void*,0) |
| 45 | |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 46 | #@@@ new name is AC_CONFIG_HEADERS |
| 47 | AM_CONFIG_HEADER(config.h) |
| 48 | |
Josh Coalson | d82251b | 2007-01-28 17:36:10 +0000 | [diff] [blame] | 49 | AC_C_BIGENDIAN |
| 50 | |
Josh Coalson | 27ae348 | 2005-01-27 03:59:55 +0000 | [diff] [blame] | 51 | AC_CHECK_TYPES(socklen_t, [], []) |
| 52 | |
Josh Coalson | 5a804ca | 2002-05-17 06:08:13 +0000 | [diff] [blame] | 53 | dnl check for getopt in standard library |
| 54 | dnl AC_CHECK_FUNCS(getopt_long , , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"] ) |
| 55 | AC_CHECK_FUNCS(getopt_long, [], []) |
| 56 | |
Josh Coalson | 5a804ca | 2002-05-17 06:08:13 +0000 | [diff] [blame] | 57 | case "$host_cpu" in |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 58 | i*86) |
| 59 | cpu_ia32=true |
| 60 | AC_DEFINE(FLAC__CPU_IA32) |
| 61 | AH_TEMPLATE(FLAC__CPU_IA32, [define if building for ia32/i386]) |
| 62 | ;; |
| 63 | powerpc) |
| 64 | cpu_ppc=true |
| 65 | AC_DEFINE(FLAC__CPU_PPC) |
| 66 | AH_TEMPLATE(FLAC__CPU_PPC, [define if building for PowerPC]) |
| 67 | ;; |
| 68 | sparc) |
| 69 | cpu_sparc=true |
| 70 | AC_DEFINE(FLAC__CPU_SPARC) |
| 71 | AH_TEMPLATE(FLAC__CPU_SPARC, [define if building for SPARC]) |
| 72 | ;; |
Josh Coalson | cf030c8 | 2001-05-23 20:59:48 +0000 | [diff] [blame] | 73 | esac |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 74 | AM_CONDITIONAL(FLaC__CPU_IA32, test "x$cpu_ia32" = xtrue) |
| 75 | AM_CONDITIONAL(FLaC__CPU_PPC, test "x$cpu_ppc" = xtrue) |
| 76 | AM_CONDITIONAL(FLaC__CPU_SPARC, test "x$cpu_sparc" = xtrue) |
Josh Coalson | 330fc08 | 2007-08-01 03:03:51 +0000 | [diff] [blame] | 77 | |
Josh Coalson | da0adb2 | 2001-06-18 23:07:19 +0000 | [diff] [blame] | 78 | case "$host" in |
Josh Coalson | c085217 | 2003-04-27 08:32:41 +0000 | [diff] [blame] | 79 | i386-*-openbsd3.[[0-3]]) OBJ_FORMAT=aoutb ;; |
Josh Coalson | 91018c8 | 2005-12-02 05:31:29 +0000 | [diff] [blame] | 80 | *-*-cygwin|*mingw*) OBJ_FORMAT=win32 ;; |
Josh Coalson | 955aed9 | 2006-11-11 22:51:58 +0000 | [diff] [blame] | 81 | *-*-darwin*) OBJ_FORMAT=macho ;; |
Josh Coalson | da0adb2 | 2001-06-18 23:07:19 +0000 | [diff] [blame] | 82 | *) OBJ_FORMAT=elf ;; |
| 83 | esac |
Josh Coalson | 27ae348 | 2005-01-27 03:59:55 +0000 | [diff] [blame] | 84 | AC_SUBST(OBJ_FORMAT) |
Josh Coalson | 330fc08 | 2007-08-01 03:03:51 +0000 | [diff] [blame] | 85 | |
| 86 | # only needed because of ntohl() usage, can get rid of after that's gone: |
| 87 | case "$host" in |
| 88 | *-*-cygwin|*mingw*) MINGW_WINSOCK_LIBS=-lwsock32 ;; |
| 89 | *) MINGW_WINSOCK_LIBS= ;; |
| 90 | esac |
| 91 | AC_SUBST(MINGW_WINSOCK_LIBS) |
| 92 | |
Josh Coalson | 27ae348 | 2005-01-27 03:59:55 +0000 | [diff] [blame] | 93 | case "$host" in |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 94 | *-pc-linux-gnu) |
| 95 | sys_linux=true |
| 96 | AC_DEFINE(FLAC__SYS_LINUX) |
| 97 | AH_TEMPLATE(FLAC__SYS_LINUX, [define if building for Linux]) |
| 98 | ;; |
| 99 | *-*-darwin*) |
| 100 | sys_darwin=true |
| 101 | AC_DEFINE(FLAC__SYS_DARWIN) |
| 102 | AH_TEMPLATE(FLAC__SYS_DARWIN, [define if building for Darwin / MacOS X]) |
| 103 | ;; |
Josh Coalson | 27ae348 | 2005-01-27 03:59:55 +0000 | [diff] [blame] | 104 | esac |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 105 | AM_CONDITIONAL(FLaC__SYS_DARWIN, test "x$sys_darwin" = xtrue) |
| 106 | AM_CONDITIONAL(FLaC__SYS_LINUX, test "x$sys_linux" = xtrue) |
Josh Coalson | cf030c8 | 2001-05-23 20:59:48 +0000 | [diff] [blame] | 107 | |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 108 | if test "x$cpu_ia32" = xtrue ; then |
Josh Coalson | 0e3576e | 2001-05-25 00:07:51 +0000 | [diff] [blame] | 109 | AC_DEFINE(FLAC__ALIGN_MALLOC_DATA) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 110 | 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] | 111 | fi |
Josh Coalson | cf030c8 | 2001-05-23 20:59:48 +0000 | [diff] [blame] | 112 | |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 113 | AC_ARG_ENABLE(asm-optimizations, AC_HELP_STRING([--disable-asm-optimizations], [Don't use any assembly optimization routines]), asm_opt=no, asm_opt=yes) |
| 114 | AM_CONDITIONAL(FLaC__NO_ASM, test "x$asm_opt" = xno) |
| 115 | if test "x$asm_opt" = xno ; then |
Josh Coalson | 0e3576e | 2001-05-25 00:07:51 +0000 | [diff] [blame] | 116 | AC_DEFINE(FLAC__NO_ASM) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 117 | AH_TEMPLATE(FLAC__NO_ASM, [define to disable use of assembly code]) |
Josh Coalson | 0e3576e | 2001-05-25 00:07:51 +0000 | [diff] [blame] | 118 | fi |
Josh Coalson | cf030c8 | 2001-05-23 20:59:48 +0000 | [diff] [blame] | 119 | |
Josh Coalson | 9f429ba | 2001-01-19 22:39:39 +0000 | [diff] [blame] | 120 | AC_ARG_ENABLE(debug, |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 121 | AC_HELP_STRING([--enable-debug], [Turn on debugging]), |
Josh Coalson | da0adb2 | 2001-06-18 23:07:19 +0000 | [diff] [blame] | 122 | [case "${enableval}" in |
| 123 | yes) debug=true ;; |
| 124 | no) debug=false ;; |
| 125 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; |
| 126 | esac],[debug=false]) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 127 | AM_CONDITIONAL(DEBUG, test "x$debug" = xtrue) |
Josh Coalson | 9f429ba | 2001-01-19 22:39:39 +0000 | [diff] [blame] | 128 | |
Josh Coalson | bb14ae8 | 2001-12-04 06:46:35 +0000 | [diff] [blame] | 129 | AC_ARG_ENABLE(sse, |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 130 | 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] | 131 | [case "${enableval}" in |
| 132 | yes) sse_os=true ;; |
| 133 | no) sse_os=false ;; |
Josh Coalson | bb14ae8 | 2001-12-04 06:46:35 +0000 | [diff] [blame] | 134 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-sse) ;; |
Josh Coalson | d01b13a | 2001-07-18 00:27:06 +0000 | [diff] [blame] | 135 | esac],[sse_os=false]) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 136 | AM_CONDITIONAL(FLaC__SSE_OS, test "x$sse_os" = xtrue) |
| 137 | if test "x$sse_os" = xtrue ; then |
Josh Coalson | d01b13a | 2001-07-18 00:27:06 +0000 | [diff] [blame] | 138 | AC_DEFINE(FLAC__SSE_OS) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 139 | 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] | 140 | fi |
| 141 | |
Josh Coalson | 28311cf | 2002-12-26 19:35:19 +0000 | [diff] [blame] | 142 | AC_ARG_ENABLE(3dnow, |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 143 | AC_HELP_STRING([--disable-3dnow], [Disable 3DNOW! optimizations]), |
Josh Coalson | 28311cf | 2002-12-26 19:35:19 +0000 | [diff] [blame] | 144 | [case "${enableval}" in |
| 145 | yes) use_3dnow=true ;; |
| 146 | no) use_3dnow=false ;; |
| 147 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-3dnow) ;; |
| 148 | esac],[use_3dnow=true]) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 149 | AM_CONDITIONAL(FLaC__USE_3DNOW, test "x$use_3dnow" = xtrue) |
| 150 | if test "x$use_3dnow" = xtrue ; then |
Josh Coalson | c69f878 | 2001-11-13 23:08:22 +0000 | [diff] [blame] | 151 | AC_DEFINE(FLAC__USE_3DNOW) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 152 | AH_TEMPLATE(FLAC__USE_3DNOW, [define to enable use of 3Dnow! instructions]) |
Josh Coalson | c69f878 | 2001-11-13 23:08:22 +0000 | [diff] [blame] | 153 | fi |
| 154 | |
Josh Coalson | 3aadd10 | 2004-07-27 01:13:16 +0000 | [diff] [blame] | 155 | AC_ARG_ENABLE(altivec, |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 156 | AC_HELP_STRING([--disable-altivec], [Disable Altivec optimizations]), |
Josh Coalson | 3aadd10 | 2004-07-27 01:13:16 +0000 | [diff] [blame] | 157 | [case "${enableval}" in |
| 158 | yes) use_altivec=true ;; |
| 159 | no) use_altivec=false ;; |
| 160 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-altivec) ;; |
| 161 | esac],[use_altivec=true]) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 162 | AM_CONDITIONAL(FLaC__USE_ALTIVEC, test "x$use_altivec" = xtrue) |
| 163 | if test "x$use_altivec" = xtrue ; then |
Josh Coalson | 3aadd10 | 2004-07-27 01:13:16 +0000 | [diff] [blame] | 164 | AC_DEFINE(FLAC__USE_ALTIVEC) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 165 | AH_TEMPLATE(FLAC__USE_ALTIVEC, [define to enable use of Altivec instructions]) |
Josh Coalson | 3aadd10 | 2004-07-27 01:13:16 +0000 | [diff] [blame] | 166 | fi |
| 167 | |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 168 | AC_ARG_ENABLE(thorough-tests, |
| 169 | AC_HELP_STRING([--disable-thorough-tests], [Disable thorough (long) testing, do only basic tests]), |
| 170 | [case "${enableval}" in |
| 171 | yes) thorough_tests=true ;; |
| 172 | no) thorough_tests=false ;; |
| 173 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-thorough-tests) ;; |
| 174 | esac],[thorough_tests=true]) |
Josh Coalson | 9b14518 | 2002-08-30 05:39:36 +0000 | [diff] [blame] | 175 | AC_ARG_ENABLE(exhaustive-tests, |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 176 | AC_HELP_STRING([--enable-exhaustive-tests], [Enable exhaustive testing (VERY long)]), |
Josh Coalson | 9b14518 | 2002-08-30 05:39:36 +0000 | [diff] [blame] | 177 | [case "${enableval}" in |
| 178 | yes) exhaustive_tests=true ;; |
| 179 | no) exhaustive_tests=false ;; |
| 180 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-exhaustive-tests) ;; |
| 181 | esac],[exhaustive_tests=false]) |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 182 | if test "x$thorough_tests" = xfalse ; then |
| 183 | FLAC__TEST_LEVEL=0 |
| 184 | elif test "x$exhaustive_tests" = xfalse ; then |
| 185 | FLAC__TEST_LEVEL=1 |
| 186 | else |
| 187 | FLAC__TEST_LEVEL=2 |
Josh Coalson | 962bb3b | 2002-12-28 07:08:31 +0000 | [diff] [blame] | 188 | fi |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 189 | AC_SUBST(FLAC__TEST_LEVEL) |
Josh Coalson | d192362 | 2002-12-05 06:36:12 +0000 | [diff] [blame] | 190 | |
| 191 | AC_ARG_ENABLE(valgrind-testing, |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 192 | AC_HELP_STRING([--enable-valgrind-testing], [Run all tests inside Valgrind]), |
Josh Coalson | d192362 | 2002-12-05 06:36:12 +0000 | [diff] [blame] | 193 | [case "${enableval}" in |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 194 | yes) FLAC__TEST_WITH_VALGRIND=yes ;; |
| 195 | no) FLAC__TEST_WITH_VALGRIND=no ;; |
Josh Coalson | d192362 | 2002-12-05 06:36:12 +0000 | [diff] [blame] | 196 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind-testing) ;; |
Josh Coalson | de9091e | 2006-05-25 02:48:22 +0000 | [diff] [blame] | 197 | esac],[FLAC__TEST_WITH_VALGRIND=no]) |
| 198 | AC_SUBST(FLAC__TEST_WITH_VALGRIND) |
Josh Coalson | 9b14518 | 2002-08-30 05:39:36 +0000 | [diff] [blame] | 199 | |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 200 | AC_ARG_ENABLE(doxygen-docs, |
| 201 | AC_HELP_STRING([--disable-doxygen-docs], [Disable API documentation building via Doxygen]), |
| 202 | [case "${enableval}" in |
| 203 | yes) enable_doxygen_docs=true ;; |
| 204 | no) enable_doxygen_docs=false ;; |
| 205 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-doxygen-docs) ;; |
| 206 | esac],[enable_doxygen_docs=true]) |
Josh Coalson | c933c93 | 2006-05-25 04:21:43 +0000 | [diff] [blame] | 207 | if test "x$enable_doxygen_docs" != xfalse ; then |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 208 | AC_CHECK_PROGS(DOXYGEN, doxygen) |
| 209 | fi |
| 210 | AM_CONDITIONAL(FLaC__HAS_DOXYGEN, test -n "$DOXYGEN") |
| 211 | |
Josh Coalson | c933c93 | 2006-05-25 04:21:43 +0000 | [diff] [blame] | 212 | AC_ARG_ENABLE(local-xmms-plugin, |
| 213 | AC_HELP_STRING([--enable-local-xmms-plugin], [Install XMMS plugin to ~/.xmms/Plugins instead of system location]), |
| 214 | [case "${enableval}" in |
| 215 | yes) install_xmms_plugin_locally=true ;; |
| 216 | no) install_xmms_plugin_locally=false ;; |
| 217 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-local-xmms-plugin) ;; |
| 218 | esac],[install_xmms_plugin_locally=false]) |
| 219 | AM_CONDITIONAL(FLaC__INSTALL_XMMS_PLUGIN_LOCALLY, test "x$install_xmms_plugin_locally" = xtrue) |
| 220 | |
| 221 | AC_ARG_ENABLE(xmms-plugin, |
| 222 | AC_HELP_STRING([--disable-xmms-plugin], [Do not build XMMS plugin]), |
| 223 | [case "${enableval}" in |
| 224 | yes) enable_xmms_plugin=true ;; |
| 225 | no) enable_xmms_plugin=false ;; |
| 226 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-xmms-plugin) ;; |
| 227 | esac],[enable_xmms_plugin=true]) |
| 228 | if test "x$enable_xmms_plugin" != xfalse ; then |
| 229 | AM_PATH_XMMS(0.9.5.1, , AC_MSG_WARN([*** XMMS >= 0.9.5.1 not installed - XMMS support will not be built])) |
| 230 | fi |
| 231 | AM_CONDITIONAL(FLaC__HAS_XMMS, test -n "$XMMS_INPUT_PLUGIN_DIR") |
| 232 | |
Josh Coalson | 367c158 | 2007-08-29 05:45:19 +0000 | [diff] [blame] | 233 | dnl build FLAC++ or not |
| 234 | AC_ARG_ENABLE([cpplibs], |
| 235 | AC_HELP_STRING([--disable-cpplibs], [Do not build libFLAC++]), |
| 236 | [case "${enableval}" in |
| 237 | yes) disable_cpplibs=false ;; |
| 238 | no) disable_cpplibs=true ;; |
| 239 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-cpplibs) ;; |
| 240 | esac], [disable_cpplibs=false]) |
| 241 | AM_CONDITIONAL(FLaC__WITH_CPPLIBS, [test "x$disable_cpplibs" != xtrue]) |
| 242 | |
Josh Coalson | e2fece2 | 2002-09-09 21:54:28 +0000 | [diff] [blame] | 243 | dnl check for ogg library |
Josh Coalson | c0f51e7 | 2007-02-09 16:18:38 +0000 | [diff] [blame] | 244 | AC_ARG_ENABLE([ogg], |
| 245 | AC_HELP_STRING([--disable-ogg], [Disable ogg support (default: test for libogg)]), |
| 246 | [ want_ogg=$enableval ], [ want_ogg=yes ] ) |
| 247 | |
| 248 | if test "x$want_ogg" != "xno"; then |
| 249 | XIPH_PATH_OGG(have_ogg=yes, AC_MSG_WARN([*** Ogg development enviroment not installed - Ogg support will not be built])) |
| 250 | fi |
| 251 | |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 252 | AM_CONDITIONAL(FLaC__HAS_OGG, [test "x$have_ogg" = xyes]) |
| 253 | if test "x$have_ogg" = xyes ; then |
Josh Coalson | c8a7d35 | 2001-11-11 03:59:46 +0000 | [diff] [blame] | 254 | AC_DEFINE(FLAC__HAS_OGG) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 255 | AH_TEMPLATE(FLAC__HAS_OGG, [define if you have the ogg library]) |
Josh Coalson | c8a7d35 | 2001-11-11 03:59:46 +0000 | [diff] [blame] | 256 | fi |
Josh Coalson | f7fc5c8 | 2001-10-31 18:31:36 +0000 | [diff] [blame] | 257 | |
Josh Coalson | 130cbb5 | 2002-07-16 16:12:27 +0000 | [diff] [blame] | 258 | dnl check for i18n(internationalization); these are from libiconv/gettext |
Josh Coalson | 412fa3b | 2002-07-11 06:15:30 +0000 | [diff] [blame] | 259 | AM_ICONV |
| 260 | AM_LANGINFO_CODESET |
| 261 | |
Josh Coalson | 90e5716 | 2004-07-30 00:46:39 +0000 | [diff] [blame] | 262 | AC_CHECK_PROGS(DOCBOOK_TO_MAN, docbook-to-man docbook2man) |
| 263 | AM_CONDITIONAL(FLaC__HAS_DOCBOOK_TO_MAN, test -n "$DOCBOOK_TO_MAN") |
| 264 | if test -n "$DOCBOOK_TO_MAN" ; then |
| 265 | AC_DEFINE(FLAC__HAS_DOCBOOK_TO_MAN) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 266 | 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] | 267 | fi |
| 268 | |
Josh Coalson | b990022 | 2004-12-30 01:13:03 +0000 | [diff] [blame] | 269 | # only matters for x86 |
Josh Coalson | cf030c8 | 2001-05-23 20:59:48 +0000 | [diff] [blame] | 270 | AC_CHECK_PROGS(NASM, nasm) |
| 271 | AM_CONDITIONAL(FLaC__HAS_NASM, test -n "$NASM") |
Josh Coalson | 0e3576e | 2001-05-25 00:07:51 +0000 | [diff] [blame] | 272 | if test -n "$NASM" ; then |
| 273 | AC_DEFINE(FLAC__HAS_NASM) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 274 | 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] | 275 | fi |
Josh Coalson | 9f429ba | 2001-01-19 22:39:39 +0000 | [diff] [blame] | 276 | |
Josh Coalson | b990022 | 2004-12-30 01:13:03 +0000 | [diff] [blame] | 277 | # only matters for PowerPC |
Josh Coalson | a02b73f | 2005-03-02 05:21:06 +0000 | [diff] [blame] | 278 | AC_CHECK_PROGS(AS, as, as) |
| 279 | AC_CHECK_PROGS(GAS, gas, gas) |
| 280 | |
Josh Coalson | fef9348 | 2006-11-17 06:51:53 +0000 | [diff] [blame] | 281 | # try -v (apple as) and --version (gas) at the same time |
| 282 | test "$AS" = "as" && as --version -v < /dev/null 2>&1 | grep Apple >/dev/null || AS=gas |
Josh Coalson | a02b73f | 2005-03-02 05:21:06 +0000 | [diff] [blame] | 283 | |
| 284 | AM_CONDITIONAL(FLaC__HAS_AS, test "$AS" = "as") |
| 285 | AM_CONDITIONAL(FLaC__HAS_GAS, test "$AS" = "gas") |
| 286 | if test "$AS" = "as" ; then |
Josh Coalson | b990022 | 2004-12-30 01:13:03 +0000 | [diff] [blame] | 287 | AC_DEFINE(FLAC__HAS_AS) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 288 | 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] | 289 | fi |
Josh Coalson | a02b73f | 2005-03-02 05:21:06 +0000 | [diff] [blame] | 290 | if test "$AS" = "gas" ; then |
Josh Coalson | b990022 | 2004-12-30 01:13:03 +0000 | [diff] [blame] | 291 | # funniest. macro. ever. |
| 292 | AC_DEFINE(FLAC__HAS_GAS) |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 293 | 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] | 294 | fi |
| 295 | |
Josh Coalson | 8403c2a | 2007-07-31 00:25:52 +0000 | [diff] [blame] | 296 | CPPFLAGS='-I$(top_builddir) -I$(srcdir)/include -I$(top_srcdir)/include'" $CPPFLAGS" |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 297 | if test "x$debug" = xtrue; then |
Josh Coalson | 8403c2a | 2007-07-31 00:25:52 +0000 | [diff] [blame] | 298 | CPPFLAGS="-DDEBUG $CPPFLAGS" |
| 299 | CFLAGS="-g $CFLAGS" |
Josh Coalson | 9f429ba | 2001-01-19 22:39:39 +0000 | [diff] [blame] | 300 | else |
Josh Coalson | 8403c2a | 2007-07-31 00:25:52 +0000 | [diff] [blame] | 301 | CPPFLAGS="-DNDEBUG $CPPFLAGS" |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 302 | if test "x$GCC" = xyes; then |
Josh Coalson | 8403c2a | 2007-07-31 00:25:52 +0000 | [diff] [blame] | 303 | CPPFLAGS="-DFLaC__INLINE=__inline__ $CPPFLAGS" |
| 304 | CFLAGS="-O3 -funroll-loops -finline-functions -Wall -W -Winline $CFLAGS" |
Josh Coalson | da0adb2 | 2001-06-18 23:07:19 +0000 | [diff] [blame] | 305 | fi |
Josh Coalson | 9f429ba | 2001-01-19 22:39:39 +0000 | [diff] [blame] | 306 | fi |
| 307 | |
Josh Coalson | 92f7fa9 | 2006-10-09 05:34:21 +0000 | [diff] [blame] | 308 | #@@@ |
Josh Coalson | 3c8d297 | 2005-01-30 18:44:04 +0000 | [diff] [blame] | 309 | AM_CONDITIONAL(FLaC__HAS_AS__TEMPORARILY_DISABLED, test "yes" = "no") |
| 310 | AM_CONDITIONAL(FLaC__HAS_GAS__TEMPORARILY_DISABLED, test "yes" = "no") |
| 311 | |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 312 | AC_CONFIG_FILES([ \ |
Josh Coalson | 1d96b7e | 2002-07-24 06:13:33 +0000 | [diff] [blame] | 313 | Makefile \ |
| 314 | src/Makefile \ |
| 315 | src/libFLAC/Makefile \ |
Josh Coalson | 07e89cc | 2007-02-07 01:24:15 +0000 | [diff] [blame] | 316 | src/libFLAC/flac.pc \ |
Josh Coalson | 1d96b7e | 2002-07-24 06:13:33 +0000 | [diff] [blame] | 317 | src/libFLAC/ia32/Makefile \ |
Josh Coalson | 3aadd10 | 2004-07-27 01:13:16 +0000 | [diff] [blame] | 318 | src/libFLAC/ppc/Makefile \ |
Josh Coalson | b990022 | 2004-12-30 01:13:03 +0000 | [diff] [blame] | 319 | src/libFLAC/ppc/as/Makefile \ |
| 320 | src/libFLAC/ppc/gas/Makefile \ |
Josh Coalson | 1d96b7e | 2002-07-24 06:13:33 +0000 | [diff] [blame] | 321 | src/libFLAC/include/Makefile \ |
| 322 | src/libFLAC/include/private/Makefile \ |
| 323 | src/libFLAC/include/protected/Makefile \ |
| 324 | src/libFLAC++/Makefile \ |
Josh Coalson | 07e89cc | 2007-02-07 01:24:15 +0000 | [diff] [blame] | 325 | src/libFLAC++/flac++.pc \ |
Josh Coalson | 1d96b7e | 2002-07-24 06:13:33 +0000 | [diff] [blame] | 326 | src/flac/Makefile \ |
| 327 | src/metaflac/Makefile \ |
Josh Coalson | 2080974 | 2003-01-10 04:39:20 +0000 | [diff] [blame] | 328 | src/monkeys_audio_utilities/Makefile \ |
Josh Coalson | 1f99eac | 2002-08-23 06:45:23 +0000 | [diff] [blame] | 329 | src/monkeys_audio_utilities/flac_mac/Makefile \ |
| 330 | src/monkeys_audio_utilities/flac_ren/Makefile \ |
Josh Coalson | 1f99eac | 2002-08-23 06:45:23 +0000 | [diff] [blame] | 331 | src/plugin_common/Makefile \ |
| 332 | src/plugin_winamp2/Makefile \ |
Josh Coalson | 2080974 | 2003-01-10 04:39:20 +0000 | [diff] [blame] | 333 | src/plugin_winamp2/include/Makefile \ |
| 334 | src/plugin_winamp2/include/winamp2/Makefile \ |
Josh Coalson | 1d96b7e | 2002-07-24 06:13:33 +0000 | [diff] [blame] | 335 | src/plugin_xmms/Makefile \ |
| 336 | src/share/Makefile \ |
Josh Coalson | 3c043fd | 2002-10-25 04:57:05 +0000 | [diff] [blame] | 337 | src/share/getopt/Makefile \ |
Josh Coalson | b8f8a07 | 2002-11-07 05:07:30 +0000 | [diff] [blame] | 338 | src/share/grabbag/Makefile \ |
Josh Coalson | 9c650a5 | 2003-12-17 04:51:06 +0000 | [diff] [blame] | 339 | src/share/replaygain_analysis/Makefile \ |
| 340 | src/share/replaygain_synthesis/Makefile \ |
Josh Coalson | e2999b7 | 2003-12-17 04:54:20 +0000 | [diff] [blame] | 341 | src/share/replaygain_synthesis/include/Makefile \ |
| 342 | src/share/replaygain_synthesis/include/private/Makefile \ |
Josh Coalson | 3c043fd | 2002-10-25 04:57:05 +0000 | [diff] [blame] | 343 | src/share/utf8/Makefile \ |
Josh Coalson | 1dca1c2 | 2002-12-03 06:30:14 +0000 | [diff] [blame] | 344 | src/test_grabbag/Makefile \ |
Josh Coalson | 2080974 | 2003-01-10 04:39:20 +0000 | [diff] [blame] | 345 | src/test_grabbag/cuesheet/Makefile \ |
Josh Coalson | 6a630c3 | 2006-09-29 14:58:56 +0000 | [diff] [blame] | 346 | src/test_grabbag/picture/Makefile \ |
Josh Coalson | 6b21f66 | 2006-09-13 01:42:27 +0000 | [diff] [blame] | 347 | src/test_libs_common/Makefile \ |
Josh Coalson | 1d96b7e | 2002-07-24 06:13:33 +0000 | [diff] [blame] | 348 | src/test_libFLAC/Makefile \ |
| 349 | src/test_libFLAC++/Makefile \ |
Josh Coalson | 94b5499 | 2004-09-21 05:41:23 +0000 | [diff] [blame] | 350 | src/test_seeking/Makefile \ |
Josh Coalson | 1d96b7e | 2002-07-24 06:13:33 +0000 | [diff] [blame] | 351 | src/test_streams/Makefile \ |
Josh Coalson | da0adb2 | 2001-06-18 23:07:19 +0000 | [diff] [blame] | 352 | include/Makefile \ |
| 353 | include/FLAC/Makefile \ |
Josh Coalson | 5a804ca | 2002-05-17 06:08:13 +0000 | [diff] [blame] | 354 | include/FLAC++/Makefile \ |
| 355 | include/share/Makefile \ |
Josh Coalson | b8f8a07 | 2002-11-07 05:07:30 +0000 | [diff] [blame] | 356 | include/share/grabbag/Makefile \ |
Josh Coalson | 6b21f66 | 2006-09-13 01:42:27 +0000 | [diff] [blame] | 357 | include/test_libs_common/Makefile \ |
Josh Coalson | 4c8f73a | 2001-07-22 07:27:45 +0000 | [diff] [blame] | 358 | doc/Makefile \ |
Josh Coalson | 130cbb5 | 2002-07-16 16:12:27 +0000 | [diff] [blame] | 359 | doc/html/Makefile \ |
| 360 | doc/html/images/Makefile \ |
Josh Coalson | a8d7b4e | 2007-02-14 06:12:24 +0000 | [diff] [blame] | 361 | doc/html/images/hw/Makefile \ |
Josh Coalson | 130cbb5 | 2002-07-16 16:12:27 +0000 | [diff] [blame] | 362 | doc/html/ru/Makefile \ |
Josh Coalson | 752a2ac | 2006-11-21 01:41:30 +0000 | [diff] [blame] | 363 | m4/Makefile \ |
Josh Coalson | 4c8f73a | 2001-07-22 07:27:45 +0000 | [diff] [blame] | 364 | man/Makefile \ |
Josh Coalson | 1d96b7e | 2002-07-24 06:13:33 +0000 | [diff] [blame] | 365 | test/Makefile \ |
Josh Coalson | 2080974 | 2003-01-10 04:39:20 +0000 | [diff] [blame] | 366 | test/cuesheets/Makefile \ |
Josh Coalson | 6b21f66 | 2006-09-13 01:42:27 +0000 | [diff] [blame] | 367 | test/flac-to-flac-metadata-test-files/Makefile \ |
| 368 | test/metaflac-test-files/Makefile \ |
Josh Coalson | 66616f9 | 2006-10-03 01:07:24 +0000 | [diff] [blame] | 369 | test/pictures/Makefile \ |
Josh Coalson | 1f99eac | 2002-08-23 06:45:23 +0000 | [diff] [blame] | 370 | build/Makefile \ |
Josh Coalson | 2080974 | 2003-01-10 04:39:20 +0000 | [diff] [blame] | 371 | obj/Makefile \ |
| 372 | obj/debug/Makefile \ |
Josh Coalson | b74fc98 | 2002-11-20 06:40:08 +0000 | [diff] [blame] | 373 | obj/debug/bin/Makefile \ |
| 374 | obj/debug/lib/Makefile \ |
Josh Coalson | 2080974 | 2003-01-10 04:39:20 +0000 | [diff] [blame] | 375 | obj/release/Makefile \ |
Josh Coalson | b74fc98 | 2002-11-20 06:40:08 +0000 | [diff] [blame] | 376 | obj/release/bin/Makefile \ |
| 377 | obj/release/lib/Makefile \ |
Josh Coalson | b1ec796 | 2006-05-24 04:41:36 +0000 | [diff] [blame] | 378 | ]) |
| 379 | AC_OUTPUT |