diff options
author | Christophe Fergeau <teuf@gnome.org> | 2007-11-06 19:44:12 +0000 |
---|---|---|
committer | Christophe Fergeau <teuf@gnome.org> | 2007-11-06 19:44:12 +0000 |
commit | c337b312b1d02df0ea9d1f3e6cd665070533306a (patch) | |
tree | 29077505b80812cf51abbed540c28c55e788825f /configure.ac | |
parent | 82aaab73264797b8b6f19110cb1020d0b2945d09 (diff) | |
download | libgpod-tmz-c337b312b1d02df0ea9d1f3e6cd665070533306a.tar.gz libgpod-tmz-c337b312b1d02df0ea9d1f3e6cd665070533306a.tar.xz libgpod-tmz-c337b312b1d02df0ea9d1f3e6cd665070533306a.zip |
* configure.ac:
* tools/20-libgpod-sysinfo-extended.fdi:
* tools/Makefile.am:
* tools/hal-callout.c:
* tools/ipod-scsi-inquiry.c:
* tools/read-sysinfoextended-sgutils.c: add hal callout which
automatically write SysinfoExtended to iPods when they are plugged
if it's properly installed
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1760 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e4a12fe..cdcff65 100644 --- a/configure.ac +++ b/configure.ac @@ -59,6 +59,23 @@ PKG_CHECK_MODULES(LIBGPOD, glib-2.0 >= 2.8.0 gobject-2.0) LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS -Wall" dnl ************************************************** +dnl * expand $libdir +dnl * by default, it looks like ${prefix}/lib +dnl * we want to expand prefix +dnl ************************************************** +expanded_libdir=`( + case $prefix in + NONE) prefix=$ac_default_prefix ;; + *) ;; + esac + case $exec_prefix in + NONE) exec_prefix=$prefix ;; + *) ;; + esac + eval echo $libdir +)` + +dnl ************************************************** dnl * sgutils is necessary to get the xml device file from the ipod dnl ************************************************** AC_CHECK_LIB(sgutils, sg_ll_inquiry, @@ -67,6 +84,37 @@ AC_CHECK_LIB(sgutils, sg_ll_inquiry, AC_SUBST(SGUTILS_LIBS) AM_CONDITIONAL(HAVE_SGUTILS, test x"$have_sgutils" = xyes) +dnl *********************************************************************** +dnl * HAL is optional, but is required if you want things to "just work" +dnl * when a recent iPod is plugged in +dnl * libgpod by itself doesn't use HAL at all, HAL is just used to build a +dnl * helper program which is then installed as a HAL callout +dnl *********************************************************************** +AC_ARG_WITH(hal, AC_HELP_STRING([--without-hal], + [Disable HAL support])) + +AC_ARG_WITH(hal_callouts_dir, AC_HELP_STRING([--with-hal-callouts-dir=DIR], + [Directory where HAL expects its callout scripts to be located]), , + with_hal_callouts_dir="${expanded_libdir}/hal") +HALCALLOUTSDIR="$with_hal_callouts_dir" +AC_SUBST(HALCALLOUTSDIR) + +if test "x$with_hal" != "xno"; then + PKG_CHECK_MODULES(HAL, hal >= 0.5 hal < 0.6, enable_hal=yes, enable_hal=no) + if test "x$enable_hal" != "xyes" -a "x$with_hal" = "xyes"; then + AC_MSG_ERROR([HAL support explicitly requested but HAL couldn't be found]) + fi + + if test "x$enable_hal" == "xyes"; then + AC_DEFINE(HAVE_HAL, 1, [Define if you have HAL support]) + AC_SUBST(HAL_CFLAGS) + AC_SUBST(HAL_LIBS) + fi +fi +AM_CONDITIONAL(HAVE_HAL, test x"$enable_hal" = xyes) + + + dnl ************************************************** dnl * TagLib is only used by test-rebuild-db dnl ************************************************** |