]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[111-configure-options-with-cql-not-working-properly] Added check of existance by... 111-configure-options-with-cql-not-working-properly
authorFrancis Dupont <fdupont@isc.org>
Sat, 29 Dec 2018 10:41:47 +0000 (11:41 +0100)
committerFrancis Dupont <fdupont@isc.org>
Tue, 29 Jan 2019 07:35:39 +0000 (02:35 -0500)
configure.ac
tools/cql_config

index 06459df4468290f35bab2e2b6e9e9d20426de08f..8a0306ae77491c877820a7e075f769d384978ea3 100644 (file)
@@ -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`"
index a3fccd83b7195046156db5715a469ff0d81f16eb..8fad4295a32c683758d6469edcae42766328596f 100755 (executable)
@@ -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