File: pilot-link.m4.in

package info (click to toggle)
pilot-link 0.12.5-dfsg-2
  • links: PTS
  • area: main
  • in suites: buster, stretch
  • size: 6,868 kB
  • ctags: 5,811
  • sloc: ansic: 53,153; sh: 10,459; java: 2,584; perl: 2,247; python: 1,044; makefile: 991; yacc: 662; cpp: 551; xml: 39
file content (43 lines) | stat: -rw-r--r-- 1,168 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
AC_DEFUN([AC_PILOT_LINK_HOOK], [
	PILOT_LINK_VERS=@PILOT_LINK_VERS@
	PILOT_LINK_MAJOR=@PILOT_LINK_MAJOR@
	PILOT_LINK_MINOR=@PILOT_LINK_MINOR@
	PILOT_LINK_PATCH=@PILOT_LINK_PATCH@

	AC_MSG_CHECKING(for pilot-link version >= $1)

	vers=$PILOT_LINK_VERS.$PILOT_LINK_MAJOR.$PILOT_LINK_MINOR$PILOT_LINK_PATCH
	pl_ve=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
	pl_ma=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
	pl_mi=`echo $1|sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`

	if test $PILOT_LINK_VERS -gt $pl_ve; then
		AC_MSG_RESULT(yes ($vers))
	elif test $PILOT_LINK_VERS -eq $pl_ve; then
		if test $PILOT_LINK_MAJOR -gt $pl_ma; then 
			AC_MSG_RESULT(yes ($vers))
		elif test $PILOT_LINK_MAJOR -eq $pl_ma; then 
			if test $PILOT_LINK_MINOR -gt $pl_mi; then 
				AC_MSG_RESULT(yes ($vers))
			elif test $PILOT_LINK_MINOR -eq $pl_mi; then 
				AC_MSG_RESULT(yes ($vers))
			else
				AC_MSG_ERROR(no)
			fi
		else
			AC_MSG_ERROR(no)
		fi
	else
		AC_MSG_ERROR(no)
	fi
])

AC_DEFUN([AC_PILOT_LINK],[
	if test x$1 = x; then
		plv=$PILOT_LINK_VERS.$PILOT_LINK_MAJOR.$PILOT_LINK_MINOR
	else
		plv=$1
	fi
		
	AC_PILOT_LINK_HOOK($plv)
])