File: configure.ac

package info (click to toggle)
libipoddevice 0.5.3-3.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,648 kB
  • ctags: 279
  • sloc: sh: 8,757; ansic: 2,722; makefile: 56
file content (80 lines) | stat: -rw-r--r-- 1,912 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
AC_PREREQ(2.52)

AC_INIT(src/ipod-device.c)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_SRCDIR(src)
AM_INIT_AUTOMAKE(libipoddevice, 0.5.3)

AM_MAINTAINER_MODE
AC_PROG_CC
AC_ISC_POSIX
AC_HEADER_STDC
AM_PROG_LIBTOOL

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])

GNOME_DEBUG_CHECK
GNOME_COMPILE_WARNINGS(error)
AM_PATH_GLIB_2_0

dnl Pkgconfig
PKG_CHECK_MODULES(LID,
	gobject-2.0 \
	glib-2.0 >= 2.6.0 \
	dbus-1 \
	dbus-glib-1 \
	hal >= 0.5.2 \
	libgtop-2.0 >= 2.12.0 \
	libxml-2.0)
AC_SUBST(LID_CFLAGS)
AC_SUBST(LID_LIBS)

PKG_CHECK_MODULES(HAL, hal >= 0.5.6, hal_eject=yes, hal_eject=no)
if test "x$hal_eject" = "xyes"; then
	AC_DEFINE([HAVE_HAL_EJECT], [1], [Have a HAL that supports DBus Methods])
fi

AC_CHECK_LIB(sgutils, sg_ll_inquiry, HAL_IPOD_INFO_LIBS="-lsgutils",
	AC_MSG_ERROR([Error! You need to have libsgutils.])
)

AC_SUBST(HAL_IPOD_INFO_LIBS)


AC_OUTPUT([
Makefile
ipoddevice.pc
src/Makefile
data/Makefile
])

echo "
        libipoddevice has been configured as follows: 

        Install Prefix:     ${prefix}"

if test "x$hal_eject" = "xyes"; then
echo "
        Using HAL for ejecting
"
else
echo "
        Unmount command:    $unmount_command
        Eject command:      $eject_command
"
fi