1 # AST_EXT_LIB([NAME], [FUNCTION], [package header], [package symbol name], [package friendly name], [additional LIB data])
3 AC_DEFUN([AST_EXT_LIB],
5 AC_ARG_WITH([$1], AC_HELP_STRING([--with-$1=PATH],[use $5 files in PATH]),[
22 if test "${USE_$4}" != "no"; then
24 if test "x${$4_DIR}" != "x"; then
25 pbxlibdir="-L${$1_DIR} -L${$1_DIR}/lib"
27 AC_CHECK_LIB([$1], [$2], [AST_$4_FOUND=yes], [AST_$4_FOUND=no], ${pbxlibdir} $6)
29 if test "${AST_$4_FOUND}" = "yes"; then
32 if test "x${$4_DIR}" != "x"; then
33 $4_LIB="${pbxlibdir} ${$4_LIB}"
34 $4_INCLUDE="-I${$4_DIR}/include"
35 if test "x$3" != "x" ; then
36 AC_CHECK_HEADER([${$4_DIR}/include/$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
39 if test "x$3" != "x" ; then
40 AC_CHECK_HEADER([$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
43 if test "x${$4_HEADER_FOUND}" = "x0" ; then
44 if test ! -z "${$4_MANDATORY}" ;
47 echo " *** It appears that you do not have the $1 development package installed."
48 echo " *** Please install it to include $5 support, or re-run configure"
49 echo " *** without explicitly specifying --with-$1"
57 AC_DEFINE_UNQUOTED([HAVE_$4], 1, [Define to indicate the $5 library])
59 elif test ! -z "${$4_MANDATORY}";
62 echo "*** The $5 installation on this system appears to be broken."
63 echo "*** Either correct the installation, or run configure"
64 echo "*** without explicity specifying --with-$1"
69 AC_SUBST([$4_INCLUDE])
75 [AST_CHECK_GNU_MAKE], [AC_CACHE_CHECK(for GNU make, GNU_MAKE,
76 GNU_MAKE='Not Found' ;
77 for a in make gmake gnumake ; do
78 if test -z "$a" ; then continue ; fi ;
79 if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
85 if test "x$GNU_MAKE" = "xNot Found" ; then
86 echo " *** Please install GNU make. It is required to build Asterisk!"