Added a test for MUIA_Listview_SelectChange.
[AROS.git] / workbench / devs / AHI / configure.in
blob3abb7f46861478cf43d8e91c9278dbd4c1e0eb02
1 dnl $Id$
4 dnl Process this file with autoconf to produce a configure script.
6 AC_REVISION( $Revision$ )
7 dnl
8 AC_INIT(TODO)
11 dnl General
13 AC_CANONICAL_SYSTEM
14 AC_PROG_MAKE_SET
15 AC_CONFIG_HEADER( config.h )
17 AC_MSG_CHECKING(CPU to build for)
18 AC_ARG_WITH(cpu,
19 [  --with-cpu              The CPU to optimize for],
20 CPU=${withval}, unset CPU)
21 AC_MSG_RESULT(${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}",
27 os_includedir="")
28 AC_MSG_RESULT(${os_includedir} )
30 AC_MSG_CHECKING(if WarpUp support code should be enabled)
31 AC_ARG_ENABLE(warpup,
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})
38 case $host in
39  i?86be-pc-amithlon)
40   : ${CPU="i686"}
41   cflags="-noixemul"
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?)
46   stripflag=""
47  ;;
48  m68k-unknown-amigaos)
49   : ${CPU="68020-60"}
50   cflags="-noixemul"
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}"
55   resident="-resident"
56   stripflag=""
57  ;;
58  powerpc-unknown-amigaos)
59   : ${CPU="603"}
60   AC_DEFINE([__USE_INLINE__], 1, [Use inlines])
61   AC_DEFINE([__USE_BASETYPE__], 1, [Use traditional library base type])
62   cflags=""
63   optflags="-mcpu=${CPU} -O2"
64   linkerflags="-mcpu=${CPU}"
65   asflags="-m${CPU} -mregnames --defsym CPU=${CPU}"
66   resident=""                                      dnl *** Not supported (yet?)
67   stripflag=""
68  ;;
69  powerpc-unknown-morphos)
70   : ${CPU="603"}
71   AC_DEFINE([USE_INLINE_STDARG], 1, [Use inlines for stdarg functions])
72   cflags="-noixemul"
73   optflags="-mcpu=${CPU} -O2"
74   linkerflags="-noixemul -mcpu=${CPU}"
75   asflags="-m${CPU} -mregnames --defsym CPU=${CPU}"
76   resident="-mresident32"
77   stripflag=""
78  ;;
79  i?86-*-aros)
80  : ${CPU="i486"}
81   cflags=""
82   optflags="-m32 -march=${CPU} -O2"
83   linkerflags=""
84   asflags="--defsym CPU=${CPU} --defsym LITTLE_ENDIAN=1"
85   resident=""                                      dnl *** Not supported (yet?)
86   stripflag="--strip-unneeded"
87  ;;
88  x86_64-*-aros)
89  : ${CPU="x86_64"}
90   cflags=""
91   optflags="-O2 -fomit-frame-pointer"
92   linkerflags=""
93   asflags="--defsym CPU=${CPU} --defsym LITTLE_ENDIAN=1 --defsym x86_64=1"
94   resident=""
95   stripflag="--strip-unneeded"
96  ;;
97  *)
98   AC_MSG_WARN(Unknown architecture!)
99  ;;
100 esac
102 top_builddir=$(pwd)
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}"}
108 : ${ARFLAGS="-ru"}
109 : ${STRIPFLAGS="${stripflag}"}
111 : ${CFLAG_RESIDENT="${resident}"}
112 : ${LDFLAG_RESIDENT="${resident}"}
114 : ${DISTDIR="/tmp/${host_alias}-ahi"}
116 AC_PREFIX_DEFAULT( / )
118 AC_SUBST(ASFLAGS)
119 AC_SUBST(ARFLAGS)
120 AC_SUBST(STRIPFLAGS)
121 AC_SUBST(CFLAG_RESIDENT)
122 AC_SUBST(LDFLAG_RESIDENT)
123 AC_SUBST(DISTDIR)
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, : ) 
134 AC_PROG_INSTALL
135 #AC_PROG_CC
136 AC_PROG_RANLIB
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. )
149 else
150  if test -n "`$LHA 2>&1 | grep 'o.*compression method'`"; then
151   LHA="$LHA -ao5"
152  else
153   LHA="$LHA -a -r"
154  fi
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?)])
169 case $host in
170  i?86be-pc-amithlon)
171   : ${CPU="i686"}
172   LIBS="-lm $LIBS" dnl *** AC_CHECK_LIBS doesn't work with -r ...?
173  ;;
174 esac
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." ))
182 AC_SUBST(HAVE_OSS)
183 AC_SUBST(HAVE_ASMIO)
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." ))
190 AC_SUBST(HAVE_ALSA)
192 dnl Checks for typedefs, structures, and compiler characteristics.
194 AC_C_CONST
195 AC_C_INLINE
196 AC_C_BIGENDIAN
198 dnl Checks for library functions.
201 AC_OUTPUT(Makefile
202           AHI/Makefile
203           AHI-Handler/Makefile
204           AddAudioModes/Makefile
205           Device/Makefile
206           Docs/Makefile
207           Drivers/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
222           Examples/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
228           Include/Makefile,
229           echo timestamp > stamp-h)