1
dnl =======================================================
2
dnl FILE: ./admin/configure.in.min
3
dnl =======================================================
5
dnl This file is part of the KDE libraries/packages
6
dnl Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
8
dnl This file is free software; you can redistribute it and/or
9
dnl modify it under the terms of the GNU Library General Public
10
dnl License as published by the Free Software Foundation; either
11
dnl version 2 of the License, or (at your option) any later version.
13
dnl This library is distributed in the hope that it will be useful,
14
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
15
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
dnl Library General Public License for more details.
18
dnl You should have received a copy of the GNU Library General Public License
19
dnl along with this library; see the file COPYING.LIB. If not, write to
20
dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
dnl Boston, MA 02110-1301, USA.
23
# Original Author was Kalle@kde.org
24
# I lifted it in some mater. (Stephan Kulow)
25
# I used much code from Janos Farkas
27
dnl Process this file with autoconf to produce a configure script.
29
AC_INIT(acinclude.m4) dnl a source file from your sub dir
31
dnl This is so we can use kde-common
32
AC_CONFIG_AUX_DIR(admin)
34
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
37
dnl Checking host/target/build systems, for make, install etc.
39
dnl Perform program name transformation
42
dnl Automake doc recommends to do this only here. (Janos)
43
AM_INIT_AUTOMAKE(knetworkmanager-0.7svn864988, "3.5.10") dnl searches for some needed programs
47
dnl generate the config header
48
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
50
dnl Checks for programs.
56
dnl for NLS support. Call them in this order!
57
dnl WITH_NLS is for the po files
62
dnl =======================================================
63
dnl FILE: configure.in.in
64
dnl =======================================================
67
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
69
if test "$build_arts" = "yes"; then
70
AC_DEFINE(USE_ARTS, 1, [If we use arts volume])
75
KDE_INIT_DOXYGEN([KEG Network API Reference], [Version $VERSION])
77
dnl =======================================================
78
dnl FILE: ./knetworkmanager-0.7/configure.in.in
79
dnl =======================================================
82
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
84
dnl PACKAGE set before
87
AC_CHECK_KDEMAXPATHLEN
89
KNETWORKMANAGER_VERSION="0.7"
90
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_VERSION, $KNETWORKMANAGER_VERSION, [KNetworkManager Version])
91
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_VERSION_STRING, "$KNETWORKMANAGER_VERSION", [KNetworkManager Version String])
93
# check for dbus, hal, libnm-util and libnl
94
PKG_CHECK_MODULES(HAL, [hal], [], [
96
AC_MSG_WARN([You need Hal, knetworkmanager will not be compiled])
97
DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager"
98
MISSING_DEPS="$MISSING_DEPS hal"
101
PKG_CHECK_MODULES(LIBNMUTIL, [libnm-util >= 0.7], [], [
103
AC_MSG_WARN([You need libnm-util >= 0.7, knetworkmanager will not be compiled])
104
DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager"
105
MISSING_DEPS="$MISSING_DEPS libnm-util"
108
PKG_CHECK_MODULES(LIBNMGLIB, [libnm_glib >= 0.7], [], [
110
AC_MSG_WARN([You need libnm-util, knetworkmanager will not be compiled])
111
DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager"
112
MISSING_DEPS="$MISSING_DEPS libnm-glib"
115
PKG_CHECK_MODULES(LIBNL, [libnl-1], [], [
117
AC_MSG_WARN([You need libnl, knetworkmanager will not be compiled])
118
DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager"
119
MISSING_DEPS="$MISSING_DEPS libnl-1"
122
PKG_CHECK_MODULES(DBUS_QT3, [dbus-1-qt3 >= 0.8.1], [], [
124
AC_MSG_ERROR([QT3 dbus bindings missing])
127
AC_CHECK_PROG(DBUSXML2QT3, [dbusxml2qt3], [dbusxml2qt3], [no])
128
if test "$DBUSXML2QT3" = no ; then
129
AC_MSG_WARN([You need dbusxml2qt3, knetworkmanager will not be compiled])
130
DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager"
131
MISSING_DEPS="$MISSING_DEPS dbusxml2qt3"
134
PACKAGE_CFLAGS="$HAL_CFLAGS $LIBNL_CFLAGS $DBUS_QT3_CFLAGS $LIBNMGLIB_CFLAGS"
135
PACKAGE_LIBS="$HAL_LIBS $LIBNL_LIBS $DBUS_QT3_LIBS"
137
AC_ARG_WITH(dbus-sys, AC_HELP_STRING([--with-dbus-sys=DIR], [D-BUS system.d directory]))
138
if ! test -z "$with_dbus_sys" ; then
139
DBUS_SYS_DIR="$with_dbus_sys"
141
DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
143
AC_SUBST(DBUS_SYS_DIR)
144
AC_DEFINE_UNQUOTED(DBUS_SYSTEMD_DIR, "$DBUS_SYS_DIR", [D-BUS system.d directory])
146
AC_SUBST(PACKAGE_CFLAGS)
147
AC_SUBST(PACKAGE_LIBS)
150
AC_ARG_WITH(distro, AC_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: suse, gentoo, fedora]))
151
if test "x$with_distro" = "x"; then
152
AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
153
AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
154
AC_CHECK_FILE(/etc/redhat-release,with_distro="fedora")
155
if test "x$with_distro" = "x"; then
156
with_distro=`lsb_release -is`
160
with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
162
# Compile dialup support
164
AC_ARG_WITH(dialup, AC_HELP_STRING([--with-dialup], [Build KNetworkManager with Dialup support (default)]))
165
if test "x$with_dialup" != "xno"; then
166
if test "x$with_distro" = "x"; then
167
echo "Linux distribution autodetection failed, you must specify the distribution to target using --with-distro=DISTRO"
171
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_DIALUP_CONFIG,
172
"kdesu --nonewdcop /sbin/yast2 modem",
173
[Command to launch dial up configuration tool])
176
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_DIALUP_CONFIG,
177
"kdesu --nonewdcop ${KDEDIR}/bin/kppp",
178
[Command to launch dial up configuration tool])
181
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_DIALUP_CONFIG,
182
"kdesu --nonewdcop /usr/bin/kppp",
183
[Command to launch dial up configuration tool])
186
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.)"
194
AC_ARG_WITH(openvpn, AC_HELP_STRING([--with-openvpn], [Build KNetworkManager with openvpn plugin]))
195
if test "x$with_openvpn" = "x"; then
196
AC_CHECK_FILE(/etc/NetworkManager/VPN/nm-openvpn-service.name,with_openvpn="yes" )
198
AM_CONDITIONAL(WITH_OPENVPN, test x"$with_openvpn" = "xyes")
202
AC_ARG_WITH(vpnc, AC_HELP_STRING([--with-vpnc], [Build KNetworkManager with vpnc plugin]))
203
if test "x$with_vpnc" = "x"; then
204
AC_CHECK_FILE(/etc/NetworkManager/VPN/nm-vpnc-service.name,with_vpnc="yes" )
206
AM_CONDITIONAL(WITH_VPNC, test x"$with_vpnc" = "xyes")
210
AC_ARG_WITH(pptp, AC_HELP_STRING([--with-pptp], [Build KNetworkManager with pptp plugin]))
211
if test "x$with_pptp" = "x"; then
212
AC_CHECK_FILE(/etc/NetworkManager/VPN/nm-pptp-service.name,with_pptp="yes" )
214
AM_CONDITIONAL(WITH_PPTP, test x"$with_pptp" = "xyes")
216
# set include path for knetworkmanager-plugin.h and knetworkmanager-vpnplugin.h when vpn plugins are built together with knetworkmanager
218
KNETWORKMANAGER_CFLAGS="-I\$(top_srcdir)/knetworkmanager-0.7/src"
219
AC_SUBST(KNETWORKMANAGER_CFLAGS)
220
dnl =======================================================
221
dnl FILE: ./knetworkmanager-0.7/vpn-plugins/openvpn/configure.in.in
222
dnl =======================================================
224
KNETWORKMANAGER_OPENVPN_VERSION=0.1
225
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_OPENVPN_VERSION, $KNETWORKMANAGER_OPENVPN_VERSION, [KNetworkManager OpenVPN Plugin Version])
226
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_OPENVPN_VERSION_STRING, "$KNETWORKMANAGER_OPENVPN_VERSION", [KNetworkManager OpenVPN Plugin Version String])
228
PKG_CHECK_MODULES(DBUS_QT3, [dbus-1-qt3 >= 0.8.1], [], [
230
AC_MSG_ERROR([QT3 dbus bindings missing])
233
OPENVPN_CFLAGS="$DBUS_QT3_CFLAGS"
234
OPENVPN_LIBS="$DBUS_QT3_LIBS"
236
AC_SUBST(OPENVPN_CFLAGS)
237
AC_SUBST(OPENVPN_LIBS)
238
dnl =======================================================
239
dnl FILE: ./knetworkmanager-0.7/vpn-plugins/vpnc/configure.in.in
240
dnl =======================================================
242
KNETWORKMANAGER_VPNC_VERSION=0.1
243
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_VPNC_VERSION, $KNETWORKMANAGER_VPNC_VERSION, [KNetworkManager VPNC Plugin Version])
244
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_VPNC_VERSION_STRING, "$KNETWORKMANAGER_VPNC_VERSION", [KNetworkManager VPNC Plugin Version String])
246
PKG_CHECK_MODULES(DBUS_QT3, [dbus-1-qt3 >= 0.8.1], [], [
248
AC_MSG_ERROR([QT3 dbus bindings missing])
251
VPNC_CFLAGS="$DBUS_QT3_CFLAGS"
252
VPNC_LIBS="$DBUS_QT3_LIBS"
254
AC_SUBST(VPNC_CFLAGS)
256
KDE_CREATE_SUBDIRSLIST
257
AM_CONDITIONAL(knetworkmanager_0_7_SUBDIR_included, test "x$knetworkmanager_0_7_SUBDIR_included" = xyes)
258
AC_CONFIG_FILES([ Makefile ])
259
AC_CONFIG_FILES([ knetworkmanager-0.7/Makefile ])
260
AC_CONFIG_FILES([ knetworkmanager-0.7/introspection/Makefile ])
261
AC_CONFIG_FILES([ knetworkmanager-0.7/pics/Makefile ])
262
AC_CONFIG_FILES([ knetworkmanager-0.7/po/Makefile ])
263
AC_CONFIG_FILES([ knetworkmanager-0.7/src/Makefile ])
264
AC_CONFIG_FILES([ knetworkmanager-0.7/src/dbus/Makefile ])
265
AC_CONFIG_FILES([ knetworkmanager-0.7/vpn-plugins/Makefile ])
266
AC_CONFIG_FILES([ knetworkmanager-0.7/vpn-plugins/openvpn/Makefile ])
267
AC_CONFIG_FILES([ knetworkmanager-0.7/vpn-plugins/openvpn/src/Makefile ])
268
AC_CONFIG_FILES([ knetworkmanager-0.7/vpn-plugins/vpnc/Makefile ])
269
AC_CONFIG_FILES([ knetworkmanager-0.7/vpn-plugins/vpnc/src/Makefile ])
271
if test -n "$MISSING_DEPS"; then
273
echo "**************************************************"
275
echo "* KNetworkManager will not be built due to missing dependencies!"
276
echo "* Missing: $MISSING_DEPS"
278
echo "**************************************************"
281
dnl Put here things to be done at the very end - telling users
282
dnl about additional packages to install. Better yet is giving
283
dnl each project / subdr its own configure.in.bot.
285
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
286
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
287
# And if so, warn when they don't match
288
if test "$kde_libs_prefix" != "$given_prefix"; then
289
# And if kde doesn't know about the prefix yet
290
echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
291
if test $? -ne 0; then
293
echo "Warning: you chose to install this package in $given_prefix,"
294
echo "but KDE was found in $kde_libs_prefix."
295
echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
296
echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
297
echo "Then restart KDE."
303
if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then
305
echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility"
306
echo "was not included. Therefore, GCC symbol visibility support remains disabled."
308
echo "For better performance, consider including the Qt visibility supporting patch"
311
echo "http://bugs.kde.org/show_bug.cgi?id=109386"
313
echo "and recompile all of Qt and KDE. Note, this is entirely optional and"
314
echo "everything will continue to work just fine without it."
318
if test "$all_tests" = "bad"; then
319
if test ! "$cache_file" = "/dev/null"; then
321
echo "Please remove the file $cache_file after changing your setup"
322
echo "so that configure will find the changes next time."
327
echo "Good - your configure finished. Start make now"