- cfg_file=configure.ac
- if [ ! -e ${module_src}/${cfg_file} ] ; then
- cfg_file=configure.in.base
- fi
- if [ -e ${module_src}/${cfg_file} ] ; then
- vx=`grep -e "^VERSION=" ${module_src}/${cfg_file} | awk -F= '{ if (NF>1) print $NF; }' | tr -d '[:space:]'`
- fi
- px=${BUILD_DIR}/${module}
- if [ "$prefix" != "" ] ; then
- px=$prefix/${module}
+ if [ -e ${module_src}/configure.ac ] ; then
+ vx=`grep -e "^AC_INIT" ${module_src}/configure.ac | sed -e "s%.*\[\([[:digit:].]*\)\].*%\1%g"`
+ elif [ -e ${module_src}/configure.in.base ] ; then
+ vx=`grep -e "^VERSION=" ${module_src}/configure.in.base | awk -F= '{ if (NF>1) print $NF; }' | tr -d '[:space:]'`
+ if [ "$vx" == "" ] ; then
+ vx=`grep -e "^AC_INIT" ${module_src}/configure.in.base | sed -e "s%.*\[\([[:digit:].]*\)\].*%\1%g"`
+ fi
+ elif [ -e ${module_src}/CMakeLists.txt ] ; then
+ ver_maj=`cat ${module_src}/CMakeLists.txt | grep SET\(VERSION_MAJOR | sed -e "s%[A-Z_() ]%%g"`
+ ver_min=`cat ${module_src}/CMakeLists.txt | grep SET\(VERSION_MINOR | sed -e "s%[A-Z_() ]%%g"`
+ ver_maintenance=`cat ${module_src}/CMakeLists.txt | grep SET\(VERSION_MAINTENANCE | sed -e "s%[A-Z_() ]%%g"`
+ vx="${ver_maj}.${ver_min}.${ver_maintenance}"