######################################################################## # $Id$ # # This file describes how to install gphoto2. ######################################################################## Follow these steps to build and install gphoto2 from the source code. You don't have to run most of these steps as root, except when explicitly required. In fact, you really shouldn't. In order to get gphoto2 running after installation, you will probably want to read doc/FAQ and doc/gphoto2.txt. ============================= Step 1: Configure the sources ============================= If you got your source tree from CVS (and not from a .tar.gz tarball), you will have to run ./autogen.sh instead of ./configure in this step. In this case, you will need to have the following software installed: - autoconf - automake (ver. >= 1.5) - libtool (ver. >= 1.4) Now run either one of ./configure --prefix=/usr/local to prepare a tarball source tree for installation in /usr/local ./autogen.sh --prefix=/usr/local to prepare a CVS source tree for installation in /usr/local ./configure --prefix=/home/me/root --with-drivers=ptp,canon to prepare a tarball source tree for installation in /home/me/root and for compilation only of the drivers for PTP and Canon cameras or run ./configure --help in order to find out about more configuration parameters. See Appendix A at the end of this file for some hints on configuring for certain platforms. The following software components are optional, and will improve the libraries' and/or command-line client's functionality if present: libusb (ver. >= 0.1.5) -- Universal Serial Bus camera support gettext (ver. >= 0.10.35) -- internationalization using shared library aalib -- picture preview cdk -- camera configuration dialogs gtk-doc -- documentation built in doc/api/ jpeglib -- JPEG picture preview libexif - EXIF tag support Please check the output of the configure script for whether all desired libraries have been detected correctly. E.g., you might have to add the path where libusb-config resides to your PATH before running configure. =========================== Step 2: Compile the program =========================== You will probably be best off running GNU make. On GNU/Linux linux systems, you can run "make", on other systems (such as *BSD), you will have to run "gmake" or something similar. The classic way to compile the program is just to run make and wait until the source is built. If you want to install gphoto2 using RPM, you should be able to run make rpm after making sure that CDPATH is unset. The RPM packages will be located in packaging/rpm/RPMS/. ============================== Step 3: Installing the program ============================== To install the stuff you just compiled by running "make", you can just run make install now. If installing to a directory which is not writable by your current user, you will have to run it as root. This installs the software and documentation into the proper directories on your system. In the case you're trying to use RPM packages, find the *.rpm files in packaging/rpm/RPMS/ and install them. ==================================================== Step 4: Installation is finished - now what do I do? ==================================================== Note that gphoto2 is not designed to be installed as a setuid/setgid program. Running ANY gphoto2 frontend as root or setuid root or in a similar fashion will open up a SECURITY HOLE in your system! Read doc/FAQ if you run into problems. Read doc/gphoto2.txt for more general information about how to configure gphoto2. If you have permission problems when accessing your camera, read doc/gphoto2.txt -- you will probably want to create a new user group for the users that are to have camera access and change the permissions of the serial or USB device to match. =============================================== Appendix A: Platform specific compilation hints =============================================== gphoto2 has been successfully used on many system. Some systems where it has been reported to successfully compile are listed below. Not all, or even any, camera libraries have been tested on these systems, so there may be endian other other issues that prevent some camera libraries from working. Please report any changes to this list to the gphoto2 developer mailing list. As of this writing, USB support is only available on Linux and FreeBSD as those are the only systems on which libusb is available. If you have build problems in the intl or po directories, try re-running configure with the --disable-nls flag. If configure stops due to an error with 'test', try re-running configure with the --without-usb flag. If 'make' reports an error, try using GNU make (often called gmake or gnumake) instead of the make that comes with your system. If one camera driver has compilation errors, re-run configure with an appropriate --with-drivers= flag to prevent that driver from being compiled. i386: Debian GNU/Linux 2.2 Red Hat Linux 7.1 Red Hat Linux 4.2 TurboLinux 6.5 Slackware Linux 8.0 FreeBSD 4.3 Try the following to configure the optional libraries: env CFLAGS="-I/usr/local/include" CPPFLAGS="-I/usr/local/include" \ LDFLAGS="-I/usr/local/lib" ./configure (you may also need to append the flag --disable-nls). Use GNU make to build (gmake). Alpha: Debian GNU/Linux 2.2 OpenBSD 3.0 NetBSD 1.5.1 Configure with this command: ./configure --disable-nls Use GNU make to build (gmake). Tru64 5.1A Configure with this command: env CFLAGS='-D__STDC_VERSION__=0' ./configure --disable-nls Use GNU make to build (gnumake). PowerPC: Debian GNU/Linux 2.2 Apple Darwin/OS X Need dlcompat from Configure with this command: env CFLAGS="-I/path/to/dlcompat -no-cpp-precomp" \ LDFLAGS="-L/path/to/dlcompat" ./configure --disable-nls Need libtool ver. >= 1.4.2a Sparc: Debian GNU/Linux 2.2 Solaris 8 (gcc) Configure with this command: ./configure --without-usb and use GNU make to build (gmake). StrongARM: Intimate+Debian iPAQ GNU/Linux (native gcc) Linux (cross-compiled gcc) Itanium: Red Hat 7.1 (gcc) The following systems have some problems compiling, but may be made to work with some effort: Itanium: Red Hat 7.1 (Intel ecc) There is a bug in ver. 5.0.1 of this compiler tickled by gphoto2 that prevents full compilation. Need better libtool support (newer than version 1.4.2). Red Hat 7.1 (sgicc) Need better libtool support (newer than version 1.4.2). Sparc: Solaris 8 (cc) Sun's cc doesn't support #warning or # or ## macro features, which occur several times in the code. Thanks go to SourceForge for their compile farm, and Compaq for their TestDrive program which allowed gphoto2 to be tested on many of these systems.