• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1dnl $Id$
2dnl
3dnl
4dnl don't forget to set ASM_FOR_ARCH to a space delimited list of
5dnl processor architectures, for which assembler routines exist
6dnl
7dnl
8dnl Exported and configured variables:
9dnl CC
10dnl CFLAGS
11dnl LDFLAGS
12dnl LDADD
13dnl NASM
14
15dnl extra vars for frontend:
16dnl FRONTEND_LDFLAGS
17dnl FRONTEND_CFLAGS
18dnl FRONTEND_LDADD
19
20dnl extra vars for libmp3lame:
21dnl LIBMP3LAME_LDADD
22
23AC_PREREQ(2.69)
24AC_INIT([lame],[3.100],[lame-dev@lists.sf.net])
25AC_CONFIG_SRCDIR([libmp3lame/lame.c])
26AC_LANG([C])
27
28dnl check system
29AC_CANONICAL_HOST
30
31dnl automake
32AM_INIT_AUTOMAKE
33AC_CONFIG_HEADERS([config.h])
34AH_TOP([
35#ifndef LAME_CONFIG_H
36#define LAME_CONFIG_H
37])
38AH_BOTTOM([#endif /* LAME_CONFIG_H */])
39AM_MAINTAINER_MODE
40AM_MAKE_INCLUDE
41PKG_PROG_PKG_CONFIG([])
42
43dnl check environment
44AC_AIX
45AC_ISC_POSIX
46AC_MINIX
47case $host_os in
48  *cygwin* ) CYGWIN=yes;;
49         * ) CYGWIN=no;;
50esac
51
52dnl libtool
53# AC_DISABLE_SHARED
54AC_PROG_LIBTOOL
55AC_SUBST(LIBTOOL_DEPS)
56CFLAGS="${ac_save_CFLAGS}"
57
58# increase this when the shared lib becomes totally incompatible
59LIB_MAJOR_VERSION=0
60
61# increase this when changes are made, but they are upward compatible
62# to previous versions
63LIB_MINOR_VERSION=0
64
65dnl # work around for a bug, don't know where it is exactly
66if test "${ac_cv_cygwin}" = "yes"; then
67	if test "${CC}" != "gcc"; then
68		AC_MSG_ERROR([Please use]
69			[   CC=gcc ./configure]
70			[Abort this configure run and add "CC=gcc" or you will]
71			[see errors and no lame.exe will be build.])
72	fi
73fi
74
75dnl check programs
76AC_PROG_CC()
77
78if test "x${GCC}" = "xyes"; then
79	AC_MSG_CHECKING(compiler)
80	COMPILER_TYPE="`${CC} --version | head -1 | sed -e '1,$s/version.*//g'`"
81	case "${COMPILER_TYPE}" in
82	*gcc*)
83		AC_MSG_RESULT(gcc)
84		HAVE_GCC=yes
85		HAVE_CLANG=no
86		;;
87	*clang*)
88		AC_MSG_RESULT(clang)
89		HAVE_CLANG=yes
90		HAVE_GCC=no
91		;;
92	*)
93		AC_MSG_RESULT(unknown)
94		HAVE_GCC=no
95		HAVE_CLANG=no
96		;;
97	esac
98
99	if test "${HAVE_GCC}" = "yes"; then
100		AC_MSG_CHECKING(version of GCC)
101		GCC_version="`${CC} --version | sed -n '1s/^[[^ ]]* (.*) //;s/ .*$//;1p'`"
102		case "${GCC_version}" in
103		[[0-9]]*[[0-9]]*)
104			AC_MSG_RESULT(${GCC_version})
105			;;
106		*)
107			# probably not gcc...
108			AC_MSG_RESULT(unknown compiler version pattern, playing safe and disabling gcc optimisations... ${GCC_version})
109			HAVE_GCC=no
110			;;
111		esac
112	fi
113
114	if test "${HAVE_CLANG}" = "yes"; then
115		AC_MSG_CHECKING(version of clang)
116		CLANG_version="`${CC} --version | sed -n 's/.*clang version //;s/ .*$//;1p'`"
117		AC_MSG_RESULT(${CLANG_version})
118	fi
119fi
120
121
122
123AC_CHECK_HEADER(dmalloc.h)
124if test "${ac_cv_header_dmalloc_h}" = "yes"; then
125	AM_WITH_DMALLOC
126fi
127
128dnl Checks for header files.
129AC_HEADER_STDC
130AC_CHECK_HEADERS( \
131		 errno.h \
132		 fcntl.h \
133		 limits.h \
134		 stdint.h \
135		 string.h \
136		 sys/soundcard.h \
137		 sys/time.h \
138		 unistd.h \
139		 linux/soundcard.h)
140
141dnl Checks for actually working SSE intrinsics
142AC_MSG_CHECKING(working SSE intrinsics)
143AC_COMPILE_IFELSE(
144	[AC_LANG_PROGRAM(
145		[[#include <xmmintrin.h>]],
146		[[_mm_sfence();]])],
147	[AC_DEFINE([HAVE_XMMINTRIN_H], [1], [Define if SSE intrinsics work.])
148	 ac_cv_header_xmmintrin_h=yes],
149	[ac_cv_header_xmmintrin_h=no])
150AC_MSG_RESULT(${ac_cv_header_xmmintrin_h})
151
152dnl Checks for typedefs, structures, and compiler characteristics.
153AC_C_CONST
154AC_C_INLINE
155if test ${cross_compiling} = "no"; then
156	AC_C_BIGENDIAN
157fi
158
159AC_SYS_LARGEFILE
160
161AC_CHECK_SIZEOF(short)
162AC_CHECK_SIZEOF(unsigned short)
163AC_CHECK_SIZEOF(int)
164AC_CHECK_SIZEOF(unsigned int)
165AC_CHECK_SIZEOF(long)
166AC_CHECK_SIZEOF(unsigned long)
167AC_CHECK_SIZEOF(long long)
168AC_CHECK_SIZEOF(unsigned long long)
169AC_CHECK_SIZEOF(float)
170AC_CHECK_SIZEOF(double)
171
172if test $ac_cv_sizeof_short -eq 0 \
173    -o $ac_cv_sizeof_unsigned_short -eq 0 \
174    -o $ac_cv_sizeof_int -eq 0 \
175    -o $ac_cv_sizeof_unsigned_int -eq 0 \
176    -o $ac_cv_sizeof_long -eq 0 \
177    -o $ac_cv_sizeof_unsigned_long -eq 0 \
178    -o $ac_cv_sizeof_long_long -eq 0 \
179    -o $ac_cv_sizeof_unsigned_long_long -eq 0 \
180    -o $ac_cv_sizeof_float -eq 0 \
181    -o $ac_cv_sizeof_double -eq 0; then
182	echo '*** I have a problem determining the size of some variable types. Either'
183	echo '*** you compiler is broken, or your system+compiler combination is not'
184	echo '*** supportet by the "autoconf" framework we use to generate this'
185	echo '*** configure script.'
186	exit 1
187fi
188
189AC_C_LONG_DOUBLE
190if test "${ac_cv_c_have_long_double}" = "yes" ; then
191	AC_CHECK_SIZEOF(long double)
192fi
193
194AC_CHECK_TYPES([uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t])
195
196AH_VERBATIM([HAVE_UINT8_T],
197[/* add uint8_t type */
198#undef HAVE_UINT8_T
199#ifndef HAVE_UINT8_T
200	typedef unsigned char uint8_t;
201#endif])
202
203AH_VERBATIM([HAVE_INT8_T],
204[/* add int8_t type */
205#undef HAVE_INT8_T
206#ifndef HAVE_INT8_T
207	typedef char int8_t;
208#endif])
209
210AH_VERBATIM([HAVE_UINT16_T],
211[/* add uint16_t type */
212#undef HAVE_UINT16_T
213#ifndef HAVE_UINT16_T
214	typedef unsigned short uint16_t;
215#endif])
216
217AH_VERBATIM([HAVE_INT16_T],
218[/* add int16_t type */
219#undef HAVE_INT16_T
220#ifndef HAVE_INT16_T
221	typedef short int16_t;
222#endif])
223
224if test "${HAVE_INT32_T}" = yes; then
225	AC_DEFINE(A_UINT32_T,unsigned int32_t)
226else
227	if test "${ac_cv_sizeof_unsigned_short}" = "4"; then
228		AC_DEFINE(A_UINT32_T,unsigned short)
229	else
230		if test "${ac_cv_sizeof_unsigned_int}" = "4"; then
231			AC_DEFINE(A_UINT32_T,unsigned int)
232		else
233			if test "${ac_cv_sizeof_unsigned_long}" = "4"; then
234				AC_DEFINE(A_UINT32_T,unsigned long)
235			else
236				AC_MSG_ERROR([CHECK_TYPE_uint32_t - please report to lame-dev@lists.sourceforge.net])
237			fi
238		fi
239	fi
240fi
241
242AH_VERBATIM([HAVE_UINT32_T],
243[/* add uint32_t type */
244#undef HAVE_UINT32_T
245#ifndef HAVE_UINT32_T
246#undef A_UINT32_T
247	typedef A_UINT32_T uint32_t;
248#endif])
249
250if test "${ac_cv_sizeof_short}" = "4"; then
251	AC_DEFINE(A_INT32_T,short)
252else
253	if test "${ac_cv_sizeof_int}" = "4"; then
254		AC_DEFINE(A_INT32_T,int)
255	else
256		if test "${ac_cv_sizeof_long}" = "4"; then
257			AC_DEFINE(A_INT32_T,long)
258		else
259			AC_MSG_ERROR([CHECK_TYPE_int32_t - please report to lame-dev@lists.sourceforge.net])
260		fi
261	fi
262fi
263
264AH_VERBATIM([HAVE_INT32_T],
265[/* add int32_t type */
266#undef HAVE_INT32_T
267#ifndef HAVE_INT32_T
268#undef A_INT32_T
269	typedef A_INT32_T int32_t;
270#endif])
271
272if test "${HAVE_INT64_T}" = yes; then
273        AC_DEFINE(A_UINT64_T,unsigned int64_t)
274else
275	if test "${ac_cv_sizeof_unsigned_int}" = "8"; then
276		AC_DEFINE(A_UINT64_T,unsigned int)
277	else
278		if test "${ac_cv_sizeof_unsigned_long}" = "8"; then
279			AC_DEFINE(A_UINT64_T,unsigned long)
280		else
281			if test "${ac_cv_sizeof_unsigned_long_long}" = "8"; then
282				AC_DEFINE(A_UINT64_T,unsigned long long)
283			else
284				AC_MSG_ERROR([CHECK_TYPE_uint64_t - please report to lame-dev@lists.sourceforge.net])
285			fi
286		fi
287	fi
288fi
289
290AH_VERBATIM([HAVE_UINT64_T],
291[/* add uint64_t type */
292#undef HAVE_UINT64_T
293#ifndef HAVE_UINT64_T
294#undef A_UINT64_T
295	typedef A_UINT64_T uint64_t;
296#endif])
297
298if test "${ac_cv_sizeof_int}" = "8"; then
299	AC_DEFINE(A_INT64_T,int)
300else
301	if test "${ac_cv_sizeof_long}" = "8"; then
302		AC_DEFINE(A_INT64_T,long)
303	else
304		if test "${ac_cv_sizeof_long_long}" = "8"; then
305			AC_DEFINE(A_INT64_T,long long)
306		else
307			AC_MSG_ERROR([CHECK_TYPE_int64_t - please report to lame-dev@lists.sourceforge.net])
308		fi
309	fi
310fi
311
312AH_VERBATIM([HAVE_INT64_T],
313[/* add int64_t type */
314#undef HAVE_INT64_T
315#ifndef HAVE_INT64_T
316#undef A_INT64_T
317	typedef A_INT64_T int64_t;
318#endif])
319
320alex_IEEE854_FLOAT80
321if test "${alex_cv_ieee854_float80}" = "yes" ; then
322	if test "${ac_cv_c_long_double}" = "yes" ; then
323		AC_CHECK_TYPES(ieee854_float80_t, long double)
324		AH_VERBATIM([HAVE_IEEE854_FLOAT80_T],
325[/* add ieee854_float80_t type */
326#undef HAVE_IEEE854_FLOAT80_T
327#ifndef HAVE_IEEE854_FLOAT80_T
328	typedef long double ieee854_float80_t;
329#endif])
330
331		AC_DEFINE(HAVE_IEEE854_FLOAT80, 1, [system has 80 bit floats])
332	fi
333fi
334AC_CHECK_TYPES([ieee754_float64_t, ieee754_float32_t])
335
336AH_VERBATIM([HAVE_IEEE754_FLOAT64_T],
337[/* add ieee754_float64_t type */
338#undef HAVE_IEEE754_FLOAT64_T
339#ifndef HAVE_IEEE754_FLOAT64_T
340	typedef double ieee754_float64_t;
341#endif])
342
343AH_VERBATIM([HAVE_IEEE754_FLOAT32_T],
344[/* add ieee754_float32_t type */
345#undef HAVE_IEEE754_FLOAT32_T
346#ifndef HAVE_IEEE754_FLOAT32_T
347	typedef float ieee754_float32_t;
348#endif])
349
350AC_DEFINE(LAME_LIBRARY_BUILD, 1, [requested by Frank, seems to be temporary needed for a smooth transition])
351
352
353if test ${cross_compiling} = "yes"; then
354	AC_MSG_WARN([]
355  [**************************************************************************]
356  [*                                                                        *]
357  [* You are cross compiling:                                               *]
358  [*   - I did not have a change to determine                               *]
359  [*     + the size of:                                                     *]
360  [*       - short                                                          *]
361  [*       - unsigned short                                                 *]
362  [*       - int                                                            *]
363  [*       - unsigned int                                                   *]
364  [*       - long                                                           *]
365  [*       - unsigned long                                                  *]
366  [*       - float                                                          *]
367  [*       - double                                                         *]
368  [*       - long double                                                    *]
369  [*     + the endianess of the system                                      *]
370  [*   - You have to provide appropriate defines for them in config.h, e.g. *]
371  [*     + define SIZEOF_SHORT to 2 if the size of a short is 2             *]
372  [*     + define WORDS_BIGENDIAN if your system is a big endian system     *]
373  [*                                                                        *]
374  [**************************************************************************])
375fi
376
377AC_TYPE_SIZE_T
378AC_HEADER_TIME
379
380dnl Checks for library functions.
381AC_FUNC_ALLOCA
382AC_CHECK_FUNCS(gettimeofday strtol)
383
384if test "X${ac_cv_func_strtol}" != "Xyes"; then
385	AC_MSG_ERROR([function strtol is mandatory])
386fi
387
388dnl Check if we are on a mingw system, which needs libwsock32
389SOCKETFUNCTION=unknown
390AC_CHECK_FUNCS(socket)
391if test $ac_cv_func_socket = no; then
392	# maybe it is in libsocket
393	AC_CHECK_LIB(socket, socket, [AC_DEFINE(HAVE_SOCKET)
394	LIBS="$LIBS -lsocket"])
395	if test "X${ac_cv_lib_socket_socket}" != "Xyes"; then
396		SOCKETFUNCTION=NO
397	else
398		case ${host_os} in
399		*solaris*)
400			LIBS="$LIBS -lnsl"
401			;;
402		esac
403	fi
404fi
405
406dnl Initialize configuration variables for the Makefile
407CFLAGS=${CFLAGS}
408CONFIG_DEFS=${CONFIG_DEFS}
409NASM=
410INCLUDES="-I\$(top_srcdir)/include -I\$(srcdir)"
411FRONTEND_LDFLAGS=
412FRONTEND_CFLAGS=
413LIB_SOURCES=
414MAKEDEP="-M"
415RM_F="rm -f"
416
417AC_ARG_ENABLE(nasm,
418  [  --enable-nasm           Allow the use of nasm if available],
419  ASM_FOR_ARCH="i386", ASM_FOR_ARCH="")
420
421AC_ARG_ENABLE(ieeehack,
422  [  --enable-ieeehack       Enable Takhiros IEEE754 hack (speed improvement for old CPUs)],
423  IEEE754_HACK="yes", IEEE754_HACK="no")
424case ${IEEE754_HACK} in
425	yes)
426		AC_DEFINE(TAKEHIRO_IEEE754_HACK, 1, IEEE754 compatible machine)
427		;;
428	no)
429		AC_DEFINE(TAKEHIRO_IEEE754_HACK, 0, IEEE754 compatible machine)
430		;;
431esac
432
433dnl Checks for libraries.
434
435AC_CHECK_HEADERS(termcap.h)
436AC_CHECK_HEADERS(ncurses/termcap.h)
437AC_CHECK_LIB(termcap, initscr, HAVE_TERMCAP="termcap")
438AC_CHECK_LIB(curses, initscr, HAVE_TERMCAP="curses")
439AC_CHECK_LIB(ncurses, initscr, HAVE_TERMCAP="ncurses")
440AC_CHECK_HEADERS(langinfo.h, AC_CHECK_FUNCS(nl_langinfo))
441
442AM_ICONV
443
444dnl math lib
445AC_CHECK_LIB(m, cos, USE_LIBM="-lm")
446dnl free fast math library
447AC_CHECK_LIB(ffm, cos, USE_LIBM="-lffm -lm")
448dnl Compaq fast math library.
449AC_ARG_ENABLE(cpml,
450  [  --disable-cpml          Do not use Compaq's fast Math Library],
451  CONFIG_CPML="no", CONFIG_CPML="yes")
452if test "${CONFIG_CPML}" = yes; then
453      AC_CHECK_LIB(cpml, cos, USE_LIBM="-lcpml")
454fi
455CONFIG_MATH_LIB="${USE_LIBM}"
456
457dnl configure use of features
458
459AM_PATH_GTK(1.2.0, HAVE_GTK="yes", HAVE_GTK="no")
460
461dnl ElectricFence malloc debugging
462AC_MSG_CHECKING(use of ElectricFence malloc debugging)
463AC_ARG_ENABLE(efence,
464  [  --enable-efence         Use ElectricFence for malloc debugging],
465  CONFIG_EFENCE="${enableval}", CONFIG_EFENCE="no")
466
467case "${CONFIG_EFENCE}" in
468yes)
469	AC_CHECK_LIB(efence, EF_Print, HAVE_EFENCE="-lefence")
470	if test "x${HAVE_EFENCE}" != "x-lefence"; then
471		AC_MSG_RESULT(yes, but libefence not found)
472	else
473		LDADD="${LDADD} ${HAVE_EFENCE}"
474		AC_DEFINE(HAVE_EFENCE, 1, we link against libefence)
475		AC_MSG_RESULT(${CONFIG_EFENCE})
476	fi
477	;;
478no)
479	AC_MSG_RESULT(${CONFIG_EFENCE})
480	;;
481*)
482	AC_MSG_ERROR(bad value �${CONFIG_EFENCE}� for efence option)
483	;;
484esac
485
486
487dnl libsndfile
488WARNING=
489AC_ARG_WITH(fileio,
490  [  --with-fileio=lame      Use lame's internal file io routines [default]]
491  [             =sndfile   Use Erik de Castro Lopo's libsndfile]
492  [                        (no stdin possible currently)],
493  CONFIG_FILEIO="${withval}", CONFIG_FILEIO="lame")
494
495if test "${CONFIG_FILEIO}" = "sndfile" ; then
496  PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2, HAVE_SNDFILE="yes", HAVE_SNDFILE="no")
497fi
498
499AC_MSG_CHECKING(use of file io)
500
501if test "${CONFIG_FILEIO}" = "sndfile" ; then
502  if test "${HAVE_SNDFILE}" = "yes" -o "x${SNDFILE_LIBS}" != "x" \
503    -o "x${SNDFILE_CFLAGS}" != "x"; then
504    SNDFILE_LIBS=`echo ${SNDFILE_LIBS}`
505    SNDFILE_CFLAGS=`echo ${SNDFILE_CFLAGS}`
506
507    if test -n "${SNDFILE_LIBS}" ; then
508      FRONTEND_LDFLAGS="${SNDFILE_LIBS} ${FRONTEND_LDFLAGS}"
509    fi
510    FRONTEND_LDADD="-lsndfile ${FRONTEND_LDADD}"
511
512    if test -n "${SNDFILE_CFLAGS}" ; then
513      INCLUDES="${SNDFILE_CFLAGS} ${INCLUDES}"
514    fi
515
516    AC_DEFINE(LIBSNDFILE, 1, set to 1 if you have libsndfile)
517  else
518    # default
519    CONFIG_FILEIO="lame"
520    WARNING="${WARNING} Could not find any sndfile lib on system."
521  fi
522else
523  CONFIG_FILEIO="lame"
524fi
525AC_MSG_RESULT(${CONFIG_FILEIO})
526if test "x${WARNING}" != "x" ; then
527  AC_MSG_WARN($WARNING)
528fi
529
530
531dnl check if we should remove hooks for analyzer code in library
532dnl default library must include these hooks
533AC_MSG_CHECKING(use of analyzer hooks)
534AC_ARG_ENABLE(analyzer-hooks,
535  [  --disable-analyzer-hooks Exclude analyzer hooks],
536  CONFIG_ANALYZER="${enableval}", CONFIG_ANALYZER="yes")
537
538case "${CONFIG_ANALYZER}" in
539yes)
540	;;
541no)
542	AC_DEFINE(NOANALYSIS, 1, build without hooks for analyzer)
543	;;
544*)
545	AC_MSG_ERROR(bad value �${CONFIG_ANALYZER}� for analyzer-hooks option)
546	;;
547esac
548AC_MSG_RESULT($CONFIG_ANALYZER)
549
550
551dnl mpg123 decoder
552PKG_CHECK_MODULES([mpg123], [libmpg123 >= 1.26.0], [HAVE_MPG123="yes"], [HAVE_MPG123="no"])
553
554AC_MSG_CHECKING(use of mpg123 decoder)
555AC_ARG_ENABLE(decoder,
556  [  --disable-decoder          Exclude mpg123 decoder (internal or external)],
557  CONFIG_DECODER="${enableval}", CONFIG_DECODER="yes")
558AC_ARG_ENABLE(libmpg123,
559  [  --disable-libmpg123        Disable use of external libmpg123 decoder (normally favoured over internal decoder)],
560  CONFIG_MPG123="${enableval}", CONFIG_MPG123="auto")
561
562if test "${CONFIG_MPG123}" = "yes" && ! test "${HAVE_MPG123}" = "yes"; then
563	AC_MSG_ERROR([libmpg123 decoder enforced but not found])
564fi
565if test "${CONFIG_MPG123}" = "auto" && test "${HAVE_MPG123}" = "yes"; then
566	CONFIG_MPG123="yes"
567fi
568
569LIB_WITH_DECODER=false
570if test "${CONFIG_MPG123}" = "yes" && test "${CONFIG_DECODER}" != "no"; then
571	CONFIG_DECODER="no"
572	AC_MSG_RESULT(enabled use of external libmpg123 decoder)
573	AC_DEFINE(HAVE_MPG123, 1, set to 1 if you have libmpg123)
574	AC_DEFINE(DECODE_ON_THE_FLY, 1, allow to compute a more accurate replaygain value)
575	FRONTEND_LDADD="$mpg123_LIBS $FRONTEND_LDADD"
576	LIBMP3LAME_LDADD="$mpg123_LIBS $LIBMP3LAME_LDADD"
577	INCLUDES="$mpg123_CFLAGS $INCLUDES"
578else
579	if test "${CONFIG_DECODER}" != "no" ; then
580		LIB_WITH_DECODER=true
581		CONFIG_DECODER="internal mpglib decoder (Layer 1, 2, 3)"
582		AC_MSG_RESULT($CONFIG_DECODER)
583		AC_DEFINE(HAVE_MPGLIB, 1, build with mpglib support)
584		AC_DEFINE(DECODE_ON_THE_FLY, 1, allow to compute a more accurate replaygain value)
585	else
586		AC_MSG_RESULT($CONFIG_DECODER)
587	fi
588fi
589AM_CONDITIONAL(LIB_WITH_DECODER, ${LIB_WITH_DECODER})
590
591AC_MSG_CHECKING(if the lame frontend should be build)
592AC_ARG_ENABLE(frontend,
593  [  --disable-frontend      Do not build the lame executable [default=build]],
594    WITH_FRONTEND="${enableval}", WITH_FRONTEND=yes)
595if test "x${WITH_FRONTEND}" = "xyes"; then
596	WITH_FRONTEND=lame${ac_exeext}
597	AC_MSG_RESULT(yes)
598else
599	WITH_FRONTEND=
600	AC_MSG_RESULT(no)
601fi
602
603
604
605AC_MSG_CHECKING(if mp3x is requested)
606AC_ARG_ENABLE(mp3x,
607  [  --enable-mp3x           Build GTK frame analyzer [default=no]],
608    WITH_MP3X="${enableval}", WITH_MP3X=no)
609if test "x${WITH_MP3X}" = "xyes"; then
610	WITH_MP3X=mp3x${ac_exeext}
611	AC_MSG_RESULT(yes)
612else
613	WITH_MP3X=
614	AC_MSG_RESULT(no)
615fi
616
617if test "${HAVE_GTK}" = "no"; then
618	if test "x${WITH_MP3X}" = "xmp3x"; then
619		AC_MSG_WARN(can't build mp3x, no GTK installed)
620		WITH_MP3X=
621	fi
622	if test "x${CONFIG_ANALYZER}" != "xyes"; then
623		AC_MSG_WARN(can't build mp3x because of disabled analyzer hooks)
624		WITH_MP3X=
625	fi
626fi
627
628AC_MSG_CHECKING(if mp3rtp is requested)
629AC_ARG_ENABLE(mp3rtp,
630  [  --enable-mp3rtp         Build mp3rtp [default=no]],
631    WITH_MP3RTP="${enableval}", WITH_MP3RTP=no)
632if test "x${WITH_MP3RTP}" = "xyes"; then
633	if test ${SOCKETFUNCTION} = NO; then
634		AC_MSG_ERROR([function socket is mandatory for mp3rtp])
635	fi
636	WITH_MP3RTP=mp3rtp${ac_exeext}
637	AC_MSG_RESULT(yes)
638else
639	WITH_MP3RTP=
640	AC_MSG_RESULT(no)
641fi
642
643AC_MSG_CHECKING(if dynamic linking of the frontends is requested)
644AC_ARG_ENABLE(dynamic-frontends,
645  [  --enable-dynamic-frontends Link frontends against shared libraries [default=no]],
646    FRONTEND_LDFLAGS="${FRONTEND_LDFLAGS}", FRONTEND_LDFLAGS="${FRONTEND_LDFLAGS} -static")
647case "x${FRONTEND_LDFLAGS}" in
648*-static*)
649	AC_MSG_RESULT(no)
650	;;
651*)
652	AC_MSG_RESULT(yes)
653	;;
654esac
655
656
657#
658# this is from vorbis
659#
660dnl check GLIBC
661case $host in
662*86-*-linux*)
663	# glibc < 2.1.3 has a serious FP bug in the math inline header
664	# that will cripple Vorbis.  Look to see if the magic FP stack
665	# clobber is missing in the mathinline header, thus indicating
666	# the buggy version
667
668	AC_EGREP_CPP(log10.*fldlg2.*fxch,[
669		#define __LIBC_INTERNAL_MATH_INLINES 1
670	     	#define __OPTIMIZE__
671		#include <math.h>
672		],bad=maybe,bad=no)
673
674	AC_MSG_CHECKING(glibc mathinline bug)
675	if test ${bad} = "maybe" ;then
676	      AC_EGREP_CPP(log10.*fldlg2.*fxch.*st\([[0123456789]]*\),
677				[
678				#define __LIBC_INTERNAL_MATH_INLINES 1
679			     	#define __OPTIMIZE__
680				#include <math.h>
681				],bad=no,bad=yes)
682	fi
683	AC_MSG_RESULT(${bad})
684	if test ${bad} = "yes" ;then
685 AC_MSG_WARN([                                                        ])
686 AC_MSG_WARN([********************************************************])
687 AC_MSG_WARN([* The glibc headers on this machine have a serious bug *])
688 AC_MSG_WARN([* in /usr/include/bits/mathinline.h  This bug affects  *])
689 AC_MSG_WARN([* all floating point code, not only LAME, but all code *])
690 AC_MSG_WARN([* built on this machine. Upgrading to glibc 2.1.3 is   *])
691 AC_MSG_WARN([* strongly urged to correct the problem.               *])
692 AC_MSG_WARN([*Note: that upgrading glibc will not fix any previously*])
693 AC_MSG_WARN([* built programs; this is a compile-time bug.          *])
694 AC_MSG_WARN([* To work around the problem for this build of LAME,   *])
695 AC_MSG_WARN([* autoconf is disabling all math inlining.  This will  *])
696 AC_MSG_WARN([* hurt LAME performace but is necessary for LAME to    *])
697 AC_MSG_WARN([* work correctly.  Once glibc is upgraded, rerun       *])
698 AC_MSG_WARN([* configure and make to build with inlining.           *])
699 AC_MSG_WARN([********************************************************])
700 AC_MSG_WARN([                                                        ])
701
702	AC_DEFINE(__NO_MATH_INLINES, 1, work around a glibc bug)
703	fi;;
704esac
705
706
707dnl configure use of VBR bitrate histogram
708dnl todo: always use yes as default, use simulation instead ?
709AC_MSG_CHECKING(for termcap)
710if test "x${HAVE_TERMCAP}" != "x"; then
711  FRONTEND_LDADD="-l${HAVE_TERMCAP} ${FRONTEND_LDADD}"
712  AC_DEFINE(HAVE_TERMCAP, 1, have termcap)
713  TERMCAP_DEFAULT="yes"
714else
715  TERMCAP_DEFAULT="no"
716fi
717AC_MSG_RESULT(${TERMCAP_DEFAULT})
718
719
720dnl ### processor specific options ###
721WITH_VECTOR=no
722case $host_cpu in
723x86_64|amd64)
724	CPUTYPE="no"
725	if test $ac_cv_header_xmmintrin_h = yes ; then
726		WITH_XMM=yes
727		WITH_VECTOR=yes
728	fi
729
730	AC_DEFINE(USE_FAST_LOG, 1, faster log implementation with less but enough precission)
731	;;
732*86)
733	CPUTYPE="i386"
734	if test $ac_cv_header_xmmintrin_h = yes ; then
735		WITH_XMM=yes
736		WITH_VECTOR=yes
737	fi
738
739	AC_DEFINE(USE_FAST_LOG, 1, faster log implementation with less but enough precission)
740	;;
741powerpc)
742	CPUTYPE="no"
743
744	# The following should not get enabled on a G5. HOWTO check for a G5?
745	AC_DEFINE(USE_FAST_LOG, 1, faster log implementation with less but enough precission)
746	;;
747*)
748	CPUTYPE="no"
749	;;
750esac
751
752# which vector code do we support to build on this machine?
753AM_CONDITIONAL(WITH_XMM, test "x${WITH_XMM}" = "xyes")
754
755# needs to be defined to link in the internal vector lib
756AM_CONDITIONAL(WITH_VECTOR, test "x${WITH_VECTOR}" = "xyes")
757AC_MSG_CHECKING(if I have to build the internal vector lib)
758AC_MSG_RESULT(${WITH_VECTOR})
759
760
761AC_PATH_PROG(NASM, nasm, no)
762case "${NASM}" in
763no)
764	;;
765*)
766	AC_MSG_CHECKING(for assembler routines for this processor type)
767	for recurse_over in ${ASM_FOR_ARCH}
768	do
769		if test "${CPUTYPE}" = "${recurse_over}"; then
770			include_asm_routines="yes"
771		fi
772
773		case $host_os in
774		*darwin*)
775			# currently we have problems because of a wrong
776			# libtool hack in the darwin case (for nasm code)
777			include_asm_routines="no"
778			;;
779		esac
780	done
781	if test "x${include_asm_routines}" = "xyes"; then
782		AC_DEFINE(HAVE_NASM, 1, have nasm)
783		AC_DEFINE(MMX_choose_table, 1, use MMX version of choose_table)
784	else
785		include_asm_routines="no"
786		NASM="no"
787	fi
788	AC_MSG_RESULT(${include_asm_routines})
789	;;
790esac
791AM_CONDITIONAL(HAVE_NASM, test "${NASM}" != "no")
792
793case $host_os in
794	*cygwin*|*mingw32*)
795		CYGWIN=yes
796		NASM_FORMAT="-f win32 -DWIN32"
797		;;
798	*darwin*)
799		NASM_FORMAT="-f macho"
800		;;
801	*os2-emx*)
802		NASM_FORMAT="-f aout -DAOUT"
803		;;
804	*)
805		CYGWIN=no
806		NASM_FORMAT="-f elf"
807		;;
808esac
809
810#
811# 'expopt' is used for "additional optimizations", not for optimizations which
812# are marked as "experimental" in the guide for the compiler.
813# They are "experimental" here in the LAME project (at least
814# "--enable-expopt=full").
815#
816AC_MSG_CHECKING(for additional optimizations)
817AC_ARG_ENABLE(expopt,
818  [  --enable-expopt=full,norm Whether to enable experimental optimizations]
819  [                          [default=no]],
820    CONFIG_EXPOPT="${enableval}", CONFIG_EXPOPT="no")
821
822if test "x$HAVE_GCC" = "xyes" -o "x$HAVE_CLANG" = "xyes"; then
823	# gcc defaults. OS specific options go in versious sections below
824	# from the gcc man pages:  "there is no reason to use -pedantic"
825	if test "x${with_gnu_ld}" = "xyes"; then
826		CFLAGS="-Wall -pipe ${CFLAGS}"
827	else
828		# some vendor ld's don't like '-pipe'
829		CFLAGS="-Wall ${CFLAGS}"
830	fi
831
832	# GCC version specific generic options
833	if test "x${HAVE_GCC}" = "xyes"; then
834		case "${GCC_version}" in
835		2.96*)
836        		# for buggy version of gcc shipped with RH7.1, back of on some
837        		# optimizations
838        		OPTIMIZATION="-O -fomit-frame-pointer -ffast-math \
839				-funroll-loops"
840			OPTIMIZATION_FULL="-fmove-all-movables -freduce-all-givs \
841				-fsched-interblock -fbranch-count-reg -fforce-addr \
842				-fforce-mem"
843        		;;
844		3.0*)
845			# -funroll-loops seems to produce buggy code with gcc 3.0.3
846			OPTIMIZATION="-O -fomit-frame-pointer -ffast-math"
847			OPTIMIZATION_FULL="-fmove-all-movables -freduce-all-givs \
848				-fbranch-count-reg -fforce-addr -fforce-mem"
849			;;
850		3.*|4.0.*|4.1.*)
851			# -fomit-frame-pointer seems to be buggy on cygwin
852			case ${host_os} in
853			*cygwin*)
854				OMIT_FRAME_POINTER=
855				;;
856			*)
857				OMIT_FRAME_POINTER=-fomit-frame-pointer
858				;;
859			esac
860
861			OPTIMIZATION="-O3 ${OMIT_FRAME_POINTER} -ffast-math"
862			OPTIMIZATION_FULL="-fmove-all-movables -freduce-all-givs \
863				-fbranch-count-reg -fforce-addr -fforce-mem"
864			;;
865		[[456789]].*|1[[0-9]].*)
866			OPTIMIZATION="-O3 -fomit-frame-pointer -ffast-math"
867			OPTIMIZATION_FULL="-fbranch-count-reg -fforce-addr"
868			;;
869		*)
870			# default
871			OPTIMIZATION="-O3 ${OMIT_FRAME_POINTER} -ffast-math \
872				-funroll-loops"
873			OPTIMIZATION_FULL="-fbranch-count-reg -fforce-addr"
874			;;
875		esac
876
877		# GCC version independend generic options
878		OPTIMIZATION_NORM="-fschedule-insns2"
879	fi
880
881
882	# generic CPU specific options
883	case ${host_cpu} in
884	sparc)
885		case "${GCC_version}" in
886		3.0*)
887			;;
888		[[3456789]].*|1[[0-9]].*)
889			# doesn't work on 3.0.x, but on 3.[12] and
890			# hopefully on every other release after that too
891			if test -x /usr/bin/isalist; then
892				/usr/bin/isalist | grep sparcv8plus \
893					>/dev/null 2>&1 && \
894					OPTIMIZATION="${OPTIMIZATION} \
895						-mcpu=ultrasparc \
896						-mtune=ultrasparc"
897			fi
898			;;
899		esac
900		;;
901	*86)
902		case "${GCC_version}" in
903		[[3456789]].*|1[[0-9]].*)
904			OPTIMIZATION="${OPTIMIZATION} \
905				-maccumulate-outgoing-args"
906			;;
907		esac
908		;;
909	esac
910
911	expopt_msg_result_printed=no
912	case "${CONFIG_EXPOPT}" in
913	no)
914		# if someone supplies own CFLAGS, we don't add our own
915		if test "x${ac_save_CFLAGS}" != "x"; then
916			OPTIMIZATION=""
917		fi
918		;;
919	norm|yes)
920		OPTIMIZATION="${OPTIMIZATION} ${OPTIMIZATION_NORM}"
921		;;
922	full)
923		OPTIMIZATION="${OPTIMIZATION} ${OPTIMIZATION_NORM} \
924			${OPTIMIZATION_FULL}"
925
926		if test "${HAVE_GCC}" = "yes"; then
927			# some hardware dependend options
928			case "${GCC_version}" in
929			2.9*|3.*|4.0.*|4.1.*)
930				# "new" GCC, use some "new" CPU specific optimizations
931				# use -mtune instead of -m486 or -mcpu= etc, since they are
932				# deprecated by GCC <rbrito>
933				case ${host_cpu} in
934				*486)
935					OPTIMIZATION="${OPTIMIZATION} -mcpu=i486 \
936						-mfancy-math-387"
937					;;
938				*586)
939					OPTIMIZATION="${OPTIMIZATION} -mcpu=pentium \
940						-march=pentium -mfancy-math-387"
941					;;
942				*686)
943					OPTIMIZATION="${OPTIMIZATION} -mcpu=pentiumpro \
944						-march=pentiumpro -mfancy-math-387 \
945						-malign-double"
946					;;
947				*86)
948					OPTIMIZATION="${OPTIMIZATION} -mfancy-math-387"
949					;;
950				alpha*)
951					OPTIMIZATION="${OPTIMIZATION} -mfp-regs"
952					AC_DEFINE(FLOAT, double, double is faster than float on Alpha)
953					# add "-mcpu=21164a -Wa,-m21164a" to optimize
954					# for 21164a (ev56) CPU
955					;;
956				*)
957					OPTIMIZATION="${OPTIMIZATION} -fdelayed-branch"
958					;;
959				esac
960				;;
961			[[456789]].*|1[[0-9]].*)
962				case ${host_cpu} in
963				*486)
964					OPTIMIZATION="${OPTIMIZATION} -march=i486"
965					;;
966				*586)
967					OPTIMIZATION="${OPTIMIZATION} -march=i586 \
968						-mtune=native"
969					;;
970				*686)
971					OPTIMIZATION="${OPTIMIZATION} -march=i686 \
972						-mtune=native"
973					;;
974				*86)
975					OPTIMIZATION="${OPTIMIZATION} -march=native \
976						-mtune=native"
977					;;
978				arm*-gnueabi)
979					if [ -z "$(echo ${GCC_version} | awk '/4\.0/')" ]; then
980						# Work round buggy softfloat optimization in ARM EABI compilers
981						# -gnueabi in only gcc-4.1 onwards
982						OPTIMIZATION="${OPTIMIZATION} -fno-finite-math-only"
983					fi
984					;;
985				esac
986				;;
987			*)
988				# no special optimization for other versions
989				AC_MSG_RESULT(no)
990				expopt_msg_result_printed=yes
991				AC_MSG_WARN(LAME doesn't know about your version (${GCC_version}) of gcc, please report it to lame-dev@lists.sourceforge.net. Please make sure you try the latest LAME version first!)
992				;;
993			esac
994		fi
995		;;
996	*)
997		AC_MSG_ERROR(bad value �${CONFIG_EXPOPT}� for expopt option)
998		;;
999	esac
1000
1001
1002	if test "x${HAVE_CLANG}" = "xyes"; then
1003		case "${CLANG_VERSION}" in
1004		3.[[89]]*|[[45]].*|1[[0-9]].*)
1005			OPTIMIZATION="-Ofast"
1006			;;
1007		*)
1008			OPTIMIZATION="-O3"
1009			;;
1010		esac
1011
1012		# generic CPU specific options
1013		case ${host_cpu} in
1014		*486)
1015			OPTIMIZATION="${OPTIMIZATION} -march=i486"
1016			;;
1017		*586)
1018			OPTIMIZATION="${OPTIMIZATION} -march=i586 \
1019				-mtune=native"
1020			;;
1021		*686)
1022			OPTIMIZATION="${OPTIMIZATION} -march=i686 \
1023				-mtune=native"
1024			;;
1025		*86)
1026			OPTIMIZATION="${OPTIMIZATION} -march=native \
1027				-mtune=native"
1028			;;
1029		esac
1030
1031	fi
1032
1033
1034	if test "${expopt_msg_result_printed}" = "no" ; then
1035		AC_MSG_RESULT(${CONFIG_EXPOPT})
1036	fi
1037else
1038	AC_MSG_RESULT(no)
1039fi
1040
1041
1042
1043
1044
1045AC_MSG_CHECKING(for debug options)
1046AC_ARG_ENABLE(debug,
1047  [  --enable-debug=alot,norm Enable debugging (disables optimizations)]
1048  [                         [default=no]],
1049    CONFIG_DEBUG="${enableval}", CONFIG_DEBUG="no")
1050
1051if test "x$GCC" = "xyes"; then
1052	DEBUG_NORM_OPT="-O -g -Wall"
1053	DEBUG_ANOYING="-Wbad-function-cast -Wcast-align \
1054		-Wcast-qual -Wchar-subscripts -Wconversion \
1055		-Wmissing-prototypes -Wnested-externs -Wpointer-arith \
1056		-Wredundant-decls -Wshadow -Wstrict-prototypes \
1057		-Wwrite-strings -Winline \
1058		-Wformat -Wswitch -Waggregate-return -Wmissing-noreturn \
1059		-Wimplicit-int -fno-builtin"
1060
1061	case "${CONFIG_DEBUG}" in
1062	no)
1063dnl	Comment out the NDEBUG on release build, they check for issues
1064dnl	which should also be rejected in a release build.
1065dnl	The real solution would be to do user friendly error messages
1066dnl	instead of a core dump. This is a quick and user-unfriendly fix.
1067dnl		AC_DEFINE(NDEBUG, 1, no debug build)
1068		;;
1069	norm|yes)
1070		AC_DEFINE(ABORTFP, 1, debug define)
1071		OPTIMIZATION="${DEBUG_NORM_OPT}"
1072		;;
1073	anoying)
1074		AC_DEFINE(ABORTFP, 1, debug define)
1075		OPTIMIZATION="${DEBUG_NORM_OPT} ${DEBUG_ANOYING}"
1076		;;
1077	alot)
1078		AC_DEFINE(ABORTFP, 1, debug define)
1079		AC_DEFINE(DEBUG, 1, alot of debug output)
1080		OPTIMIZATION="${DEBUG_NORM_OPT}"
1081		;;
1082	*)
1083		AC_MSG_ERROR(bad value �${CONFIG_DEBUG}� for debug option)
1084	esac
1085
1086	AC_MSG_RESULT(${CONFIG_DEBUG})
1087else
1088	AC_MSG_RESULT(no)
1089fi
1090
1091
1092
1093dnl ###  system specific options  ###
1094
1095##########################################################################
1096# LINUX on Digital/Compaq Alpha CPUs
1097##########################################################################
1098case $host in
1099alpha*-*-linux*)
1100
1101################################################################
1102#### Check if 'ccc' is in our path
1103################################################################
1104if test "`which ccc 2>/dev/null | grep -c ccc`" != "0" ; then
1105	# Compaq's C Compiler
1106	CC=ccc
1107
1108################################################################
1109#### set 'OPTIMIZATION = -arch host -tune host'
1110####              to generate/tune instructions for this machine
1111####     'OPTIMIZATION += -migrate -fast -inline speed -unroll 0'
1112####              tweak to run as fast as possible :)
1113####     'OPTIMIZATION += -w0'
1114####              set warning and linking flags
1115################################################################
1116	OPTIMIZATION="-arch host -tune host"
1117	OPTIMIZATION="-migrate -fast -inline speed -unroll 0 $OPTIMIZATION"
1118	OPTIMIZATION="-w0 $OPTIMIZATION"
1119
1120
1121################################################################
1122#### to debug, uncomment
1123################################################################
1124	# For Debugging
1125	#OPTIMIZATION="-g3 $OPTIMIZATION"
1126
1127################################################################
1128#### define __DECALPHA__ (i was getting re-declaration warnings
1129####   in machine.h
1130################################################################
1131	# Define DEC Alpha
1132	AC_DEFINE(__DECALPHA__, 1, we're on DEC Alpha)
1133fi  #  gcc or ccc?
1134;; # alpha
1135
1136
1137##########################################################################
1138# SunOS
1139##########################################################################
1140sparc-*-sunos4*)
1141	if test CC = "cc"; then
1142		OPTIMIZATION="-O -xCC"
1143		MAKEDEP="-xM"
1144		# for gcc, use instead:
1145		#   CC="gcc"
1146		#   OPTIMIZATION="-O"
1147		#   MAKEDEP="-M"
1148AC_MSG_WARN([Please contact lame@lists.sourceforge.net with the output of the configure run and the file config.cache. Thank you for your cooperation.])
1149	fi
1150;; #SunOS
1151
1152##########################################################################
1153# SGI
1154##########################################################################
1155*-sgi-irix*)
1156	if test CC = "cc"; then
1157		OPTIMIZATION="-O3 -woff all"
1158	fi
1159;; # SGI
1160
1161##########################################################################
1162# Compaq Alpha running Dec Unix (OSF)
1163##########################################################################
1164alpha*-dec-osf*)
1165	if test CC = "cc"; then
1166		OPTIMIZATION="-fast -O3 -std -g3 -non_shared"
1167	fi
1168;; #OSF
1169esac
1170
1171# todo: include the following tests in the case-list
1172UNAME=`uname`
1173ARCH=`uname -m`
1174
1175###########################################################################
1176# MOSXS (Rhapsody PPC)
1177###########################################################################
1178if test "$UNAME" = "Rhapsody"; then
1179#   CC="cc"   # should be handled already by autoconf
1180   MAKEDEP="-make"
1181fi
1182
1183###########################################################################
1184# MAC OSX  Darwin PPC
1185###########################################################################
1186if test "$UNAME" = "Darwin"; then
1187   MAKEDEP="-make"
1188   CFLAGS="$CFLAGS -fno-common"
1189fi
1190
1191
1192##########################################################################
1193# OS/2
1194##########################################################################
1195# Properly installed EMX runtime & development package is a prerequisite.
1196# tools I used: make 3.76.1, uname 1.12, sed 2.05, PD-ksh 5.2.13
1197#
1198##########################################################################
1199if test "$UNAME" = "OS/2"; then
1200   SHELL=sh
1201   #CC=gcc # should already be handled by configure
1202
1203   # file extension should already be handled by automake (I don't know,
1204   # please  give feedback!
1205   #FILE_EXTENSION=".exe"
1206
1207# Uncomment & inspect the GTK lines to use MP3x GTK frame analyzer.
1208# Properly installed XFree86/devlibs & GTK+ is a prerequisite.
1209# The following works for me using Xfree86/OS2 3.3.5 and GTK+ 1.2.3:
1210#   AC_DEFINE(HAVE_GTK, 1, have GTK)
1211#   AC_DEFINE(__ST_MT_ERRNO__, 1)
1212#   INCLUDES="-IC:/XFree86/include/gtk12 -IC:/XFree86/include/glib12 \
1213#             -IC:/XFree86/include $INCLUDES"
1214#   FRONTEND_LDFLAGS="-LC:/XFree86/lib -lgtk12 -lgdk12 -lgmodule -lglib12 \
1215#             -lXext -lX11 -lshm -lbsd -lsocket -lm $FRONTEND_LDFLAGS"
1216#   FRONTEND_CFLAGS="-Zmtd -Zsysv-signals -Zbin-files $FRONTEND_CFLAGS"
1217fi
1218
1219###########################################################################
1220# AmigaOS
1221###########################################################################
1222# Type 'Make ARCH=PPC' for PowerUP and 'Make ARCH=WOS' for WarpOS
1223#
1224###########################################################################
1225if test "$UNAME" = "AmigaOS" ; then
1226	CC="gcc -noixemul"
1227	OPTIMIZATION="$OPTIMIZATION -m68020-60 -m68881"
1228	MAKEDEP="-MM"
1229	if test "$ARCH" = "WOS"; then
1230		CC="ppc-amigaos-gcc -warpup"
1231		OPTIMIZATION="$OPTIMIZATION -mmultiple -mcpu=603e"
1232		AR="ppc-amigaos-ar"
1233		RANLIB="ppc-amigaos-ranlib"
1234	fi
1235	if test "$ARCH",PPC; then
1236		CC="ppc-amigaos-gcc"
1237		OPTIMIZATION="$OPTIMIZATION -mmultiple -mcpu=603e"
1238		AR="ppc-amigaos-ar"
1239		RANLIB="ppc-amigaos-ranlib"
1240	fi
1241fi
1242
1243
1244CFLAGS="${OPTIMIZATION} ${CFLAGS}"
1245LDADD="${LDADD}"
1246FRONTEND_CFLAGS="${INCICONV} ${FRONTEND_CFLAGS}"
1247FRONTEND_LDADD="${FRONTEND_LDADD} ${LTLIBICONV} ${CONFIG_MATH_LIB}"
1248
1249
1250AC_SUBST(INCLUDES)
1251
1252AC_SUBST(FRONTEND_LDFLAGS)
1253AC_SUBST(FRONTEND_CFLAGS)
1254AC_SUBST(FRONTEND_LDADD)
1255AC_SUBST(LIBMP3LAME_LDADD)
1256AC_SUBST(CONFIG_MATH_LIB)
1257AC_SUBST(LDADD)
1258
1259AC_SUBST(LIB_MAJOR_VERSION)
1260AC_SUBST(LIB_MINOR_VERSION)
1261
1262AC_SUBST(NASM)
1263AC_SUBST(NASM_FORMAT)
1264
1265AC_SUBST(MAKEDEP)
1266AC_SUBST(RM_F)
1267
1268AC_SUBST(LIBTOOL_DEPS)
1269
1270AC_SUBST(WITH_FRONTEND)
1271AC_SUBST(WITH_MP3X)
1272AC_SUBST(WITH_MP3RTP)
1273
1274AC_SUBST(CPUTYPE)
1275AC_SUBST(CPUCCODE)
1276
1277AC_SUBST(CONFIG_DEFS)
1278
1279AC_CONFIG_FILES([Makefile \
1280		 libmp3lame/Makefile \
1281		 libmp3lame/i386/Makefile \
1282		 libmp3lame/vector/Makefile \
1283		 frontend/Makefile \
1284		 mpglib/Makefile \
1285		 doc/Makefile \
1286		 doc/html/Makefile \
1287		 doc/man/Makefile \
1288		 include/Makefile \
1289		 Dll/Makefile \
1290		 misc/Makefile \
1291		 dshow/Makefile \
1292		 ACM/Makefile \
1293		 ACM/ADbg/Makefile \
1294		 ACM/ddk/Makefile \
1295		 ACM/tinyxml/Makefile \
1296		 lame.spec \
1297		 mac/Makefile \
1298		 macosx/Makefile \
1299		 macosx/English.lproj/Makefile \
1300		 macosx/LAME.xcodeproj/Makefile \
1301		 vc_solution/Makefile])
1302
1303AC_OUTPUT
1304