[polypaudio-commits] r1000 - /trunk/configure.ac

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Fri Jun 2 08:30:07 PDT 2006


Author: lennart
Date: Fri Jun  2 17:30:04 2006
New Revision: 1000

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1000&root=polypaudio&view=rev
Log:
Add new configure options to disable/enable specific modules at configure time. Original patch by ed at catmur.co.uk. (Closes #16)

Modified:
    trunk/configure.ac

Modified: trunk/configure.ac
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/configure.ac?rev=1000&root=polypaudio&r1=999&r2=1000&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Jun  2 17:30:04 2006
@@ -107,13 +107,17 @@
   yes) lynx=yes ;;
   no)  lynx=no ;;
   *) AC_MSG_ERROR(bad value ${enableval} for --disable-lynx) ;;
-esac],[lynx=yes])
-
-if test x$lynx = xyes ; then
+esac],[lynx=auto])
+
+if test x$lynx != xno ; then
    AC_CHECK_PROG(have_lynx, lynx, yes, no)
 
    if test x$have_lynx = xno ; then
-     AC_MSG_WARN([*** lynx not found, plain text README will not be built ***])
+       if test x$lynx = xyes ; then
+           AC_MSG_ERROR([*** lynx not found])
+       else
+           AC_MSG_WARN([*** lynx not found, plain text README will not be built ***])
+       fi
    fi
 fi
 
@@ -291,8 +295,14 @@
         AC_HELP_STRING([--without-caps],[Omit support for POSIX capabilities.]))
 
 if test "x${with_caps}" != "xno"; then
-    AC_SEARCH_LIBS([cap_init], [cap])
-    AC_CHECK_HEADERS([sys/capability.h])
+    AC_SEARCH_LIBS([cap_init], [cap], [], [
+                    if test "x${with_caps}" = "xyes" ; then
+                        AC_MSG_ERROR([*** POSIX caps libraries not found])
+                    fi])
+    AC_CHECK_HEADERS([sys/capability.h], [], [
+                    if test "x${with_caps}" = "xyes" ; then
+                        AC_MSG_ERROR([*** POSIX caps headers not found])
+                    fi])
 fi
 
 #### pkg-config ####
@@ -321,20 +331,30 @@
 
 #### OSS support (optional) ####
 
-AC_CHECK_HEADERS([sys/soundcard.h], [
-HAVE_OSS=1
-AC_DEFINE([HAVE_OSS], 1, [Have OSS?])
-], [HAVE_OSS=0])
+AC_ARG_ENABLE([oss], 
+    AC_HELP_STRING([--disable-oss], [Disable optional OSS support]), 
+    [case "${enableval}" in yes) oss=yes ;; no) oss=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-oss) ;; esac],[oss=auto])
+if test "x${oss}" != xno ; then
+    AC_CHECK_HEADERS([sys/soundcard.h], [
+    HAVE_OSS=1
+    AC_DEFINE([HAVE_OSS], 1, [Have OSS?])
+    ], [HAVE_OSS=0 ; if test "x$oss" = xyes ; then AC_MSG_ERROR([*** OSS support not found]) ; fi])
+else HAVE_OSS=0; fi
 AC_SUBST(HAVE_OSS)
 AM_CONDITIONAL([HAVE_OSS], [test "x$HAVE_OSS" = x1])
 
 
 #### ALSA support (optional) ####
 
-PKG_CHECK_MODULES(ASOUNDLIB, [ alsa >= 1.0.0 ], [
-HAVE_ALSA=1
-AC_DEFINE([HAVE_ALSA], 1, [Have ALSA?])
-], [HAVE_ALSA=0])
+AC_ARG_ENABLE([alsa], 
+    AC_HELP_STRING([--disable-alsa], [Disable optional ALSA support]), 
+    [case "${enableval}" in yes) alsa=yes ;; no) alsa=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-alsa) ;; esac],[alsa=auto])
+if test "x${alsa}" != xno ; then
+    PKG_CHECK_MODULES(ASOUNDLIB, [ alsa >= 1.0.0 ], [
+    HAVE_ALSA=1
+    AC_DEFINE([HAVE_ALSA], 1, [Have ALSA?])
+    ], [HAVE_ALSA=0 ; if test "x$alsa" = xyes ; then AC_MSG_ERROR([*** ALSA support not found]) ; fi])
+else HAVE_ALSA=0 ; fi
 AC_SUBST(ASOUNDLIB_CFLAGS)
 AC_SUBST(ASOUNDLIB_LIBS) 
 AC_SUBST(HAVE_ALSA)
@@ -342,16 +362,26 @@
 
 #### Solaris audio support (optional) ####
 
-AC_CHECK_HEADERS([sys/audio.h], [
-HAVE_SOLARIS=1
-AC_DEFINE([HAVE_SOLARIS], 1, [Have Solaris audio?])
-], [HAVE_SOLARIS=0])
+AC_ARG_ENABLE([solaris], 
+    AC_HELP_STRING([--disable-solaris], [Disable optional Solaris audio support]), 
+    [case "${enableval}" in yes) solaris=yes ;; no) solaris=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-solaris) ;; esac],[solaris=auto])
+if test "x${solaris}" != xno ; then
+    AC_CHECK_HEADERS([sys/audio.h], [
+    HAVE_SOLARIS=1
+    AC_DEFINE([HAVE_SOLARIS], 1, [Have Solaris audio?])
+    ], [HAVE_SOLARIS=0 ; if test "x$solaris" = xyes ; then AC_MSG_ERROR([*** Solaris audio support not found]) ; fi])
+else HAVE_SOLARIS=0 ; fi
 AC_SUBST(HAVE_SOLARIS)
 AM_CONDITIONAL([HAVE_SOLARIS], [test "x$HAVE_SOLARIS" = x1])
 
 #### GLib 2 support (optional) ####
 
-PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ], HAVE_GLIB20=1, HAVE_GLIB20=0)
+AC_ARG_ENABLE([glib2], 
+    AC_HELP_STRING([--disable-glib2], [Disable optional GLib 2 support]), 
+    [case "${enableval}" in yes) glib2=yes ;; no) glib2=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-glib2) ;; esac],[glib2=auto])
+if test "x${glib2}" != xno ; then
+    PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ], HAVE_GLIB20=1, [HAVE_GLIB20=0 ; if test "x$glib2" = xyes ; then AC_MSG_ERROR([*** GLib 2 support not found]) ; fi])
+else HAVE_GLIB20=0 ; fi
 AC_SUBST(GLIB20_CFLAGS)
 AC_SUBST(GLIB20_LIBS)
 AC_SUBST(HAVE_GLIB20)
@@ -359,7 +389,12 @@
 
 #### GLib 1 support (optional) ####
 
-PKG_CHECK_MODULES(GLIB12, [ glib >= 1.2.0 ], HAVE_GLIB12=1, HAVE_GLIB12=0)
+AC_ARG_ENABLE([glib1], 
+    AC_HELP_STRING([--disable-glib1], [Disable optional GLib 1 support]), 
+    [case "${enableval}" in yes) glib1=yes ;; no) glib1=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-glib1) ;; esac],[glib1=auto])
+if test "x${glib1}" != xno ; then
+    PKG_CHECK_MODULES(GLIB12, [ glib >= 1.2.0 ], HAVE_GLIB12=1, [HAVE_GLIB12=0 ; if test "x$glib1" = xyes ; then AC_MSG_ERROR([*** GLib 1 support not found]) ; fi])
+else HAVE_GLIB12=0 ; fi
 AC_SUBST(GLIB12_CFLAGS)
 AC_SUBST(GLIB12_LIBS)
 AC_SUBST(HAVE_GLIB12)
@@ -367,7 +402,12 @@
 
 #### Howl support (optional) ####
 
-PKG_CHECK_MODULES(HOWL, [ howl >= 0.9.8 ], HAVE_HOWL=1, HAVE_HOWL=0)
+AC_ARG_ENABLE([howl], 
+    AC_HELP_STRING([--disable-howl], [Disable optional Howl support]), 
+    [case "${enableval}" in yes) howl=yes ;; no) howl=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-howl) ;; esac],[howl=auto])
+if test "x${howl}" != xno ; then
+    PKG_CHECK_MODULES(HOWL, [ howl >= 0.9.8 ], HAVE_HOWL=1, PKG_CHECK_MODULES(HOWL, [ avahi-compat-howl >= 0.9.8 ], HAVE_HOWL=1, [HAVE_HOWL=0 ; if test "x$howl" = xyes ; then AC_MSG_ERROR([*** Howl support not found]) ; fi]))
+else HAVE_HOWL=0 ; fi
 AC_SUBST(HOWL_CFLAGS)
 AC_SUBST(HOWL_LIBS)
 AC_SUBST(HAVE_HOWL)
@@ -381,7 +421,12 @@
 
 ### JACK (optional) ####
 
-PKG_CHECK_MODULES(JACK, [ jack >= 0.100 ], HAVE_JACK=1, HAVE_JACK=0)
+AC_ARG_ENABLE([jack], 
+    AC_HELP_STRING([--disable-jack], [Disable optional JACK support]), 
+    [case "${enableval}" in yes) jack=yes ;; no) jack=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-jack) ;; esac],[jack=auto])
+if test "x${jack}" != xno ; then
+    PKG_CHECK_MODULES(JACK, [ jack >= 0.100 ], HAVE_JACK=1, [HAVE_JACK=0 ; if test "x$jack" = xyes ; then AC_MSG_ERROR([*** JACK support not found]) ; fi])
+else HAVE_JACK=0 ; fi
 AC_SUBST(JACK_CFLAGS)
 AC_SUBST(JACK_LIBS)
 AC_SUBST(HAVE_JACK)
@@ -389,7 +434,12 @@
 
 #### Async DNS support (optional) ####
 
-PKG_CHECK_MODULES(LIBASYNCNS, [ libasyncns >= 0.1 ], HAVE_LIBASYNCNS=1, HAVE_LIBASYNCNS=0)
+AC_ARG_ENABLE([asyncns], 
+    AC_HELP_STRING([--disable-asyncns], [Disable optional Async DNS support]), 
+    [case "${enableval}" in yes) asyncns=yes ;; no) asyncns=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-asyncns) ;; esac],[asyncns=auto])
+if test "x${asyncns}" != xno ; then
+    PKG_CHECK_MODULES(LIBASYNCNS, [ libasyncns >= 0.1 ], HAVE_LIBASYNCNS=1, [HAVE_LIBASYNCNS=0 ; if test "x$asyncns" = xyes ; then AC_MSG_ERROR([*** Async DNS support not found]) ; fi])
+else HAVE_LIBASYNCNS=0 ; fi
 AC_SUBST(LIBASYNCNS_CFLAGS)
 AC_SUBST(LIBASYNCNS_LIBS)
 AC_SUBST(HAVE_LIBASYNCNS)
@@ -401,12 +451,28 @@
 
 #### TCP wrappers (optional) ####
 
-ACX_LIBWRAP
+AC_ARG_ENABLE([tcpwrap], 
+    AC_HELP_STRING([--disable-tcpwrap], [Disable optional TCP wrappers support]), 
+    [case "${enableval}" in yes) tcpwrap=yes ;; no) tcpwrap=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-tcpwrap) ;; esac],[tcpwrap=auto])
+if test "x${tcpwrap}" != xno ; then
+    ACX_LIBWRAP
+    if test "x${LIBWRAP_LIBS}" = x && test "x$tcpwrap" = xyes ; then
+        AC_MSG_ERROR([*** TCP wrappers support not found])
+    fi
+else LIBWRAP_LIBS= ; fi
 AC_SUBST(LIBWRAP_LIBS)
 
 #### LIRC support (optional) ####
 
-ACX_LIRC
+AC_ARG_ENABLE([lirc], 
+    AC_HELP_STRING([--disable-lirc], [Disable optional LIRC support]), 
+    [case "${enableval}" in yes) lirc=yes ;; no) lirc=no ;; *) AC_MSG_ERROR(bad value ${enableval} for --disable-lirc) ;; esac],[lirc=auto])
+if test "x${lirc}" != xno ; then
+    ACX_LIRC
+    if test "x${HAVE_LIRC}" = x0 && test "x$lirc" = xyes ; then
+        AC_MSG_ERROR([*** LIRC support not found])
+    fi
+else HAVE_LIRC=0 ; fi
 AC_SUBST(LIRC_CFLAGS)
 AC_SUBST(LIRC_LIBS)
 AM_CONDITIONAL([HAVE_LIRC], [test "x$HAVE_LIRC" = x1])




More information about the pulseaudio-commits mailing list