File: configure.ac

package info (click to toggle)
madfuload 1.2-4
  • links: PTS
  • area: non-free
  • in suites: jessie-kfreebsd, squeeze, wheezy
  • size: 372 kB
  • ctags: 67
  • sloc: sh: 804; ansic: 342; makefile: 37
file content (47 lines) | stat: -rw-r--r-- 1,256 bytes parent folder | download | duplicates (5)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Process this file with autoconf to produce a configure script
AC_PREREQ(2.0)
AC_INIT(madfuload, 1.2, [usb-midi-fw-user@lists.sourceforge.net])
AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION)
AC_REVISION($Revision$)
AC_CONFIG_SRCDIR(madfuload.c)
AC_PROG_CC

AC_MSG_CHECKING([for udev version])
udev_ver=`udevinfo -V | awk '{ print $3 }'`
if test -n "$udev_ver"; then
  AC_MSG_RESULT([$udev_ver])
else
  AC_MSG_RESULT([none])
  udev_ver="0"
fi
if test "$udev_ver" -lt 057; then
  AC_MSG_ERROR([udev version 057 or later is required])
fi

AC_ARG_WITH([udev],
	    AS_HELP_STRING([--with-udev=dir],
			   [specify udev directory [[/etc/udev]]]),
	    [udev_dir="$withval"],
	    [udev_dir="/etc/udev"])
AC_CHECK_FILE([$udev_dir/udev.conf],
	      [udev_conf="$udev_dir/udev.conf"],
	      [udev_conf=""])

AC_MSG_CHECKING([for udev rules directory])
udev_rules=""
if test -r "$udev_conf"; then
  udev_rules=`. "$udev_conf"; echo "$udev_rules"`
fi
if test -n "$udev_rules"; then
  AC_MSG_RESULT([$udev_rules])
else
  udev_rules="$udev_dir/rules.d"
  AC_MSG_RESULT([not found; assuming $udev_rules])
fi
if test ! -d "$udev_rules"; then
  AC_MSG_ERROR([$udev_rules not found])
fi
AC_SUBST([UDEV_RULES_DIR], [$udev_rules])

AC_CONFIG_FILES(Makefile)
AC_OUTPUT