autoconf: Remove use of m4_ifblank.
authorCorey Farrell <git@cfware.com>
Sat, 2 Dec 2017 21:55:31 +0000 (16:55 -0500)
committerCorey Farrell <git@cfware.com>
Sat, 2 Dec 2017 21:59:31 +0000 (16:59 -0500)
The m4_ifblank macro is not available on CentOS 6, reverse conditionals
to allow use of m4_ifval instead.  ./bootstrap.sh was run but this patch
does not result in any difference to the generated configure script.

Change-Id: I280785deb872ed8d3339d99cce63a2b54d5f1438

autoconf/ast_check_pwlib.m4
autoconf/ast_ext_lib.m4
autoconf/ast_gcc_attribute.m4

index 4588fa3..8ec2d58 100644 (file)
@@ -200,7 +200,7 @@ AC_DEFUN([AST_CHECK_PWLIB_VERSION], [
                $2_BUILD_NUMBER=`echo ${$2_VERSION} | cut -f3 -d.`
                $2_VER=$((${$2_MAJOR_VERSION}*10000+${$2_MINOR_VERSION}*100+${$2_BUILD_NUMBER}))
                $2_REQ=$(($4*10000+$5*100+$6))
-               $2_MAX=m4_ifblank([$10], [9999999], [$(($8*10000+$9*100+$10))])
+               $2_MAX=m4_ifval([$10], [$(($8*10000+$9*100+$10))], [9999999])
 
                AC_MSG_CHECKING(if $1 version ${$2_VERSION} is compatible with chan_h323)
                if test ${$2_VER} -lt ${$2_REQ}; then
index e8ce201..080b8c3 100644 (file)
@@ -117,14 +117,14 @@ if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
          pbxlibdir="-L${$1_DIR}"
       fi
    fi
-   m4_ifblank([$3], [
-      # empty lib, assume only headers
-      AST_$1_FOUND=yes
-   ], [
+   m4_ifval([$3], [
       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
       CFLAGS="${CFLAGS} $6"
       AC_CHECK_LIB([$2], [$3], [AST_$1_FOUND=yes], [AST_$1_FOUND=no], [${pbxlibdir} $5])
       CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
+   ], [
+      # empty lib, assume only headers
+      AST_$1_FOUND=yes
    ])
 
    # now check for the header.
@@ -135,21 +135,21 @@ if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
          $1_INCLUDE="-I${$1_DIR}/include"
       fi
       $1_INCLUDE="${$1_INCLUDE} $6"
-      m4_ifblank([$4], [
-         # no header, assume found
-         $1_HEADER_FOUND="1"
-      ], [
+      m4_ifval([$4], [
          # check for the header
          ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
          CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}"
          AC_CHECK_HEADER([$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0])
          CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
+      ], [
+         # no header, assume found
+         $1_HEADER_FOUND="1"
       ])
       if test "x${$1_HEADER_FOUND}" = "x0" ; then
          $1_LIB=""
          $1_INCLUDE=""
       else
-         m4_ifblank([$3], [
+         m4_ifval([$3], [], [
             # only checking headers -> no library
             $1_LIB=""
          ])
index 9d5a320..0286853 100644 (file)
@@ -11,9 +11,9 @@ ax_cv_have_func_attribute_$1=0
 
 AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM(
-               m4_ifblank([$2],
-                       [$3 void __attribute__(($1)) *test(void *muffin, ...) {return (void *) 0;}],
-                       [$3 void __attribute__(($2)) *test(void *muffin, ...) ;]))],
+               m4_ifval([$2],
+                       [$3 void __attribute__(($2)) *test(void *muffin, ...) ;],
+                       [$3 void __attribute__(($1)) *test(void *muffin, ...) {return (void *) 0;}]))],
        AC_MSG_RESULT(yes)
        m4_ifval([$4],$4=1)
        ax_cv_have_func_attribute_$1=1