Commit 3d6955d6 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

Remove esound/esdsink plugin

parent 72873243
......@@ -89,11 +89,6 @@ Version: >= 0.71
Plugins: cdio (cdiocddasrc)
URL: http://www.gnu.org/software/libcdio/
Package: ESound
Version: >= 0.2.12
Plugins: esdsink
URL: http://www.gnome.org/
Package: FLAC
Version: == 1.1.2
Plugins: flac (flacenc, flacdec)
......
......@@ -719,17 +719,6 @@ AG_GST_CHECK_FEATURE(CAIRO_GOBJECT,
AG_GST_PKG_CHECK_MODULES(CAIRO_GOBJECT, cairo-gobject >= 1.10.0)
])
dnl **** ESound ****
translit(dnm, m, l) AM_CONDITIONAL(USE_ESD, true)
AG_GST_CHECK_FEATURE(ESD, [ESounD sound daemon], esdsink, [
AG_GST_PKG_CHECK_MODULES(ESD, esound >= 0.2.12)
if test $HAVE_ESD = no
then
AM_PATH_ESD(0.2.12, HAVE_ESD="yes")
AS_SCRUB_INCLUDE(ESD_CFLAGS)
fi
])
dnl *** FLAC ***
translit(dnm, m, l) AM_CONDITIONAL(USE_FLAC, true)
AG_GST_CHECK_FEATURE(FLAC, [FLAC lossless audio], flac, [
......@@ -1021,7 +1010,6 @@ AM_CONDITIONAL(USE_CAIRO, false)
AM_CONDITIONAL(USE_CAIRO_GOBJECT, false)
AM_CONDITIONAL(USE_DIRECTSOUND, false)
AM_CONDITIONAL(USE_DV1394, false)
AM_CONDITIONAL(USE_ESD, false)
AM_CONDITIONAL(USE_FLAC, false)
AM_CONDITIONAL(USE_GDK_PIXBUF, false)
AM_CONDITIONAL(USE_GST_V4L2, false)
......@@ -1157,7 +1145,6 @@ ext/aalib/Makefile
ext/annodex/Makefile
ext/cairo/Makefile
ext/dv/Makefile
ext/esd/Makefile
ext/flac/Makefile
ext/gdk_pixbuf/Makefile
ext/hal/Makefile
......
......@@ -84,7 +84,6 @@ EXTRA_HFILES = \
$(top_srcdir)/ext/cairo/gstcairooverlay.h \
$(top_srcdir)/ext/dv/gstdvdec.h \
$(top_srcdir)/ext/dv/gstdvdemux.h \
$(top_srcdir)/ext/esd/esdsink.h \
$(top_srcdir)/ext/flac/gstflacdec.h \
$(top_srcdir)/ext/flac/gstflacenc.h \
$(top_srcdir)/ext/flac/gstflactag.h \
......
......@@ -72,7 +72,6 @@
<xi:include href="xml/element-equalizer-10bands.xml" />
<xi:include href="xml/element-equalizer-3bands.xml" />
<xi:include href="xml/element-equalizer-nbands.xml" />
<xi:include href="xml/element-esdsink.xml" />
<xi:include href="xml/element-flacdec.xml" />
<xi:include href="xml/element-flacenc.xml" />
<xi:include href="xml/element-flacparse.xml" />
......@@ -205,7 +204,6 @@
<xi:include href="xml/plugin-efence.xml" />
<xi:include href="xml/plugin-equalizer.xml" />
<xi:include href="xml/plugin-effectv.xml" />
<xi:include href="xml/plugin-esdsink.xml" />
<xi:include href="xml/plugin-flac.xml" />
<xi:include href="xml/plugin-flv.xml" />
<xi:include href="xml/plugin-flxdec.xml" />
......
......@@ -797,20 +797,6 @@ LOWEST_FREQ
ProcessFunc
</SECTION>
<SECTION>
<FILE>element-esdsink</FILE>
<TITLE>esdsink</TITLE>
GstEsdSink
<SUBSECTION Standard>
GstEsdSinkClass
GST_TYPE_ESDSINK
GST_ESDSINK
GST_ESDSINK_CLASS
GST_IS_ESDSINK
GST_IS_ESDSINK_CLASS
gst_esdsink_get_type
</SECTION>
<SECTION>
<FILE>element-flacdec</FILE>
<TITLE>flacdec</TITLE>
......
<plugin>
<name>esdsink</name>
<description>ESD Element Plugins</description>
<filename>../../ext/esd/.libs/libgstesd.so</filename>
<basename>libgstesd.so</basename>
<version>0.10.29.1</version>
<license>LGPL</license>
<source>gst-plugins-good</source>
<package>GStreamer Good Plug-ins git</package>
<origin>Unknown package origin</origin>
<elements>
<element>
<name>esdsink</name>
<longname>Esound audio sink</longname>
<class>Sink/Audio</class>
<description>Plays audio to an esound server</description>
<author>Arwed von Merkatz &lt;v.merkatz@gmx.net&gt;</author>
<pads>
<caps>
<name>sink</name>
<direction>sink</direction>
<presence>always</presence>
<details>audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16, depth=(int)16, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ]; audio/x-raw-int, signed=(boolean){ true, false }, width=(int)8, depth=(int)8, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2 ]</details>
</caps>
</pads>
</element>
</elements>
</plugin>
\ No newline at end of file
......@@ -16,12 +16,6 @@ else
CAIRO_DIR =
endif
if USE_ESD
ESD_DIR = esd
else
ESD_DIR =
endif
if USE_FLAC
FLAC_DIR = flac
else
......@@ -130,7 +124,6 @@ SUBDIRS = \
$(ANNODEX_DIR) \
$(CAIRO_DIR) \
$(DV1394_DIR) \
$(ESD_DIR) \
$(FLAC_DIR) \
$(GDK_PIXBUF_DIR) \
$(HAL_DIR) \
......@@ -153,7 +146,6 @@ DIST_SUBDIRS = \
annodex \
cairo \
dv \
esd \
flac \
gdk_pixbuf \
hal \
......
plugin_LTLIBRARIES = libgstesd.la
libgstesd_la_SOURCES = esdsink.c gstesd.c
libgstesd_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(ESD_CFLAGS)
libgstesd_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR) \
$(GST_BASE_LIBS) \
$(GST_LIBS) \
$(ESD_LIBS)
libgstesd_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstesd_la_LIBTOOLFLAGS = --tag=disable-static
noinst_HEADERS = esdsink.h esdmon.h
EXTRA_DIST =
This diff is collapsed.
/* GStreamer
* Copyright (C) <2001,2002> Richard Boulton <richard-gst@tartarus.org>
*
* Based on example.c:
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_ESDMON_H__
#define __GST_ESDMON_H__
#include <gst/gst.h>
G_BEGIN_DECLS
#define GST_TYPE_ESDMON \
(gst_esdmon_get_type())
#define GST_ESDMON(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ESDMON,GstEsdmon))
#define GST_ESDMON_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ESDMON,GstEsdmonClass))
#define GST_IS_ESDMON(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ESDMON))
#define GST_IS_ESDMON_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ESDMON))
typedef enum {
GST_ESDMON_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
GST_ESDMON_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2)
} GstEsdSrcFlags;
typedef struct _GstEsdmon GstEsdmon;
typedef struct _GstEsdmonClass GstEsdmonClass;
struct _GstEsdmon {
GstElement element;
GstPad *srcpad;
gchar* host;
int fd;
gint depth;
gint channels;
gint frequency;
guint64 basetime;
guint64 samples_since_basetime;
guint64 curoffset;
guint64 bytes_per_read;
};
struct _GstEsdmonClass {
GstElementClass parent_class;
};
GType gst_esdmon_get_type (void);
G_END_DECLS
#endif /* __GST_ESDMON_H__ */
This diff is collapsed.
/* GStreamer
* Copyright (C) <2005> Arwed v. Merkatz <v.merkatz@gmx.net>
*
* esdsink.h: an EsounD audio sink
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_ESDSINK_H__
#define __GST_ESDSINK_H__
#include <gst/gst.h>
#include <gst/audio/gstaudiosink.h>
G_BEGIN_DECLS
#define GST_TYPE_ESDSINK \
(gst_esdsink_get_type())
#define GST_ESDSINK(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_ESDSINK,GstEsdSink))
#define GST_ESDSINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_ESDSINK,GstEsdSinkClass))
#define GST_IS_ESDSINK(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_ESDSINK))
#define GST_IS_ESDSINK_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_ESDSINK))
typedef struct _GstEsdSink GstEsdSink;
typedef struct _GstEsdSinkClass GstEsdSinkClass;
struct _GstEsdSink {
GstAudioSink sink;
int fd;
int ctrl_fd;
gchar *host;
guint rate;
GstCaps *cur_caps;
};
struct _GstEsdSinkClass {
GstAudioSinkClass parent_class;
};
GType gst_esdsink_get_type (void);
G_END_DECLS
#endif /* __GST_ESDSINK_H__ */
/* GStreamer
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
* Copyright (C) <2003> David A. Schleef <ds@schleef.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "esdsink.h"
#if 0
#include "esdmon.h"
#endif
#include "gst/gst-i18n-plugin.h"
GST_DEBUG_CATEGORY (esd_debug);
static gboolean
plugin_init (GstPlugin * plugin)
{
if (!gst_element_register (plugin, "esdsink", GST_RANK_MARGINAL,
GST_TYPE_ESDSINK))
return FALSE;
#if 0
if (!gst_element_register (plugin, "esdmon", GST_RANK_NONE, GST_TYPE_ESDMON))
return FALSE;
#endif
GST_DEBUG_CATEGORY_INIT (esd_debug, "esd", 0, "ESounD elements");
#ifdef ENABLE_NLS
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif /* ENABLE_NLS */
return TRUE;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"esdsink",
"ESD Element Plugins",
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
......@@ -20,11 +20,6 @@ BuildRequires: %{gstreamer}-devel >= %{gst_minver}
BuildRequires: gcc-c++
@USE_ESD_TRUE@BuildRequires: esound-devel >= 0.2.8
@USE_ESD_TRUE@Obsoletes: gstreamer-esd
@USE_ESD_TRUE@
@USE_ESD_TRUE@Provides: gstreamer-audiosrc
@USE_ESD_TRUE@Provides: gstreamer-audiosink
@USE_FLAC_TRUE@BuildRequires: flac-devel >= 1.0.3
@USE_JPEG_TRUE@BuildRequires: libjpeg-devel
@USE_LIBCACA_TRUE@BuildRequires: libcaca-devel
......@@ -141,7 +136,6 @@ rm -rf $RPM_BUILD_ROOT
# gstreamer-plugins with external dependencies but in the main package
@USE_LIBCACA_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstcacasink.so
@USE_ESD_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstesd.so
@USE_FLAC_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstflac.so
@USE_JACK_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstjack.so
@USE_JPEG_TRUE@%{_libdir}/gstreamer-%{majorminor}/libgstjpeg.so
......
EXTRA_DIST = \
a52.m4 \
aalib.m4 \
as-arts.m4 \
as-ffmpeg.m4 \
as-liblame.m4 \
as-slurp-ffmpeg.m4 \
check-libheader.m4 \
codeset.m4 \
esd.m4 \
freetype2.m4 \
gettext.m4 \
glibc21.m4 \
......
dnl as-arts.m4 0.1.0
dnl $Id: as-arts.m4,v 1.5 2004/05/21 11:20:49 thomasvs Exp $
dnl if you copy this file to your cvs,
dnl add this file using cvs -ko add to retain this header
dnl This is an example arts .m4 adapted and scrubbed by thomasvs
# Configure paths for ARTS
# Philip Stadermann 2001-06-21
# stolen from esd.m4
dnl AM_PATH_ARTS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for ARTS, and define ARTS_CXXFLAGS and ARTS_LIBS
dnl
AC_DEFUN([AM_PATH_ARTS],
[dnl
dnl Get the cflags and libraries from the artsc-config script
dnl
AC_ARG_WITH(arts-prefix,
AC_HELP_STRING([--with-arts-prefix=PFX],
[prefix where ARTS is installed (optional)]),
arts_prefix="$withval", arts_prefix="")
AC_ARG_WITH(arts-exec-prefix,
AC_HELP_STRING([--with-arts-exec-prefix=PFX],
[exec prefix where ARTS is installed (optional)]),
arts_exec_prefix="$withval", arts_exec_prefix="")
AC_ARG_ENABLE(artstest,
AC_HELP_STRING([--disable-artstest],
[do not try to compile and run a test ARTS program]),
, enable_artstest=yes)
if test x$arts_exec_prefix != x ; then
arts_args="$arts_args --exec-prefix=$arts_exec_prefix"
if test x${ARTS_CONFIG+set} != xset ; then
ARTS_CONFIG=$arts_exec_prefix/bin/artsc-config
fi
fi
if test x$arts_prefix != x ; then
arts_args="$arts_args --prefix=$arts_prefix"
if test x${ARTS_CONFIG+set} != xset ; then
ARTS_CONFIG=$arts_prefix/bin/artsc-config
fi
fi
AC_PATH_PROG(ARTS_CONFIG, artsc-config, no)
min_arts_version=ifelse([$1], ,0.9.5,$1)
AC_MSG_CHECKING(for ARTS artsc - version >= $min_arts_version)
no_arts=""
if test "$ARTS_CONFIG" = "no" ; then
no_arts=yes
else
# FIXME: thomas added this sed to get arts path instead of artsc
# replace -I.../artsc with -I.../arts
ARTS_CXXFLAGS=`$ARTS_CONFIG $artsconf_args --cflags | artsc-config --cflags | sed 's/\(-I.*\)artsc/\1arts/'`
ARTS_LIBS=`$ARTS_CONFIG $artsconf_args --libs | sed 's/artsc$/arts/'`
arts_major_version=`$ARTS_CONFIG $arts_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
arts_minor_version=`$ARTS_CONFIG $arts_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
arts_micro_version=`$ARTS_CONFIG $arts_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_artstest" = "xyes" ; then
dnl ac_save_CXXFLAGS="$CXXFLAGS"
dnl ac_save_LIBS="$LIBS"
dnl CFLAGS="$CFLAGS $ARTS_CXXFLAGS"
dnl LIBS="$LIBS $ARTS_LIBS"
dnl
dnl Now check if the installed ARTS is sufficiently new. (Also sanity
dnl checks the results of artsc-config to some extent)
dnl
dnl a*s: to successfully compile the C++ test app, we need to
dnl first make sure we're going to compile it as C++ (with AC_LANG_PUSH),
dnl then add the CFLAGS and CLIBS of arts which we just discovered to the
dnl C++ compilation and linking flags.
dnl We also need to clean up after the test; this means using AC_LANG_POP
dnl and restoring the CPPFLAGS and LDFLAGS from the saved values we take
dnl here.
dnl ask nicely for C++ compilation
AC_LANG_PUSH(C++)
dnl save compilation and link flags and make our own
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_LDFLAGS="$LDFLAGS"
AC_SUBST(CPPFLAGS,"$CPPFLAGS $ARTS_CXXFLAGS")
AC_SUBST(LDFLAGS,"$LDFLAGS $ARTS_CLIBS")
rm -f conf.artstest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <artsflow.h>
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
// thomas: the original test did not have the typecast
new_str = (char *) malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.artstest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_arts_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_arts_version");
exit(1);
}
if (($arts_major_version > major) ||
(($arts_major_version == major) && ($arts_minor_version > minor)) ||
(($arts_major_version == major) && ($arts_minor_version == minor) && ($arts_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'artsc-config --version' returned %d.%d.%d, but the minimum version\n", $arts_major_version, $arts_minor_version, $arts_micro_version);
printf("*** of ARTS required is %d.%d.%d. If artsc-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If artsc-config was wrong, set the environment variable ARTS_CONFIG\n");
printf("*** to point to the correct copy of artsc-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
],, no_arts=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
dnl CFLAGS="$ac_save_CFLAGS"
dnl LIBS="$ac_save_LIBS"
dnl a*s this is were we clean up after the test
AC_LANG_POP(C++)
CXXFLAGS="$ac_save_CXXFLAGS"
LDFLAGS="$ac_save_LDFLAGS"
dnl a*s we are sure that these are right, so we make them active
AC_SUBST(CXXFLAGS,"$CXXFLAGS")
AC_SUBST(LDFLAGS,"$LDFLAGS")
fi
fi
if test "x$no_arts" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$ARTS_CONFIG" = "no" ; then
echo "*** The artsc-config script installed by ARTS could not be found"
echo "*** If ARTS was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the ARTS_CONFIG environment variable to the"
echo "*** full path to artsc-config."
else
if test -f conf.artstest ; then
:
else
echo "*** Could not run ARTS test program, checking why..."
CFLAGS="$CFLAGS $ARTS_CXXFLAGS"
LIBS="$LIBS $ARTS_LIBS"
AC_TRY_LINK([
#include <stdio.h>
#include <artsflow.h>
], [ return 0; ],
[ echo "*** The test program compiled, but did not run. This usually means"
echo "*** that the run-time linker is not finding ARTS or finding the wrong"
echo "*** version of ARTS. If it is not finding ARTS, you'll need to set your"
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
echo "*** to the installed location Also, make sure you have run ldconfig if that"
echo "*** is required on your system"
echo "***"
echo "*** If you have an old version installed, it is best to remove it, although"
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
[ echo "*** The test program failed to compile or link. See the file config.log for the"
echo "*** exact error that occured. This usually means ARTS was incorrectly installed"
echo "*** or that you have moved ARTS since it was installed. In the latter case, you"
echo "*** may want to edit the artsc-config script: $ARTS_CONFIG" ])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
fi
ARTS_CXXFLAGS=""
ARTS_LIBS=""
ifelse([$3], , :, [$3])
fi
AC_SUBST(ARTS_CXXFLAGS)
AC_SUBST(ARTS_LIBS)
rm -f conf.artstest
])
dnl release C++ question
# Configure paths for ESD
# Manish Singh 98-9-30
# stolen back from Frank Belew
# stolen from Manish Singh
# Shamelessly stolen from Owen Taylor
dnl AM_PATH_ESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS
dnl
AC_DEFUN([AM_PATH_ESD],
[dnl
dnl Get the cflags and libraries from the esd-config script
dnl
AC_ARG_WITH(esd-prefix,
AC_HELP_STRING([--with-esd-prefix=PFX],
[prefix where ESD is installed (optional)]),
esd_prefix="$withval", esd_prefix="")
AC_ARG_WITH(esd-exec-prefix,
AC_HELP_STRING([--with-esd-exec-prefix=PFX],
[exec prefix where ESD is installed (optional)]),
esd_exec_prefix="$withval", esd_exec_prefix="")
AC_ARG_ENABLE(esdtest,
AC_HELP_STRING([--disable-esdtest],
[do not try to compile and run a test ESD program]),
, enable_esdtest=yes)
if test x$esd_exec_prefix != x ; then
esd_args="$esd_args --exec-prefix=$esd_exec_prefix"
if test x${ESD_CONFIG+set} != xset ; then
ESD_CONFIG=$esd_exec_prefix/bin/esd-config
fi
fi
if test x$esd_prefix != x ; then
esd_args="$esd_args --prefix=$esd_prefix"
if test x${ESD_CONFIG+set} != xset ; then
ESD_CONFIG=$esd_prefix/bin/esd-config
fi
fi
AC_PATH_PROG(ESD_CONFIG, esd-config, no)
min_esd_version=ifelse([$1], ,0.2.7,$1)
AC_MSG_CHECKING(for ESD - version >= $min_esd_version)
no_esd=""
if test "$ESD_CONFIG" = "no" ; then
no_esd=yes
else
AC_LANG_SAVE
AC_LANG_C
ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags`
ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs`
esd_major_version=`$ESD_CONFIG $esd_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
esd_minor_version=`$ESD_CONFIG $esd_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
if test "x$enable_esdtest" = "xyes" ; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $ESD_CFLAGS"
LIBS="$LIBS $ESD_LIBS"
dnl
dnl Now check if the installed ESD is sufficiently new. (Also sanity
dnl checks the results of esd-config to some extent
dnl
rm -f conf.esdtest
AC_TRY_RUN([
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <esd.h>
char*
my_strdup (char *str)
{
char *new_str;
if (str)
{
new_str = malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;
return new_str;
}
int main ()
{
int major, minor, micro;
char *tmp_version;
system ("touch conf.esdtest");
/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup("$min_esd_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", "$min_esd_version");
exit(1);
}
if (($esd_major_version > major) ||
(($esd_major_version == major) && ($esd_minor_version > minor)) ||
(($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro)))
{
return 0;
}
else
{
printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version);
printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n");
printf("*** to point to the correct copy of esd-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}
],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
AC_LANG_RESTORE
fi
fi
if test "x$no_esd" = x ; then
AC_MSG_RESULT(yes)
ifelse([$2], , :, [$2])
else
AC_MSG_RESULT(no)
if test "$ESD_CONFIG" = "no" ; then
echo "*** The esd-config script installed by ESD could not be found"
echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
echo "*** your path, or set the ESD_CONFIG environment variable to the"
echo "*** full path to esd-config."
else
if test -f conf.esdtest ; then
:
else
echo "*** Could not run ESD test program, checking why..."
CFLAGS="$CFLAGS $ESD_CFLAGS"
LIBS="$LIBS $ESD_LIBS"
AC_LANG_SAVE