Cleanup
[external/alsa-lib.git] / configure.in
index 3cd6366..e33e629 100644 (file)
@@ -12,11 +12,14 @@ dnl add API = c+1:0:a+1
 dnl remove API = c+1:0:0
 dnl *************************************************
 AC_CANONICAL_HOST
-AM_INIT_AUTOMAKE(alsa-lib, 1.0.21a)
+AM_INIT_AUTOMAKE(alsa-lib, 1.0.24.1)
 eval LIBTOOL_VERSION_INFO="2:0:0"
 dnl *************************************************
 AM_CONDITIONAL(INSTALL_M4, test -n "${ACLOCAL}")
 
+# Test for new silent rules and enable only if they are available
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
 AC_PREFIX_DEFAULT(/usr)
 
 dnl Checks for programs.
@@ -35,6 +38,8 @@ then
   AC_MSG_RESULT($CC)
 fi
            
+CFLAGS="$CFLAGS -D_GNU_SOURCE"
+
 
 AC_PROG_CC
 AC_PROG_CPP
@@ -59,6 +64,7 @@ dnl Checks for library functions.
 AC_PROG_GCC_TRADITIONAL
 AC_CHECK_FUNC([hsearch_r], [HAVE_HSEARCH_R=yes])
 AM_CONDITIONAL(ALSA_HSEARCH_R, [test "x$HAVE_HSEARCH_R" != xyes])
+AC_CHECK_FUNCS([uselocale])
 
 SAVE_LIBRARY_VERSION
 AC_SUBST(LIBTOOL_VERSION_INFO)
@@ -109,11 +115,11 @@ AC_ARG_WITH(versioned,
   versioned="$withval", versioned="yes")
 if test "$versioned" = "yes"; then
   # it seems that GNU ld versions since 2.10 are not broken
-  xres=`grep '^VERSION=' libtool | cut -d = -f 2 | cut -d \" -f 2`
+  xres=`grep '^VERSION=' ${srcdir}/ltmain.sh | cut -d = -f 2 | cut -d \" -f 2`
   major=`echo $xres | cut -d . -f 1`
   minor=`echo $xres | cut -d . -f 2`
   pass=0
-  if test $major -eq 1 -a $minor -gt 3; then
+  if test $major -eq 1 && test $minor -gt 3; then
     pass=1
   else
     if test $major -gt 1; then
@@ -201,9 +207,12 @@ AC_MSG_CHECKING(for softfloat)
 AC_ARG_WITH(softfloat,
   AS_HELP_STRING([--with-softfloat],
     [do you have floating point unit on this machine? (optional)]),
-  [  AC_DEFINE(HAVE_SOFT_FLOAT, "1", [Avoid calculation in float])
-     softfloat=yes ],)
+  [case "$withval" in
+       y|yes) softfloat=yes ;;
+       *) softfloat=no ;;
+   esac],)
 if test "$softfloat" = "yes" ; then
+  AC_DEFINE(HAVE_SOFT_FLOAT, "1", [Avoid calculation in float])
   AC_MSG_RESULT(yes)
 else
   AC_MSG_RESULT(no)
@@ -364,6 +373,9 @@ AC_ARG_ENABLE(hwdep,
 AC_ARG_ENABLE(seq,
   AS_HELP_STRING([--disable-seq], [disable the sequencer component]),
   [build_seq="$enableval"], [build_seq="yes"])
+AC_ARG_ENABLE(ucm,
+  AS_HELP_STRING([--disable-ucm], [disable the use-case-manager component]),
+  [build_ucm="$enableval"], [build_ucm="yes"])
 AC_ARG_ENABLE(alisp,
   AS_HELP_STRING([--disable-alisp], [disable the alisp component]),
   [build_alisp="$enableval"], [build_alisp="yes"])
@@ -405,6 +417,7 @@ AM_CONDITIONAL(BUILD_PCM, test x$build_pcm = xyes)
 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_ALISP, test x$build_alisp = xyes)
 AM_CONDITIONAL(BUILD_PYTHON, test x$build_python = xyes)
 
@@ -423,6 +436,9 @@ fi
 if test "$build_seq" = "yes"; then
   AC_DEFINE([BUILD_SEQ], "1", [Build sequencer component])
 fi
+if test "$build_ucm" = "yes"; then
+  AC_DEFINE([BUILD_UCM], "1", [Build UCM component])
+fi
 
 dnl PCM Plugins
 
@@ -589,7 +605,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
           src/control/Makefile src/mixer/Makefile \
          src/pcm/Makefile src/pcm/scopes/Makefile \
          src/rawmidi/Makefile src/timer/Makefile \
-          src/hwdep/Makefile src/seq/Makefile \
+          src/hwdep/Makefile src/seq/Makefile src/ucm/Makefile \
           src/compat/Makefile src/alisp/Makefile src/conf/Makefile \
          src/conf/cards/Makefile \
          src/conf/pcm/Makefile \