summaryrefslogtreecommitdiffstats
path: root/libkmid/configure.in.in
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitce4a32fe52ef09d8f5ff1dd22c001110902b60a2 (patch)
tree5ac38a06f3dde268dc7927dc155896926aaf7012 /libkmid/configure.in.in
downloadtdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.tar.gz
tdelibs-ce4a32fe52ef09d8f5ff1dd22c001110902b60a2.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkmid/configure.in.in')
-rw-r--r--libkmid/configure.in.in128
1 files changed, 128 insertions, 0 deletions
diff --git a/libkmid/configure.in.in b/libkmid/configure.in.in
new file mode 100644
index 000000000..7500e3455
--- /dev/null
+++ b/libkmid/configure.in.in
@@ -0,0 +1,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)