~ubuntu-branches/ubuntu/karmic/quilt/karmic

« back to all changes in this revision

Viewing changes to aclocal.m4

  • Committer: Bazaar Package Importer
  • Author(s): Raphael Hertzog
  • Date: 2008-06-19 21:40:27 UTC
  • mfrom: (4.1.4 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080619214027-so7yis356zayzu1c
Tags: 0.46-6
Change back patchsys-quilt.mk to enter DEB_SRCDIR by default before
applying patches (8 packages FTBFS due to this change). But we can now
use DEB_QUILT_TOPDIR to override the default choice of DEB_SRCDIR.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
      AC_PATH_PROG($1,$2,,$PATH:$4)
34
34
    ],[
35
35
      AC_PATH_PROGS($1,$3,,$PATH:$4)
36
 
      if test `expr "$$1" : '.*/\([[^/]]*\)$'` != "$2"; then
 
36
      if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then
37
37
        COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
38
38
      fi
39
39
    ])
62
62
  fi
63
63
  AC_SUBST($1)
64
64
])
 
65
 
 
66
dnl Allow configure to specify a specific binary
 
67
dnl This variant is for optional binaries.
 
68
dnl 1: Environment variable
 
69
dnl 2: binary name
 
70
dnl 3: optional list of alternative binary names
 
71
dnl 4: optional list of additional search directories
 
72
AC_DEFUN([QUILT_COMPAT_PROG_PATH_OPT],[
 
73
  AC_ARG_WITH($2, AC_HELP_STRING(
 
74
    [--with-$2], [name of the $2 executable to use]),
 
75
  [
 
76
    if test x"$withval" != xno; then
 
77
      AC_MSG_CHECKING(for $2)
 
78
      $1="$withval"
 
79
      if test -e "$$1"; then
 
80
        if test ! -f "$$1" -a ! -h "$$1" || test ! -x "$$1"; then
 
81
          AC_MSG_ERROR([$$1 is not an executable file])
 
82
        fi
 
83
      fi
 
84
      AC_MSG_RESULT([$$1])
 
85
      if test ! -e "$$1"; then
 
86
        AC_MSG_WARN([$$1 does not exist])
 
87
      fi
 
88
      COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
 
89
    fi
 
90
  ],[
 
91
    m4_if([$3],[],[
 
92
      AC_PATH_PROG($1,$2,,$PATH:$4)
 
93
    ],[
 
94
      AC_PATH_PROGS($1,$3,,$PATH:$4)
 
95
      if test -n "$$1" -a "`expr "$$1" : '.*/\([[^/]]*\)$'`" != "$2"; then
 
96
        COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
 
97
      fi
 
98
    ])
 
99
    m4_if([$4],[],[],[
 
100
      if test -n "$$1"; then
 
101
        as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
102
        for dir in "$4"; do
 
103
          if test "`dirname $$1`" = "$dir"; then
 
104
            COMPAT_SYMLINKS="$COMPAT_SYMLINKS $2"
 
105
            break
 
106
          fi
 
107
        done
 
108
        IFS="$as_save_IFS"
 
109
      fi
 
110
    ])
 
111
    if test -z "$$1"; then
 
112
      AC_MSG_WARN([$2 not found, some optional functionalities will be missing])
 
113
    fi
 
114
  ])
 
115
  if test -z "$$1"; then
 
116
    $1=$2
 
117
  fi
 
118
  AC_SUBST($1)
 
119
])