GTK+2 panel 

GTK+2 panel Git Source Tree

Root/configure.ac

1AC_PREREQ(2.58)
2
3AC_INIT([GTK2 panel],[0.1.1],[http://dev.entidi.com/p/gtk2panel/],[gtk2panel],[http://gtk2panel.entidi.com/])
4
5m4_ifdef([LT_INIT],
6 [LT_INIT([disable-static])],
7 [AC_DISABLE_STATIC
8 AC_PROG_LIBTOOL])
9
10AC_CONFIG_SRCDIR([configure.ac])
11AC_CONFIG_HEADERS([config.h])
12AC_CONFIG_AUX_DIR([build])
13AC_CONFIG_MACRO_DIR([build])
14
15dnl No idea which is the oldest automake supported: be optimistic
16AM_INIT_AUTOMAKE([1.0 gnits no-dist-gzip dist-bzip2 -Wall -Wno-portability])
17
18AC_DEFINE([PACKAGE_DESCRIPTION],
19 ["A bleeding edge panel heavily based on the GTK+2 stack"],
20 [Package description to be used as summary.])
21
22dnl Enable silent rules, if possible
23m4_ifdef([AM_SILENT_RULES],
24 [AM_SILENT_RULES([yes])],
25 [AC_SUBST([AM_V_GEN],[])])
26
27
28##################################################
29# Checks for programs
30##################################################
31
32AC_PROG_CC
33PKG_PROG_PKG_CONFIG
34GTK_DOC_CHECK
35
36
37##################################################
38# Check for header files
39##################################################
40
41AC_CHECK_HEADERS([string.h])
42
43
44##################################################
45# Check for typedefs, structures and compiler characteristics
46##################################################
47
48AC_LANG(C)
49AC_C_CONST
50
51
52##################################################
53# Check for required packages
54##################################################
55
56PKG_CHECK_MODULES([GOBJECT],[glib-2.0 >= 2.6.0 gobject-2.0 >= 2.6.0])
57PKG_CHECK_MODULES([GTK],[gtk+-2.0 >= 2.16.0])
58
59
60dnl Glade catalog dir. Valid values include:
61dnl - check: try to figure out the correct path at configure time
62dnl - yes: figure out the correct path at configure time or fail
63dnl - no: glade support disabled
64dnl - ...: explicit path to glade catalogs (check for gladeui disabled)
65AC_ARG_WITH(glade_catalogdir,
66 [AS_HELP_STRING([--with-glade-catalogdir@<:@=DIR@:>@],
67 [where to install the glade catalogs @<:@default=check@:>@])],
68 [],[with_glade_catalogdir=check])
69
70# Both "check" and "yes" require gladeui detection but "yes" fails on gladeui not found.
71# gtk2panel is GTK+2 based, so only gladeui-1.0 is checked.
72AS_IF([test "x${with_glade_catalogdir}" = "xcheck" -o "x${with_glade_catalogdir}" = "xyes"],
73 [catalogdir=$($PKG_CONFIG --define-variable=prefix='${prefix}' \
74 --define-variable=exec_prefix='${exec_prefix}' --define-variable=libdir='${libdir}' \
75 --define-variable=bindir='${bindir}' --define-variable=datarootdir='${datarootdir}' \
76 --define-variable=datadir='${datadir}' --define-variable=includedir='${includedir}' \
77 --variable=catalogdir gladeui-1.0)
78 AS_IF([test "x${catalogdir}" != "x"], [with_glade_catalogdir="${catalogdir}"])])
79
80# Handle "yes" failure
81AS_IF([test "x${with_glade_catalogdir}" = "xyes"],
82 [AC_MSG_ERROR([Glade support explicitely required but gladeui-1.0 not found])])
83
84# Handle "check" graceful degradation
85AS_IF([test "x${with_glade_catalogdir}" = "xcheck"],
86 [with_glade_catalogdir=no])
87
88AM_CONDITIONAL([HAVE_GLADE],[test "x${with_glade_catalogdir}" != "xno"])
89AM_COND_IF([HAVE_GLADE],
90 [enable_glade=yes
91 report_glade_catalogdir="
92 Glade catalog dir: ${with_glade_catalogdir}"],
93 [enable_glade=no
94 report_glade_catalogdir=""])
95AC_SUBST([GLADE_CATALOGDIR],${with_glade_catalogdir})
96
97
98
99##################################################
100# Check for optional libwnck support (pager and taskbar widgets)
101##################################################
102
103AC_ARG_ENABLE([libwnck],
104 [AS_HELP_STRING([--enable-libwnck],
105 [Enable libwnck based widgets @<:@default=check@:>@])],
106 [],[enable_libwnck=check])
107AS_IF([test "x$enable_libwnck" != "xno"],
108 [PKG_CHECK_MODULES([LIBWNCK],[libwnck-1.0],
109 [enable_libwnck=yes],
110 [AS_IF([test "x$enable_libwnck" = "xyes"],
111 [AC_MSG_ERROR([$LIBWNCK_PKG_ERRORS but libwnck widgets requested])],
112 [enable_libwnck=no])])])
113AM_CONDITIONAL([HAVE_LIBWNCK],[test "x$enable_libwnck" = "xyes"])
114
115
116##################################################
117# Final step
118##################################################
119
120AC_CONFIG_FILES([Makefile
121 libgpsystem/Makefile
122 libgpwidgets/Makefile
123 gtk2panel/Makefile
124 examples/Makefile
125 docs/Makefile
126 docs/gtk2panel/bookinfo.xml
127 docs/gtk2panel/Makefile])
128AC_OUTPUT
129
130AC_MSG_NOTICE([
131
132The following features will be enabled:
133
134 libwnck-based widgets: $enable_libwnck
135 Install glade catalogs: $enable_glade$report_glade_catalogdir
136])

Archive Download this file

Branches

Tags