/branches/0.1.10/libusb/INSTALL.libusb.in

# · Autoconf · 59 lines · 41 code · 18 blank · 0 comment · 2 complexity · 7c1dbdf9ef3f8146d9a1edff44d41f93 MD5 · raw file

  1. Simple install procedure
  2. ========================
  3. % gzip -cd libusb-@LIBUSB_VERSION@.tar.gz | tar xvf - # unpack the sources
  4. % cd libusb-@LIBUSB_VERSION@ # change to the toplevel directory
  5. % ./configure # run the `configure' script
  6. % make # build libusb
  7. [ Become root if necessary ]
  8. % make install # install libusb
  9. The Nitty-Gritty
  10. ================
  11. The 'configure' script can be given a number of options to enable
  12. and disable various features. For a complete list, type:
  13. ./configure --help
  14. A few of the more important ones:
  15. * --prefix=PREFIX install architecture-independent files in PREFIX
  16. [ Defaults to /usr/local ]
  17. * --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  18. [ Defaults to the value given to --prefix ]
  19. Options can be given to the compiler and linker by setting
  20. environment variables before running configure. A few of the more
  21. important ones:
  22. CC : The C compiler to use
  23. CPPFLAGS : Flags for the C preprocesser such as -I and -D
  24. CFLAGS : C compiler flags
  25. The most important use of this is to set the
  26. optimization/debugging flags. For instance, to compile with no
  27. debugging information at all, run configure as:
  28. CFLAGS=-O2 ./configure # Bourne compatible shells (sh/bash/zsh)
  29. or,
  30. setenv CFLAGS -O2 ; ./configure # csh and variants
  31. Installation directories
  32. ========================
  33. The location of the installed files is determined by the --prefix
  34. and --exec-prefix options given to configure. There are also more
  35. detailed flags to control individual directories. However, the
  36. use of these flags is not tested.
  37. A shell script libusb-config is created during the configure
  38. process, and installed in the bin/ directory
  39. ($exec_prefix/bin). This is used to determine the location of libusb
  40. when building applications. If you move libusb after installation,
  41. it will be necessary to edit this file.