configure.ac: use common m4's for argument checking

Original commit message from CVS:

* configure.ac:
use common m4's for argument checking
This commit is contained in:
Thomas Vander Stichele 2005-10-15 21:41:20 +00:00
parent 45a07481db
commit bdaec23195
3 changed files with 14 additions and 131 deletions

View file

@ -1,3 +1,8 @@
2005-10-15 Thomas Vander Stichele <thomas at apestaart dot org>
* configure.ac:
use common m4's for argument checking
2005-10-15 Tim-Philipp Müller <tim at centricular dot net>
* docs/gst/gstreamer-sections.txt:

2
common

@ -1 +1 @@
Subproject commit 507a4dc1d4fd6957ee8d62ca612a9a9054c271fc
Subproject commit 2034edbc868e2e26964ba884c5233e047433e9e7

View file

@ -44,7 +44,7 @@ dnl allow for different autotools
AS_AUTOTOOLS_ALTERNATE
dnl Add parameters for aclocal
AC_SUBST(ACLOCAL_AMFLAGS, "-I common/m4 -I .")
AC_SUBST(ACLOCAL_AMFLAGS, "-I common/m4")
dnl *** check for arguments to configure ***
@ -71,41 +71,14 @@ AM_CONDITIONAL(GST_DISABLE_PLUGIN, test "x$GST_DISABLE_PLUGIN" = "xyes")
GST_CHECK_SUBSYSTEM_DISABLE(URI,[uri handlers])
AM_CONDITIONAL(GST_DISABLE_URI, test "x$GST_DISABLE_URI" = "xyes")
dnl FIXME: simplify all this down using a few m4 macros
GST_ARG_DEBUG
GST_ARG_PROFILING
GST_ARG_VALGRIND
GST_ARG_GCOV
dnl possibly modify pkg-config path
AC_ARG_WITH(pkg-config-path,
AC_HELP_STRING([--with-pkg-config-path],
[colon-separated list of pkg-config(1) dirs]),
[export PKG_CONFIG_PATH=${withval}])
AC_ARG_ENABLE(fast-stack-trash,
AC_HELP_STRING([--enable-fast-stack-trash],
[use fast memory allocator (i586 or above)]),
[
case "${enableval}" in
yes) USE_FAST_STACK_TRASH=yes;;
noset) USE_FAST_STACK_TRASH=no;;
no) USE_FAST_STACK_TRASH=no;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;;
esac],
[USE_FAST_STACK_TRASH=yes]) dnl Default value
if test "x$USE_FAST_STACK_TRASH" = xyes; then
AC_DEFINE(USE_FAST_STACK_TRASH, 1,
[Define if we should use i586 optimized stack functions])
fi
AC_ARG_ENABLE(profiling,
AC_HELP_STRING([--enable-profiling],
[adds -pg to compiler commandline, for profiling]),
[
case "${enableval}" in
yes) USE_PROFILING=yes ;;
no) USE_PROFILING=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-profiling) ;;
esac
],
[USE_PROFILING=no]) dnl Default value
GST_ARG_WITH_PKG_CONFIG_PATH
GST_ARG_WITH_PACKAGE_NAME([GStreamer])
GST_ARG_WITH_PACKAGE_ORIGIN
dnl use a cache dir for storing element registry info.
GST_CACHE_DIR=${localstatedir}/cache/gstreamer-$GST_MAJORMINOR
@ -187,100 +160,6 @@ if test "x$USE_POISONING" = xyes; then
[Define if we should poison deallocated memory])
fi
dnl debugging stuff
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--disable-debug],[disable addition of -g debugging info]),
[
case "${enableval}" in
yes) USE_DEBUG=yes ;;
no) USE_DEBUG=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac
],
[USE_DEBUG=yes]) dnl Default value
dnl valgrind inclusion
AC_ARG_ENABLE(valgrind,
AC_HELP_STRING([--disable-valgrind],[disable run-time valgrind detection]),
[
case "${enableval}" in
yes) USE_VALGRIND="$USE_DEBUG" ;;
no) USE_VALGRIND=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-valgrind) ;;
esac
],
[USE_VALGRIND="$USE_DEBUG"]) dnl Default value
VALGRIND_REQ="2.1"
if test "x$USE_VALGRIND" = xyes; then
PKG_CHECK_MODULES(VALGRIND, valgrind > $VALGRIND_REQ,
USE_VALGRIND="yes", USE_VALGRIND="no")
fi
if test "x$USE_VALGRIND" = xyes; then
AC_DEFINE(HAVE_VALGRIND, 1, [Define if valgrind should be used])
AC_MSG_NOTICE(Using extra code paths for valgrind)
fi
AC_ARG_ENABLE(gcov,
AC_HELP_STRING([--enable-gcov],
[compile with coverage profiling instrumentation (gcc only)]),
enable_gcov=$enableval,
enable_gcov=no)
if test x$enable_gcov = xyes ; then
AS_COMPILER_FLAG(["-fprofile-arcs"],
[GCOV_CFLAGS="$GCOV_CFLAGS -fprofile-arcs"],
true)
AS_COMPILER_FLAG(["-ftest-coverage"],
[GCOV_CFLAGS="$GCOV_CFLAGS -ftest-coverage"],
true)
dnl remove any -O flags - FIXME: is this needed ?
GCOV_CFLAGS=`echo "$GCOV_CFLAGS" | sed -e 's/-O[0-9]*//g'`
AC_DEFINE_UNQUOTED(GST_GCOV_ENABLED, 1,
[Defined if gcov is enabled to force a rebuild due to config.h changing])
fi
AM_CONDITIONAL(GST_GCOV_ENABLED, test x$enable_gcov = xyes)
dnl package name in plugins
AC_ARG_WITH(package-name,
AC_HELP_STRING([--with-package-name],
[specify package name to use in plugins]),
[
case "${withval}" in
yes) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
no) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
*) GST_PACKAGE="${withval}" ;;
esac
],
[
dnl default value
if test "x$GST_CVS" = "xyes"
then
dnl nano >= 1
GST_PACKAGE="GStreamer CVS/prerelease"
else
GST_PACKAGE="GStreamer source release"
fi
]
)
AC_MSG_NOTICE(Using $GST_PACKAGE as package name)
AC_DEFINE_UNQUOTED(GST_PACKAGE, "$GST_PACKAGE", [package name in plugins])
dnl package origin URL
AC_ARG_WITH(package-origin,
AC_HELP_STRING([--with-package-origin],
[specify package origin URL to use in plugins]),
[
case "${withval}" in
yes) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
no) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
*) GST_ORIGIN="${withval}" ;;
esac
],
[GST_ORIGIN="http://gstreamer.freedesktop.org/"] dnl Default value
)
AC_MSG_NOTICE(Using $GST_ORIGIN as package origin)
AC_DEFINE_UNQUOTED(GST_ORIGIN, "$GST_ORIGIN", [package origin])
dnl *** platform checks ***
dnl * hardware/architecture *
@ -380,7 +259,6 @@ AC_HEADER_STDC
dnl Check for ucontext.h
AC_CHECK_HEADERS([ucontext.h])
AC_CHECK_HEADERS([sys/socket.h], HAVE_SYS_SOCKET_H=yes)
echo $HAVE_SYS_SOCKET_H
AM_CONDITIONAL(HAVE_SYS_SOCKET_H, test "x$HAVE_SYS_SOCKET_H" = "xyes")
dnl *** checks for library functions ***