• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1AC_DEFUN([GPKG_CHECK_RPM],
2[
3AC_ARG_WITH([rpmbuild],
4[AS_HELP_STRING([--with-rpmbuild=PATH],
5[Program to use for building RPMs])])
6
7if test -x "${with_rpmbuild}"
8then
9    RPMBUILD="${with_rpmbuild}"
10    AC_MSG_CHECKING([for rpmbuild or rpm])
11    AC_MSG_RESULT([${RPMBUILD} (from parameter)])
12else
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)])
17fi
18AC_SUBST([RPMBUILD])
19AM_CONDITIONAL([ENABLE_RPM], [test "$RPMBUILD" != "false"])
20
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.
24AM_CONDITIONAL([RPM_LIBUSB_DEVEL], [rpm -q libusb-devel > /dev/null 2>&1])
25])
26
27AC_DEFUN([GPKG_CHECK_LINUX],
28[
29	# effective_target has to be determined in advance
30	AC_REQUIRE([AC_NEED_BYTEORDER_H])
31
32	is_linux=false
33	case "$effective_target" in
34		*linux*)
35			is_linux=true
36			;;
37	esac
38	AM_CONDITIONAL([HAVE_LINUX], ["$is_linux"])
39
40	# required for docdir
41	# FIXME: Implicit dependency
42	# AC_REQUIRE(GP_CHECK_DOC_DIR)
43
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]])])
47
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)])
56	fi
57	AC_SUBST([hotplugdocdir])
58
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]])])
62
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)])
71	fi
72
73	AC_SUBST([hotplugusermapdir])
74])
75