4 dnl Process this file with autoconf to produce a configure script.
6 AC_REVISION( $Revision$ )
15 AC_CONFIG_HEADER( config.h )
17 AC_MSG_CHECKING(CPU to build for)
19 [ --with-cpu The CPU to optimize for],
20 CPU=${withval}, unset CPU)
23 AC_MSG_CHECKING(OS include directory)
24 AC_ARG_WITH(os-includedir,
25 [ --with-os-includedir Path to AmigaOS include directory],
26 os_includedir="-I${withval}",
28 AC_MSG_RESULT(${os_includedir} )
30 AC_MSG_CHECKING(if WarpUp support code should be enabled)
32 [ --enable-warpup Enable WarpUp support],
33 AC_DEFINE(ENABLE_WARPUP))
34 ENABLE_WARPUP=${enable_warpup}
35 AC_SUBST(ENABLE_WARPUP)
36 AC_MSG_RESULT(${enable_warpup})
42 optflags="-mcpu=${CPU} -O2"
43 linkerflags="-noixemul -mcpu=${CPU} -r"
44 asflags="--defsym CPU=${CPU} --defsym LITTLE_ENDIAN=1"
45 resident="" dnl *** Not supported (yet?)
51 optflags="-m${CPU} -O2 -fomit-frame-pointer -ffast-math -msoft-float"
52 linkerflags="-noixemul -m${CPU}"
53 asCPU=`echo ${CPU} | sed 's/-.*//'`
54 asflags="-m${asCPU} --register-prefix-optional --bitwise-or --defsym CPU=${asCPU}"
58 powerpc-unknown-amigaos)
60 AC_DEFINE([__USE_INLINE__], 1, [Use inlines])
61 AC_DEFINE([__USE_BASETYPE__], 1, [Use traditional library base type])
63 optflags="-mcpu=${CPU} -O2"
64 linkerflags="-mcpu=${CPU}"
65 asflags="-m${CPU} -mregnames --defsym CPU=${CPU}"
66 resident="" dnl *** Not supported (yet?)
69 powerpc-unknown-morphos)
71 AC_DEFINE([USE_INLINE_STDARG], 1, [Use inlines for stdarg functions])
73 optflags="-mcpu=${CPU} -O2"
74 linkerflags="-noixemul -mcpu=${CPU}"
75 asflags="-m${CPU} -mregnames --defsym CPU=${CPU}"
76 resident="-mresident32"
82 optflags="-m32 -march=${CPU} -O2"
84 asflags="--defsym CPU=${CPU} --defsym LITTLE_ENDIAN=1"
85 resident="" dnl *** Not supported (yet?)
86 stripflag="--strip-unneeded"
91 optflags="-O2 -fomit-frame-pointer"
93 asflags="--defsym CPU=${CPU} --defsym LITTLE_ENDIAN=1 --defsym x86_64=1"
95 stripflag="--strip-unneeded"
98 AC_MSG_WARN(Unknown architecture!)
104 : ${CFLAGS="-g -W -Wall -Wstrict-prototypes -Wno-unused ${cflags} ${optflags}"}
105 : ${CPPFLAGS="-DCPU=\"\\\"${CPU}\\\"\" -I. -I${srcdir} -I${top_builddir} -I${top_builddir}/Include/gcc ${os_includedir}"}
106 : ${LDFLAGS="${linkerflags}"}
107 : ${ASFLAGS="${asflags}"}
109 : ${STRIPFLAGS="${stripflag}"}
111 : ${CFLAG_RESIDENT="${resident}"}
112 : ${LDFLAG_RESIDENT="${resident}"}
114 : ${DISTDIR="/tmp/${host_alias}-ahi"}
116 AC_PREFIX_DEFAULT( / )
121 AC_SUBST(CFLAG_RESIDENT)
122 AC_SUBST(LDFLAG_RESIDENT)
125 dnl Checks for programs.
127 AC_CHECK_TOOL( CC, gcc, : )
128 AC_CHECK_TOOL( AS, as, : )
129 AC_CHECK_TOOL( AR, ar, : )
130 AC_CHECK_TOOL( RANLIB, ranlib, : )
131 AC_CHECK_TOOL( STRIP, strip, : )
132 AC_CHECK_TOOL( OBJCOPY, objcopy, : )
137 AC_CHECK_PROG( RM, rm, rm )
138 AC_CHECK_PROGS( ROBODOC, RoboDoc robodoc )
139 AC_CHECK_PROGS( FLEXCAT, FlexCat flexcat )
140 AC_CHECK_PROGS( SFDC, SFDC sfdc )
141 AC_CHECK_PROGS( LHA, lha )
143 if test -z "$SFDC"; then
144 AC_MSG_ERROR( sfdc missing. )
147 if test -z "$LHA"; then
148 AC_MSG_WARN( lha missing. )
150 if test -n "`$LHA 2>&1 | grep 'o.*compression method'`"; then
157 if test -z "$ROBODOC"; then
158 AC_MSG_WARN( robodoc missing. )
161 dnl Checks for libraries.
163 AC_SEARCH_LIBS([NewList], [amiga],, [AC_MSG_WARN(libamiga is missing.)])
164 AC_SEARCH_LIBS([floor], [m],, [AC_MSG_ERROR(libm is missing.)])
165 AC_SEARCH_LIBS([IntuitionBase],[auto],, [AC_MSG_WARN(Who cares?)])
166 AC_SEARCH_LIBS([LayoutBase], [raauto],,[AC_MSG_WARN(Who cares?)])
167 AC_SEARCH_LIBS([MUI_NewObject],[mui],, [AC_MSG_WARN(Who cares?)])
172 LIBS="-lm $LIBS" dnl *** AC_CHECK_LIBS doesn't work with -r ...?
176 dnl Checks for header files.
178 AC_CHECK_HEADERS( proto/oss.h, HAVE_OSS=1, AC_MSG_WARN( "proto/oss.h is missing." ))
179 AC_CHECK_HEADERS( asm/io.h, HAVE_ASMIO=1, AC_MSG_WARN( "asm/io.h is missing." ))
180 AC_CHECK_HEADERS( libraries/openpci.h, HAVE_OPENPCI=1, AC_MSG_WARN( "libraries/openpci.h is missing." ))
184 AC_SUBST(HAVE_OPENPCI)
186 dnl Check for link libs
188 AC_CHECK_LIB( alsa-bridge, ALSA_Init, HAVE_ALSA=1, AC_MSG_WARN( "alsa-bridge is missing." ))
192 dnl Checks for typedefs, structures, and compiler characteristics.
198 dnl Checks for library functions.
204 AddAudioModes/Makefile
208 Drivers/ac97/Makefile
209 Drivers/VIA-AC97/Makefile
210 Drivers/HDAudio/Makefile
211 Drivers/Alsa/Makefile
212 Drivers/CMI8738/Makefile
213 Drivers/SB128/Makefile
214 Drivers/AROS/Makefile
215 Drivers/Common/Makefile.common
216 Drivers/Device/Makefile
217 Drivers/EMU10kx/Makefile
218 Drivers/Envy24HT/Makefile
219 Drivers/Envy24/Makefile
220 Drivers/Filesave/Makefile
221 Drivers/Void/Makefile
223 Examples/Device/PlayTest/Makefile
224 Examples/Extras/CloneAudioModes/Makefile
225 Examples/Low-level/PlaySineEverywhere/Makefile
226 Examples/Low-level/Test-7.1/Makefile
227 Examples/Low-level/ScanAudioModes/Makefile
229 echo timestamp > stamp-h)