summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTushar Gohad <tushar.gohad@intel.com>2015-12-10 06:54:04 -0700
committerTushar Gohad <tushar.gohad@intel.com>2015-12-10 06:55:00 -0700
commit25fd05f0e9b589021ca3ac8c8bb425fe74386e20 (patch)
tree6e1f9d66a4e51face1b46dab51187d3be87ad5fd
parent76a7a33e3afa1b2b9a13295670e9a09f7c0e3092 (diff)
downloadliberasurecode-25fd05f0e9b589021ca3ac8c8bb425fe74386e20.tar.gz
Look up version number in version header (part 2)
-rw-r--r--configure.ac16
1 files changed, 9 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 3835706..bc714cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,20 +10,20 @@ AM_MAINTAINER_MODE([disable])
m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])
AM_SILENT_RULES([yes])
-# Release version
+# Get release version
AC_PATH_PROG(SED, sed, "", $PATH:/bin:/usr/bin:/usr/local/bin)
if test -z "$SED"; then
AC_MSG_WARN([sed was not found])
fi
-
+VERINC="${srcdir}/include/erasurecode/erasurecode_version.h"
AC_MSG_CHECKING([liberasurecode API version])
-LIBERASURECODE_VERSION_MAJOR=`$SED -ne 's/^#define _MAJOR *\([0-9]*\)/\1/p' ${srcdir}/include/erasurecode/erasurecode_version.h 2>/dev/null`
+LIBERASURECODE_VERSION_MAJOR=`$SED -ne 's/^#define _MAJOR *\([0-9]*\)/\1/p' ${VERINC} 2>/dev/null`
AC_MSG_RESULT($LIBERASURECODE_VERSION_MAJOR)
if test -z "$LIBERASURECODE_VERSION_MAJOR"; then
- AC_MSG_ERROR([API version number can not be retrieved from include/erasurecode/erasurecode_version.h])
+ AC_MSG_ERROR([API version number can not be retrieved from $VERINC])
fi
-LIBERASURECODE_VERSION_MINOR=`$SED -ne 's/^#define _MINOR *\([0-9]*\)/\1/p' ${srcdir}/include/erasurecode/erasurecode_version.h 2>/dev/null`
-LIBERASURECODE_VERSION_MICRO=`$SED -ne 's/^#define _REV *\([0-9]*\)/\1/p' ${srcdir}/include/erasurecode/erasurecode_version.h 2>/dev/null`
+LIBERASURECODE_VERSION_MINOR=`$SED -ne 's/^#define _MINOR *\([0-9]*\)/\1/p' ${VERINC} 2>/dev/null`
+LIBERASURECODE_VERSION_MICRO=`$SED -ne 's/^#define _REV *\([0-9]*\)/\1/p' ${VERINC} 2>/dev/null`
LIBERASURECODE_VERSION=${LIBERASURECODE_VERSION_MAJOR}.${LIBERASURECODE_VERSION_MINOR}.${LIBERASURECODE_VERSION_MICRO}
LIBERASURECODE_API_VERSION=${LIBERASURECODE_VERSION_MAJOR}
@@ -196,7 +196,9 @@ fi
# Detect the SIMD features supported by both the compiler and the CPU
SIMD_FLAGS=""
-cat "$srcdir/get_flags_from_cpuid.c" | sed "s/FLAGSFROMAUTOCONF/${SUPPORTED_FLAGS}/" | $CC -x c -g - -o get_flags_from_cpuid
+cat "$srcdir/get_flags_from_cpuid.c" \
+ | sed "s/FLAGSFROMAUTOCONF/${SUPPORTED_FLAGS}/" \
+ | $CC -x c -g - -o get_flags_from_cpuid
if [[ -e ./get_flags_from_cpuid ]]; then
chmod 755 get_flags_from_cpuid; ./get_flags_from_cpuid; rm ./get_flags_from_cpuid
if [[ -e compiler_flags ]]; then