summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2009-04-14 19:52:33 +0200
committerKay Sievers <kay.sievers@vrfy.org>2009-04-14 19:52:33 +0200
commit655193fdbe876506009dbb4d87e4cc9bf3ab32d1 (patch)
tree65b2973e866860dfc15105950429f54a27f38f0f
parenta06e510fb08293c0e2b4bdd42e42f85f0107f387 (diff)
sync with and depend on recent udev
-rw-r--r--Makefile.am5
-rwxr-xr-xautogen.sh53
-rw-r--r--configure.ac77
3 files changed, 53 insertions, 82 deletions
diff --git a/Makefile.am b/Makefile.am
index 7243d3c..74d87fb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,12 +3,9 @@ include $(top_srcdir)/Makefile.am.inc
SUBDIRS = \
rules.d \
modem-modeswitch \
+ usb-db \
udev-acl
-if WITH_USB_DB
-SUBDIRS += usb-db
-endif
-
ACLOCAL_AMFLAGS = -I m4
clean-local:
diff --git a/autogen.sh b/autogen.sh
index 9b803da..fb96d4a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,20 +1,39 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
+#!/bin/sh -e
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-REQUIRED_AUTOMAKE_VERSION=1.9
-PKG_NAME=udev-extras
+autoreconf --install --symlink
-(test -f $srcdir/configure.ac \
- && test -f $srcdir/modem-modeswitch/modem-modeswitch.c) || {
- echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
- echo " top-level $PKG_NAME directory"
- exit 1
-}
-
-(cd $srcdir;
- autoreconf --install --symlink
- ./configure $@
-)
+CFLAGS="-g -Wall \
+-Wmissing-declarations -Wmissing-prototypes \
+-Wnested-externs -Wpointer-arith \
+-Wpointer-arith -Wsign-compare -Wchar-subscripts \
+-Wstrict-prototypes -Wshadow \
+-Wformat=2 -Wtype-limits"
+args="--prefix=/usr --exec-prefix= --sysconfdir=/etc --with-selinux"
+libdir=$(basename $(cd /lib/$(gcc -print-multi-os-directory); pwd))
+case "$1" in
+ *install|"")
+ args="$args --with-libdir-name=$libdir"
+ export CFLAGS="$CFLAGS -O2"
+ echo " configure: $args"
+ echo
+ ./configure $args
+ ;;
+ *devel)
+ args="$args --enable-debug --with-libdir-name=$libdir"
+ export CFLAGS="$CFLAGS -O0"
+ echo " configure: $args"
+ echo
+ ./configure $args
+ ;;
+ *clean)
+ ./configure
+ make maintainer-clean
+ git clean -f -X
+ exit 0
+ ;;
+ *)
+ echo "Usage: $0 [--install|--devel|--clean]"
+ exit 1
+ ;;
+esac
diff --git a/configure.ac b/configure.ac
index 48d6a2d..bd09005 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
AC_INIT([udev-extras],
- [20090226],
+ [20090414],
[linux-hotplug@vger.kernel.org])
AC_PREREQ(2.60)
AM_INIT_AUTOMAKE([check-news foreign 1.9 subdir-objects dist-bzip2])
@@ -17,57 +17,16 @@ dnl prefix is /usr, exec_prefix in /, if overridden exec_prefix follows prefix
AC_PREFIX_DEFAULT([/usr])
test "$prefix" = NONE && test "$exec_prefix" = NONE && exec_prefix=
-dnl ensure that when the Automake generated makefile calls aclocal,
-dnl it honours the $ACLOCAL_FLAGS environment variable
-ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
-if test -n "$ac_macro_dir"; then
- ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
-fi
-AC_SUBST([ACLOCAL_AMFLAGS])
-
PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.12)
AC_SUBST(LIBUSB_CFLAGS)
AC_SUBST(LIBUSB_LIBS)
-AC_ARG_WITH(usb-db, AC_HELP_STRING([--with-usb-db], [Build modem prober]),[],[with_usb_db=yes])
-AM_CONDITIONAL(WITH_USB_DB, test "x$with_usb_db" = "xyes")
-if test "x$with_usb_db" = "xyes"; then
- PKG_CHECK_MODULES(LIBUDEV, libudev)
- AC_SUBST(LIBUDEV_CFLAGS)
- AC_SUBST(LIBUDEV_LIBS)
-fi
+PKG_CHECK_MODULES(LIBUDEV, libudev >= 141)
+AC_SUBST(LIBUDEV_CFLAGS)
+AC_SUBST(LIBUDEV_LIBS)
AC_PATH_PROG([XSLTPROC], [xsltproc])
-AC_ARG_ENABLE(more-warnings,
-AS_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]), set_more_warnings="$enableval",set_more_warnings=yes)
-AC_MSG_CHECKING(for more warnings, including -Werror)
-if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
- AC_MSG_RESULT(yes)
- CFLAGS="-Wall -Werror $CFLAGS"
-
- for option in -Wshadow -Wmissing-declarations -Wmissing-prototypes \
- -Wdeclaration-after-statement -Wstrict-prototypes \
- -Wfloat-equal -Wno-unused-parameter -Wno-sign-compare \
- -fno-strict-aliasing; do
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $option"
- AC_MSG_CHECKING([whether gcc understands $option])
- AC_TRY_COMPILE([], [],
- has_option=yes,
- has_option=no,)
- if test $has_option = no; then
- CFLAGS="$SAVE_CFLAGS"
- fi
- AC_MSG_RESULT($has_option)
- unset has_option
- unset SAVE_CFLAGS
- done
- unset option
-else
- AC_MSG_RESULT(no)
-fi
-
AC_ARG_WITH(udev-prefix,
AS_HELP_STRING([--with-udev-prefix=DIR], [add prefix to internal udev path names]),
[], [with_udev_prefix='${exec_prefix}'])
@@ -79,31 +38,27 @@ AC_DEFINE(LIBUDEV_I_KNOW_THE_API_IS_SUBJECT_TO_CHANGE, 1, [I know the API is sub
AC_CHECK_FILES([/usr/share/usb.ids], [usbids=/usr/share/usb.ids])
AC_CHECK_FILES([/usr/share/hwdata/usb.ids], [usbids=/usr/share/hwdata/usb.ids])
AC_CHECK_FILES([/usr/share/misc/usb.ids], [usbids=/usr/share/misc/usb.ids])
-
AC_ARG_WITH(usb-ids-path,
AS_HELP_STRING([--usb-ids-path=DIR], [Path to usb.ids file]),
[USB_DATABASE=${withval}],
- [if test -n "$usbids" ; then
- USB_DATABASE="$usbids"
- else
- AC_MSG_ERROR([usb.ids not found, try --with-usb-ids-path=])
- fi])
-
+ [if test -n "$usbids" ; then
+ USB_DATABASE="$usbids"
+ else
+ AC_MSG_ERROR([usb.ids not found, try --with-usb-ids-path=])
+ fi])
AC_SUBST(USB_DATABASE)
AC_CHECK_FILES([/usr/share/pci.ids], [pciids=/usr/share/pci.ids])
AC_CHECK_FILES([/usr/share/hwdata/pci.ids], [pciids=/usr/share/hwdata/pci.ids])
AC_CHECK_FILES([/usr/share/misc/pci.ids], [pciids=/usr/share/misc/pci.ids])
-
AC_ARG_WITH(pci-ids-path,
AS_HELP_STRING([--pci-ids-path=DIR], [Path to pci.ids file]),
[PCI_DATABASE=${withval}],
- [if test -n "$pciids" ; then
- PCI_DATABASE="$pciids"
- else
- AC_MSG_ERROR([pci.ids not found, try --with-pci-ids-path=])
- fi])
-
+ [if test -n "$pciids" ; then
+ PCI_DATABASE="$pciids"
+ else
+ AC_MSG_ERROR([pci.ids not found, try --with-pci-ids-path=])
+ fi])
AC_SUBST(PCI_DATABASE)
AC_CONFIG_FILES([
@@ -125,8 +80,8 @@ echo "
datarootdir: ${datarootdir}
mandir: ${mandir}
- usb.ids: ${USB_DATABASE}
- pci.ids: ${PCI_DATABASE}
+ usb.ids: ${USB_DATABASE}
+ pci.ids: ${PCI_DATABASE}
compiler: ${CC}
cflags: ${CFLAGS}