~ubuntu-branches/ubuntu/oneiric/modemmanager/oneiric-proposed

1 by Tony Espy
Import upstream version 0.2.git.20090806t105932.354a4cb
1
AC_PREREQ(2.52)
2
1.1.7 by Michael Biebl
Import upstream version 0.4+git.20100624t180933.6e79d15
3
AC_INIT(ModemManager, 0.4, dcbw@redhat.com, ModemManager)
1 by Tony Espy
Import upstream version 0.2.git.20090806t105932.354a4cb
4
AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar no-dist-gzip dist-bzip2])
5
AM_MAINTAINER_MODE
6
1.1.7 by Michael Biebl
Import upstream version 0.4+git.20100624t180933.6e79d15
7
AC_CONFIG_MACRO_DIR([m4])
8
1 by Tony Espy
Import upstream version 0.2.git.20090806t105932.354a4cb
9
AC_CONFIG_HEADERS(config.h)
10
11
dnl Required programs
12
AC_PROG_CC
13
AM_PROG_CC_C_O
14
AC_PROG_INSTALL
15
AC_PROG_LIBTOOL
16
1.1.7 by Michael Biebl
Import upstream version 0.4+git.20100624t180933.6e79d15
17
dnl Define _GNU_SOURCE for various things like strcasestr()
18
AC_GNU_SOURCE
19
20
dnl
21
dnl translation support
22
dnl
23
GETTEXT_PACKAGE=ModemManager
24
AC_SUBST(GETTEXT_PACKAGE)
25
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
26
IT_PROG_INTLTOOL([0.35.0])
27
AM_GLIB_GNU_GETTEXT
28
1.1.6 by Tony Espy
Import upstream version 0.3
29
PKG_CHECK_MODULES(MM, dbus-glib-1 >= 0.75 glib-2.0 >= 2.18 gmodule-2.0 gobject-2.0)
1 by Tony Espy
Import upstream version 0.2.git.20090806t105932.354a4cb
30
31
PKG_CHECK_MODULES(GUDEV, gudev-1.0)
32
AC_SUBST(GUDEV_CFLAGS)
33
AC_SUBST(GUDEV_LIBS)
34
35
AC_ARG_WITH(dbus-sys-dir, AS_HELP_STRING([--with-dbus-sys-dir=DIR], [where D-BUS system.d directory is]))
36
37
if test -n "$with_dbus_sys_dir" ; then
38
    DBUS_SYS_DIR="$with_dbus_sys_dir"
39
else
40
    DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
41
fi
42
AC_SUBST(DBUS_SYS_DIR)
43
44
AC_ARG_WITH(udev-base-dir, AS_HELP_STRING([--with-udev-base-dir=DIR], [where udev base directory is]))
45
46
if test -n "$with_udev_base_dir" ; then
47
    UDEV_BASE_DIR="$with_udev_base_dir"
48
else
49
    UDEV_BASE_DIR="/lib/udev"
50
fi
51
AC_SUBST(UDEV_BASE_DIR)
52
53
GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
54
AC_SUBST(GLIB_GENMARSHAL)
55
1.1.7 by Michael Biebl
Import upstream version 0.4+git.20100624t180933.6e79d15
56
# PolicyKit
57
AC_ARG_WITH(polkit, AS_HELP_STRING([--with-polkit], [Build with PolicyKit support]))
58
AM_CONDITIONAL(WITH_POLKIT, test "x$with_polkit" = "xyes")
59
case $with_polkit in
60
    yes)
61
        with_polkit=yes
62
	PKG_CHECK_MODULES(POLKIT, polkit-gobject-1 >= 0.95)
63
	AC_DEFINE(WITH_POLKIT, 1, [Define if you want to use PolicyKit])
64
	AC_SUBST(POLKIT_CFLAGS)
65
	AC_SUBST(POLKIT_LIBS)
66
        ;;
67
    *)
68
        with_polkit=no
69
        ;;
70
esac
71
1.1.6 by Tony Espy
Import upstream version 0.3
72
# PPPD
73
AC_CHECK_HEADERS(pppd/pppd.h, have_pppd_headers="yes", have_pppd_headers="no")
74
AM_CONDITIONAL(HAVE_PPPD_H, test "x$have_pppd_headers" = "xyes")
75
case $have_pppd_headers in
76
    yes) ;;
77
    *)
78
        have_pppd_headers=no
79
        ;;
80
esac
81
82
AC_ARG_WITH([pppd-plugin-dir], AS_HELP_STRING([--with-pppd-plugin-dir=DIR], [path to the pppd plugins directory]))
83
84
if test -n "$with_pppd_plugin_dir" ; then
85
	PPPD_PLUGIN_DIR="$with_pppd_plugin_dir"
86
else
1.1.7 by Michael Biebl
Import upstream version 0.4+git.20100624t180933.6e79d15
87
	PPPD_PLUGIN_DIR="${libdir}/pppd/2.4.5"
1.1.6 by Tony Espy
Import upstream version 0.3
88
fi
89
AC_SUBST(PPPD_PLUGIN_DIR)
90
1 by Tony Espy
Import upstream version 0.2.git.20090806t105932.354a4cb
91
AC_ARG_WITH(docs, AC_HELP_STRING([--with-docs], [Build ModemManager documentation]))
92
AM_CONDITIONAL(WITH_DOCS, test "x$with_docs" = "xyes")
93
case $with_docs in
94
       yes) ;;
95
       *)
96
               with_docs=no
97
               ;;
98
esac
99
1.1.6 by Tony Espy
Import upstream version 0.3
100
dnl
101
dnl Tests
102
dnl
103
AC_ARG_WITH(tests, AS_HELP_STRING([--with-tests], [Build ModemManager tests]))
104
AM_CONDITIONAL(WITH_TESTS, test "x$with_tests" = "xyes")
105
case $with_tests in
106
    yes)
107
        with_tests=yes
108
        ;;
109
    *)
110
        with_tests=no
111
        ;;
112
esac
113
1.1.7 by Michael Biebl
Import upstream version 0.4+git.20100624t180933.6e79d15
114
NM_COMPILER_WARNINGS
115
116
117
dnl
118
dnl dbus-glib >= 0.86 is required for Location API support
119
dnl
120
with_location_api=no
121
PKG_CHECK_MODULES(DBUS_GLIB, dbus-glib-1 >= 0.86, with_location_api="yes", with_location_api="no")
122
if test x"$with_location_api" = xyes; then
123
    AC_DEFINE(LOCATION_API, 1, [Define if you have dbus-glib 0.86 or higher])
124
else
125
    AC_MSG_WARN([dbus-glib >= 0.86 is required for Location API support])
126
fi
127
AM_CONDITIONAL(WITH_LOCATION_API, test "x$with_location_api" = "xyes")
128
129
dnl
130
dnl Distribution version string
131
dnl
132
AC_ARG_WITH(dist-version, AS_HELP_STRING([--with-dist-version=<mm-dist-version>], [Define the custom version (like distribution package name and revision)]), ac_distver=$withval, ac_distver="")
133
if ! test x"$ac_distver" = x""; then
134
  AC_DEFINE_UNQUOTED(MM_DIST_VERSION, "$ac_distver", [Define the distribution version string])
135
fi
136
1 by Tony Espy
Import upstream version 0.2.git.20090806t105932.354a4cb
137
AC_CONFIG_FILES([
138
Makefile
139
marshallers/Makefile
1.1.7 by Michael Biebl
Import upstream version 0.4+git.20100624t180933.6e79d15
140
libqcdm/Makefile
141
libqcdm/src/Makefile
142
libqcdm/tests/Makefile
1 by Tony Espy
Import upstream version 0.2.git.20090806t105932.354a4cb
143
src/Makefile
1.1.6 by Tony Espy
Import upstream version 0.3
144
src/tests/Makefile
1 by Tony Espy
Import upstream version 0.2.git.20090806t105932.354a4cb
145
plugins/Makefile
146
test/Makefile
147
introspection/Makefile
1.1.7 by Michael Biebl
Import upstream version 0.4+git.20100624t180933.6e79d15
148
po/Makefile.in
149
policy/Makefile
1 by Tony Espy
Import upstream version 0.2.git.20090806t105932.354a4cb
150
])
151
AC_OUTPUT
1.1.6 by Tony Espy
Import upstream version 0.3
152
153
echo
154
echo Building with D-Bus system directory: ${DBUS_SYS_DIR}
155
echo
156
echo Building with udev base directory: ${UDEV_BASE_DIR}
157
echo
158
echo Building documentation: ${with_docs}
159
echo
160
echo Building PPP-enabled tests: ${have_pppd_headers}
161
echo
1.1.7 by Michael Biebl
Import upstream version 0.4+git.20100624t180933.6e79d15
162
echo Building with PolicyKit support: ${with_polkit}
163
echo
164
echo Building with Location API support: ${with_location_api}
165
echo
1.1.6 by Tony Espy
Import upstream version 0.3
166