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
147
|
#MIN_CONFIG(3.2)
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
AM_INIT_AUTOMAKE(knetworkmanager, 0.8, [email protected])
AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN
KNETWORKMANAGER_VERSION="0.8"
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_VERSION, $KNETWORKMANAGER_VERSION, [KNetworkManager Version])
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_VERSION_STRING, "$KNETWORKMANAGER_VERSION", [KNetworkManager Version String])
# check for dbus, hal, libnm-util and libnl
PKG_CHECK_MODULES(HAL, [hal], [], [
AC_MSG_RESULT([no])
AC_MSG_WARN([You need Hal, knetworkmanager will not be compiled])
DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager"
MISSING_DEPS="$MISSING_DEPS hal"
])
PKG_CHECK_MODULES(LIBNMUTIL, [libnm-util >= 0.7], [], [
AC_MSG_RESULT([no])
AC_MSG_WARN([You need libnm-util >= 0.7, knetworkmanager will not be compiled])
DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager"
MISSING_DEPS="$MISSING_DEPS libnm-util"
])
PKG_CHECK_MODULES(LIBNMGLIB, [libnm_glib >= 0.7], [], [
AC_MSG_RESULT([no])
AC_MSG_WARN([You need libnm-util, knetworkmanager will not be compiled])
DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager"
MISSING_DEPS="$MISSING_DEPS libnm-glib"
])
PKG_CHECK_MODULES(LIBNL, [libnl-1], [], [
AC_MSG_RESULT([no])
AC_MSG_WARN([You need libnl, knetworkmanager will not be compiled])
DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager"
MISSING_DEPS="$MISSING_DEPS libnl-1"
])
PKG_CHECK_MODULES(DBUS_TQT, [dbus-1-tqt >= 0.8.1], [], [
AC_MSG_RESULT([no])
AC_MSG_ERROR([TQT dbus bindings missing])
])
AC_CHECK_PROG(DBUSXML2QT3, [dbusxml2qt3], [dbusxml2qt3], [no])
if test "$DBUSXML2QT3" = no ; then
AC_MSG_WARN([You need dbusxml2qt3, knetworkmanager will not be compiled])
DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager"
MISSING_DEPS="$MISSING_DEPS dbusxml2qt3"
fi
PACKAGE_CFLAGS="$HAL_CFLAGS $LIBNL_CFLAGS $DBUS_TQT_CFLAGS $LIBNMGLIB_CFLAGS"
PACKAGE_LIBS="$HAL_LIBS $LIBNL_LIBS $DBUS_TQT_LIBS"
AC_ARG_WITH(dbus-sys, AC_HELP_STRING([--with-dbus-sys=DIR], [D-BUS system.d directory]))
if ! test -z "$with_dbus_sys" ; then
DBUS_SYS_DIR="$with_dbus_sys"
else
DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
fi
AC_SUBST(DBUS_SYS_DIR)
AC_DEFINE_UNQUOTED(DBUS_SYSTEMD_DIR, "$DBUS_SYS_DIR", [D-BUS system.d directory])
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)
AC_SUBST(LIB_DL)
AC_ARG_WITH(distro, AC_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: suse, gentoo, fedora]))
if test "x$with_distro" = "x"; then
AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
AC_CHECK_FILE(/etc/redhat-release,with_distro="fedora")
if test "x$with_distro" = "x"; then
with_distro=`lsb_release -is`
fi
fi
with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
# Compile dialup support
AC_ARG_WITH(dialup, AC_HELP_STRING([--with-dialup], [Build KNetworkManager with Dialup support (default)]))
if test "x$with_dialup" != "xno"; then
if test "x$with_distro" = "x"; then
echo "Linux distribution autodetection failed, you must specify the distribution to target using --with-distro=DISTRO"
else
case $with_distro in
suse)
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_DIALUP_CONFIG,
"kdesu --nonewdcop /sbin/yast2 modem",
[Command to launch dial up configuration tool])
;;
gentoo)
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_DIALUP_CONFIG,
"kdesu --nonewdcop ${KDEDIR}/bin/kppp",
[Command to launch dial up configuration tool])
;;
fedora)
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_DIALUP_CONFIG,
"kdesu --nonewdcop /usr/bin/kppp",
[Command to launch dial up configuration tool])
;;
*)
echo "Your distribution (${with_distro}) is not yet supported (e.g. you will not be able to launch a tool to configure dial-up connections.)"
;;
esac
fi
fi
# openvpn support
AC_ARG_WITH(openvpn, AC_HELP_STRING([--with-openvpn], [Build KNetworkManager with openvpn plugin]))
if test "x$with_openvpn" = "x"; then
AC_CHECK_FILE(/etc/NetworkManager/VPN/nm-openvpn-service.name,with_openvpn="yes" )
fi
AM_CONDITIONAL(WITH_OPENVPN, test x"$with_openvpn" = "xyes")
# vpnc support
AC_ARG_WITH(vpnc, AC_HELP_STRING([--with-vpnc], [Build KNetworkManager with vpnc plugin]))
if test "x$with_vpnc" = "x"; then
AC_CHECK_FILE(/etc/NetworkManager/VPN/nm-vpnc-service.name,with_vpnc="yes" )
fi
AM_CONDITIONAL(WITH_VPNC, test x"$with_vpnc" = "xyes")
# pptp support
AC_ARG_WITH(pptp, AC_HELP_STRING([--with-pptp], [Build KNetworkManager with pptp plugin]))
if test "x$with_pptp" = "x"; then
AC_CHECK_FILE(/etc/NetworkManager/VPN/nm-pptp-service.name,with_pptp="yes" )
fi
AM_CONDITIONAL(WITH_PPTP, test x"$with_pptp" = "xyes")
# strongswan support
AC_ARG_WITH(strongswan, AC_HELP_STRING([--with-strongswan], [Build KNetworkManager with strongswan plugin]))
if test "x$with_strongswan" = "x"; then
AC_CHECK_FILE(/etc/NetworkManager/VPN/nm-strongswan-service.name,with_strongswan="yes" )
fi
AM_CONDITIONAL(WITH_STRONGSWAN, test x"$with_strongswan" = "xyes")
# set include path for knetworkmanager-plugin.h and knetworkmanager-vpnplugin.h when vpn plugins are built together with knetworkmanager
KNETWORKMANAGER_CFLAGS="-I\$(top_srcdir)/knetworkmanager-0.8/src"
AC_SUBST(KNETWORKMANAGER_CFLAGS)
|