Skip to content

Commit

Permalink
configure test
Browse files Browse the repository at this point in the history
  • Loading branch information
olofhagsand committed Jul 4, 2024
1 parent 7aac03b commit aee9d4f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
9 changes: 6 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
INCLUDES
CLIXON_VERSION_PATCH
CLIXON_VERSION_MINOR
CLIXON_VERSION_MAJOR
CLIXON_VERSION
Expand Down Expand Up @@ -2811,11 +2812,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# where autotool scripts are: install-sh, config.sub, config.guess


CLIXON_VERSION_MAJOR="7"
CLIXON_VERSION_MINOR="1"
CLIXON_VERSION_PATCH="0"

# Use GIT, if this does not work, need a fallback mechanism
CLIXON_VERSION="$(git log --pretty="format:%(describe) %ci" -n1)"
CLIXON_VERSION_MAJOR="$(echo $CLIXON_VERSION | awk -F "." '{print $1}')"
CLIXON_VERSION_MINOR="$(echo $CLIXON_VERSION | awk -F "." '{print $2}')"
CLIXON_VERSION_PATCH="$(echo $CLIXON_VERSION | awk -F "." '{print $3}' | awk -F " " '{print $1}')"

# Debug flag
# Check whether --enable-debug was given.
Expand Down Expand Up @@ -4016,6 +4018,7 @@ test -n "$target_alias" &&




{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: CLIXON version is ${CLIXON_VERSION}" >&5
printf "%s\n" "CLIXON version is ${CLIXON_VERSION}" >&6; }

Expand Down
8 changes: 5 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ AC_CONFIG_SRCDIR([lib/clixon/clixon.h.in])
# where autotool scripts are: install-sh, config.sub, config.guess
AC_CONFIG_AUX_DIR(config-aux)

CLIXON_VERSION_MAJOR="7"
CLIXON_VERSION_MINOR="1"
CLIXON_VERSION_PATCH="0"

# Use GIT, if this does not work, need a fallback mechanism
CLIXON_VERSION="$(git log --pretty="format:%(describe) %ci" -n1)"
CLIXON_VERSION_MAJOR="$(echo $CLIXON_VERSION | awk -F "." '{print $1}')"
CLIXON_VERSION_MINOR="$(echo $CLIXON_VERSION | awk -F "." '{print $2}')"
CLIXON_VERSION_PATCH="$(echo $CLIXON_VERSION | awk -F "." '{print $3}' | awk -F " " '{print $1}')"

# Debug flag
AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],[Build with debug symbols, default: no]),[
Expand Down Expand Up @@ -88,6 +89,7 @@ AC_CANONICAL_TARGET
AC_SUBST(CLIXON_VERSION)
AC_SUBST(CLIXON_VERSION_MAJOR)
AC_SUBST(CLIXON_VERSION_MINOR)
AC_SUBST(CLIXON_VERSION_PATCH)

AC_MSG_RESULT(CLIXON version is ${CLIXON_VERSION})

Expand Down

0 comments on commit aee9d4f

Please sign in to comment.