summaryrefslogtreecommitdiff
path: root/gphoto-m4/gp-sleep.m4
blob: 2c401489246b2f164d2956a1dd1fa8b6c2ab244a (plain)
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
dnl ####################################################################
dnl GP_SLEEP(delay_in_whole_seconds)
dnl   If the SLEEP variable is set to "no" or empty or is unset,
dnl   do not sleep.
dnl   If the SLEEP variable is set to something else, run that something
dnl   else with the given delay value.
dnl ####################################################################
AC_DEFUN_ONCE([_GP_SLEEP_INIT], [dnl
AC_REQUIRE([GP_PROG_SLEEP])dnl
AS_IF([test "x$SLEEP" != "x" && test "x$SLEEP" != "xno"], [dnl
gp_sleep=[$]SLEEP
], [dnl
gp_sleep=:
])
])dnl
dnl
dnl
AC_DEFUN([GP_SLEEP], [dnl
AC_REQUIRE([_GP_SLEEP_INIT])dnl
$gp_sleep $1
])dnl
dnl
dnl
dnl ####################################################################
dnl
dnl Local Variables:
dnl mode: autoconf
dnl End: