"Fossies" - the Fresh Open Source Software Archive

Member "alsa-plugins-1.2.5/configure.ac" (27 May 2021, 9641 Bytes) of package /linux/misc/alsa-plugins-1.2.5.tar.bz2:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "configure.ac": 1.2.2_vs_1.2.5.

    1 AC_PREREQ(2.59)
    2 AC_INIT(alsa-plugins, 1.2.5)
    3 AM_INIT_AUTOMAKE
    4 AC_PREFIX_DEFAULT(/usr)
    5 
    6 AM_MAINTAINER_MODE([enable])
    7 
    8 AC_CONFIG_HEADERS(config.h)
    9 AC_CONFIG_MACRO_DIR([m4])
   10 
   11 AC_PROG_CC
   12 AC_PROG_INSTALL
   13 AC_DISABLE_STATIC
   14 AM_PROG_LIBTOOL
   15 AC_HEADER_STDC
   16 
   17 CC_NOUNDEFINED
   18 
   19 PKG_CHECK_MODULES(ALSA, alsa >= 1.1.6)
   20 AC_CHECK_LIB(asound, snd_pcm_ioplug_create,,
   21 	     AC_ERROR([*** libasound has no external plugin SDK]), -ldl)
   22 
   23 AC_ARG_ENABLE([oss],
   24       AS_HELP_STRING([--disable-oss], [Disable building of OSS plugin]))
   25 AS_IF([test "x$enable_oss" != "xno"],
   26       [AM_CONDITIONAL(HAVE_OSS, true)],
   27       [AM_CONDITIONAL(HAVE_OSS, false)])
   28 
   29 AC_ARG_ENABLE([mix],
   30       AS_HELP_STRING([--disable-mix], [Disable building of upmix and vdownmix plugins]))
   31 AS_IF([test "x$enable_mix" != "xno"],
   32       [AM_CONDITIONAL(HAVE_MIX, true)],
   33       [AM_CONDITIONAL(HAVE_MIX, false)])
   34 
   35 AC_ARG_ENABLE([usbstream],
   36       AS_HELP_STRING([--disable-usbstream], [Disable building of usb_stream plugin]))
   37 AS_IF([test "x$enable_usbstream" != "xno"],
   38       [AM_CONDITIONAL(HAVE_USBSTREAM, true)],
   39       [AM_CONDITIONAL(HAVE_USBSTREAM, false)])
   40 
   41 AC_ARG_ENABLE([arcamav],
   42       AS_HELP_STRING([--disable-arcamav], [Disable building of Arcam AV control plugin]))
   43 AS_IF([test "x$enable_arcamav" != "xno"],
   44       [AM_CONDITIONAL(HAVE_ARCAMAV, true)],
   45       [AM_CONDITIONAL(HAVE_ARCAMAV, false)])
   46 
   47 AC_ARG_ENABLE([jack],
   48       AS_HELP_STRING([--disable-jack], [Disable building of JACK plugin]))
   49 
   50 if test "x$enable_jack" != "xno"; then
   51   PKG_CHECK_MODULES(JACK, jack >= 0.98, [HAVE_JACK=yes], [HAVE_JACK=no])
   52 fi
   53 AM_CONDITIONAL(HAVE_JACK, test x$HAVE_JACK = xyes)
   54 
   55 AC_ARG_ENABLE([pulseaudio],
   56       AS_HELP_STRING([--disable-pulseaudio], [Disable building of pulseaudio plugin]))
   57 
   58 if test "x$enable_pulseaudio" != "xno"; then
   59   PKG_CHECK_MODULES(pulseaudio, [libpulse >= 0.9.11], [HAVE_PULSE=yes], [HAVE_PULSE=no])
   60 fi
   61 AM_CONDITIONAL(HAVE_PULSE, test x$HAVE_PULSE = xyes)
   62 
   63 AC_ARG_ENABLE([samplerate],
   64       AS_HELP_STRING([--disable-samplerate], [Disable building of samplerate plugin]))
   65 
   66 if test "x$enable_samplerate" != "xno"; then
   67   PKG_CHECK_MODULES(samplerate, [samplerate], [HAVE_SAMPLERATE=yes], [HAVE_SAMPLERATE=no])
   68 fi
   69 AM_CONDITIONAL(HAVE_SAMPLERATE, test x$HAVE_SAMPLERATE = xyes)
   70 
   71 AC_ARG_ENABLE([maemo-plugin],
   72 	AS_HELP_STRING([--enable-maemo-plugin],
   73 		[Build Maemo DSP plugin]),
   74 	[HAVE_MAEMO_PLUGIN="$enableval"], [HAVE_MAEMO_PLUGIN="no"])
   75 AM_CONDITIONAL(HAVE_MAEMO_PLUGIN, test x$HAVE_MAEMO_PLUGIN = xyes)
   76 
   77 AC_ARG_ENABLE([maemo-resource-manager],
   78 	AS_HELP_STRING([--enable-maemo-resource-manager],
   79 		[Use Maemo resource manager]),
   80 	[use_maemo_rm="$enableval"], [use_maemo_rm="no"])
   81 
   82 if test "$use_maemo_rm" = "yes"; then
   83         PKG_CHECK_MODULES(DBUS, [dbus-1], [HAVE_DBUS=yes], [HAVE_DBUS=no])
   84 
   85         if test "$HAVE_DBUS" = "yes"; then
   86                 AC_DEFINE(USE_RESOURCE_MANAGER, 1,"Use dbus server as a resouce manager")
   87         else
   88         	AC_ERROR([You must have D-Bus installed if you want to enable the Maemo resource manager])
   89         fi
   90 fi
   91 
   92 AC_ARG_ENABLE([libav],
   93       AS_HELP_STRING([--disable-libav], [Do not build plugins depending on libav/ffmpeg (a52,lavrate...)]))
   94 
   95 if test "x$enable_libav" != "xno"; then
   96   PKG_CHECK_MODULES(LIBAV, [libavcodec libavutil libavresample], [HAVE_LIBAV=yes], [HAVE_LIBAV=no])
   97 fi
   98 
   99 if test "x$HAVE_LIBAV" = "xno"; then
  100   AC_ARG_WITH([libav-includedir],
  101 	AS_HELP_STRING([--with-libav-includedir=dir],
  102 		[Libav/ffmpeg include directory]),
  103 		[LIBAV_CFLAGS="-I$(withval)"], [LIBAV_CFLAGS=""])
  104   AC_ARG_WITH([libav-libdir],
  105 	AS_HELP_STRING([--with-libav-libdir=dir],
  106 		[Libav/ffmpeg library directory]),
  107 		[LIBAV_LIBS="-L$withval"], [LIBAV_LIBS=""])
  108 
  109   CFLAGS_saved="$CFLAGS"
  110   LDFLAGS_saved="$LDFLAGS"
  111   CFLAGS="$CFLAGS $LIBAV_CFLAGS"
  112   LDFLAGS="$LDFLAGS $LIBAV_LIBS"
  113   AC_CHECK_LIB([avcodec], [avcodec_open], [HAVE_LIBAV=yes], [HAVE_LIBAV=no])
  114   CFLAGS="$CFLAGS_saved"
  115   LDFLAGS="$LDFLAGS_saved"
  116   LIBAV_CODEC_LIBS="-lavcodec"
  117   LIBAV_RESAMPLE_LIBS="-lavresample -lavutil"
  118 fi
  119 
  120 AM_CONDITIONAL(HAVE_LIBAV, test x$HAVE_LIBAV = xyes)
  121 AC_SUBST(LIBAV_CFLAGS)
  122 AC_SUBST(LIBAV_LIBS)
  123 AC_SUBST(LIBAV_CODEC_LIBS)
  124 AC_SUBST(LIBAV_RESAMPLE_LIBS)
  125 
  126 AC_ARG_ENABLE([a52],
  127       AS_HELP_STRING([--disable-a52], [Disable building of A52 encoder plugin]))
  128 
  129 if test "x$enable_a52" != "xno" -a "$HAVE_LIBAV" = "yes"; then
  130   HAVE_A52=yes
  131 fi
  132 AM_CONDITIONAL(HAVE_A52, test x$HAVE_A52 = xyes)
  133 
  134 AC_ARG_ENABLE([lavrate],
  135       AS_HELP_STRING([--disable-lavrate], [Disable building of libav/ffmpeg rate plugin]))
  136 
  137 if test "x$enable_lavrate" != "xno" -a "$HAVE_LIBAV" = "yes"; then
  138   HAVE_LAVRATE=yes
  139 fi
  140 AM_CONDITIONAL(HAVE_LAVRATE, test x$HAVE_LAVRATE = xyes)
  141 
  142 AC_ARG_ENABLE([speexdsp],
  143       AS_HELP_STRING([--disable-speexdsp], [Disable building of speexdsp plugin]))
  144 
  145 if test "x$enable_speexdsp" != "xno"; then
  146   PKG_CHECK_MODULES(speexdsp, [speexdsp >= 1.2rc2], [HAVE_SPEEXDSP="yes"], [HAVE_SPEEXDSP=""])
  147 fi
  148 AM_CONDITIONAL(HAVE_SPEEXDSP, test "$HAVE_SPEEXDSP" = "yes")
  149 
  150 AC_ARG_WITH([speex],
  151 	AS_HELP_STRING([--with-speex={builtin|lib|no}],
  152 		[build speex resampler (built-in code, link with external lib, or no build)]),
  153 	[PPH=$withval], [PPH="lib"])
  154 
  155 USE_LIBSPEEX=""
  156 if test "$PPH" = "lib"; then
  157 	if test "$HAVE_SPEEXDSP" = "yes"; then
  158 		AC_CHECK_LIB([speexdsp], [speex_resampler_init],
  159 			[USE_LIBSPEEX="yes"], [USE_LIBSPEEX=""])
  160 	fi
  161 	if test "$USE_LIBSPEEX" = "yes"; then
  162 		AC_DEFINE(USE_LIBSPEEX, 1, "Link with libspeex for resampler")
  163 	else
  164 		echo "No libspeex with resampler unit; use built-in code"
  165 		PPH="builtin"
  166 	fi
  167 fi
  168 
  169 AM_CONDITIONAL(HAVE_PPH, test "$PPH" = "builtin" -o "$PPH" = "lib")
  170 AM_CONDITIONAL(USE_LIBSPEEX, test "$PPH" = "lib")
  171 
  172 if test "$PPH" = "lib"; then
  173     AC_CHECK_HEADERS([speex/speexdsp_types.h])
  174 fi
  175 
  176 test "x$prefix" = xNONE && prefix=$ac_default_prefix
  177 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
  178 
  179 AC_ARG_ENABLE([aaf],
  180       AS_HELP_STRING([--disable-aaf], [Disable building of AAF plugin]))
  181 
  182 if test "x$enable_aaf" != "xno"; then
  183   PKG_CHECK_MODULES(AVTP, avtp >= 0.1, [HAVE_AAF=yes], [HAVE_AAF=no])
  184   AC_CHECK_HEADERS([linux/if_ether.h linux/if_packet.h linux/net_tstamp.h], [], [HAVE_AAF=no])
  185 fi
  186 AM_CONDITIONAL(HAVE_AAF, test x$HAVE_AAF = xyes)
  187 
  188 dnl ALSA plugin directory
  189 AC_ARG_WITH(plugindir,
  190     AS_HELP_STRING([--with-plugindir=dir],
  191 	[path where ALSA plugin files are stored]),
  192     plugindir="$withval", plugindir="")
  193 if test -z "$plugindir"; then
  194     eval dir="$libdir"
  195     case "$dir" in
  196     /*) ;;
  197     *) dir="$dir"
  198     esac
  199     plugindir="$dir/alsa-lib"
  200 fi
  201 AC_DEFINE_UNQUOTED(ALSA_PLUGIN_DIR, "$plugindir", [directory containing ALSA add-on modules])
  202 ALSA_PLUGIN_DIR="$plugindir"
  203 AC_SUBST(ALSA_PLUGIN_DIR)
  204 
  205 dnl ALSA data directory
  206 AC_ARG_WITH(alsadatadir,
  207     AS_HELP_STRING([--with-alsadatadir=dir],
  208 	[path where ALSA data files are stored]),
  209     alsadatadir="$withval", alsadatadir="")
  210 if test -z "$alsadatadir"; then
  211     eval dir="$datadir"
  212     case "$dir" in
  213     /*) ;;
  214     *) eval dir="$dir"
  215     esac
  216     alsadatadir="$dir/alsa"
  217 fi
  218 AC_DEFINE_UNQUOTED(ALSA_DATA_DIR, "$alsadatadir", [directory containing ALSA data files])
  219 ALSA_DATA_DIR="$alsadatadir"
  220 AC_SUBST(ALSA_DATA_DIR)
  221 
  222 dnl ALSA add-on global config directory
  223 AC_ARG_WITH(alsagconfdir,
  224     AS_HELP_STRING([--with-alsagconfdir=dir],
  225 	[path where ALSA global add-on config files are stored]),
  226     alsagconfdir="$withval", alsagconfdir="")
  227 if test -z "$alsagconfdir"; then
  228     alsagconfdir="$ALSA_DATA_DIR/alsa.conf.d"
  229 fi
  230 AC_DEFINE_UNQUOTED(ALSA_GCONF_DIR, "$alsagconfdir", [directory containing global ALSA add-on config files])
  231 ALSA_GCONF_DIR="$alsagconfdir"
  232 AC_SUBST(ALSA_GCONF_DIR)
  233 
  234 dnl ALSA add-on local config directory
  235 AC_ARG_WITH(alsalconfdir,
  236     AS_HELP_STRING([--with-alsalconfdir=dir],
  237 	[path where ALSA local add-on config files are stored]),
  238     alsalconfdir="$withval", alsalconfdir="")
  239 if test -z "$alsalconfdir"; then
  240     eval dir="$sysconfdir"
  241     case "$dir" in
  242     /*) ;;
  243     *) dir="$dir"
  244     esac
  245     alsalconfdir="$dir/alsa/conf.d"
  246 fi
  247 AC_DEFINE_UNQUOTED(ALSA_LCONF_DIR, "$alsalconfdir", [directory containing local ALSA add-on config files])
  248 ALSA_LCONF_DIR="$alsalconfdir"
  249 AC_SUBST(ALSA_LCONF_DIR)
  250 
  251 SAVE_PLUGINS_VERSION
  252 
  253 AC_OUTPUT([
  254 	Makefile
  255 	oss/Makefile
  256 	pph/Makefile
  257 	jack/Makefile
  258 	pulse/Makefile
  259 	mix/Makefile
  260 	rate/Makefile
  261 	a52/Makefile
  262 	rate-lav/Makefile
  263 	maemo/Makefile
  264 	doc/Makefile
  265 	usb_stream/Makefile
  266 	speex/Makefile
  267 	arcam-av/Makefile
  268 	aaf/Makefile
  269 ])
  270 
  271 dnl Show the build conditions
  272 
  273 echo
  274 echo "Plugin directory: $ALSA_PLUGIN_DIR"
  275 echo "ALSA_CFLAGS: $ALSA_CFLAGS"
  276 echo "ALSA_LIBS: $ALSA_LIBS"
  277 echo "JACK plugin:        $HAVE_JACK"
  278 if test "$HAVE_JACK" = "yes"; then
  279   echo "  JACK_CFLAGS: $JACK_CFLAGS"
  280   echo "  JACK_LIBS: $JACK_LIBS"
  281 fi
  282 echo "Pulseaudio plugin:  $HAVE_PULSE"
  283 if test "$HAVE_PULSE" = "yes"; then
  284   echo "  pulseaudio_CFLAGS: $pulseaudio_CFLAGS"
  285   echo "  pulseaudio_LIBS: $pulseaudio_LIBS"
  286 fi
  287 echo "Samplerate plugin:  $HAVE_SAMPLERATE"
  288 if test "$HAVE_SAMPLERATE" = "yes"; then
  289   echo "  samplerate_CFLAGS: $samplerate_CFLAGS"
  290   echo "  samplerate_LIBS: $samplerate_LIBS"
  291 fi
  292 echo "Maemo plugin:       $HAVE_MAEMO_PLUGIN"
  293 echo "  Using Osso resource manager: $use_maemo_rm"
  294 if test "$HAVE_LIBAV" = "yes"; then
  295   echo "Libav/ffmpeg config:"
  296   echo "  LIBAV_CFLAGS:   $LIBAV_CFLAGS"
  297   echo "  LIBAV_LIBS:     $LIBAV_LIBS / $LIBAV_CODEC_LIBS / $LIBAV_RESAMPLE_LIBS"
  298 fi
  299 echo "Libav A52 plugin:   $HAVE_A52"
  300 echo "Libav rate plugin:  $HAVE_LAVRATE"
  301 echo "Speex rate plugin:  $PPH"
  302 echo "Speex preprocess plugin:  $HAVE_SPEEXDSP"
  303 if test "$HAVE_SPEEX" = "yes"; then
  304   echo "  speexdsp_CFLAGS: $speexdsp_CFLAGS"
  305   echo "  speexdsp_LIBS: $speexdsp_LIBS"
  306 fi
  307 echo "AAF plugin:         $HAVE_AAF"