OSDN Git Service

ucm: bytcr/PlatformEnableSeq.conf update some comments
[android-x86/external-alsa-lib.git] / configure.ac
index 734163c..e9e1a36 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)
-AC_INIT(alsa-lib, 1.0.28)
+AC_INIT(alsa-lib, 1.1.8)
 
 AC_CONFIG_SRCDIR([src/control/control.c])
 AC_CONFIG_MACRO_DIR([m4])
@@ -27,25 +27,9 @@ AC_PREFIX_DEFAULT(/usr)
 
 dnl Checks for programs.
 
-dnl try to gues cross-compiler if not set
-if test "x$host" != "x$build" -a -z "`echo $CC | grep -e '-gcc'`";
-then
-  AC_MSG_CHECKING(for cross-compiler)
-
-  which ${program_prefix}gcc >/dev/null 2>&1 && CC=${program_prefix}gcc
-  which ${host_cpu}-${host_os}-gcc >/dev/null 2>&1 \
-  && CC=${host_cpu}-${host_os}-gcc
-  which ${host_cpu}-${host_vendor}-${host_os}-gcc >/dev/null 2>&1 \
-  && CC=${host_cpu}-${host_vendor}-${host_os}-gcc
-
-  AC_MSG_RESULT($CC)
-fi
-           
-CFLAGS="$CFLAGS -D_GNU_SOURCE"
-
-
 AC_PROG_CC
 AC_PROG_CPP
+AC_USE_SYSTEM_EXTENSIONS
 AC_PROG_INSTALL
 AC_PROG_LN_S 
 AC_DISABLE_STATIC
@@ -282,6 +266,15 @@ else
   AC_MSG_RESULT(no)
 fi
 
+dnl Check for pthread
+if test "$HAVE_LIBPTHREAD" = "yes"; then
+  AC_CHECK_DECL(PTHREAD_MUTEX_RECURSIVE,
+    AC_DEFINE(HAVE_PTHREAD_MUTEX_RECURSIVE, [],
+      [Define if your pthreads implementation have PTHREAD_MUTEX_RECURSIVE]),
+    ,
+    [#include <pthread.h>])
+fi
+
 dnl Check for __thread
 AC_MSG_CHECKING([for __thread])
 AC_LINK_IFELSE([AC_LANG_PROGRAM([#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && ((__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 1) || (__GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ < 2))
@@ -310,8 +303,25 @@ fi
 
 AC_SUBST(ALSA_DEPLIBS)
 
+dnl Check for use of wordexp...
+AC_MSG_CHECKING(for use of wordexp)
+AC_ARG_WITH(wordexp,
+  AS_HELP_STRING([--with-wordexp],
+    [Use wordexp when expanding configs (default = no)]),
+  [case "$withval" in
+       y|yes) wordexp=yes ;;
+       *) wordexp=no ;;
+   esac],)
+if test "$wordexp" = "yes" ; then
+  AC_DEFINE(HAVE_WORDEXP, "1", [Enable use of wordexp])
+  AC_MSG_RESULT(yes)
+  AC_CHECK_HEADER([wordexp.h],[], [AC_MSG_ERROR([Couldn't find wordexp.h])])
+else
+  AC_MSG_RESULT(no)
+fi
+
 dnl Check for headers
-AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h])
+AC_CHECK_HEADERS([endian.h sys/endian.h sys/shm.h])
 
 dnl Check for resmgr support...
 AC_MSG_CHECKING(for resmgr support)
@@ -380,29 +390,54 @@ AC_ARG_ENABLE(seq,
 AC_ARG_ENABLE(ucm,
   AS_HELP_STRING([--disable-ucm], [disable the use-case-manager component]),
   [build_ucm="$enableval"], [build_ucm="yes"])
+AC_ARG_ENABLE(topology,
+  AS_HELP_STRING([--disable-topology], [disable the DSP topology component]),
+  [build_topology="$enableval"], [build_topology="yes"])
 AC_ARG_ENABLE(alisp,
-  AS_HELP_STRING([--disable-alisp], [disable the alisp component]),
-  [build_alisp="$enableval"], [build_alisp="yes"])
+  AS_HELP_STRING([--enable-alisp], [enable the alisp component]),
+  [build_alisp="$enableval"], [build_alisp="no"])
 test "$softfloat" = "yes" && build_alisp="no"
 AC_ARG_ENABLE(old-symbols,
   AS_HELP_STRING([--disable-old-symbols], [disable old obsoleted symbols]),
   [keep_old_symbols="$enableval"], [keep_old_symbols="yes"])
 AM_CONDITIONAL([KEEP_OLD_SYMBOLS], [test x$keep_old_symbols = xyes])
 
+AC_ARG_ENABLE(mixer-modules,
+  AS_HELP_STRING([--enable-mixer-modules], [enable the additional mixer modules (experimental)]),
+  [build_mixer_modules="$enableval"], [build_mixer_modules="no"])
+
+AC_ARG_ENABLE(mixer-pymods,
+  AS_HELP_STRING([--enable-mixer-pymods], [enable the mixer python modules (experimental)]),
+  [build_mixer_pymodules="$enableval"], [build_mixer_pymodules="no"])
+
 AC_ARG_ENABLE(python,
   AS_HELP_STRING([--disable-python], [disable the python components]),
   [build_python="$enableval"], [build_python="yes"])
+
+AC_ARG_ENABLE(python2,
+  AS_HELP_STRING([--enable-python2], [prefer python2]),
+  [build_python2="$enableval"], [build_python2="no"])
 PYTHON_LIBS=""
 PYTHON_INCLUDES=""
-if test "$build_python" = "yes"; then
+if test "$build_python" = "yes" -a "$build_mixer_pymodules" = "yes"; then
+  pythonlibs0=
+  pythoninc0=
+  if test "$build_python2" != "yes"; then
+    pythonlibs0=$(python3-config --libs)
+    pythoninc0=$(python3-config --includes)
+  fi
+  if test -z "$pythonlibs0"; then
+    pythonlibs0=$(python-config --libs)
+    pythoninc0=$(python-config --includes)
+  fi
   AC_ARG_WITH(pythonlibs,
     AS_HELP_STRING([--with-pythonlibs=ldflags],
       [specify python libraries (-lpthread -lm -ldl -lpython2.4)]),
-    pythonlibs="$withval", pythonlibs=`python-config --libs`)
+    pythonlibs="$withval", pythonlibs=$pythonlibs0)
   AC_ARG_WITH(pythonincludes,
     AS_HELP_STRING([--with-pythonincludes=Cflags],
       [specify python C header files (-I/usr/include/python)]),
-    pythonincludes="$withval", pythonincludes=`python-config --includes`)
+    pythonincludes="$withval", pythonincludes=$pythoninc0)
   if test -z "$pythonlibs"; then
     echo "Unable to determine python libraries! Probably python-config is not"
     echo "available on this system. Please, use --with-pythonlibs and"
@@ -413,6 +448,9 @@ if test "$build_python" = "yes"; then
     PYTHON_INCLUDES="$pythonincludes"
   fi
 fi
+if test "$build_python" != "yes"; then
+  build_mixer_pymodules=
+fi
 AC_SUBST(PYTHON_LIBS)
 AC_SUBST(PYTHON_INCLUDES)
 
@@ -422,8 +460,10 @@ AM_CONDITIONAL([BUILD_RAWMIDI], [test x$build_rawmidi = xyes])
 AM_CONDITIONAL([BUILD_HWDEP], [test x$build_hwdep = xyes])
 AM_CONDITIONAL([BUILD_SEQ], [test x$build_seq = xyes])
 AM_CONDITIONAL([BUILD_UCM], [test x$build_ucm = xyes])
+AM_CONDITIONAL([BUILD_TOPOLOGY], [test x$build_topology = xyes])
 AM_CONDITIONAL([BUILD_ALISP], [test x$build_alisp = xyes])
-AM_CONDITIONAL([BUILD_PYTHON], [test x$build_python = xyes])
+AM_CONDITIONAL([BUILD_MIXER_MODULES], [test x$build_mixer_modules = xyes])
+AM_CONDITIONAL([BUILD_MIXER_PYMODULES], [test x$build_mixer_pymodules = xyes])
 
 if test "$build_mixer" = "yes"; then
   AC_DEFINE([BUILD_MIXER], "1", [Build mixer component])
@@ -443,6 +483,9 @@ fi
 if test "$build_ucm" = "yes"; then
   AC_DEFINE([BUILD_UCM], "1", [Build UCM component])
 fi
+if test "$build_topology" = "yes"; then
+  AC_DEFINE([BUILD_TOPOLOGY], "1", [Build DSP Topology component])
+fi
 
 dnl PCM Plugins
 
@@ -517,6 +560,13 @@ if test "$gcc_have_atomics" != "yes"; then
   build_pcm_meter="no"
 fi
 
+if test "$ac_cv_header_sys_shm_h" != "yes"; then
+  build_pcm_dmix="no"
+  build_pcm_dshare="no"
+  build_pcm_dsnoop="no"
+  build_pcm_shm="no"
+fi
+
 AM_CONDITIONAL([BUILD_PCM_PLUGIN], [test x$build_pcm_plugin = xyes])
 AM_CONDITIONAL([BUILD_PCM_PLUGIN_COPY], [test x$build_pcm_copy = xyes])
 AM_CONDITIONAL([BUILD_PCM_PLUGIN_LINEAR], [test x$build_pcm_linear = xyes])
@@ -603,6 +653,10 @@ for p in $ctl_plugins; do
   done
 done
 
+if test "$ac_cv_header_sys_shm_h" != "yes"; then
+  build_ctl_shm="no"
+fi
+
 AM_CONDITIONAL([BUILD_CTL_PLUGIN], [test x$build_ctl_plugin = xyes])
 AM_CONDITIONAL([BUILD_CTL_PLUGIN_SHM], [test x$build_ctl_shm = xyes])
 AM_CONDITIONAL([BUILD_CTL_PLUGIN_EXT], [test x$build_ctl_ext = xyes])
@@ -630,6 +684,21 @@ elif test "$max_cards" -gt 256; then
 fi
 AC_DEFINE_UNQUOTED(SND_MAX_CARDS, $max_cards, [Max number of cards])
 
+dnl Check for thread-safe API functions
+if test "$HAVE_LIBPTHREAD" = "yes"; then
+AC_MSG_CHECKING(for thread-safe API functions)
+AC_ARG_ENABLE(thread-safety,
+  AS_HELP_STRING([--disable-thread-safety],
+    [disable thread-safe API functions]),
+  threadsafe="$enableval", threadsafe="yes")
+if test "$threadsafe" = "yes"; then
+  AC_MSG_RESULT(yes)
+  AC_DEFINE([THREAD_SAFE_API], "1", [Disable thread-safe API functions])
+else
+  AC_MSG_RESULT(no)
+fi
+fi
+
 dnl Make a symlink for inclusion of alsa/xxx.h
 if test ! -L "$srcdir"/include/alsa ; then
   echo "Making a symlink include/alsa"
@@ -643,18 +712,71 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
          src/pcm/Makefile src/pcm/scopes/Makefile \
          src/rawmidi/Makefile src/timer/Makefile \
           src/hwdep/Makefile src/seq/Makefile src/ucm/Makefile \
-          src/alisp/Makefile \
-         src/conf/Makefile src/conf/alsa.conf.d/Makefile \
+          src/alisp/Makefile src/topology/Makefile \
+         src/conf/Makefile \
          src/conf/cards/Makefile \
          src/conf/pcm/Makefile \
          src/conf/ucm/Makefile \
+         src/conf/ucm/ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN/Makefile \
+         src/conf/ucm/broadwell-rt286/Makefile \
+         src/conf/ucm/broxton-rt298/Makefile \
+         src/conf/ucm/bytcht-es8316/Makefile \
+         src/conf/ucm/bytcht-es8316-mono-spk-in1-mic/Makefile \
+         src/conf/ucm/bytcht-es8316-mono-spk-in2-mic/Makefile \
+         src/conf/ucm/bytcht-es8316-stereo-spk-in1-mic/Makefile \
+         src/conf/ucm/bytcht-es8316-stereo-spk-in2-mic/Makefile \
+         src/conf/ucm/bytcr-rt5640/Makefile \
+         src/conf/ucm/bytcr-rt5640-mono-spk-dmic1-mic/Makefile \
+         src/conf/ucm/bytcr-rt5640-mono-spk-in1-mic/Makefile \
+         src/conf/ucm/bytcr-rt5640-mono-spk-in3-mic/Makefile \
+         src/conf/ucm/bytcr-rt5640-stereo-spk-dmic1-mic/Makefile \
+         src/conf/ucm/bytcr-rt5640-stereo-spk-in1-mic/Makefile \
+         src/conf/ucm/bytcr-rt5640-stereo-spk-in3-mic/Makefile \
+         src/conf/ucm/bytcr-rt5651/Makefile \
+         src/conf/ucm/bytcr-rt5651-mono-spk-in1-mic/Makefile \
+         src/conf/ucm/bytcr-rt5651-mono-spk-in2-mic/Makefile \
+         src/conf/ucm/bytcr-rt5651-mono-spk-in2-mic-hp-swapped/Makefile \
+         src/conf/ucm/bytcr-rt5651-stereo-spk-dmic-mic/Makefile \
+         src/conf/ucm/bytcr-rt5651-stereo-spk-in1-mic/Makefile \
+         src/conf/ucm/bytcr-rt5651-stereo-spk-in2-mic/Makefile \
+         src/conf/ucm/bytcr-rt5651-stereo-spk-in12-mic/Makefile \
+         src/conf/ucm/chtnau8824/Makefile \
+         src/conf/ucm/chtrt5645/Makefile \
+         src/conf/ucm/chtrt5645-mono-speaker-analog-mic/Makefile \
+         src/conf/ucm/chtrt5650/Makefile \
+         src/conf/ucm/cube-i1_TF-Defaultstring-CherryTrailCR/Makefile \
          src/conf/ucm/DAISY-I2S/Makefile \
+         src/conf/ucm/DB410c/Makefile \
+         src/conf/ucm/DB820c/Makefile \
+         src/conf/ucm/Dell-WD15-Dock/Makefile \
+         src/conf/ucm/GoogleNyan/Makefile \
+         src/conf/ucm/gpd-win-pocket-rt5645/Makefile \
+         src/conf/ucm/HDAudio-Gigabyte-ALC1220DualCodecs/Makefile \
+         src/conf/ucm/HDAudio-Lenovo-DualCodecs/Makefile \
+         src/conf/ucm/kblrt5660/Makefile \
+         src/conf/ucm/LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216/Makefile \
          src/conf/ucm/PandaBoard/Makefile \
          src/conf/ucm/PandaBoardES/Makefile \
+         src/conf/ucm/PAZ00/Makefile \
+         src/conf/ucm/PIPO-W2S-Defaultstring-CherryTrailCR/Makefile \
          src/conf/ucm/SDP4430/Makefile \
+         src/conf/ucm/skylake-rt286/Makefile \
+         src/conf/ucm/TECLAST-X80Pro-Defaultstring-CherryTrailCR/Makefile \
          src/conf/ucm/tegraalc5632/Makefile \
-         src/conf/ucm/PAZ00/Makefile \
+         src/conf/ucm/VEYRON-I2S/Makefile \
+         src/conf/ucm/codecs/Makefile \
+         src/conf/ucm/codecs/es8316/Makefile \
+         src/conf/ucm/codecs/nau8824/Makefile \
+         src/conf/ucm/codecs/rt5640/Makefile \
+         src/conf/ucm/codecs/rt5645/Makefile \
+         src/conf/ucm/codecs/rt5651/Makefile \
+         src/conf/ucm/platforms/Makefile \
+         src/conf/ucm/platforms/bytcr/Makefile \
+         src/conf/topology/Makefile \
+         src/conf/topology/broadwell/Makefile \
          modules/Makefile modules/mixer/Makefile modules/mixer/simple/Makefile \
+         src/conf/topology/sklrt286/Makefile \
+         src/conf/topology/bxtrt298/Makefile \
          alsalisp/Makefile aserver/Makefile \
          test/Makefile test/lsb/Makefile \
          utils/Makefile utils/alsa-lib.spec utils/alsa.pc)