# Rules to generate autoconf scripts if configure.base is updated
$(top_srcdir)/configure.in: $(top_srcdir)/configure.base
- sed <$(top_srcdir)/configure.base >$(top_srcdir)/configure.in '/^SUBSTFOR configure.ac:.*/d;s/^SUBSTFOR configure.in://g'
+ $(top_srcdir)/makeconfigure <$(top_srcdir)/configure.base >$(top_srcdir)/configure.in configure.in
+
$(top_srcdir)/configure.ac: $(top_srcdir)/configure.base
- sed <$(top_srcdir)/configure.base >$(top_srcdir)/configure.ac '/^SUBSTFOR configure.in:.*/d;s/^SUBSTFOR configure.ac://g'
+ $(top_srcdir)/makeconfigure <$(top_srcdir)/configure.base >$(top_srcdir)/configure.ac configure.ac
AC_SUBST(ALSA_LIBS)
])
+
+dnl Perform a check for a feature for GStreamer
+dnl Richard Boulton <richard-alsa@tartarus.org>
+dnl Last modification: 25/06/2001
+dnl GST_CHECK_FEATURE(FEATURE-NAME, FEATURE-DESCRIPTION,
+dnl DEPENDENT-PLUGINS, TEST-FOR-FEATURE)
+dnl
+dnl
+AC_DEFUN(GST_CHECK_FEATURE,
+[
+AC_ARG_ENABLE(translit($1, `A-Z', `a-z'),
+ [ --enable-translit($1, `A-Z', `a-z') enable [$2]: [$3]],
+ [ case "${enableval}" in
+ yes) USE_[$1]=yes ;;
+ no) USE_[$1]=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-translit($1, `A-Z', `a-z')) ;;
+ esac],
+ [ USE_$1=yes ]) dnl DEFAULT
+
+dnl *** If it's enabled
+if test x$USE_[$1] = xyes; then
+ gst_check_save_LIBS=$LIBS
+ gst_check_save_CFLAGS=$CFLAGS
+ $4
+ LIBS=$gst_check_save_LIBS
+ CFLAGS=$gst_check_save_CFLAGS
+
+ dnl If it isn't found, unset USE_[$1]
+ if test x$HAVE_[$1] = xno; then
+ USE_[$1]=yes
+ fi
+fi
+dnl *** Warn if it's disabled or not found
+if test x$USE_[$1] = xno; then
+ AC_MSG_WARN(
+***** NOTE: These plugins won't be built: [$3]
+)
+fi
+dnl *** Define the conditional as appropriate
+AM_CONDITIONAL(USE_[$1], test x$USE_[$1] = xyes)
+])
+
# Generate configure.in and configure.ac
-sed <configure.base >configure.in '/^SUBSTFOR configure.ac:.*/d;s/^SUBSTFOR configure.in://g'
-sed <configure.base >configure.ac '/^SUBSTFOR configure.in:.*/d;s/^SUBSTFOR configure.ac://g'
+./makeconfigure <configure.base > configure.in configure.in
+./makeconfigure <configure.base > configure.ac configure.ac
libtoolize --copy --force
aclocal $ACLOCAL_FLAGS || {
dnl ***** ESound *****
-
-dnl *** First, the --enable-esd arg
-AC_ARG_ENABLE(esd,
- [ --enable-esd enable esound plugins: esdsrc, esdsink],
- [ case "${enableval}" in
- yes) USE_LIBESD=yes ;;
- no) USE_LIBESD=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-esd) ;;
- esac],
- [ USE_LIBESD=yes ]) dnl DEFAULT
-dnl *** If it's enabled
-if test x$USE_LIBESD = xyes; then
- esd_save_LIBS=$LIBS
- esd_save_CFLAGS=$CFLAGS
+GST_CHECK_FEATURE(LIBESD, [esound plugins], esdsrc esdsink, [
AM_PATH_ESD(0.2.12, HAVE_LIBESD=yes, HAVE_LIBESD=no)
- LIBS=$esd_save_LIBS
- CFLAGS=$esd_save_CFLAGS
-
- dnl If it isn't found, unset USE_LIBESD
- if test x$HAVE_LIBESD = xno; then
- USE_LIBESD=yes
- fi
-fi
-dnl *** Warn if it's disabled or not found
-if test x$USE_LIBESD = xno; then
- AC_MSG_WARN(
-***** NOTE: These plugins won't be built: esdsink
-)
-fi
-dnl *** Define the conditional as appropriate
-AM_CONDITIONAL(USE_LIBESD, test x$USE_LIBESD = xyes)
-
+])
dnl Check for artsc
AC_PATH_PROG(ARTSC_CONFIG, artsc-config, no)
AM_CONDITIONAL(HAVE_CDPARANOIA, test "x$HAVE_CDPARANOIA" = "xyes")
AM_CONDITIONAL(HAVE_LIBLAME, test "x$HAVE_LIBLAME" = "xyes")
AM_CONDITIONAL(HAVE_LIBSHOUT, test "x$HAVE_LIBSHOUT" = "xyes")
-dnl AM_CONDITIONAL(HAVE_LIBESD, test "x$HAVE_LIBESD" = "xyes")
AM_CONDITIONAL(HAVE_ARTSC, test "x$HAVE_ARTSC" = "xyes")
AM_CONDITIONAL(HAVE_LIBASOUND, test "x$HAVE_LIBASOUND" = "xyes")
AM_CONDITIONAL(HAVE_MPEG2DEC, test "x$HAVE_MPEG2DEC" = "xyes")
--- /dev/null
+#!/bin/sh
+# Run this to generate configure.in and configure.ac from configure.base
+
+# args: $1 - configure file to create
+
+sed "
+s/^SUBSTFOR $1://g;
+/^SUBSTFOR .*:.*/d;
+s/GST_CHECK_FEATURE *(\\([A-Za-z0-9_]*\\) *,/translit(dnm, m, l) AM_CONDITIONAL(USE_\\1, true)\\
+GST_CHECK_FEATURE(\\1,/"