maint: Post-release version bump to 5.5.0
[libvirt/ericb.git] / m4 / virt-chrdev-lock-files.m4
blob7d85c0e21b6cd605c928c2b7304e9d18dcd56543
1 dnl The locaton of UUCP style lock files
2 dnl
3 dnl Copyright (C) 2016 Red Hat, Inc.
4 dnl
5 dnl This library is free software; you can redistribute it and/or
6 dnl modify it under the terms of the GNU Lesser General Public
7 dnl License as published by the Free Software Foundation; either
8 dnl version 2.1 of the License, or (at your option) any later version.
9 dnl
10 dnl This library is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 dnl Lesser General Public License for more details.
14 dnl
15 dnl You should have received a copy of the GNU Lesser General Public
16 dnl License along with this library.  If not, see
17 dnl <http://www.gnu.org/licenses/>.
18 dnl
20 AC_DEFUN([LIBVIRT_ARG_CHRDEV_LOCK_FILES], [
21   LIBVIRT_ARG_WITH([CHRDEV_LOCK_FILES],
22                    [location for UUCP style lock files for character devices ]
23                      [(use auto for default paths on some platforms)],
24                    [auto])
27 AC_DEFUN([LIBVIRT_CHECK_CHRDEV_LOCK_FILES], [
28   if test "$with_chrdev_lock_files" != "no"; then
29     case $with_chrdev_lock_files in
30       yes | auto)
31         dnl Default locations for platforms, or disable if unknown
32         if test "$with_linux" = "yes"; then
33           with_chrdev_lock_files=/var/lock
34         elif test "$with_chrdev_lock_files" = "auto"; then
35           with_chrdev_lock_files=no
36         fi
37         ;;
38     esac
39     if test "$with_chrdev_lock_files" = "yes"; then
40       AC_MSG_ERROR([You must specify path for the lock files on this platform])
41     fi
42     if test "$with_chrdev_lock_files" != "no"; then
43       AC_DEFINE_UNQUOTED([VIR_CHRDEV_LOCK_FILE_PATH], "$with_chrdev_lock_files",
44                          [path to directory containing UUCP device lock files])
45     fi
46   fi
47   AM_CONDITIONAL([VIR_CHRDEV_LOCK_FILE_PATH], [test "$with_chrdev_lock_files" != "no"])
50 AC_DEFUN([LIBVIRT_RESULT_CHRDEV_LOCK_FILES], [
51   AC_MSG_NOTICE([ Char device locks: $with_chrdev_lock_files])