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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
AC_INIT([fsogsmd], [0.3.0], [smartphones-userland@linuxtogo.org], [fsogsmd])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([dist-bzip2])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_PROG_CC
AM_PROG_CC_C_O
AC_GNU_SOURCE
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
# pkg-config requirements
PKG_PROG_PKG_CONFIG
VALA_REQUIRED=0.7.8
GLIB_REQUIRED=2.18.0
GEE_REQUIRED=0.5.0
XML_REQUIRED=2.7.3
DBUS_REQUIRED=1.2.1
DBUS_GLIB_REQUIRED=0.76
GSMMUX_REQUIRED=0.3.4
FSO_GLIB_REQUIRED=0.2.0
FSO_FRAMEWORK_REQUIRED=0.2.3
FSO_TRANSPORT_REQUIRED=0.9.5.9
FSO_RESOURCE_REQUIRED=0.1.0
# vala
AC_PATH_PROG(VALAC, valac, valac)
AC_SUBST(VALAC)
PKG_CHECK_MODULES(VALA,
vala-1.0 >= $VALA_REQUIRED)
# glib and friends
PKG_CHECK_MODULES(GLIB,
glib-2.0 >= $GLIB_REQUIRED
gobject-2.0 >= $GLIB_REQUIRED
gio-2.0 >= $GLIB_REQUIRED)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
# gee
PKG_CHECK_MODULES(GEE,
gee-1.0 >= $GEE_REQUIRED)
AC_SUBST(GEE_CFLAGS)
AC_SUBST(GEE_LIBS)
# dbus and dbus-glib
PKG_CHECK_MODULES(DBUS,
dbus-1 >= $DBUS_REQUIRED
dbus-glib-1 >= $DBUS_GLIB_REQUIRED)
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
# dbus conf directory
DBUS_DIR="`$PKG_CONFIG --variable=sysconfdir dbus-1`"
if (test -z "{DBUS_DIR}"); then
DBUS_DIR="${sysconfdir}/dbus-1"
else
DBUS_DIR="$DBUS_DIR/dbus-1"
fi
AC_SUBST(DBUS_DIR)
# dbus service directory
DBUS_SERVICE_DIR="`$PKG_CONFIG --variable=session_bus_services_dir dbus-1`"
if (test -z "{DBUS_SERVICE_DIR}"); then
DBUS_SERVICE_DIR="${datadir}/dbus-1/services"
fi
AC_SUBST(DBUS_SERVICE_DIR)
# gsm0710mux
PKG_CHECK_MODULES(GSMMUX,
gsm0710mux-1.0 >= $GSMMUX_REQUIRED)
AC_SUBST(GSMMUX_CFLAGS)
AC_SUBST(GSMMUX_LIBS)
# fso-glib and framework
PKG_CHECK_MODULES(FSO,
fso-glib-1.0 >= $FSO_GLIB_REQUIRED
fsoframework-2.0 >= $FSO_FRAMEWORK_REQUIRED
fsotransport-2.0 >= $FSO_TRANSPORT_REQUIRED
fsoresource-2.0 >= $FSO_RESOURCE_REQUIRED)
AC_SUBST(FSO_CFLAGS)
AC_SUBST(FSO_LIBS)
# datadir
if test "x$prefix" != "xNONE"; then
pkgdatadir='${prefix}/share/fsogsmd'
else
pkgdatadir='/usr/local/share/fsogsmd'
fi
eval PACKAGE_DATADIR="${pkgdatadir}"
AC_DEFINE_UNQUOTED([PACKAGE_DATADIR], ["${PACKAGE_DATADIR}"], [Shared data directory])
# check for debugging
AC_ARG_ENABLE(debug,
[ --enable-debug Enable debug build (default=disabled)],
debug="yes", debug="no")
AM_CONDITIONAL( [WANT_DEBUG], [test x"$debug" = x"yes"])
# git version
GITV=`cat ../.git/refs/heads/master || echo "unknown"`
AC_DEFINE_UNQUOTED([PACKAGE_GITV], ["${GITV}"], [git version])
AC_CONFIG_FILES([
Makefile
src/Makefile
src/lib/Makefile
src/bin/Makefile
src/plugins/Makefile
src/plugins/dbus_service/Makefile
src/plugins/lowlevel_openmoko/Makefile
src/plugins/modem_cinterion_mc75/Makefile
src/plugins/modem_singleline/Makefile
src/plugins/modem_ti_calypso/Makefile
src/plugins/modem_qualcomm_htc/Makefile
data/Makefile
data/org.freesmartphone.ogsmd.service
tests/Makefile
])
AC_OUTPUT
# info
echo
echo
echo
echo "------------------------------------------------------------------------"
echo "$PACKAGE_NAME $PACKAGE_VERSION-$GITV"
echo "------------------------------------------------------------------------"
echo
echo "Configuration Options:"
echo
echo " shared data directory...: $pkgdatadir"
echo
echo " debug build.............: $debug"
echo
echo " prefix..................: $prefix"
echo
echo "------------------------------------------------------------------------"
echo
echo "Now type 'make' to compile and 'make install' to install this package."
|