Skip to content
Snippets Groups Projects
Commit f2e9a73c authored by Tilghman Lesher's avatar Tilghman Lesher
Browse files

Merged revisions 214357 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r214357 | tilghman | 2009-08-27 11:03:50 -0500 (Thu, 27 Aug 2009) | 3 lines
  
  Make autoheader descriptions render correctly in our autoconfig.h file.
  (Figured out while working with issue #14906)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@214360 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 08df1b85
Branches
Tags
No related merge requests found
...@@ -29,6 +29,7 @@ AC_DEFUN([AST_EXT_LIB_SETUP], ...@@ -29,6 +29,7 @@ AC_DEFUN([AST_EXT_LIB_SETUP],
;; ;;
esac esac
]) ])
AH_TEMPLATE(m4_bpatsubst([[HAVE_$1]], [(.*)]), [Define to 1 if you have the $2 library.])
AC_SUBST([$1_LIB]) AC_SUBST([$1_LIB])
AC_SUBST([$1_INCLUDE]) AC_SUBST([$1_INCLUDE])
AC_SUBST([$1_DIR]) AC_SUBST([$1_DIR])
...@@ -73,7 +74,7 @@ if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then ...@@ -73,7 +74,7 @@ if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
else # check for the header else # check for the header
saved_cppflags="${CPPFLAGS}" saved_cppflags="${CPPFLAGS}"
CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}" CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}"
AC_CHECK_HEADER([$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0]) AC_CHECK_HEADER([$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0])
CPPFLAGS="${saved_cppflags}" CPPFLAGS="${saved_cppflags}"
fi fi
if test "x${$1_HEADER_FOUND}" = "x0" ; then if test "x${$1_HEADER_FOUND}" = "x0" ; then
...@@ -84,9 +85,19 @@ if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then ...@@ -84,9 +85,19 @@ if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
$1_LIB="" $1_LIB=""
fi fi
PBX_$1=1 PBX_$1=1
# XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED if test "x${$1_OPTION}" = "x"; then
AC_DEFINE_UNQUOTED([HAVE_$1], 1, [Define this to indicate the ${$1_DESCRIP} library]) dnl Ensure that we have an autoheader, when AST_EXT_LIB_SETUP was
AC_DEFINE_UNQUOTED([HAVE_$1_VERSION], [$7], [Define to indicate the ${$1_DESCRIP} library version]) dnl not called. Note that we cannot use shell substitution in the
dnl description, because the shell is never invoked when rendering
dnl the autoheader. Only m4 substitutions will expand correctly.
AC_DEFINE_UNQUOTED([HAVE_$1], 1, [Define to 1 to indicate $1 functionality.])
AC_DEFINE_UNQUOTED([HAVE_$1_VERSION], [$7], [Define to indicate the $1 library version])
else
cat >>confdefs.h <<_ACEOF
[@%:@define] HAVE_$1 1
[@%:@define] HAVE_$1_VERSION $7
_ACEOF
fi
fi fi
fi fi
fi fi
......
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment