[asterisk-commits] rizzo: branch rizzo/video_v2 r85193 - /team/rizzo/video_v2/acinclude.m4
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Oct 9 22:31:15 CDT 2007
Author: rizzo
Date: Tue Oct 9 22:31:15 2007
New Revision: 85193
URL: http://svn.digium.com/view/asterisk?view=rev&rev=85193
Log:
start commenting the code here in an attempt to simplify
and document the usage of the macros.
I think this would be a good trunk candidate.
Modified:
team/rizzo/video_v2/acinclude.m4
Modified: team/rizzo/video_v2/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/rizzo/video_v2/acinclude.m4?view=diff&rev=85193&r1=85192&r2=85193
==============================================================================
--- team/rizzo/video_v2/acinclude.m4 (original)
+++ team/rizzo/video_v2/acinclude.m4 Tue Oct 9 22:31:15 2007
@@ -1,3 +1,9 @@
+# $Revision$
+# Definition of various utility functions used in configure.ac
+
+# Check for the existence of a given compiler attribute,
+# and set HAVE_ATTRIBUTE_$1 accordingly
+#
# AST_GCC_ATTRIBUTE([attribute name])
AC_DEFUN([AST_GCC_ATTRIBUTE],
@@ -11,7 +17,21 @@
AC_MSG_RESULT(no))
])
-# AST_EXT_LIB_SETUP([package symbol name], [package friendly name], [package option name], [additional help text])
+
+# Prepare for checking the status of external libraries.
+# $1 is a unique (usually uppercase) string representing
+# the prefix of variables in configure.h
+# $3 is the name (usually lowercase) used to identify the option
+# in --with-$3 or --without-$3
+# Other arguments are just comments.
+#
+# You should call AST_EXT_LIB_SETUP() first, and then have one or more
+# instances of related macros such as AST_EXT_LIB_CHECK() which
+# actually check for the presence of the library involved, and set up
+# HAVE_*, $1_LIB, $1_INCLUDE and other variables accordingly.
+
+# AST_EXT_LIB_SETUP([package symbol name], [package friendly name],
+# [package option name], [additional help text])
AC_DEFUN([AST_EXT_LIB_SETUP],
[
@@ -39,7 +59,8 @@
])
# Check whether any of the mandatory modules are not present, and
-# print error messages in case.
+# print error messages in case. The list of mandatory modules is
+# built from the --with-x options passed to configure.
AC_DEFUN([AST_CHECK_MANDATORY],
[
@@ -70,7 +91,9 @@
# Check if a given macro is defined in a certain header.
-# AST_C_DEFINE_CHECK([package symbol name], [macro name], [header file], [version])
+# AST_C_DEFINE_CHECK([package symbol name], [macro name],
+# [header file], [version])
+#
AC_DEFUN([AST_C_DEFINE_CHECK],
[
if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
@@ -99,7 +122,9 @@
# in a library, or, if no function is supplied, only check for the
# existence of the header files.
-# AST_EXT_LIB_CHECK([package symbol name], [package library name], [function to check], [package header], [additional LIB data], [version])
+# AST_EXT_LIB_CHECK([package symbol name], [package library name],
+# [function to check], [package header], [additional LIB data], [version])
+
AC_DEFUN([AST_EXT_LIB_CHECK],
[
if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
@@ -151,9 +176,11 @@
fi
])
-
-AC_DEFUN(
-[AST_CHECK_GNU_MAKE], [AC_CACHE_CHECK(for GNU make, GNU_MAKE,
+# Specific checks for some features (such as gnu make, pwlib, etc)
+
+AC_DEFUN([AST_CHECK_GNU_MAKE],
+[
+AC_CACHE_CHECK(for GNU make, GNU_MAKE,
GNU_MAKE='Not Found' ;
GNU_MAKE_VERSION_MAJOR=0 ;
GNU_MAKE_VERSION_MINOR=0 ;
@@ -175,8 +202,8 @@
])
-AC_DEFUN(
-[AST_CHECK_PWLIB], [
+AC_DEFUN([AST_CHECK_PWLIB],
+[
PWLIB_INCDIR=
PWLIB_LIBDIR=
AC_LANG_PUSH([C++])
@@ -281,8 +308,8 @@
])
-AC_DEFUN(
-[AST_CHECK_OPENH323_PLATFORM], [
+AC_DEFUN([AST_CHECK_OPENH323_PLATFORM],
+[
PWLIB_OSTYPE=
case "$host_os" in
linux*) PWLIB_OSTYPE=linux ;
@@ -368,8 +395,8 @@
])
-AC_DEFUN(
-[AST_CHECK_OPENH323], [
+AC_DEFUN([AST_CHECK_OPENH323],
+[
OPENH323_INCDIR=
OPENH323_LIBDIR=
AC_LANG_PUSH([C++])
@@ -443,8 +470,8 @@
])
-AC_DEFUN(
-[AST_CHECK_PWLIB_VERSION], [
+AC_DEFUN([AST_CHECK_PWLIB_VERSION],
+[
if test "${HAS_$2:-unset}" != "unset"; then
$2_VERSION=`grep "$2_VERSION" ${$2_INCDIR}/$3 | cut -f2 -d ' ' | sed -e 's/"//g'`
$2_MAJOR_VERSION=`echo ${$2_VERSION} | cut -f1 -d.`
@@ -464,8 +491,8 @@
])
-AC_DEFUN(
-[AST_CHECK_PWLIB_BUILD], [
+AC_DEFUN([AST_CHECK_PWLIB_BUILD],
+[
if test "${HAS_$2:-unset}" != "unset"; then
AC_MSG_CHECKING($1 installation validity)
@@ -512,8 +539,8 @@
fi
])
-AC_DEFUN(
-[AST_CHECK_OPENH323_BUILD], [
+AC_DEFUN([AST_CHECK_OPENH323_BUILD],
+[
if test "${HAS_OPENH323:-unset}" != "unset"; then
AC_MSG_CHECKING(OpenH323 build option)
OPENH323_SUFFIX=
More information about the asterisk-commits
mailing list