Skip to content

Latest commit

 

History

History
113 lines (94 loc) · 3.99 KB

configure.ac

File metadata and controls

113 lines (94 loc) · 3.99 KB
 
Apr 22, 2016
Apr 22, 2016
1
AC_INIT([usb_moded], [0.85.7])
Mar 22, 2011
Mar 22, 2011
2
3
4
5
6
7
8
9
10
11
12
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AM_CONFIG_HEADER([config.h])
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_C_CONST
AC_HEADER_STDC
Sep 15, 2014
Sep 15, 2014
13
14
AM_PROG_CC_C_O
Mar 22, 2011
Mar 22, 2011
15
test_gcc_flag() {
Mar 1, 2012
Mar 1, 2012
16
# AC_LANG_CONFTEST([int main() {}])
Mar 22, 2011
Mar 22, 2011
17
18
19
20
21
22
$CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
ret=$?
rm -f conftest.o
return $ret
}
Aug 15, 2012
Aug 15, 2012
23
24
# We use gnu99 instead of c99 because many have interpreted the standard
# in a way that int64_t isn't defined on non-64 bit platforms.
Dec 10, 2014
Dec 10, 2014
25
CFLAGS="-Os -std=gnu99 -Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wno-unused-parameter -finline-small-functions -Wno-unused-result -fstack-protector -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now -fPIE -fpie -pie"
Mar 22, 2011
Mar 22, 2011
26
27
28
AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug],[Enable debug @<:@default=false@:>@]),
[case "${enableval}" in
Sep 24, 2015
Sep 24, 2015
29
yes) debug=true ; CFLAGS="-g -ggdb -DDEBUG $CFLAGS" ;;
Mar 22, 2011
Mar 22, 2011
30
31
32
33
34
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
esac],[debug=false])
AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
Jan 13, 2012
Jan 13, 2012
35
36
AC_ARG_ENABLE([meegodevlock], AS_HELP_STRING([--enable-meegodevlock], [Enable Meego devicelock @<:@default=false@:>@]),
[case "${enableval}" in
Mar 1, 2012
Mar 1, 2012
37
yes) meegodevlock=true ; CFLAGS="-DMEEGOLOCK $CFLAGS" ;;
Jan 13, 2012
Jan 13, 2012
38
39
40
no) meegodevlock=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-meegodevlock]) ;;
esac],[meegodevlock=false])
Mar 1, 2012
Mar 1, 2012
41
AM_CONDITIONAL([MEEGOLOCK], [test x$meegodevlock = xtrue])
Jan 13, 2012
Jan 13, 2012
42
Aug 14, 2013
Aug 14, 2013
43
AC_ARG_ENABLE([app_sync], AS_HELP_STRING([--enable-app-sync], [Enable application syncing @<:@default=true@:>@]),
Mar 22, 2011
Mar 22, 2011
44
45
46
[case "${enableval}" in
yes) app_sync=true ; CFLAGS="-DAPP_SYNC $CFLAGS" ;;
no) app_sync=false ;;
Mar 1, 2012
Mar 1, 2012
47
*) AC_MSG_ERROR([bad value ${enableval} for --enable-app-sync]) ;;
Aug 14, 2013
Aug 14, 2013
48
esac],[app_sync=true])
Mar 22, 2011
Mar 22, 2011
49
50
AM_CONDITIONAL([APP_SYNC], [test x$app_sync = xtrue])
Nov 25, 2013
Nov 25, 2013
51
52
53
54
55
56
57
58
AC_ARG_ENABLE([app_sync_dbus], AS_HELP_STRING([--enable-app-sync-dbus], [Enable application syncing with dbus @<:@default=false@:>@]),
[case "${enableval}" in
yes) app_sync_dbus=true ; CFLAGS="-DAPP_SYNC_DBUS $CFLAGS" ;;
no) app_sync_dbus=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-app-sync-dbus]) ;;
esac],[app_sync_dbus=false])
AM_CONDITIONAL([APP_SYNC_DBUS], [test x$app_sync_dbus = xtrue])
Dec 3, 2013
Dec 3, 2013
59
60
61
62
63
64
65
66
AC_ARG_ENABLE([connman], AS_HELP_STRING([--enable-connman], [Enable connman support for usb tethering @<:@default=false@:>@]),
[case "${enableval}" in
yes) connman=true ; CFLAGS="-DCONNMAN $CFLAGS" ;;
no) connman=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-connman]) ;;
esac],[connman=false])
AM_CONDITIONAL([CONNMAN], [test x$connman = xtrue])
Jan 20, 2014
Jan 20, 2014
67
68
69
70
71
72
73
74
AC_ARG_ENABLE([systemd], AS_HELP_STRING([--enable-systemd], [Enable systemd notify interface @<:@default=false@:>@]),
[case "${enableval}" in
yes) systemd=true ; CFLAGS="-DSYSTEMD -lsystemd-daemon $CFLAGS" ;;
no) systemd=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-systemd]) ;;
esac],[systemd=false])
AM_CONDITIONAL([SYSTEMD], [test x$systemd = xtrue])
Feb 11, 2014
Feb 11, 2014
75
76
77
78
79
80
AC_ARG_ENABLE([ofono], AS_HELP_STRING([--enable-ofono], [Enable ofono DBUS interface for usb tethering roaming detection @<:@default=false@:>@]),
[case "${enableval}" in
yes) ofono=true ; CFLAGS="-DOFONO $CFLAGS" ;;
no) ofono=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-ofono]) ;;
esac],[ofono=false])
Aug 5, 2014
Aug 5, 2014
81
AM_CONDITIONAL([OFONO], [test x$ofono = xtrue])
Feb 11, 2014
Feb 11, 2014
82
Mar 22, 2011
Mar 22, 2011
83
PKG_CHECK_MODULES([USB_MODED], [
May 16, 2011
May 16, 2011
84
glib-2.0 >= 2.24.0
Mar 22, 2011
Mar 22, 2011
85
86
87
88
dbus-1 >= 1.2.1
dbus-glib-1 >= 0.78
gobject-2.0 >= 2.16.6
gio-2.0
Aug 19, 2014
Aug 19, 2014
89
libudev
Nov 13, 2012
Nov 13, 2012
90
libkmod
Mar 22, 2011
Mar 22, 2011
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
])
AC_SUBST(USB_MODED_LIBS)
AC_SUBST(USB_MODED_CFLAGS)
AC_CONFIG_FILES([
Makefile
src/Makefile
usb_moded.pc
docs/usb_moded-doxygen.conf
docs/Makefile
])
echo "
== $PACKAGE_NAME $VERSION ==
Compiler: ${CC}
CFLAGS: ${CFLAGS}
Mar 30, 2013
Mar 30, 2013
109
LDFLAGS: ${LDFLAGS}
Mar 22, 2011
Mar 22, 2011
110
111
112
113
Debug enabled: ${debug}
"
AC_OUTPUT