~ubuntu-branches/ubuntu/lucid/knetworkmanager/lucid

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2009-09-02 00:32:01 UTC
  • mfrom: (1.2.8 upstream) (1.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20090902003201-q1v8drzx8eq3q9h2
Tags: 1:0.7~~svn941706-2
* Bump Standards-Version to 3.8.3. No further changes.
* debian/patches/06-buildsystem_fixes.patch
  - Add support for automake 1.11.
  - Fix build failures with autoconf 2.64 where the compiler is not
    correctly detected as GNU compiler leading to libtool not linking
    libraries correctly. Closes: #543026

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl =======================================================
2
 
dnl FILE: ./admin/configure.in.min
3
 
dnl =======================================================
4
 
 
5
 
dnl    This file is part of the KDE libraries/packages
6
 
dnl    Copyright (C) 2001 Stephan Kulow (coolo@kde.org)
7
 
 
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.
12
 
 
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.
17
 
 
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.
22
 
 
23
 
# Original Author was Kalle@kde.org
24
 
# I lifted it in some mater. (Stephan Kulow)
25
 
# I used much code from Janos Farkas
26
 
 
27
 
dnl Process this file with autoconf to produce a configure script.
28
 
 
29
 
AC_INIT(acinclude.m4) dnl a source file from your sub dir
30
 
 
31
 
dnl This is so we can use kde-common
32
 
AC_CONFIG_AUX_DIR(admin)
33
 
 
34
 
dnl This ksh/zsh feature conflicts with `cd blah ; pwd`
35
 
unset CDPATH
36
 
 
37
 
dnl Checking host/target/build systems, for make, install etc.
38
 
AC_CANONICAL_SYSTEM 
39
 
dnl Perform program name transformation
40
 
AC_ARG_PROGRAM
41
 
 
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
44
 
 
45
 
KDE_SET_PREFIX
46
 
 
47
 
dnl generate the config header
48
 
AM_CONFIG_HEADER(config.h) dnl at the distribution this done
49
 
 
50
 
dnl Checks for programs.
51
 
AC_CHECK_COMPILERS
52
 
AC_ENABLE_SHARED(yes)
53
 
AC_ENABLE_STATIC(no)
54
 
KDE_PROG_LIBTOOL
55
 
 
56
 
dnl for NLS support. Call them in this order!
57
 
dnl WITH_NLS is for the po files
58
 
AM_KDE_WITH_NLS
59
 
 
60
 
KDE_USE_QT(3.2)
61
 
AC_PATH_KDE
62
 
dnl =======================================================
63
 
dnl FILE: configure.in.in
64
 
dnl =======================================================
65
 
 
66
 
#MIN_CONFIG(3.2)
67
 
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
68
 
 
69
 
if test "$build_arts" = "yes"; then
70
 
    AC_DEFINE(USE_ARTS, 1, [If we use arts volume])
71
 
    LIB_ARTS="-lartskde"
72
 
    AC_SUBST(LIB_ARTS)
73
 
fi
74
 
 
75
 
KDE_INIT_DOXYGEN([KEG Network API Reference], [Version $VERSION])
76
 
 
77
 
dnl =======================================================
78
 
dnl FILE: ./knetworkmanager-0.7/configure.in.in
79
 
dnl =======================================================
80
 
 
81
 
#MIN_CONFIG(3.2)
82
 
CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
83
 
 
84
 
dnl PACKAGE set before
85
 
 
86
 
AC_C_BIGENDIAN
87
 
AC_CHECK_KDEMAXPATHLEN
88
 
 
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])
92
 
 
93
 
# check for dbus, hal, libnm-util and libnl
94
 
PKG_CHECK_MODULES(HAL, [hal], [], [ 
95
 
        AC_MSG_RESULT([no])
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"
99
 
])
100
 
 
101
 
PKG_CHECK_MODULES(LIBNMUTIL, [libnm-util >= 0.7], [], [ 
102
 
        AC_MSG_RESULT([no])
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"
106
 
])
107
 
 
108
 
PKG_CHECK_MODULES(LIBNMGLIB, [libnm_glib >= 0.7], [], [ 
109
 
        AC_MSG_RESULT([no])
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"
113
 
])
114
 
 
115
 
PKG_CHECK_MODULES(LIBNL, [libnl-1], [], [
116
 
        AC_MSG_RESULT([no])
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"
120
 
])
121
 
 
122
 
PKG_CHECK_MODULES(DBUS_QT3, [dbus-1-qt3 >= 0.8.1], [], [ 
123
 
        AC_MSG_RESULT([no])
124
 
        AC_MSG_ERROR([QT3 dbus bindings missing])
125
 
])
126
 
 
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"
132
 
fi
133
 
 
134
 
PACKAGE_CFLAGS="$HAL_CFLAGS $LIBNL_CFLAGS $DBUS_QT3_CFLAGS $LIBNMGLIB_CFLAGS"
135
 
PACKAGE_LIBS="$HAL_LIBS $LIBNL_LIBS $DBUS_QT3_LIBS"
136
 
 
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"
140
 
else
141
 
        DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
142
 
fi
143
 
AC_SUBST(DBUS_SYS_DIR)
144
 
AC_DEFINE_UNQUOTED(DBUS_SYSTEMD_DIR, "$DBUS_SYS_DIR", [D-BUS system.d directory])
145
 
 
146
 
AC_SUBST(PACKAGE_CFLAGS)
147
 
AC_SUBST(PACKAGE_LIBS)
148
 
AC_SUBST(LIB_DL)
149
 
 
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`
157
 
        fi
158
 
fi
159
 
 
160
 
with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
161
 
 
162
 
# Compile dialup support
163
 
 
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"
168
 
        else
169
 
                case $with_distro in
170
 
                        suse)
171
 
                                AC_DEFINE_UNQUOTED(KNETWORKMANAGER_DIALUP_CONFIG,
172
 
                                        "kdesu --nonewdcop /sbin/yast2 modem",
173
 
                                        [Command to launch dial up configuration tool])
174
 
                                ;;
175
 
                        gentoo)
176
 
                                AC_DEFINE_UNQUOTED(KNETWORKMANAGER_DIALUP_CONFIG,
177
 
                                        "kdesu --nonewdcop ${KDEDIR}/bin/kppp",
178
 
                                        [Command to launch dial up configuration tool])
179
 
                                ;;
180
 
                        fedora)
181
 
                                AC_DEFINE_UNQUOTED(KNETWORKMANAGER_DIALUP_CONFIG,
182
 
                                        "kdesu --nonewdcop /usr/bin/kppp",
183
 
                                        [Command to launch dial up configuration tool])
184
 
                                ;; 
185
 
                        *)
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.)"
187
 
                                ;;
188
 
                esac
189
 
        fi
190
 
fi
191
 
 
192
 
# openvpn support
193
 
 
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" )
197
 
fi
198
 
AM_CONDITIONAL(WITH_OPENVPN, test x"$with_openvpn" = "xyes")
199
 
 
200
 
# vpnc support
201
 
 
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" )
205
 
fi
206
 
AM_CONDITIONAL(WITH_VPNC, test x"$with_vpnc" = "xyes")
207
 
 
208
 
# pptp support
209
 
 
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" )
213
 
fi
214
 
AM_CONDITIONAL(WITH_PPTP, test x"$with_pptp" = "xyes")
215
 
 
216
 
# set include path for knetworkmanager-plugin.h and knetworkmanager-vpnplugin.h when vpn plugins are built together with knetworkmanager
217
 
 
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 =======================================================
223
 
 
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])
227
 
 
228
 
PKG_CHECK_MODULES(DBUS_QT3, [dbus-1-qt3 >= 0.8.1], [], [
229
 
        AC_MSG_RESULT([no])
230
 
        AC_MSG_ERROR([QT3 dbus bindings missing])
231
 
])
232
 
 
233
 
OPENVPN_CFLAGS="$DBUS_QT3_CFLAGS"
234
 
OPENVPN_LIBS="$DBUS_QT3_LIBS"
235
 
 
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 =======================================================
241
 
 
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])
245
 
 
246
 
PKG_CHECK_MODULES(DBUS_QT3, [dbus-1-qt3 >= 0.8.1], [], [
247
 
        AC_MSG_RESULT([no])
248
 
        AC_MSG_ERROR([QT3 dbus bindings missing])
249
 
])
250
 
 
251
 
VPNC_CFLAGS="$DBUS_QT3_CFLAGS"
252
 
VPNC_LIBS="$DBUS_QT3_LIBS"
253
 
 
254
 
AC_SUBST(VPNC_CFLAGS)
255
 
AC_SUBST(VPNC_LIBS)
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 ])
270
 
AC_OUTPUT
271
 
if test -n "$MISSING_DEPS"; then
272
 
 
273
 
        echo "**************************************************"
274
 
        echo "*"
275
 
        echo "* KNetworkManager will not be built due to missing dependencies!"
276
 
        echo "* Missing: $MISSING_DEPS"
277
 
        echo "*"
278
 
        echo "**************************************************"
279
 
 
280
 
fi
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.
284
 
 
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
292
 
      echo ""
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."
298
 
      echo ""
299
 
    fi
300
 
  fi
301
 
fi
302
 
 
303
 
if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then
304
 
  echo ""
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."
307
 
  echo ""
308
 
  echo "For better performance, consider including the Qt visibility supporting patch"
309
 
  echo "located at:"
310
 
  echo ""
311
 
  echo "http://bugs.kde.org/show_bug.cgi?id=109386"
312
 
  echo ""
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."
315
 
  echo ""
316
 
fi
317
 
 
318
 
if test "$all_tests" = "bad"; then
319
 
  if test ! "$cache_file" = "/dev/null"; then
320
 
    echo ""
321
 
    echo "Please remove the file $cache_file after changing your setup"
322
 
    echo "so that configure will find the changes next time."
323
 
    echo ""
324
 
  fi
325
 
else
326
 
  echo ""
327
 
  echo "Good - your configure finished. Start make now"
328
 
  echo ""
329
 
fi