1
AC_DEFUN([GPKG_CHECK_RPM],
3
AC_ARG_WITH([rpmbuild],
4
[AS_HELP_STRING([--with-rpmbuild=PATH],
5
[Program to use for building RPMs])])
7
if test -x "${with_rpmbuild}"
9
RPMBUILD="${with_rpmbuild}"
10
AC_MSG_CHECKING([for rpmbuild or rpm])
11
AC_MSG_RESULT([${RPMBUILD} (from parameter)])
13
AC_MSG_RESULT([using autodetection])
14
AC_CHECK_PROGS(RPMBUILD, [rpmbuild rpm], false)
15
AC_MSG_CHECKING([for rpmbuild or rpm])
16
AC_MSG_RESULT([${RPMBUILD} (autodetected)])
19
AM_CONDITIONAL([ENABLE_RPM], [test "$RPMBUILD" != "false"])
21
# whether libusb-devel is installed or not defines whether the RPM
22
# packages we're going to build will depend on libusb and libusb-devel
23
# RPM packages or not.
24
AM_CONDITIONAL([RPM_LIBUSB_DEVEL], [rpm -q libusb-devel > /dev/null 2>&1])
27
AC_DEFUN([GPKG_CHECK_LINUX],
29
# effective_target has to be determined in advance
30
AC_REQUIRE([AC_NEED_BYTEORDER_H])
33
case "$effective_target" in
38
AM_CONDITIONAL([HAVE_LINUX], ["$is_linux"])
41
# FIXME: Implicit dependency
42
# AC_REQUIRE(GP_CHECK_DOC_DIR)
44
AC_ARG_WITH([hotplug-doc-dir],
45
[AS_HELP_STRING([--with-hotplug-doc-dir=PATH],
46
[Where to install hotplug scripts as docs [default=autodetect]])])
48
AC_MSG_CHECKING([for hotplug doc dir])
49
if test "x${with_hotplug_doc_dir}" != "x"
50
then # given as parameter
51
hotplugdocdir="${with_hotplug_doc_dir}"
52
AC_MSG_RESULT([${hotplugdocdir} (from parameter)])
53
else # start at docdir
54
hotplugdocdir="${docdir}/linux-hotplug"
55
AC_MSG_RESULT([${hotplugdocdir} (default)])
57
AC_SUBST([hotplugdocdir])
59
AC_ARG_WITH([hotplug-usermap-dir],
60
[AS_HELP_STRING([--with-hotplug-usermap-dir=PATH],
61
[Where to install hotplug scripts as docs [default=autodetect]])])
63
AC_MSG_CHECKING([for hotplug usermap dir])
64
if test "x${with_hotplug_usermap_dir}" != "x"
65
then # given as parameter
66
hotplugusermapdir="${with_hotplug_usermap_dir}"
67
AC_MSG_RESULT([${hotplugusermapdir} (from parameter)])
68
else # start at docdir
69
hotplugusermapdir="${docdir}/linux-hotplug"
70
AC_MSG_RESULT([${hotplugusermapdir} (default)])
73
AC_SUBST([hotplugusermapdir])