File: configure.in.in

package info (click to toggle)
ksimus-boolean 0.3.6-13
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,296 kB
  • ctags: 768
  • sloc: sh: 8,092; cpp: 4,980; perl: 2,029; makefile: 102
file content (63 lines) | stat: -rw-r--r-- 1,386 bytes parent folder | download | duplicates (3)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#MIN_CONFIG

AM_INIT_AUTOMAKE(ksimus-boolean,0.3.6)

AC_DEFUN(CHECK_KSIMUS_HEADER,
[
  AC_MSG_CHECKING(for KSimus Header);

  KSIMUS_HEADER_DIR=$includedir/ksimus

  if eval "test -f $KSIMUS_HEADER_DIR/component.h" && eval "test -f $KSIMUS_HEADER_DIR/ksimus.h"; then
    AC_MSG_RESULT(yes)
  else
    AC_MSG_ERROR(KSimus header not found)
  fi
])


AC_DEFUN(CHECK_KSIMUS_BINARY,
[
  AC_MSG_CHECKING(for KSimus Binary);

  KSIMUS_BINARY_DIR=$bindir


  if test "${exec_prefix}" != NONE; then
    KSIMUS_BINARY_DIR=${exec_prefix}/bin
  else
    KSIMUS_BINARY_DIR=${prefix}/bin
  fi

  if eval "test -f $KSIMUS_BINARY_DIR/ksimus"; then
    AC_MSG_RESULT(yes)
  else
    AC_MSG_ERROR(KSimus not found)
  fi
])


AC_DEFUN(CHECK_KSIMUS_VERSION,
[
  AC_MSG_CHECKING(KSimus version);

  eval "KSIMUS_VERSION=`$KSIMUS_BINARY_DIR/ksimus  --version | grep 'KSimus:' | cut -d ' ' -f 2`"

  dnl Limit version to relevant numbers
  eval "KSIMUS_VERSION_LIMITED=`echo $KSIMUS_VERSION | cut -d '-' -f 1 | cut -d '.' -f 1,2,3`"
  eval "PACKAGE_VERSION_LIMITED=`echo $VERSION | cut -d '-' -f 1 | cut -d '.' -f 1,2,3`"


  if eval "test $KSIMUS_VERSION_LIMITED = $PACKAGE_VERSION_LIMITED"; then
    AC_MSG_RESULT(($KSIMUS_VERSION) yes)
  else
    AC_MSG_ERROR(KSimus version $KSIMUS_VERSION does not match package version $VERSION)
  fi
])



CHECK_KSIMUS_HEADER
CHECK_KSIMUS_BINARY
CHECK_KSIMUS_VERSION