~ubuntu-branches/ubuntu/jaunty/knetworkmanager/jaunty

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2007-07-27 09:47:32 UTC
  • Revision ID: james.westby@ubuntu.com-20070727094732-o03jpgb294oui8zg
Tags: 1:0.2-1ubuntu2
Removed kapptemplate build-dep, since this is in Universe. Admin/
folder applied manually instead to fit in .diff.gz file, and applied
buildprep to regenerate makefiles. Fixes dependancy wait on
launchpad.

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.2, "3.5.7") 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/configure.in.in
 
79
dnl =======================================================
 
80
 
 
81
dnl dnl PACKAGE set before
 
82
 
 
83
AC_C_BIGENDIAN
 
84
AC_CHECK_KDEMAXPATHLEN
 
85
 
 
86
KNETWORKMANAGER_VERSION="0.2"
 
87
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_VERSION, $KNETWORKMANAGER_VERSION, [KNetworkManager Version])
 
88
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_VERSION_STRING, "$KNETWORKMANAGER_VERSION", [KNetworkManager Version String])
 
89
 
 
90
# test if variables are already set
 
91
test "x$prefix" = xNONE && prefix=$ac_default_prefix
 
92
 
 
93
# check for dbus, hal, libnm-util and libnl
 
94
PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.33], [], [ 
 
95
        AC_MSG_RESULT([no])
 
96
        AC_MSG_WARN([You need D-Bus, knetworkmanager will not be compiled])
 
97
        DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager" 
 
98
        MISSING_DEPS="$MISSING_DEPS dbus-1"
 
99
])
 
100
PKG_CHECK_MODULES(HAL, [hal], [], [ 
 
101
        AC_MSG_RESULT([no])
 
102
        AC_MSG_WARN([You need Hal, knetworkmanager will not be compiled])
 
103
        DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager" 
 
104
        MISSING_DEPS="$MISSING_DEPS hal"
 
105
])
 
106
PKG_CHECK_MODULES(LIBNMUTIL, [libnm-util], [], [ 
 
107
        AC_MSG_RESULT([no])
 
108
        AC_MSG_WARN([You need libnm-util, knetworkmanager will not be compiled])
 
109
        DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager" 
 
110
        MISSING_DEPS="$MISSING_DEPS libnm-util"
 
111
])
 
112
PKG_CHECK_MODULES(LIBNL, [libnl-1], [], [
 
113
        AC_MSG_RESULT([no])
 
114
        AC_MSG_WARN([You need libnl, knetworkmanager will not be compiled])
 
115
        DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager" 
 
116
        MISSING_DEPS="$MISSING_DEPS libnl-1"
 
117
])
 
118
 
 
119
PACKAGE_CFLAGS="$DBUS_CFLAGS $HAL_CFLAGS $LIBNMUITL_CFLAGS $LIBNL_CFLAGS"
 
120
PACKAGE_LIBS="$DBUS_LIBS $HAL_LIBS $LIBNMUTIL_LIBS $LIBNL_LIBS"
 
121
 
 
122
AC_ARG_WITH(dbus-sys, AC_HELP_STRING([--with-dbus-sys=DIR], [D-BUS system.d directory]))
 
123
if ! test -z "$with_dbus_sys" ; then
 
124
        DBUS_SYS_DIR="$with_dbus_sys"
 
125
else
 
126
        DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
 
127
fi
 
128
AC_SUBST(DBUS_SYS_DIR)
 
129
AC_DEFINE_UNQUOTED(DBUS_SYSTEMD_DIR, "$DBUS_SYS_DIR", [D-BUS system.d directory])
 
130
 
 
131
AC_SUBST(PACKAGE_CFLAGS)
 
132
AC_SUBST(PACKAGE_LIBS)
 
133
AC_SUBST(LIB_DL)
 
134
 
 
135
# Check for D-Bus Qt3 bindings
 
136
 
 
137
safe_CPPFLAGS=$CPPFLAGS
 
138
CPPFLAGS="$CPPFLAGS $PACKAGE_CFLAGS $all_includes"
 
139
safe_LIBS=$LIBS
 
140
LIBS="$PACKAGE_LIBS"
 
141
AC_LANG_SAVE
 
142
AC_LANG_CPLUSPLUS
 
143
 
 
144
AC_CHECK_HEADER([dbus/connection.h],,[
 
145
        AC_MSG_WARN([You need D-Bus/Qt3 bindings])
 
146
        DO_NOT_COMPILE="$DO_NOT_COMPILE knetworkmanager"
 
147
])
 
148
 
 
149
AC_MSG_CHECKING([for phase2 authentication support in NetworkManager])
 
150
AC_TRY_COMPILE([#include <NetworkManager/NetworkManager.h>]
 
151
, [#ifdef NM_PHASE2_AUTH_NONE
 
152
   int ok;
 
153
   #else
 
154
   choke me
 
155
   #endif]
 
156
, [AC_MSG_RESULT([yes])
 
157
   AC_DEFINE([HAVE_PHASE2_AUTH], [], [Enable phase2 authentication])
 
158
]
 
159
, [AC_MSG_RESULT([no])])
 
160
 
 
161
 
 
162
AC_CHECK_FUNC([nmu_security_serialize_leap_with_cipher], [AC_DEFINE([HAVE_LEAP], [], [Enable Leap support])])
 
163
 
 
164
CPPFLAGS=$safe_CPPFLAGS
 
165
LIBS=$safe_LIBS
 
166
AC_LANG_RESTORE
 
167
 
 
168
AC_ARG_WITH(distro, AC_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: suse]))
 
169
if test "x$with_distro" = "x"; then
 
170
        AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
 
171
        if test "x$with_distro" = "x"; then
 
172
                with_distro=`lsb_release -is`
 
173
        fi
 
174
fi
 
175
 
 
176
with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
 
177
 
 
178
if test "x$with_distro" = "x"; then
 
179
        echo "Linux distribution autodetection failed, you must specify the distribution to target using --with-distro=DISTRO"
 
180
else
 
181
        case $with_distro in
 
182
                suse)
 
183
                        AC_DEFINE_UNQUOTED(KNETWORKMANAGER_DIALUP_CONFIG, "kdesu --nonewdcop /sbin/yast2 modem", [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
 
 
191
# openvpn support
 
192
 
 
193
AC_ARG_WITH(openvpn, AC_HELP_STRING([--with-openvpn], [Build KNetworkManager with openvpn plugin]))
 
194
if test "x$with_openvpn" = "x"; then
 
195
        AC_CHECK_FILE(/etc/NetworkManager/VPN/nm-openvpn-service.name,with_openvpn="yes" )
 
196
fi
 
197
AM_CONDITIONAL(WITH_OPENVPN, test x"$with_openvpn" != x)
 
198
 
 
199
# vpnc support
 
200
 
 
201
AC_ARG_WITH(vpnc, AC_HELP_STRING([--with-vpnc], [Build KNetworkManager with vpnc plugin]))
 
202
if test "x$with_vpnc" = "x"; then
 
203
        AC_CHECK_FILE(/etc/NetworkManager/VPN/nm-vpnc-service.name,with_vpnc="yes" )
 
204
fi
 
205
AM_CONDITIONAL(WITH_VPNC, test x"$with_vpnc" != x)
 
206
 
 
207
# pptp support
 
208
 
 
209
AC_ARG_WITH(pptp, AC_HELP_STRING([--with-pptp], [Build KNetworkManager with pptp plugin]))
 
210
if test "x$with_pptp" = "x"; then
 
211
        AC_CHECK_FILE(/etc/NetworkManager/VPN/nm-pptp-service.name,with_pptp="yes" )
 
212
fi
 
213
AM_CONDITIONAL(WITH_PPTP, test x"$with_pptp" != x)
 
214
 
 
215
# set include path for knetworkmanager-plugin.h and knetworkmanager-vpnplugin.h when vpn plugins are built together with knetworkmanager
 
216
 
 
217
KNETWORKMANAGER_CFLAGS="-I\$(top_srcdir)/knetworkmanager/src"
 
218
AC_SUBST(KNETWORKMANAGER_CFLAGS)
 
219
dnl =======================================================
 
220
dnl FILE: ./knetworkmanager/vpn-plugins/openvpn/configure.in.in
 
221
dnl =======================================================
 
222
 
 
223
KNETWORKMANAGER_OPENVPN_VERSION=0.1
 
224
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_OPENVPN_VERSION, $KNETWORKMANAGER_OPENVPN_VERSION, [KNetworkManager OpenVPN Plugin  Version])
 
225
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_OPENVPN_VERSION_STRING, "$KNETWORKMANAGER_OPENVPN_VERSION", [KNetworkManager OpenVPN Plugin Version String])
 
226
 
 
227
 
 
228
dnl =======================================================
 
229
dnl FILE: ./knetworkmanager/vpn-plugins/pptp/configure.in.in
 
230
dnl =======================================================
 
231
 
 
232
KNETWORKMANAGER_PPTP_VERSION=0.1
 
233
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_PPTP_VERSION, $KNETWORKMANAGER_PPTP_VERSION, [KNetworkManager PPTP Plugin Version])
 
234
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_PPTP_VERSION_STRING, "$KNETWORKMANAGER_PPTP_VERSION", [KNetworkManager PPTP Plugin Version String])
 
235
 
 
236
 
 
237
dnl =======================================================
 
238
dnl FILE: ./knetworkmanager/vpn-plugins/vpnc/configure.in.in
 
239
dnl =======================================================
 
240
 
 
241
KNETWORKMANAGER_VPNC_VERSION=0.1
 
242
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_VPNC_VERSION, $KNETWORKMANAGER_VPNC_VERSION, [KNetworkManager VPNC Plugin Version])
 
243
AC_DEFINE_UNQUOTED(KNETWORKMANAGER_VPNC_VERSION_STRING, "$KNETWORKMANAGER_VPNC_VERSION", [KNetworkManager VPNC Plugin Version String])
 
244
 
 
245
 
 
246
KDE_CREATE_SUBDIRSLIST
 
247
AM_CONDITIONAL(knetworkmanager_SUBDIR_included, test "x$knetworkmanager_SUBDIR_included" = xyes)
 
248
AM_CONDITIONAL(po_SUBDIR_included, test "x$po_SUBDIR_included" = xyes)
 
249
AC_CONFIG_FILES([ Makefile ])
 
250
AC_CONFIG_FILES([ knetworkmanager/Makefile ])
 
251
AC_CONFIG_FILES([ knetworkmanager/pics/Makefile ])
 
252
AC_CONFIG_FILES([ knetworkmanager/src/Makefile ])
 
253
AC_CONFIG_FILES([ knetworkmanager/vpn-plugins/Makefile ])
 
254
AC_CONFIG_FILES([ knetworkmanager/vpn-plugins/openvpn/Makefile ])
 
255
AC_CONFIG_FILES([ knetworkmanager/vpn-plugins/openvpn/src/Makefile ])
 
256
AC_CONFIG_FILES([ knetworkmanager/vpn-plugins/pptp/Makefile ])
 
257
AC_CONFIG_FILES([ knetworkmanager/vpn-plugins/pptp/src/Makefile ])
 
258
AC_CONFIG_FILES([ knetworkmanager/vpn-plugins/vpnc/Makefile ])
 
259
AC_CONFIG_FILES([ knetworkmanager/vpn-plugins/vpnc/src/Makefile ])
 
260
AC_CONFIG_FILES([ po/Makefile ])
 
261
AC_CONFIG_FILES([ po/ar/Makefile ])
 
262
AC_CONFIG_FILES([ po/bg/Makefile ])
 
263
AC_CONFIG_FILES([ po/br/Makefile ])
 
264
AC_CONFIG_FILES([ po/ca/Makefile ])
 
265
AC_CONFIG_FILES([ po/cs/Makefile ])
 
266
AC_CONFIG_FILES([ po/da/Makefile ])
 
267
AC_CONFIG_FILES([ po/de/Makefile ])
 
268
AC_CONFIG_FILES([ po/el/Makefile ])
 
269
AC_CONFIG_FILES([ po/es/Makefile ])
 
270
AC_CONFIG_FILES([ po/et/Makefile ])
 
271
AC_CONFIG_FILES([ po/fi/Makefile ])
 
272
AC_CONFIG_FILES([ po/fr/Makefile ])
 
273
AC_CONFIG_FILES([ po/ga/Makefile ])
 
274
AC_CONFIG_FILES([ po/gl/Makefile ])
 
275
AC_CONFIG_FILES([ po/hu/Makefile ])
 
276
AC_CONFIG_FILES([ po/it/Makefile ])
 
277
AC_CONFIG_FILES([ po/ja/Makefile ])
 
278
AC_CONFIG_FILES([ po/ka/Makefile ])
 
279
AC_CONFIG_FILES([ po/km/Makefile ])
 
280
AC_CONFIG_FILES([ po/nb/Makefile ])
 
281
AC_CONFIG_FILES([ po/nl/Makefile ])
 
282
AC_CONFIG_FILES([ po/pa/Makefile ])
 
283
AC_CONFIG_FILES([ po/pl/Makefile ])
 
284
AC_CONFIG_FILES([ po/pt/Makefile ])
 
285
AC_CONFIG_FILES([ po/ru/Makefile ])
 
286
AC_CONFIG_FILES([ po/sk/Makefile ])
 
287
AC_CONFIG_FILES([ po/sl/Makefile ])
 
288
AC_CONFIG_FILES([ po/sv/Makefile ])
 
289
AC_CONFIG_FILES([ po/tr/Makefile ])
 
290
AC_CONFIG_FILES([ po/uk/Makefile ])
 
291
AC_CONFIG_FILES([ po/zh_CN/Makefile ])
 
292
AC_CONFIG_FILES([ po/zh_TW/Makefile ])
 
293
AC_OUTPUT
 
294
if test -n "$MISSING_DEPS"; then
 
295
 
 
296
        echo "**************************************************"
 
297
        echo "*"
 
298
        echo "* KNetworkManager will not be built due to missing dependencies!"
 
299
        echo "* Missing: $MISSING_DEPS"
 
300
        echo "*"
 
301
        echo "**************************************************"
 
302
 
 
303
fi
 
304
# Check if KDE_SET_PREFIX was called, and --prefix was passed to configure
 
305
if test -n "$kde_libs_prefix" -a -n "$given_prefix"; then
 
306
  # And if so, warn when they don't match
 
307
  if test "$kde_libs_prefix" != "$given_prefix"; then
 
308
    # And if kde doesn't know about the prefix yet
 
309
    echo ":"`kde-config --path exe`":" | grep ":$given_prefix/bin/:" 2>&1 >/dev/null
 
310
    if test $? -ne 0; then
 
311
      echo ""
 
312
      echo "Warning: you chose to install this package in $given_prefix,"
 
313
      echo "but KDE was found in $kde_libs_prefix."
 
314
      echo "For this to work, you will need to tell KDE about the new prefix, by ensuring"
 
315
      echo "that KDEDIRS contains it, e.g. export KDEDIRS=$given_prefix:$kde_libs_prefix"
 
316
      echo "Then restart KDE."
 
317
      echo ""
 
318
    fi
 
319
  fi
 
320
fi
 
321
 
 
322
if test x$GXX = "xyes" -a x$kde_have_gcc_visibility = "xyes" -a x$kde_cv_val_qt_gcc_visibility_patched = "xno"; then
 
323
  echo ""
 
324
  echo "Your GCC supports symbol visibility, but the patch for Qt supporting visibility"
 
325
  echo "was not included. Therefore, GCC symbol visibility support remains disabled."
 
326
  echo ""
 
327
  echo "For better performance, consider including the Qt visibility supporting patch"
 
328
  echo "located at:"
 
329
  echo ""
 
330
  echo "http://bugs.kde.org/show_bug.cgi?id=109386"
 
331
  echo ""
 
332
  echo "and recompile all of Qt and KDE. Note, this is entirely optional and"
 
333
  echo "everything will continue to work just fine without it."
 
334
  echo ""
 
335
fi
 
336
 
 
337
if test "$all_tests" = "bad"; then
 
338
  if test ! "$cache_file" = "/dev/null"; then
 
339
    echo ""
 
340
    echo "Please remove the file $cache_file after changing your setup"
 
341
    echo "so that configure will find the changes next time."
 
342
    echo ""
 
343
  fi
 
344
else
 
345
  echo ""
 
346
  echo "Good - your configure finished. Start make now"
 
347
  echo ""
 
348
fi