build system tweaks, and now the cothreads test code will build and configure with the rest of gst.

Original commit message from CVS:
build system tweaks, and now the cothreads test code will build and configure with the rest of gst.
This commit is contained in:
Andy Wingo 2002-01-23 00:04:33 +00:00
parent f8b0a4dc3a
commit f58c8f26b4
6 changed files with 92 additions and 68 deletions

View file

@ -6,6 +6,8 @@ package=GStreamer
srcfile=gst/gstobject.h srcfile=gst/gstobject.h
#DEBUG=defined #DEBUG=defined
CONFIGURE_OPT='--enable-maintainer-mode --enable-plugin-builddir'
for i in $@; do for i in $@; do
if test "$i" = "--autogen-noconfigure"; then if test "$i" = "--autogen-noconfigure"; then
NOCONFIGURE=defined NOCONFIGURE=defined
@ -58,7 +60,6 @@ version_check ()
test -z "$NOCHECK" && { test -z "$NOCHECK" && {
echo -n "+ checking for $1 >= $VERSION ... " echo -n "+ checking for $1 >= $VERSION ... "
} || { } || {
echo "+ NOT checking for $1 >= $VERSION, as requested ..."
return 0 return 0
} }
@ -119,6 +120,14 @@ if test "$ac_version" = "2.52d"; then
fi fi
if test -z "$*"; then
echo "This autogen script will automatically run ./configure as:"
echo "./configure $CONFIGURE_OPT"
echo "To pass any other options, please specify them on the $0"
echo "command line."
echo
fi
version_check "autoconf" "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1 version_check "autoconf" "ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
version_check "automake" "ftp://ftp.gnu.org/pub/gnu/automake/" 1 5 || DIE=1 version_check "automake" "ftp://ftp.gnu.org/pub/gnu/automake/" 1 5 || DIE=1
version_check "libtool" "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 4 0 || DIE=1 version_check "libtool" "ftp://ftp.gnu.org/pub/gnu/libtool/" 1 4 0 || DIE=1
@ -133,11 +142,6 @@ test -f $srcfile || {
exit 1 exit 1
} }
if test -z "$*"; then
echo "I am going to run ./configure with no arguments - if you wish "
echo "to pass any to it, please specify them on the $0 command line."
fi
echo "+ creating acinclude.m4" echo "+ creating acinclude.m4"
cat m4/*.m4 > acinclude.m4 cat m4/*.m4 > acinclude.m4
@ -178,7 +182,13 @@ automake -a -c || {
exit 1 exit 1
} }
CONFIGURE_OPT='--enable-maintainer-mode --enable-plugin-builddir --enable-debug --enable-DEBUG' echo
echo "+ running autogen.sh in gst/cothreads..."
pushd gst/cothreads > /dev/null
echo
./autogen.sh --autogen-noconfigure --autogen-nocheck
popd > /dev/null
echo
test -n "$NOCONFIGURE" && { test -n "$NOCONFIGURE" && {
echo "skipping configure stage for package $package, as requested." echo "skipping configure stage for package $package, as requested."

View file

@ -244,9 +244,9 @@ GST_CHECK_FEATURE(GLIB2, [use of glib-2.0 and GObject], , [
# if we've gotten this far, the user has specifically asked that glib2 be # if we've gotten this far, the user has specifically asked that glib2 be
# used. if we have no glib2, that is an error. # used. if we have no glib2, that is an error.
if test "x$HAVE_GLIB2" = "xno"; then if test "x$HAVE_GLIB2" = "xno"; then
AC_MSG_ERROR(no glib2 found) AC_MSG_ERROR(no glib2 found, try --disable-glib2)
fi fi
], disabled, [ ], enabled, [
AC_DEFINE(USE_GLIB2) AC_DEFINE(USE_GLIB2)
GST_EXT_CFLAGS="$GST_EXT_CFLAGS -DUSE_GLIB2" GST_EXT_CFLAGS="$GST_EXT_CFLAGS -DUSE_GLIB2"
]) ])
@ -286,7 +286,7 @@ if test x$USE_GLIB2 = xno; then
LIBXML_PKG=', libxml >= 1.8.1' LIBXML_PKG=', libxml >= 1.8.1'
AC_PATH_PROG(XML_CONFIG, xml-config, no) AC_PATH_PROG(XML_CONFIG, xml-config, no)
if test x$XML_CONFIG = xno; then if test x$XML_CONFIG = xno; then
AC_MSG_ERROR(Couldn't find $LIBXML_PKG) AC_MSG_ERROR(Couldn't find xml-config -- Need version 1.8.1 or better of libxml)
fi fi
XML_LIBS="`xml-config --libs`" XML_LIBS="`xml-config --libs`"
XML_CFLAGS="`xml-config --cflags`" XML_CFLAGS="`xml-config --cflags`"
@ -295,10 +295,12 @@ if test x$USE_GLIB2 = xno; then
$XML_LIBS) $XML_LIBS)
else else
LIBXML_PKG=', libxml-2.0' LIBXML_PKG=', libxml-2.0'
PKG_CHECK_MODULES(XML, $LIBXML_PKG, XML_CONFIG=yes, XML_CONFIG=no) PKG_CHECK_MODULES(XML, libxml-2.0, HAVE_LIBXML2=yes, HAVE_LIBXML2=no)
AC_PATH_PROG(XML_CONFIG, xml-config, no) if test "x$HAVE_LIBXML2" = "xyes"; then
AC_DEFINE(HAVE_LIBXML2) AC_DEFINE(HAVE_LIBXML2)
GST_EXT_CFLAGS="$GST_EXT_CFLAGS -DHAVE_LIBXML2" else
AC_ERROR(Need libxml2 for glib2 builds)
fi
fi fi
AC_SUBST(LIBXML_PKG) AC_SUBST(LIBXML_PKG)
AC_SUBST(XML_LIBS) AC_SUBST(XML_LIBS)
@ -331,8 +333,10 @@ dnl ######################################################################
dnl # Check command line parameters, and set shell variables accordingly # dnl # Check command line parameters, and set shell variables accordingly #
dnl ###################################################################### dnl ######################################################################
dnl FIXME: simplify all this down using a few m4 macros
AC_ARG_ENABLE(libmmx, AC_ARG_ENABLE(libmmx,
[ --enable-libmmx use libmmx, if available], AC_HELP_STRING([--enable-libmmx][use libmmx, if available]),
[case "${enableval}" in [case "${enableval}" in
yes) USE_LIBMMX=$HAVE_LIBMMX ;; yes) USE_LIBMMX=$HAVE_LIBMMX ;;
no) USE_LIBMMX=no ;; no) USE_LIBMMX=no ;;
@ -341,7 +345,7 @@ esac],
[USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value [USE_LIBMMX=$HAVE_LIBMMX]) dnl Default value
AC_ARG_ENABLE(atomic, AC_ARG_ENABLE(atomic,
[ --enable-atomic use atomic reference counting header], AC_HELP_STRING([--enable-atomic][use atomic reference counting header]),
[case "${enableval}" in [case "${enableval}" in
yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;; yes) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;; noset) USE_ATOMIC_H=$HAVE_ATOMIC_H;;
@ -351,7 +355,7 @@ esac],
[USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value
AC_ARG_ENABLE(plugin-builddir, AC_ARG_ENABLE(plugin-builddir,
[ --enable-plugin-builddir allow tests/demos to use non-installed plugins ], AC_HELP_STRING([--enable-plugin-builddir][allow tests/demos to use non-installed plugins]),
[case "${enableval}" in [case "${enableval}" in
yes) PLUGINS_USE_BUILDDIR=yes ;; yes) PLUGINS_USE_BUILDDIR=yes ;;
no) PLUGINS_USE_BUILDDIR=no ;; no) PLUGINS_USE_BUILDDIR=no ;;
@ -360,28 +364,28 @@ esac],
[PLUGINS_USE_BUILDDIR=no]) dnl Default value [PLUGINS_USE_BUILDDIR=no]) dnl Default value
AC_ARG_ENABLE(debug, AC_ARG_ENABLE(debug,
[ --enable-debug compile with -g debugging info], AC_HELP_STRING([--disable-debug][disable addition of -g debugging info]),
[case "${enableval}" in [case "${enableval}" in
yes) USE_DEBUG=yes ;; yes) USE_DEBUG=yes ;;
no) USE_DEBUG=no ;; no) USE_DEBUG=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac], esac],
[USE_DEBUG=no]) dnl Default value [USE_DEBUG=yes]) dnl Default value
AC_ARG_ENABLE(DEBUG, AC_ARG_ENABLE(DEBUG,
[ --enable-DEBUG compiles in a large number of debugging messages], AC_HELP_STRING([--disable-DEBUG][disables compilation of debugging messages]),
[case "${enableval}" in [case "${enableval}" in
yes) ENABLE_DEBUG=yes ;; yes) ENABLE_DEBUG=yes ;;
no) ENABLE_DEBUG=no ;; no) ENABLE_DEBUG=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-DEBUG) ;; *) AC_MSG_ERROR(bad value ${enableval} for --enable-DEBUG) ;;
esac], esac],
[ENABLE_DEBUG=no]) dnl Default value [ENABLE_DEBUG=yes]) dnl Default value
if test x$ENABLE_DEBUG = xyes; then if test x$ENABLE_DEBUG = xyes; then
AC_DEFINE(GST_DEBUG_ENABLED, 1, [Define if DEBUG statements should be compiled in]) AC_DEFINE(GST_DEBUG_ENABLED, 1, [Define if DEBUG statements should be compiled in])
fi fi
AC_ARG_ENABLE(INFO, AC_ARG_ENABLE(INFO,
[ --disable-INFO disables compilation of informational messages], AC_HELP_STRING([--disable-INFO][disables compilation of informational messages]),
[case "${enableval}" in [case "${enableval}" in
yes) ENABLE_INFO=yes ;; yes) ENABLE_INFO=yes ;;
no) ENABLE_INFO=no ;; no) ENABLE_INFO=no ;;
@ -393,7 +397,7 @@ if test x$ENABLE_INFO = xyes; then
fi fi
AC_ARG_ENABLE(debug-color, AC_ARG_ENABLE(debug-color,
[ --disable-debug-color disables color output of DEBUG and INFO output], AC_HELP_STRING([--disable-debug-color][disables color output of DEBUG and INFO output]),
[case "${enableval}" in [case "${enableval}" in
yes) ENABLE_DEBUG_COLOR=yes ;; yes) ENABLE_DEBUG_COLOR=yes ;;
no) ENABLE_DEBUG_COLOR=no ;; no) ENABLE_DEBUG_COLOR=no ;;
@ -405,7 +409,7 @@ if test "x$ENABLE_DEBUG_COLOR" = xyes; then
fi fi
AC_ARG_ENABLE(profiling, AC_ARG_ENABLE(profiling,
[ --enable-profiling adds -pg to compiler commandline, for profiling], AC_HELP_STRING([--enable-profiling][adds -pg to compiler commandline, for profiling]),
[case "${enableval}" in [case "${enableval}" in
yes) USE_PROFILING=yes ;; yes) USE_PROFILING=yes ;;
no) UES_PROFILING=no ;; no) UES_PROFILING=no ;;
@ -420,7 +424,7 @@ else
GST_CONFIG_DIR=/etc/gstreamer GST_CONFIG_DIR=/etc/gstreamer
fi fi
AC_ARG_WITH(configdir, AC_ARG_WITH(configdir,
[ --with-configdir specify path to use for configdir], AC_HELP_STRING([--with-configdir][specify path to use for plugin and command completion registries]),
[case "${withval}" in [case "${withval}" in
yes) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;; yes) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;;
no) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;; no) AC_MSG_ERROR(bad value ${withval} for --with-configdir) ;;
@ -429,7 +433,7 @@ esac],
[:]) dnl Default value [:]) dnl Default value
AC_ARG_ENABLE(docs-build, AC_ARG_ENABLE(docs-build,
[ --enable-docs-build enable building of documentation], AC_HELP_STRING([--enable-docs-build][enable building of documentation]),
[case "${enableval}" in [case "${enableval}" in
yes) if $HAVE_GTK_DOC; then BUILD_DOCS=yes; else AC_MSG_ERROR([you don't have gtk-doc, so don't use --docs-build]); fi; ;; yes) if $HAVE_GTK_DOC; then BUILD_DOCS=yes; else AC_MSG_ERROR([you don't have gtk-doc, so don't use --docs-build]); fi; ;;
no) BUILD_DOCS=no ;; no) BUILD_DOCS=no ;;
@ -437,18 +441,19 @@ AC_ARG_ENABLE(docs-build,
esac], esac],
[BUILD_DOCS=no]) dnl Default value [BUILD_DOCS=no]) dnl Default value
AC_ARG_ENABLE(plugin-docs, dnl AC_ARG_ENABLE(plugin-docs,
[ --enable-plugin-docs enable the building of plugin documentation dnl [ --enable-plugin-docs enable the building of plugin documentation
(this is currently broken, so off by default)], dnl (this is currently broken, so off by default)],
[case "${enableval}" in dnl [case "${enableval}" in
yes) BUILD_PLUGIN_DOCS=yes ;; dnl yes) BUILD_PLUGIN_DOCS=yes ;;
no) BUILD_PLUGIN_DOCS=no ;; dnl no) BUILD_PLUGIN_DOCS=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-docs) ;; dnl *) AC_MSG_ERROR(bad value ${enableval} for --enable-plugin-docs) ;;
esac], dnl esac],
[BUILD_PLUGIN_DOCS=no]) dnl Default value dnl [BUILD_PLUGIN_DOCS=no]) dnl Default value
BUILD_PLUGIN_DOCS=no
AC_ARG_ENABLE(tests, AC_ARG_ENABLE(tests,
[ --disable-tests disable building test apps], AC_HELP_STRING([--disable-tests][disable building test apps]),
[case "${enableval}" in [case "${enableval}" in
yes) BUILD_TESTS=yes ;; yes) BUILD_TESTS=yes ;;
no) BUILD_TESTS=no ;; no) BUILD_TESTS=no ;;
@ -457,7 +462,7 @@ esac],
[BUILD_TESTS=yes]) dnl Default value [BUILD_TESTS=yes]) dnl Default value
AC_ARG_ENABLE(examples, AC_ARG_ENABLE(examples,
[ --disable-examples disable building examples], AC_HELP_STRING([--disable-examples][disable building examples]),
[case "${enableval}" in [case "${enableval}" in
yes) BUILD_EXAMPLES=yes ;; yes) BUILD_EXAMPLES=yes ;;
no) BUILD_EXAMPLES=no ;; no) BUILD_EXAMPLES=no ;;
@ -468,28 +473,6 @@ esac],
dnl Next, check for the optional components: dnl Next, check for the optional components:
dnl ======================================== dnl ========================================
AC_DEFUN(GST_SUBSYSTEM_DISABLE,
[dnl
dnl Add a subsystem --disable flag and all the necessary symbols and substitions
dnl
AC_ARG_ENABLE(translit([$1], A-Z, a-z),
[ ]builtin(format, --disable-%-17s disable %s, translit([$1], A-Z, a-z), $2),
[ case "${enableval}" in
yes) GST_DISABLE_[$1]=no ;;
no) GST_DISABLE_[$1]=yes ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-translit([$1], A-Z, a-z)) ;;
esac],
[GST_DISABLE_[$1]=no]) dnl Default value
if test x$GST_DISABLE_[$1] = xyes; then
AC_DEFINE(GST_DISABLE_[$1], 1, [Disable $2])
GST_DISABLE_[$1]_DEFINE=-DGST_DISABLE_[$1]
fi
AM_CONDITIONAL(GST_DISABLE_[$1], test x$GST_DISABLE_[$1] = xyes)
AC_SUBST(GST_DISABLE_[$1]_DEFINE)
GST_SUBSYSTEM_DISABLE_DEFINES="$GST_SUBSYTEM_DISABLE_DEFINES $GST_DISABLE_[$1]_DEFINE"
])
translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_LOADSAVE, true) translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_LOADSAVE, true)
GST_SUBSYSTEM_DISABLE(LOADSAVE,[pipeline XML load/save]) GST_SUBSYSTEM_DISABLE(LOADSAVE,[pipeline XML load/save])
translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_TYPEFIND, true) translit(dnm, m, l) AM_CONDITIONAL(GST_DISABLE_TYPEFIND, true)
@ -617,6 +600,8 @@ GST_INT_CFLAGS="-I\$(top_srcdir)/libs -I\$(top_srcdir)/include -I\$(top_srcdir)"
AC_SUBST(GST_CFLAGS, "$GST_EXT_CFLAGS $GST_INT_CFLAGS") AC_SUBST(GST_CFLAGS, "$GST_EXT_CFLAGS $GST_INT_CFLAGS")
AC_SUBST(GST_LIBS, "$GST_EXT_LIBS $GST_INT_LIBS") AC_SUBST(GST_LIBS, "$GST_EXT_LIBS $GST_INT_LIBS")
AC_CONFIG_SUBDIRS(gst/cothreads)
dnl ################################################## dnl ##################################################
dnl # Prepare informative messages to display at end # dnl # Prepare informative messages to display at end #
dnl ################################################## dnl ##################################################
@ -631,7 +616,8 @@ This option is for development purposes only: binaries built with
it should be used with code in the build tree only. To build an it should be used with code in the build tree only. To build an
installable version, use ./configure without the --enable-plugin-builddir installable version, use ./configure without the --enable-plugin-builddir
option. Note that the autogen.sh script supplies the plugin builddir option. Note that the autogen.sh script supplies the plugin builddir
option automatically - it cannot be used to configure installable builds. option automatically -- run ./autogen.sh --disable-plugin-buildddir to make
an installable build.
" "
fi fi

View file

@ -53,7 +53,7 @@ endif
EXTRA_libgst_la_SOURCES = gstcpuid_i386.s gstmarshal.list gobject2gtk.c gobject2gtk.h gstxml.c gsttypefind.c gstparse.c gstautoplug.c gsttrace.c EXTRA_libgst_la_SOURCES = gstcpuid_i386.s gstmarshal.list gobject2gtk.c gobject2gtk.h gstxml.c gsttypefind.c gstparse.c gstautoplug.c gsttrace.c
SUBDIRS = . types elements $(GST_AUTOPLUG_DIRS) schedulers SUBDIRS = . types elements $(GST_AUTOPLUG_DIRS) schedulers
DIST_SUBDIRS = types elements autoplug schedulers DIST_SUBDIRS = types elements autoplug schedulers cothreads
libgst_la_SOURCES = \ libgst_la_SOURCES = \
cothreads.c \ cothreads.c \

View file

@ -145,12 +145,12 @@ aclocal $ACLOCAL_FLAGS || {
} }
# FIXME : why does libtoolize keep complaining about aclocal ? # FIXME : why does libtoolize keep complaining about aclocal ?
echo "+ running libtoolize ..." #echo "+ running libtoolize ..."
libtoolize --copy --force || { #libtoolize --copy --force || {
echo # echo
echo "libtoolize failed" # echo "libtoolize failed"
exit 1 # exit 1
} #}
echo "+ running autoheader ... " echo "+ running autoheader ... "
autoheader || { autoheader || {

View file

@ -1,8 +1,13 @@
plugindir = $(libdir)/gst plugindir = $(libdir)/gst
plugin_LTLIBRARIES = libgstbasicscheduler.la plugin_LTLIBRARIES = libgstbasicscheduler.la libgstpthscheduler.la
libgstbasicscheduler_la_SOURCES = gstbasicscheduler.c libgstbasicscheduler_la_SOURCES = gstbasicscheduler.c
libgstbasicscheduler_la_CFLAGS = $(GST_CFLAGS) libgstbasicscheduler_la_CFLAGS = $(GST_CFLAGS)
libgstbasicscheduler_la_LIBADD = $(GST_LIBS) libgstbasicscheduler_la_LIBADD = $(GST_LIBS)
libgstbasicscheduler_la_LDFLAGS = -version-info $(GST_LIBVERSION) libgstbasicscheduler_la_LDFLAGS = -version-info $(GST_LIBVERSION)
libgstpthscheduler_la_SOURCES = gstpthscheduler.c
libgstpthscheduler_la_CFLAGS = $(GST_CFLAGS)
libgstpthscheduler_la_LIBADD = $(GST_LIBS) -lpth
libgstpthscheduler_la_LDFLAGS = -version-info $(GST_LIBVERSION)

View file

@ -157,3 +157,26 @@ AC_DEFUN(GST_CHECK_LIBHEADER,
AC_SUBST(HAVE_[$1]) AC_SUBST(HAVE_[$1])
] ]
) )
dnl
dnl Add a subsystem --disable flag and all the necessary symbols and substitions
dnl
dnl GST_SUBSYSTEM_DISABLE(SYSNAME, [subsystem name])
dnl
AC_DEFUN(GST_SUBSYSTEM_DISABLE,
[AC_ARG_ENABLE(translit([$1], A-Z, a-z),
[ ]builtin(format, --disable-%-17s disable %s, translit([$1], A-Z, a-z), $2),
[ case "${enableval}" in
yes) GST_DISABLE_[$1]=no ;;
no) GST_DISABLE_[$1]=yes ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-translit([$1], A-Z, a-z)) ;;
esac],
[GST_DISABLE_[$1]=no]) dnl Default value
if test x$GST_DISABLE_[$1] = xyes; then
AC_DEFINE(GST_DISABLE_[$1], 1, [Disable $2])
GST_DISABLE_[$1]_DEFINE=-DGST_DISABLE_[$1]
fi
AM_CONDITIONAL(GST_DISABLE_[$1], test x$GST_DISABLE_[$1] = xyes)
AC_SUBST(GST_DISABLE_[$1]_DEFINE)
GST_SUBSYSTEM_DISABLE_DEFINES="$GST_SUBSYTEM_DISABLE_DEFINES $GST_DISABLE_[$1]_DEFINE"
])