diff --git a/config/ax_check_folders.m4 b/config/ax_check_folders.m4 new file mode 100644 index 0000000..1cdb3d3 --- /dev/null +++ b/config/ax_check_folders.m4 @@ -0,0 +1,22 @@ +# AX_CHECK_FOLDERS(PATH, ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND]) +# ----------------------------------------------------------- +# First checks if the provided PATH exists and is a directory. +# If so, then checks if at least one folder exists in the provided PATH. +# Calls ACTION-IF-FOUND if found, ACTION-IF-NOT-FOUND otherwise. + +AC_DEFUN([AX_CHECK_FOLDERS], [ + AC_MSG_CHECKING([if $1 is a valid directory]) + if test -d "$1"; then + AC_MSG_RESULT([yes]) + AC_MSG_CHECKING([for at least one folder in $1]) + if (find "$1" -maxdepth 1 -mindepth 1 -type d | grep -q .); then + AC_MSG_RESULT([yes]) + $2 + else + AC_MSG_RESULT([no]) + m4_ifval([$3], [$3], []) + fi + else + AC_MSG_RESULT([no]) + fi +]) diff --git a/config/ax_check_real_file.m4 b/config/ax_check_real_file.m4 deleted file mode 100644 index 44fffa7..0000000 --- a/config/ax_check_real_file.m4 +++ /dev/null @@ -1,27 +0,0 @@ -# AX_CHECK_REAL_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# ------------------------------------------------------------------ -# -# Check for the existence of FILE, and make sure it is a real file or -# directory, and not a symbolic link. -# -AC_DEFUN([AX_CHECK_REAL_FILE], -[AC_DIAGNOSE([cross], - [cannot check for file existence when cross compiling])dnl -AS_VAR_PUSHDEF([ac_RealFile], [ac_cv_real_file_$1])dnl -AC_CACHE_CHECK([for $1], ac_RealFile, -[test "$cross_compiling" = yes && - AC_MSG_ERROR([cannot check for file existence when cross compiling]) -if test -r "$1" -then - if test -h "$1" - then - AS_VAR_SET(ac_RealFile, no) - else - AS_VAR_SET(ac_RealFile, yes) - fi -else - AS_VAR_SET(ac_RealFile, no) -fi]) -AS_IF([test AS_VAR_GET(ac_RealFile) = yes], [$2], [$3])[]dnl -AS_VAR_POPDEF([ac_RealFile])dnl -])# AX_CHECK_REAL_FILE diff --git a/configure.ac b/configure.ac index b03dabc..c6f34a9 100644 --- a/configure.ac +++ b/configure.ac @@ -27,11 +27,11 @@ CXXFLAGS="$CXXFLAGS $CONFIGURE_CXXFLAGS" LDFLAGS="$LDFLAGS $CONFIGURE_LDFLAGS" m4_include(config/ax_compiler_vendor.m4) -m4_include(config/ax_check_real_file.m4) m4_include(config/ax_fixed_point_machine.m4) m4_include(config/ax_misaligned_access_fails.m4) m4_include(config/ax_c99_features.m4) m4_include(config/ax_check_export_capability.m4) +m4_include(config/ax_check_folders.m4) BROADVOICE_MAJOR_VERSION=0 BROADVOICE_MINOR_VERSION=1 @@ -211,7 +211,7 @@ if test "${build}" = "${host}" then case "${host}" in x86_64-*) - AX_CHECK_REAL_FILE([${prefix}/lib64], libdir='$(exec_prefix)/lib64') + AX_CHECK_FOLDERS([${prefix}/lib64], libdir='$(exec_prefix)/lib64') ;; esac fi diff --git a/debian/compat b/debian/compat index ec63514..f599e28 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -9 +10 diff --git a/debian/control b/debian/control index 5885566..5e901f2 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ Source: libbroadvoice -Priority: extra +Priority: optional Maintainer: FreeSWITCH Solutions -Build-Depends: debhelper (>= 9), dh-autoreconf, automake (>= 1.14), autoconf (>= 2.69) +Build-Depends: debhelper (>= 10), dh-autoreconf, automake (>= 1.14), autoconf (>= 2.69) Standards-Version: 3.9.6 Section: libs Homepage: https://www.broadcom.com/support/broadvoice/ diff --git a/debian/libbroadvoice-dev.lintian-overrides b/debian/libbroadvoice-dev.lintian-overrides index 807eb4a..4ed42e5 100644 --- a/debian/libbroadvoice-dev.lintian-overrides +++ b/debian/libbroadvoice-dev.lintian-overrides @@ -1,2 +1,3 @@ libbroadvoice-dev: new-package-should-close-itp-bug libbroadvoice-dev: helper-templates-in-copyright +libbroadvoice-dev: pkg-config-unavailable-for-cross-compilation