Permalink
Browse files

gzipped usb.ids (from Aurelien Jarno); regen config/install stuff

  • Loading branch information...
1 parent ba1b0d3 commit 0b5d5ee003d13b5f828010a1b7f65fa946ae9704 David Brownell committed Dec 10, 2006
Showing with 209 additions and 51 deletions.
  1. +4 −0 ChangeLog
  2. +14 −4 Makefile.am
  3. +22 −39 Makefile.in
  4. +3 −0 config.h.in
  5. +112 −1 configure
  6. +19 −0 configure.in
  7. +17 −2 lsusb.c
  8. +18 −5 names.c
View
@@ -1,3 +1,7 @@
+2006-12-10 Aurelien Jarno <aurelien@aurel32.net>
+ * lsusb.c, names.c, Makefile.am, configure.in: gzipped usb.ids
+ * configure, other autoconf stuff: regenerate
+
2006-12-10 David Brownell <dbrownell@users.sourceforge.net>
* lsusb.c: bugfix GUID printing; byteorder matches rfc 4122
* usb.ids: update to current version
View
@@ -1,6 +1,6 @@
# Process this file with 'automake' to create 'Makefile.in'
-AM_CPPFLAGS = -DUSBIDS_FILE='"@datadir@/usb.ids"'
+AM_CPPFLAGS = -DUSBIDS_DIR='"@datadir@"'
AM_CFLAGS = -Wall -W -Wunused
@@ -11,10 +11,20 @@ lsusb_SOURCES = lsusb.c \
devtree.c devtree.h list.h \
usbmisc.c usbmisc.h
-data_DATA = usb.ids
-
man_MANS = lsusb.8
+install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(datadir)
+if HAVE_ZLIB
+ gzip -c -9 $(srcdir)/usb.ids > $(DESTDIR)$(datadir)/usb.ids.gz
+else
+ $(INSTALL_DATA) $(srcdir)/usb.ids $(DESTDIR)$(datadir)/usb.ids
+endif
+
+uninstall-local:
+ rm -f $(DESTDIR)$(datadir)/usb.ids $(DESTDIR)$(datadir)/usb.ids.gz
+ rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(datadir) >/dev/null 2>&1
+
# usbmodules is needed only with 2.4 based hotplugging, and is OBSOLETE
# EXTRA_PROGRAMS = usbmodules
@@ -27,4 +37,4 @@ man_MANS = lsusb.8
# man_MANS += usbmodules.8
#endif
-EXTRA_DIST = $(man_MANS) $(data_DATA) update-usbids.sh
+EXTRA_DIST = $(man_MANS) usb.ids update-usbids.sh
View
@@ -16,7 +16,6 @@
# Process this file with 'automake' to create 'Makefile.in'
-
SOURCES = $(lsusb_SOURCES)
srcdir = @srcdir@
@@ -44,7 +43,7 @@ subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
- compile depcomp install-sh missing mkinstalldirs
+ depcomp install-sh missing mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -54,8 +53,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" \
- "$(DESTDIR)$(datadir)"
+am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"
sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(sbin_PROGRAMS)
am_lsusb_OBJECTS = lsusb.$(OBJEXT) names.$(OBJEXT) devtree.$(OBJEXT) \
@@ -74,14 +72,6 @@ DIST_SOURCES = $(lsusb_SOURCES)
man8dir = $(mandir)/man8
NROFF = nroff
MANS = $(man_MANS)
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-dataDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(data_DATA)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -117,6 +107,8 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+HAVE_ZLIB_FALSE = @HAVE_ZLIB_FALSE@
+HAVE_ZLIB_TRUE = @HAVE_ZLIB_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -171,14 +163,13 @@ sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-AM_CPPFLAGS = -DUSBIDS_FILE='"@datadir@/usb.ids"'
+AM_CPPFLAGS = -DUSBIDS_DIR='"@datadir@"'
AM_CFLAGS = -Wall -W -Wunused
lsusb_SOURCES = lsusb.c \
names.c names.h \
devtree.c devtree.h list.h \
usbmisc.c usbmisc.h
-data_DATA = usb.ids
man_MANS = lsusb.8
# usbmodules is needed only with 2.4 based hotplugging, and is OBSOLETE
@@ -192,7 +183,7 @@ man_MANS = lsusb.8
# sbin_PROGRAMS += usbmodules
# man_MANS += usbmodules.8
#endif
-EXTRA_DIST = $(man_MANS) $(data_DATA) update-usbids.sh
+EXTRA_DIST = $(man_MANS) usb.ids update-usbids.sh
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -345,23 +336,6 @@ uninstall-man8:
echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \
rm -f "$(DESTDIR)$(man8dir)/$$inst"; \
done
-install-dataDATA: $(data_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(datadir)" || $(mkdir_p) "$(DESTDIR)$(datadir)"
- @list='$(data_DATA)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(dataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(datadir)/$$f'"; \
- $(dataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/$$f"; \
- done
-
-uninstall-dataDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(data_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(datadir)/$$f'"; \
- rm -f "$(DESTDIR)$(datadir)/$$f"; \
- done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -539,9 +513,9 @@ distcleancheck: distclean
exit 1; } >&2
check-am: all-am
check: check-am
-all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) config.h
+all-am: Makefile $(PROGRAMS) $(MANS) config.h
installdirs:
- for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(datadir)"; do \
+ for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(man8dir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
@@ -589,7 +563,7 @@ info: info-am
info-am:
-install-data-am: install-dataDATA install-man
+install-data-am: install-data-local install-man
install-exec-am: install-sbinPROGRAMS
@@ -618,7 +592,7 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-dataDATA uninstall-info-am uninstall-man \
+uninstall-am: uninstall-info-am uninstall-local uninstall-man \
uninstall-sbinPROGRAMS
uninstall-man: uninstall-man8
@@ -629,15 +603,24 @@ uninstall-man: uninstall-man8
distclean distclean-compile distclean-generic distclean-hdr \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dataDATA install-exec \
+ install-data install-data-am install-data-local install-exec \
install-exec-am install-info install-info-am install-man \
install-man8 install-sbinPROGRAMS install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-dataDATA uninstall-info-am \
- uninstall-man uninstall-man8 uninstall-sbinPROGRAMS
+ uninstall-am uninstall-info-am uninstall-local uninstall-man \
+ uninstall-man8 uninstall-sbinPROGRAMS
+
+
+install-data-local:
+ $(mkinstalldirs) $(DESTDIR)$(datadir)
+@HAVE_ZLIB_TRUE@ gzip -c -9 $(srcdir)/usb.ids > $(DESTDIR)$(datadir)/usb.ids.gz
+@HAVE_ZLIB_FALSE@ $(INSTALL_DATA) $(srcdir)/usb.ids $(DESTDIR)$(datadir)/usb.ids
+uninstall-local:
+ rm -f $(DESTDIR)$(datadir)/usb.ids $(DESTDIR)$(datadir)/usb.ids.gz
+ rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(datadir) >/dev/null 2>&1
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
View
@@ -43,6 +43,9 @@
/* Define to 1 if you have the `usb' library (-lusb). */
#undef HAVE_LIBUSB
+/* Define to 1 if you have the `z' library (-lz). */
+#undef HAVE_LIBZ
+
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
View
113 configure
@@ -309,7 +309,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S ALLOCA CPP EGREP LIBOBJS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S ALLOCA CPP EGREP LIBOBJS HAVE_ZLIB_TRUE HAVE_ZLIB_FALSE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -849,6 +849,7 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
+ --disable-zlib disable support for zlib
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
@@ -5149,6 +5150,107 @@ echo "$as_me: error: get libusb 0.1.8 or newer" >&2;}
fi
+
+USE_ZLIB=yes
+# Check whether --enable-zlib or --disable-zlib was given.
+if test "${enable_zlib+set}" = set; then
+ enableval="$enable_zlib"
+
+ if eval "test x$enable_zlib = xno"; then
+ USE_ZLIB=
+ fi
+
+fi;
+if test "$USE_ZLIB" = "yes" ; then
+
+echo "$as_me:$LINENO: checking for inflateEnd in -lz" >&5
+echo $ECHO_N "checking for inflateEnd in -lz... $ECHO_C" >&6
+if test "${ac_cv_lib_z_inflateEnd+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char inflateEnd ();
+int
+main ()
+{
+inflateEnd ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_z_inflateEnd=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_z_inflateEnd=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateEnd" >&5
+echo "${ECHO_T}$ac_cv_lib_z_inflateEnd" >&6
+if test $ac_cv_lib_z_inflateEnd = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+ LIBS="-lz $LIBS"
+
+fi
+
+ if test "${ac_cv_lib_z_inflateEnd}" = "yes" ; then
+ HAVE_ZLIB="yes"
+ fi
+fi
+
+
+if test x$HAVE_ZLIB = xyes; then
+ HAVE_ZLIB_TRUE=
+ HAVE_ZLIB_FALSE='#'
+else
+ HAVE_ZLIB_TRUE='#'
+ HAVE_ZLIB_FALSE=
+fi
+
+
#AC_ARG_ENABLE(usbmodules,
# [ --enable-usbmodules build usbmodules (for Linux 2.4)],
# [ case "${enableval}" in
@@ -5290,6 +5392,13 @@ echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${HAVE_ZLIB_TRUE}" && test -z "${HAVE_ZLIB_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"HAVE_ZLIB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HAVE_ZLIB\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -5872,6 +5981,8 @@ s,@ALLOCA@,$ALLOCA,;t t
s,@CPP@,$CPP,;t t
s,@EGREP@,$EGREP,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
+s,@HAVE_ZLIB_TRUE@,$HAVE_ZLIB_TRUE,;t t
+s,@HAVE_ZLIB_FALSE@,$HAVE_ZLIB_FALSE,;t t
s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t
View
@@ -34,6 +34,25 @@ AC_CHECK_FUNCS([getcwd memset getopt_long strchr strerror strstr strtoul uname])
AC_CHECK_LIB(usb, usb_get_string_simple, ,
[AC_MSG_ERROR(get libusb 0.1.8 or newer)])
+
+dnl zlib on enabled by default (if found)
+USE_ZLIB=yes
+AC_ARG_ENABLE(zlib,
+ AC_HELP_STRING([--disable-zlib],
+ [disable support for zlib]),
+ [
+ if eval "test x$enable_zlib = xno"; then
+ USE_ZLIB=
+ fi
+ ])
+if test "$USE_ZLIB" = "yes" ; then
+ AC_CHECK_LIB(z, inflateEnd)
+ if test "${ac_cv_lib_z_inflateEnd}" = "yes" ; then
+ HAVE_ZLIB="yes"
+ fi
+fi
+AM_CONDITIONAL(HAVE_ZLIB, test x$HAVE_ZLIB = xyes)
+
#AC_ARG_ENABLE(usbmodules,
# [ --enable-usbmodules build usbmodules (for Linux 2.4)],
# [ case "${enableval}" in
Oops, something went wrong.

0 comments on commit 0b5d5ee

Please sign in to comment.