~ubuntu-branches/ubuntu/wily/lxpanel/wily-proposed

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Package Import Robot
  • Author(s): Julien Lavergne
  • Date: 2015-01-31 15:30:45 UTC
  • mfrom: (1.3.3)
  • mto: This revision was merged to the branch mainline in revision 45.
  • Revision ID: package-import@ubuntu.com-20150131153045-1r9i4602vrplnx3i
ImportĀ upstreamĀ versionĀ 0.7.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
AC_PREREQ(2.53)
2
 
AC_INIT(lxpanel, 0.6.2, http://lxde.org/)
3
 
AM_INIT_AUTOMAKE([-Wall foreign])
 
2
AC_INIT(lxpanel, 0.7.2, http://lxde.org/)
 
3
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects no-dist-gzip dist-xz])
4
4
AC_CONFIG_HEADER([config.h])
5
5
AC_CONFIG_MACRO_DIR([m4])
6
6
 
15
15
AC_PROG_CC
16
16
AC_PROG_INSTALL
17
17
AC_PROG_LN_S
18
 
AC_PROG_INTLTOOL(, [no-xml])
 
18
IT_PROG_INTLTOOL([0.40.0], [no-xml])
19
19
AM_PROG_CC_C_O
20
20
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
21
21
 
34
34
 
35
35
if test "x$enable_gtk3" = "xyes" ; then
36
36
  CFLAGS="$CFLAGS -DENABLE_GTK3"
37
 
  pkg_modules="$pkg_modules gtk+-3.0"
 
37
  pkg_modules="$pkg_modules gtk+-3.0 libfm-gtk3 >= 1.2.0 libwnck-3.0"
38
38
else
39
 
  pkg_modules="$pkg_modules gtk+-2.0 >= 2.16.0"
 
39
  pkg_modules="$pkg_modules gtk+-2.0 >= 2.18.0 libfm-gtk >= 1.2.0 libwnck-1.0"
40
40
fi
41
41
 
42
42
pkg_modules="$pkg_modules \
43
43
             gio-unix-2.0 \
44
44
             gthread-2.0 \
45
 
             gmodule-2.0 \
46
 
             libmenu-cache"
47
 
#             libstartup-notification-1.0"
 
45
             gmodule-2.0"
48
46
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
49
47
AC_SUBST(PACKAGE_CFLAGS)
50
48
AC_SUBST(PACKAGE_LIBS)
81
79
PKG_CHECK_MODULES(X11, [$pkg_modules])
82
80
AC_SUBST(X11_LIBS)
83
81
 
84
 
pkg_modules="libwnck-1.0"
85
 
PKG_CHECK_MODULES(WNCK, [$pkg_modules])
86
 
AC_SUBST(WNCK_CFLAGS)
87
 
AC_SUBST(WNCK_LIBS)
88
 
 
89
82
pkg_modules="libmenu-cache"
90
83
PKG_CHECK_MODULES(MENU_CACHE, [$pkg_modules],
91
84
                  enable_menu_cache=yes, enable_menu_cache=no)
112
105
PACKAGE_CFLAGS="$PACKAGE_CFLAGS $MENU_CACHE_CFLAGS $ADDITIONAL_FLAGS"
113
106
PACKAGE_LIBS="$PACKAGE_LIBS $MENU_CACHE_LIBS"
114
107
 
115
 
AC_ARG_ENABLE(man,
116
 
        [AC_HELP_STRING([--enable-man],
117
 
                [regenerate roff man pages from Docbook @<:@default=no@:>@])],
118
 
        [enable_man="${enableval}"],
119
 
        [enable_man=no]
120
 
)
121
 
 
122
 
AC_ARG_ENABLE([cast-checks],
123
 
    AS_HELP_STRING([--enable-cast-checks],
124
 
               [enable Glib casting checks (default: disable)]),
125
 
               cast_checks=$enableval, cast_checks="no")
126
 
G_CAST_CHECKS=""
127
 
if test x"$cast_checks" = "xno"; then
128
 
    G_CAST_CHECKS="-DG_DISABLE_CAST_CHECKS"
129
 
fi
130
 
AC_SUBST(G_CAST_CHECKS)
131
 
 
132
108
dnl linker tweaking
133
109
# The function of the link flag --as-needed is to prevent unnecesary linking.
134
110
# Example: A -> B -> C
232
208
plugin_thermal=
233
209
plugin_cpufreq=
234
210
plugin_monitors=
235
 
plugin_wnckpager=
236
211
plugin_indicator=
237
212
 
238
213
AC_MSG_CHECKING([which plugins should be built dynamically])
243
218
[                         plugins prefixed with '-' are not built]
244
219
[                         Possible plugins are: ]
245
220
[                         netstatus, netstat, volume, volumealsa, cpu, deskno, batt,]
246
 
[                         kbled, xkb, thermal, cpufreq, monitors, wnckpager]
 
221
[                         kbled, xkb, thermal, cpufreq, monitors, indicator, weather]
247
222
, plugins="$withval",[plugins="all"])
248
223
 
249
224
if test x"$plugins" != xall -a x"$plugins" != xnone; then
253
228
    fi
254
229
fi
255
230
 
256
 
ALL_PLUGINS_LIST="netstatus netstat volume volumealsa cpu deskno batt kbled xkb thermal cpufreq monitors wnckpager indicator"
 
231
ALL_PLUGINS_LIST="netstatus netstat volume volumealsa cpu deskno batt kbled xkb thermal cpufreq monitors indicator weather"
257
232
AC_SUBST(ALL_PLUGINS_LIST)
258
233
 
259
234
AC_DEFUN([check_plugin_name],[
277
252
            all)
278
253
                for name in $ALL_PLUGINS_LIST
279
254
                do
280
 
                    export plugin_$name="$name"
 
255
                    export plugin_$name="$name.la"
281
256
                done
282
257
                ;;
283
258
            -*)
286
261
                ;;
287
262
            *)
288
263
                check_plugin_name([$plugin])
289
 
                export plugin_$plugin=$plugin
 
264
                export plugin_$plugin=$plugin.la
290
265
                ;;
291
266
        esac
292
267
    done
322
297
    $plugin_thermal \
323
298
    $plugin_cpufreq \
324
299
    $plugin_monitors \
325
 
    $plugin_wnckpager\
326
 
    $plugin_indicator"
 
300
    $plugin_indicator \
 
301
    $plugin_weather"
327
302
 
328
303
AC_SUBST(PLUGINS_LIST)
329
304
 
334
309
 AC_MSG_ERROR([netstat plugin requires wireless-tools-devel]))
335
310
fi
336
311
 
 
312
# weather
 
313
if test x"$plugin_weather" != "x";then
 
314
PKG_CHECK_MODULES([LIBXML2], [libxml-2.0])
 
315
AC_SUBST(LIBXML2_CFLAGS)
 
316
AC_SUBST(LIBXML2_LIBS)
 
317
fi
 
318
 
337
319
# Checks for header files.
338
320
AC_PATH_X
339
321
AC_HEADER_STDC
353
335
AC_FUNC_STRFTIME
354
336
AC_CHECK_FUNCS([bzero memset mkdir setlocale strchr])
355
337
 
 
338
dnl check for menu-cache versions 0.4.x since no macro MENU_CACHE_CHECK_VERSION
 
339
dnl is available in those versions
 
340
LIBS_save="${LIBS}"
 
341
LIBS="${LIBS} ${MENU_CACHE_LIBS}"
 
342
AC_CHECK_FUNCS(menu_cache_dir_list_children)
 
343
LIBS="${LIBS_save}"
356
344
 
357
345
# Generate po/LINGUAS on the fly rather than relying on translators
358
346
# to maintain it manually. This also overcome the problem that Transifex
365
353
done
366
354
 
367
355
GETTEXT_PACKAGE=lxpanel
368
 
AM_GNU_GETTEXT([external])
369
 
AM_GNU_GETTEXT_VERSION(0.14.1)
370
356
AC_SUBST(GETTEXT_PACKAGE)
371
357
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
372
358
 
373
359
AM_GLIB_GNU_GETTEXT
374
360
 
375
 
if test x"$enable_man" = x"yes"; then
376
 
        AC_PATH_PROG([XSLTPROC], [xsltproc])
377
 
        if test -z "$XSLTPROC"; then
378
 
                enable_man=no
379
 
        fi
380
 
 
381
 
        dnl check for DocBook DTD and stylesheets in the local catalog.
382
 
        JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
383
 
                [DocBook XML DTD V4.1.2], [], enable_man=no)
384
 
        JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
385
 
                [DocBook XSL Stylesheets >= 1.70.1], [], enable_man=no)
386
 
fi
387
 
 
388
 
AM_CONDITIONAL(ENABLE_REGENERATE_MAN, test "x$enable_man" != "xno")
 
361
AC_ARG_ENABLE(debug,
 
362
    [AC_HELP_STRING([--enable-debug],
 
363
        [enable debug support @<:@default=no@:>@])],
 
364
    [enable_debug="${enableval}"],
 
365
    [enable_debug=no]
 
366
)
 
367
if test "$enable_debug" = "yes"; then
 
368
    # turn on debug and disable optimization
 
369
    CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG -O0 -g"
 
370
    case "$CC" in
 
371
    gcc*)
 
372
        CPPFLAGS="$CPPFLAGS -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration"
 
373
        ;;
 
374
    *)
 
375
        ;;
 
376
    esac
 
377
    dnl Be more strict on portability
 
378
    #CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L -D_XOPEN_SOURCE=700"
 
379
else
 
380
    # turn off glib debug checks
 
381
    CPPFLAGS="$CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
 
382
fi
 
383
 
 
384
dnl Fix invalid sysconfdir when --prefix=/usr
 
385
if test `eval "echo $sysconfdir"` = /usr/etc
 
386
then
 
387
    sysconfdir=/etc
 
388
fi
389
389
 
390
390
AC_CONFIG_FILES([
391
391
    lxpanel.pc
392
392
    Makefile
393
393
    src/Makefile
394
 
    src/plugins/Makefile
395
 
    src/plugins/netstatus/Makefile
396
 
    src/plugins/netstat/Makefile
397
 
    src/plugins/volume/Makefile
398
 
    src/plugins/volumealsa/Makefile
399
 
    src/plugins/cpu/Makefile
400
 
    src/plugins/deskno/Makefile
401
 
    src/plugins/batt/Makefile
402
 
    src/plugins/kbled/Makefile
403
 
    src/plugins/xkb/Makefile
404
 
    src/plugins/thermal/Makefile
405
 
    src/plugins/cpufreq/Makefile
406
 
    src/plugins/monitors/Makefile
407
 
    src/plugins/wnckpager/Makefile
408
 
    src/plugins/indicator/Makefile
 
394
    plugins/Makefile
409
395
    po/Makefile.in
410
396
    data/Makefile
411
397
    data/default/panels/panel
419
405
echo lxpanel ......................... : Version $VERSION
420
406
echo
421
407
echo Prefix........................... : $prefix
 
408
echo System config directory.......... : `eval "echo $sysconfdir"`
 
409
echo
 
410
 
422
411
if test x$plugins_loading = xyes; then
423
412
echo Building dynamic plugins:
424
413
    if test x"$plugin_netstatus" != x; then
457
446
    if test x"$plugin_monitors" != x; then
458
447
        AC_MSG_RESULT([    monitors - Monitors for CPU & RAM])
459
448
    fi
460
 
    if test x"$plugin_wnckpager" != x; then
461
 
        AC_MSG_RESULT([    wnckpager - Pager which support openbox and compiz])
462
 
    fi
463
449
    if test x"$plugin_indicator" != x; then
464
450
        AC_MSG_RESULT([    indicator - Indicator support])
465
451
    fi
 
452
    if test x"$plugin_weather" != x; then
 
453
        AC_MSG_RESULT([    weather - Weather conditions and forecast])
 
454
    fi
466
455
else
467
456
echo Dynamic loader for plugins....... : disabled.
468
457
fi
469
458
 
 
459
if test x"$sysconfdir" != x'/etc'; then
 
460
    echo
 
461
    echo 'Warning: sysconfdir is not /etc. It might be not what you want.'
 
462
    echo 'Please consider passing --sysconfdir=/etc to configure.'
 
463
fi
 
464
 
470
465
echo
471
466
echo 'LXPanel requires menu-cache and lxmenu-data packages since'
472
467
echo 'version 0.4.0. Please make sure they are correctly installed.'