dnl Process this file with autoconf to produce a configure script. PACKAGE=gphoto VERSION=2.0beta2 libdir=${prefix}/lib/gphoto2 cargs=$@ AC_INIT(include/gphoto2.h) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(gphoto, 2.0beta2) AM_MAINTAINER_MODE dnl Checks for programs. AC_PROG_CC AC_PROG_CPP AM_PROG_LIBTOOL dnl The following is a hack to get gphoto2 to build on gettext-0.10.35 dnl systems - BUILD_INCLUDED_LIBINTL is set only in gettext-0.10.37 which is dnl the gettext version provided with gphoto2. BUILD_INCLUDED_LIBINTL=no AC_SUBST(BUILD_INCLUDED_LIBINTL) dnl Languages ALL_LINGUAS="de" AM_GNU_GETTEXT dnl Turn on debugging and all warnings CFLAGS="$CFLAGS -g -Wall -Wmissing-declarations -Wmissing-prototypes" LDFLAGS="$LDFLAGS -g -Wall" dnl Solaris hack for grep and tr changequote(, )dnl if test -n "`echo $host_os | grep [sS]olaris`"; then TR=/usr/xpg4/bin/tr GREP=/usr/xpg4/bin/grep else TR=tr GREP=grep fi changequote([, ])dnl dnl Hack to handle .libs subdirectories with old libtool if test $objdir = ".libs"; then echo ".libs subdirectory detected : \$dotlibs not defined" dotlibs="" else echo ".libs subdirectory not detected : \$dotlibs=.libs" dotlibs=".libs" fi dnl Checks for libraries. dnl Replace `main' with a function in -ldl: AC_CHECK_LIB(dl, main) dnl Replace `main' with a function in -libs: AC_CHECK_LIB(ibs, main) dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h stdio.h string.h stdlib.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T dnl Checks for library functions. AC_CHECK_FUNCS(mkdir strdup strncpy strcpy snprintf sprintf) echo "Using the bundled gphoto2_port library" LIBGPHOTO2_PORT_DIR="libgphoto2_port" CFLAGS="$CFLAGS -I`pwd`/libgphoto2_port/include"; LIBS="$LIBS -L`pwd`/libgphoto2_port/libgphoto2_port/@dotlibs@ -lgphoto2_port"; LIBGPHOTO2_INCLUDEDIR='-I${includedir}' LIBGPHOTO2_LIBDIR='-L${libdir}' LIBGPHOTO2_LIBS="-lgphoto2" LIBGPHOTO2_VERSION=$VERSION AC_SUBST(LIBGPHOTO2_PORT_DIR) AC_SUBST(LIBGPHOTO2_INCLUDEDIR) AC_SUBST(LIBGPHOTO2_LIBDIR) AC_SUBST(LIBGPHOTO2_LIBS) AC_SUBST(LIBGPHOTO2_VERSION) AC_SUBST(CFLAGS) AC_SUBST(LIBS) AC_SUBST(dotlibs) dnl Find out which drivers to compile camlibs='agfa-cl18 barbie canon dimera directory sierra konica panasonic digita kodak minolta stv0680 sonydscf1' AC_SUBST(SUBDIRS_CAMLIBS) for i in $camlibs; do d=`echo $i | $TR a-z A-Z` eval "CONFIG_DRIVER_$d=n" done AC_MSG_CHECKING(which drivers to compile) AC_ARG_WITH(drivers, [ --with-drivers= compile drivers in ; ] [ drivers may be separated with commas; ] [ 'all' compiles all drivers; ] [ possible drivers are: ] [ agfa-cl18, barbie, canon, digita, dimera, ] [ directory, kodak, konica, minolta, panasonic, ] [ sierra, sonydscf1 stv0680 ], drivers="$withval", drivers="all") if test "$drivers" = "all"; then for i in $camlibs; do d=`echo $i | $TR a-z A-Z` eval "CONFIG_DRIVER_$d=y" AC_DEFINE_UNQUOTED(CONFIG_DRIVER_$d) SUBDIRS_CAMLIBS="$SUBDIRS_CAMLIBS $i" done AC_MSG_RESULT(all) else drivers=`echo $drivers | sed 's/,/ /g'` for driver in $drivers; do if test -n "`echo $camlibs | $GREP -E \"(^| )$driver( |\$)\"`"; then d=`echo $driver | $TR a-z A-Z` eval "CONFIG_DRIVER_$d=y" AC_DEFINE_UNQUOTED(CONFIG_DRIVER_$d) SUBDIRS_CAMLIBS="$SUBDIRS_CAMLIBS $driver" else echo "Unknown driver $driver, exiting!" exit 1 fi done AC_MSG_RESULT($drivers) fi dnl ******** dnl gtk-doc? dnl ******** AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC) AC_SUBST(HAVE_GTK_DOC) AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto) if test x$enable_gtk_doc = xauto ; then if test x$GTKDOC = xtrue ; then enable_gtk_doc=yes else enable_gtk_doc=no fi fi AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ]) if test "x$with_html_dir" = "x" ; then HTML_DIR='${datadir}/gphoto2/html' else HTML_DIR=$with_html_dir fi AC_SUBST(HTML_DIR) dnl ************************* dnl Configure libgphoto2-port dnl ************************* AC_CONFIG_SUBDIRS(libgphoto2_port) AC_OUTPUT([ Makefile camlibs/Makefile camlibs/agfa-cl18/Makefile camlibs/barbie/Makefile camlibs/dimera/Makefile camlibs/sierra/Makefile camlibs/directory/Makefile camlibs/panasonic/Makefile camlibs/panasonic/l859/Makefile camlibs/konica/Makefile camlibs/digita/Makefile camlibs/canon/Makefile camlibs/sonydscf1/Makefile camlibs/kodak/Makefile camlibs/kodak/dc120/Makefile camlibs/kodak/dc240/Makefile camlibs/kodak/dc3200/Makefile camlibs/minolta/Makefile camlibs/minolta/dimagev/Makefile camlibs/sonydscf1/Makefile camlibs/stv0680/Makefile frontends/Makefile frontends/command-line/Makefile tests/Makefile include/Makefile libgphoto2/Makefile libgphoto2/libgphoto-2.0.pc gphoto2-config intl/Makefile po/Makefile.in doc/Makefile doc/api/Makefile ])