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`"
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
echo " get lib path"
echo "--modversion"
echo " get version"
+ echo "--print-errors"
+ echo " check existence"
echo "libraries:"
echo " cassandra"
echo " cassandra_static"
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
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