-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
configure.in: Extract API version from zmq.h
* Added a version.sh and relevant changes to configure.in to extract the API version from zmq.h at the time autogen.sh is run. * Moved the version macros to be next to zmq_version in zmq.h and improved the comments. * Modified ZMQ_MAKE_VERSION to use (x) instead of plain x when expanding macro parameters. Signed-off-by: Martin Lucina <mato@kotelna.sk>
- Loading branch information
Showing
4 changed files
with
38 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
# | ||
# This script extracts the 0MQ version from include/zmq.h, which is the master | ||
# location for this information. | ||
# | ||
if [ ! -f include/zmq.h ]; then | ||
echo "version.sh: error: include/zmq.h does not exist" 1>&2 | ||
exit 1 | ||
fi | ||
MAJOR=`egrep '^#define +ZMQ_VERSION_MAJOR +[0-9]+$' include/zmq.h` | ||
MINOR=`egrep '^#define +ZMQ_VERSION_MINOR +[0-9]+$' include/zmq.h` | ||
PATCH=`egrep '^#define +ZMQ_VERSION_PATCH +[0-9]+$' include/zmq.h` | ||
if [ -z "$MAJOR" -o -z "$MINOR" -o -z "$PATCH" ]; then | ||
echo "version.sh: error: could not extract version from include/zmq.h" 1>&2 | ||
exit 1 | ||
fi | ||
MAJOR=`echo $MAJOR | awk '{ print $3 }'` | ||
MINOR=`echo $MINOR | awk '{ print $3 }'` | ||
PATCH=`echo $PATCH | awk '{ print $3 }'` | ||
echo $MAJOR.$MINOR.$PATCH | ||
|