From: Francis Dupont Date: Sat, 29 Dec 2018 10:41:47 +0000 (+0100) Subject: [111-configure-options-with-cql-not-working-properly] Added check of existance by... X-Git-Tag: 429-Updated-StampedValue-to-support-reals_base~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=798cfefb0febff44a22c6ac29f22201b7d1d7df2;p=thirdparty%2Fkea.git [111-configure-options-with-cql-not-working-properly] Added check of existance by the config script --- diff --git a/configure.ac b/configure.ac index 06459df446..8a0306ae77 100644 --- a/configure.ac +++ b/configure.ac @@ -835,6 +835,11 @@ if test "$CQL_CONFIG" != "" ; then AC_MSG_ERROR([--with-cql should point to a pkg-config or cql_config program]) fi + $CQL_CONFIG --print-errors $cql_lib + if test $? -ne 0; then + AC_MSG_ERROR([$CQL_CONFIG $cql_lib failed]) + fi + CQL_INCLUDEDIR=`$CQL_CONFIG --cflags-only-I $cql_lib` CQL_CPPFLAGS="$CQL_INCLUDEDIR `$CQL_CONFIG --cflags-only-other $cql_lib`" CQL_LIBS="`$CQL_CONFIG --libs $cql_lib`" diff --git a/tools/cql_config b/tools/cql_config index a3fccd83b7..8fad4295a3 100755 --- a/tools/cql_config +++ b/tools/cql_config @@ -11,14 +11,14 @@ fi if ! [ -f ${DIR}/cql_config_defines.sh ] || ! [ -x ${DIR}/cql_config_defines.sh ] then echo "missing path configuration file for DataStax Cassandra (cql_config_defines.sh)" - exit 0 + exit 1 fi source ${DIR}/cql_config_defines.sh if [ $# -ne 1 ] && [ $# -ne 2 ] then echo "run: \`$0 --help\` for more help" - exit 0 + exit 1 fi if [ $1 == "--help" ] then @@ -34,6 +34,8 @@ then echo " get lib path" echo "--modversion" echo " get version" + echo "--print-errors" + echo " check existence" echo "libraries:" echo " cassandra" echo " cassandra_static" @@ -41,12 +43,12 @@ then else if [ $# -ne 2 ] then echo "run: \`$0 --help\` for more help" - exit 0 + exit 1 else if [ $2 != "cassandra" ] && [ $2 != "cassandra_static" ] then echo "library $2 not supported" echo "run: \`$0 --help\` for more help" - exit 0 + exit 1 else cql_lib=$2 fi @@ -74,5 +76,10 @@ then echo "${MAJOR}.${MINOR}.${PATCH}" exit 0 fi +if [ $1 == "--print-errors" ] +then + exit 0 +fi echo "wrong parameter" echo "run: \`$0 --help\` for more help" +exit 1