diff --git a/configure.ac b/configure.ac index dbf152c0..76f818e5 100644 --- a/configure.ac +++ b/configure.ac @@ -86,16 +86,16 @@ BUILD_DIR_PATH=$(pwd) # Combine to get the full path to the scrdir: THIS_TOP_SRC_DIR=$BUILD_DIR_PATH/$MYSRCDIR _gt_shared_mul_min_version=0.0.3 -AC_MSG_CHECKING([whether shared-mul is at least $_gt_shared_mul_min_version]) AS_IF([test -d "$THIS_TOP_SRC_DIR"/../shared-mul], - [AS_IF([pkg-config --atleast-version=$_gt_shared_mul_min_version --with-path="$THIS_TOP_SRC_DIR"/../shared-mul giella-shared-mul], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_WARN([shared-mul is too old for this giella-core, please update])])], - [AS_IF([pkg-config --atleast-version=$_gt_shared_mul_min_version giella-shared-mul], - [AC_MSG_RESULT([yes])], - [AC_MSG_RESULT([no]) - AC_MSG_WARN([shared-mul is too old for this giella-core, please update])])]) + [flub=$PKG_CONFIG_PATH + export PKG_CONFIG_PATH=$THIS_TOP_SRC_DIR/../shared-mul:$PKG_CONFIG_PATH + PKG_CHECK_MODULES([SHARED_MUL], [giella-shared-mul >= $_gt_shared_mul_min_version], + [AC_MSG_NOTICE([NB using shared-mul in $THIS_TOP_SRC_DIR/../shared-mul])], + [AC_MSG_ERROR([shared-mul needs to be updated, cd ../shared-mul and git pull and build])]) + export PKG_CONFIG_PATH=$flub], + [PKG_CHECK_MODULES([SHARED_MUL], [giella-shared-mul >= $_gt_shared_mul_min_version], + [AC_MSG_RESULT([NB using system shared-mul])], + [AC_MSG_WARN([shared-mul needs to be updated and installed])])])