/[openvortex]/alsa/configure.in
ViewVC logotype

Diff of /alsa/configure.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by vizard, Sun Jun 15 21:01:28 2003 UTC revision 1.4 by vizard, Mon Aug 11 00:06:37 2003 UTC
# Line 4  dnl Copyright (c) by Jaroslav Kysela <pe Line 4  dnl Copyright (c) by Jaroslav Kysela <pe
4    
5  AC_INIT(acore/sound.patch)  AC_INIT(acore/sound.patch)
6  AC_PREFIX_DEFAULT(/usr)  AC_PREFIX_DEFAULT(/usr)
7  CONFIG_SND_VERSION="0.9.4"  CONFIG_SND_VERSION="0.9.6"
8    
9  dnl Checks for programs.  dnl Checks for programs.
10  AC_PROG_CC  AC_PROG_CC
# Line 195  my_compiler=`$CROSS_COMPILE$CC --version Line 195  my_compiler=`$CROSS_COMPILE$CC --version
195  dnl  dnl
196  dnl Test section, uncomment any of these double lines to verify the bellow code:  dnl Test section, uncomment any of these double lines to verify the bellow code:
197  dnl  dnl
198    dnl kernel_compiler="gcc-Version 3.3"
199    dnl my_compiler="gcc (GCC) 3.3"
200  dnl  dnl
201  dnl kernel_compiler="gcc 3.2"  dnl kernel_compiler="gcc 3.2"
202  dnl my_compiler="gcc (GCC) 3.2"  dnl my_compiler="gcc (GCC) 3.2"
# Line 208  dnl Line 210  dnl
210  dnl kernel_compiler="gcc 2.95.3 20010315 (release)"  dnl kernel_compiler="gcc 2.95.3 20010315 (release)"
211  dnl my_compiler="2.95.3"  dnl my_compiler="2.95.3"
212  dnl  dnl
213  kernel_compiler_type=`echo $kernel_compiler | cut -d ' ' -f 1`  
214  kernel_compiler_version=`echo $kernel_compiler | cut -d ' ' -f 2`  AC_DEFUN(CHECK_COMPILER, [
215  if test "${kernel_compiler_version:0:5}" = "egcs-"; then    typevar=$2
216    kernel_compiler_type="egcs"    versionvar=$3
217    kernel_compiler_version=`echo ${kernel_compiler_version:5} | cut -d ' ' -f 1`    ac_compiler_type=""
218  fi    ac_compiler_version=""
219  if test "${my_compiler:0:4}" = "gcc-"; then    for i in $1; do
220    my_compiler_type="gcc"      case $i in
221    my_compiler_version=`echo ${my_compiler:4} | cut -d ' ' -f 1`      gcc-[[0-9]]*|*-gcc-[[0-9]]*)
222  else        if test -z "$ac_compiler_type"; then
223    if test "${my_compiler:0:5}" = "egcs-"; then          ac_compiler_type=gcc
224      my_compiler_type="egcs"        fi
225      my_compiler_version=`echo ${my_compiler:5} | cut -d ' ' -f 1`        if test -z "$ac_compiler_version"; then
226    else          ac_compiler_version=`echo $i | sed -e 's/^.*gcc-\([0-9.]\+\).*$/\1/'`
227      my_compiler_type=`echo $my_compiler | cut -d ' ' -f 1`        fi
228      my_compiler_version=`echo $my_compiler | cut -d ' ' -f 3`        ;;
229    fi      *gcc*)
230  fi        if test -z "$ac_compiler_type"; then
231  if test "$my_compiler_type" = "$my_compiler_version"; then          ac_compiler_type=gcc
232          fi
233          ;;
234        egcs-*)
235          ac_compiler_type=egcs
236          if test -z "$ac_compiler_version"; then
237            ac_compiler_version=`echo $i | sed -e 's/egcs-\(.\+\)$/\1/'`
238          fi
239          ;;
240        *cc*)
241          if test -z "$ac_compiler_type"; then
242            ac_compiler_type=cc
243          fi
244          ;;
245        [[0-9]].[[0-9]]*)
246          if test -z "$ac_compiler_version"; then
247            ac_compiler_version="$i"
248          fi
249          ;;
250        esac
251      done
252      eval $typevar="$ac_compiler_type"
253      eval $versionvar="$ac_compiler_version"
254    ])
255    
256    CHECK_COMPILER($kernel_compiler, kernel_compiler_type, kernel_compiler_version)
257    CHECK_COMPILER($my_compiler, my_compiler_type, my_compiler_version)
258    if test -z "$my_compiler_type"; then
259    my_compiler_type="gcc"    my_compiler_type="gcc"
260  fi  fi
261  AC_MSG_RESULT(Kernel compiler: $kernel_compiler Used compiler: $my_compiler);  AC_MSG_RESULT(Kernel compiler: $kernel_compiler Used compiler: $my_compiler);
# Line 273  AC_DEFUN(CHECK_KERNEL_HEADER, [ Line 302  AC_DEFUN(CHECK_KERNEL_HEADER, [
302    else    else
303      AC_MSG_RESULT("no")      AC_MSG_RESULT("no")
304      if test ! -f include/$1; then      if test ! -f include/$1; then
305        echo "Creating a dummy <$1>..."        if test -z "$2" ; then
306        mkdir -p include/linux          echo "Creating a dummy <$1>..."
307        touch include/$1          mkdir -p include/linux
308      fi          touch include/$1
309    fi        else
310  ])          echo "Creating <$1>..."
311            mkdir -p include/linux
312  AC_DEFUN(CHECK_AND_REPLACE_KERNEL_HEADER, [          echo "$2" > include/$1
313    AC_MSG_CHECKING(for kernel $1)        fi
   if test -f "$CONFIG_SND_KERNELDIR/include/$1"; then  
     AC_MSG_RESULT("yes")  
     if test -f include/$1; then  
       echo "Removing a dummy $1."  
       rm -f include/$1  
     fi  
   else  
     AC_MSG_RESULT("no")  
     if test ! -f include/$1; then  
       echo "Creating a dummy <$1> which points to <$2>..."  
       mkdir -p include/linux  
       echo "#include <$2>" > include/$1  
314      fi      fi
315    fi    fi
316  ])  ])
# Line 324  int main( void ) { Line 341  int main( void ) {
341  ])  ])
342    
343  dnl Check kernel headers for 2.2  dnl Check kernel headers for 2.2
344    CHECK_KERNEL_HEADER(linux/compiler.h)
345  CHECK_KERNEL_HEADER(linux/pm.h)  CHECK_KERNEL_HEADER(linux/pm.h)
346  CHECK_KERNEL_HEADER(linux/spinlock.h)  CHECK_KERNEL_HEADER(linux/spinlock.h)
347  CHECK_KERNEL_HEADER(linux/irq.h)  CHECK_KERNEL_HEADER(linux/irq.h)
# Line 345  if test ! -f include/linux/workqueue.h; Line 363  if test ! -f include/linux/workqueue.h;
363    fi    fi
364  fi  fi
365  CHECK_KERNEL_HEADER(asm/hw_irq.h)  CHECK_KERNEL_HEADER(asm/hw_irq.h)
366  CHECK_AND_REPLACE_KERNEL_HEADER(linux/jiffies.h, linux/sched.h)  CHECK_KERNEL_HEADER(linux/jiffies.h, [#include <linux/sched.h>
367    ])
368    CHECK_KERNEL_HEADER(linux/compat.h, [#include \"compat_64.h\"
369    ])
370  dnl PPC headers (for 2.2 kernels)  dnl PPC headers (for 2.2 kernels)
371  CHECK_AND_REPLACE_KERNEL_HEADER(linux/adb.h, asm/adb.h)  CHECK_KERNEL_HEADER(linux/adb.h, [#include <asm/adb.h>
372  CHECK_AND_REPLACE_KERNEL_HEADER(linux/cuda.h, asm/cuda.h)  ])
373  CHECK_AND_REPLACE_KERNEL_HEADER(linux/pmu.h, asm/pmu.h)  CHECK_KERNEL_HEADER(linux/cuda.h, [#include <asm/cuda.h>
374    ])
375    CHECK_KERNEL_HEADER(linux/pmu.h, [#include <asm/pmu.h>
376    ])
377    
378  dnl Check for modversions...  dnl Check for modversions...
379  CHECK_KERNEL_CONFIG(CONFIG_MODVERSIONS, [kernel module symbol versions])  CHECK_KERNEL_CONFIG(CONFIG_MODVERSIONS, [kernel module symbol versions])

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26