[gst-devel] configure.base prototype

Erik Walthinsen omega at temple-baptist.com
Fri Jun 22 23:27:18 CEST 2001


I've written up a prototype of what I think we should be doing for
dependent libs in configure.base.  The idea is to start with an --enable-
argument, and check for the lib only if that is set to 'yes' (which would
be the default).  Warn if it's disabled or not found, with the names of
the affected plugins.  Then define USE_xyz as appropriate.

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
  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)


This makes the checks self-contained (no more CONDITIONAL mess lower in
the file), and hopefully stabilize the HAVE_ vs USE_ namespace (need to
change all the makefiles to use USE_).

Also, I'm tempted to start using shtool (http://www.gnu.org/software/shtool/)
as a autogen requirement, because it includes several m4 macros that can
be useful, including visual stuff to make the output of configure more
useful.

      Erik Walthinsen <omega at temple-baptist.com> - System Administrator
        __
       /  \                GStreamer - The only way to stream!
      |    | M E G A        ***** http://gstreamer.net/ *****
      _\  /_






More information about the gstreamer-devel mailing list