source: valtobtest/subversion-1.6.2/build/ac-macros/ctypesgen.m4 @ 3

Last change on this file since 3 was 3, checked in by valtob, 15 years ago

subversion source 1.6.2 as test

File size: 1.4 KB
Line 
1dnl
2dnl ctypesgen.m4: Locates ctypesgen for building/installing ctypes-python.
3dnl
4
5AC_DEFUN(SVN_CHECK_CTYPESGEN,
6[
7  AC_ARG_WITH(ctypesgen,
8              AS_HELP_STRING([--with-ctypesgen=PATH],
9                             [Specify the path to ctypesgen.  This can either
10                              be the full path to a ctypesgen installation,
11                              the full path to a ctypesgen source tree or the
12                              full path to ctypesgen.py.]),
13  [
14    case "$withval" in
15      "no")
16        SVN_FIND_CTYPESGEN(no)
17      ;;
18      "yes")
19        SVN_FIND_CTYPESGEN(check)
20      ;;
21      *)
22        SVN_FIND_CTYPESGEN($withval)
23      ;;
24    esac
25  ],
26  [
27    SVN_FIND_CTYPESGEN(check)
28  ])
29])
30
31AC_DEFUN(SVN_FIND_CTYPESGEN,
32[
33  where=$1
34
35  CTYPESGEN=none
36
37  if test $where = check; then
38    AC_PATH_PROG(CTYPESGEN, "ctypesgen.py", none)
39  elif test $where != no; then
40    AC_MSG_CHECKING([for ctypesgen.py])
41
42    if test -f "$where"; then
43      CTYPESGEN="$where"
44    elif test -f "$where/bin/ctypesgen.py"; then
45      CTYPESGEN="$where/bin/ctypesgen.py"
46    else
47      CTYPESGEN="$where/ctypesgen.py"
48    fi
49
50    if test ! -f "$CTYPESGEN" || test ! -x "$CTYPESGEN"; then
51      AC_MSG_ERROR([Could not find ctypesgen at $where/ctypesgen.py or at
52                    $where/bin/ctypesgen.py])
53    else
54      AC_MSG_RESULT([$CTYPESGEN])
55    fi
56  fi
57
58  dnl We use CTYPESGEN in the Makefile
59  AC_SUBST(CTYPESGEN)
60])
Note: See TracBrowser for help on using the repository browser.