File: configure.in.in

package info (click to toggle)
kdelibs 4%3A3.5.5a.dfsg.1-8
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 86,260 kB
  • ctags: 72,369
  • sloc: cpp: 575,111; xml: 116,385; ansic: 27,951; sh: 10,565; perl: 6,241; java: 4,066; makefile: 3,775; yacc: 2,432; lex: 643; ruby: 329; asm: 166; jsp: 128; haskell: 116; f90: 99; ml: 75; awk: 71; tcl: 29; lisp: 24; php: 9
file content (128 lines) | stat: -rw-r--r-- 3,257 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
dnl libkmid's specific checks

#AC_MSG_CHECKING(if libkmid would compile)
#AC_CACHE_VAL(kde_libkmid_compiles,
#[
#AC_TRY_COMPILE([
##ifndef __FreeBSD__
##include <sys/soundcard.h>
##else
##include <machine/soundcard.h>
##endif
#],
#[
#],
#  kde_libmid_compiles=yes,
#kde_libmid_compiles=no)
#])
#AC_MSG_RESULT($kde_libmid_compiles)
#if test $kde_libmid_compiles = no; then
#  DO_NOT_COMPILE="$DO_NOT_COMPILE libkmid"
#fi

#AC_MSG_CHECKING([for OSS support])
#AC_CACHE_VAL(ac_cv_header_soundcard_h,
#[
#AC_TRY_COMPILE([
##include <unistd.h>
#],
#[ ],
#ac_cv_header_soundcard_h=yes,
#ac_cv_header_soundcard_h=no)
#])
#AC_MSG_RESULT($ac_cv_header_soundcard_h)
#if eval "test \"`echo $ac_cv_header_soundcard_h`\" = yes"; then
#  AC_DEFINE(HAVE_GETHOSTNAME, 1, [Define if you have getdomainname])
#fi
#CXXFLAGS="$save_CXXFLAGS"
#])


AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h linux/awe_voice.h awe_voice.h /usr/src/sys/i386/isa/sound/awe_voice.h /usr/src/sys/gnu/i386/isa/sound/awe_voice.h)  

dnl check for ALSA audio support

kde_with_alsa=yes
AC_ARG_WITH(alsa, AC_HELP_STRING([--with-alsa],[enable libKMid ALSA support]),
[kde_with_alsa=$withval])

if test "$kde_with_alsa" = "yes"; then
AC_DEFUN([AC_CHECK_LIBASOUND],
[
  ac_ldflags_save="$LDFLAGS"
  LDFLAGS="$all_libraries $LDFLAGS"
  kde_has_asoundlib=no

  AC_CHECK_HEADERS([ sys/asoundlib.h alsa/asoundlib.h ],
  [
    kde_has_asoundlib=yes
  ])

  dnl trial and error version check for ALSA 0.5.x / ALSA 0.9.x
  AC_LANG_SAVE
  AC_LANG_C
  if test "x$kde_has_asoundlib" = "xyes"; then
    AC_TRY_COMPILE([
      #include "confdefs.h"
      #ifdef HAVE_SYS_ASOUNDLIB_H
      #include <sys/asoundlib.h>
      #endif
      #ifdef HAVE_ALSA_ASOUNDLIB_H
      #include <alsa/asoundlib.h>
      #endif
    ],[
      #if ((SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9)) || (SND_LIB_MAJOR == 1)
        /* we have ALSA 0.9.x or 1.x */
      #else
        #error not ALSA 0.9.x
      #endif
    ],
    kde_has_alsa_0_9=yes,
    kde_has_alsa_0_9=no)
  fi

  if test "x$kde_has_asoundlib" = "xyes"; then
    AC_TRY_COMPILE([
      #include "confdefs.h"
      #ifdef HAVE_SYS_ASOUNDLIB_H
      #include <sys/asoundlib.h>
      #endif
      #ifdef HAVE_ALSA_ASOUNDLIB_H
      #include <alsa/asoundlib.h>
      #endif
    ],[
    #if (SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5)
      /* we have ALSA 0.5.x */
    #else
      #error not ALSA 0.5.x
    #endif
    ],
    kde_has_alsa_0_5=yes,
    kde_has_alsa_0_5=no)
  fi
  AC_LANG_RESTORE

  if test "x$kde_has_asoundlib" = "xyes"; then
    AC_CHECK_LIB(asound,snd_seq_create_simple_port,[
      if test "x$kde_has_alsa_0_5" = "xyes"; then
        LIBASOUND="-lasound"
        AC_DEFINE(HAVE_LIBASOUND, 1,
        [Define if you have libasound.so.1 (required for ALSA 0.5.x support)])
      fi
      if test "x$kde_has_alsa_0_9" = "xyes"; then
        LIBASOUND="-lasound"
        AC_DEFINE(HAVE_LIBASOUND2, 1,
          [Define if you have libasound.so.2 (required for ALSA 0.9.x support)])
        AC_CHECK_LIB(asound,snd_pcm_resume,[
          AC_DEFINE(HAVE_SND_PCM_RESUME, 1,
            [Define if libasound has snd_pcm_resume()])])
      fi
    ])
  fi
  AC_SUBST(LIBASOUND)
  LDFLAGS="$ac_ldflags_save"
])
AC_CHECK_LIBASOUND
fi

AC_SUBST(LIBASOUND)