From 1e11739a2d1cdd202700f78e358fc315533659a3 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Tue, 8 Nov 2005 09:22:07 +0000 Subject: 2005-11-08 Christophe Fergeau * configure.ac: fixed hal detection, stole a bit more autoconf-fu from libipoddevice so that ipod-device.c compiles when hal is detected git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1146 f01d2545-417e-4e96-918e-98f8d0dbbcb6 --- ChangeLog | 5 +++++ configure.ac | 25 ++++++++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 996627a..338732f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-08 Christophe Fergeau + + * configure.ac: fixed hal detection, stole a bit more autoconf-fu from + libipoddevice so that ipod-device.c compiles when hal is detected + 2005-11-08 Christophe Fergeau * src/hal-common.c: diff --git a/configure.ac b/configure.ac index 8642b01..1fd18fb 100644 --- a/configure.ac +++ b/configure.ac @@ -72,13 +72,32 @@ dnl ************************************************** dnl * hal is optional dnl ************************************************** -PKG_CHECK_MODULES(HAL, hal >= 0.5.2 hal < 0.6, enable_hal05=yes, enable_hal05=no) -if test x$enable_hal05 != xyes; then - AC_DEFINE_UNQUOTED(HAVE_HAL, 1, [Whether HAL is available or not]) +PKG_CHECK_MODULES(HAL, dbus-1 dbus-glib-1 hal >= 0.5.2 hal < 0.6, enable_hal05=yes, enable_hal05=no) +if test x$enable_hal05 == xyes; then + AC_DEFINE_UNQUOTED(HAVE_LIBHAL, 1, [Whether HAL is available or not]) fi LIBGPOD_CFLAGS="$LIBGPOD_CFLAGS $HAL_CFLAGS" LIBGPOD_LIBS="$LIBGPOD_LIBS $HAL_LIBS" +dnl ************************************************** +dnl * necessary for the HAL libipoddevice code +dnl ************************************************** +AC_PATH_PROG(EJECT_PATH, eject, eject) +AC_PATH_PROG(UNMOUNT_PATH, pumount, no) + +if test "x$UNMOUNT_PATH" = "xno"; then + AC_PATH_PROG(UNMOUNT_PATH_ALT, umount, umount) + UNMOUNT_PATH=$UNMOUNT_PATH_ALT +fi + +AC_ARG_WITH(eject-command, AC_HELP_STRING(--with-eject-command], [Command to invoke in order to eject a device]), + eject_command="$withval", eject_command="${EJECT_PATH} %d") +AC_DEFINE_UNQUOTED([EJECT_COMMAND], ["${eject_command}"], [eject command]) + +AC_ARG_WITH(unmount-command, AC_HELP_STRING(--with-unmount-command], [Command to invoke in order to unmount a device]), + unmount_command="$withval", unmount_command="${UNMOUNT_PATH} %d") +AC_DEFINE_UNQUOTED([UNMOUNT_COMMAND], ["${unmount_command}"], [unmount command]) + dnl ************************************************** dnl * internationalization support -- cgit