1
dnl Autoconf macros used by libusb
3
dnl Copyright (C) 2003 Brad Hards <bradh@frogmouth.net
4
dnl Qt tests based on pinentry code Copyright (C) 2002 g10 Code GmbH
6
dnl This program is free software; you can redistribute it and/or modify
7
dnl it under the terms of the GNU General Public License as published by
8
dnl the Free Software Foundation; either version 2, or (at your option)
11
dnl This program is distributed in the hope that it will be useful,
12
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
dnl GNU General Public License for more details.
16
dnl You should have received a copy of the GNU General Public License
17
dnl along with this program; if not, write to the Free Software
18
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
dnl LIBUSB_FIND_PATH(program-name, variable-name, list of directories, if-not-found, test-parameter)
22
AC_DEFUN([LIBUSB_FIND_PATH],
24
AC_MSG_CHECKING([for $1])
25
if test -n "$$2"; then
28
libusb_cache=`echo $1 | sed 'y%./+-%__p_%'`
30
AC_CACHE_VAL(libusb_cv_path_$libusb_cache,
42
if test -x "$dir/$1"; then
45
evalstr="$dir/$1 $5 2>&1 "
46
if eval $evalstr; then
47
libusb_cv_path="$dir/$1"
51
libusb_cv_path="$dir/$1"
57
eval "libusb_cv_path_$libusb_cache=$libusb_cv_path"
61
eval "libusb_cv_path=\"`echo '$libusb_cv_path_'$libusb_cache`\""
65
if test -z "$libusb_cv_path" || test "$libusb_cv_path" = NONE; then
66
AC_MSG_RESULT(not found)
69
AC_MSG_RESULT($libusb_cv_path)
75
AC_DEFUN([LIBUSB_INIT_DOXYGEN],
77
AC_MSG_CHECKING([for Doxygen tools])
79
LIBUSB_FIND_PATH(dot, DOT, [], [])
80
if test -n "$DOT"; then
85
AC_SUBST(LIBUSB_HAVE_DOT)
87
LIBUSB_FIND_PATH(doxygen, DOXYGEN, [], [])
90
DOXYGEN_PROJECT_NAME="$1"
91
DOXYGEN_PROJECT_NUMBER="$2"
92
AC_SUBST(DOXYGEN_PROJECT_NAME)
93
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
96
if test -n "$DOXYGEN" && test -x "$DOXYGEN"; then
97
LIBUSB_HAS_DOXYGEN=yes
99
AC_SUBST(LIBUSB_HAS_DOXYGEN)