Commit from LXDE Pootle server by user Fitoschido.: 74 of 74 strings translated ...
[lxde/lxappearance.git] / configure.ac
CommitLineData
0cd84ed6
HJYP
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
3a7d812e 4prog_name = lxappearance
0cd84ed6
HJYP
5
6AC_PREREQ([2.63])
0d3f5c61 7AC_INIT([lxappearance], [0.5.2], [http://lxde.org/])
8f1bbe3f 8AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign])
8f1bbe3f
JL
9# Support silent build rules. Disable by either passing --disable-silent-rules
10# to configure or passing V=1 to make
11AM_SILENT_RULES([yes])
12
29e7d940
JL
13AM_MAINTAINER_MODE
14
15AC_CONFIG_HEADERS([config.h])
16
0cd84ed6
HJYP
17# Checks for programs.
18AC_PROG_CC
19# AM_PROG_LIBTOOL
20
21# Checks for libraries.
22
23# Checks for header files.
24AC_HEADER_STDC
25
26# Checks for typedefs, structures, and compiler characteristics.
27
28# Checks for library functions.
29
30# intltool
31IT_PROG_INTLTOOL([0.40.0])
32
62d4031f 33AC_ARG_ENABLE(man,
44b9b0f2 34AS_HELP_STRING([--enable-man],[regenerate roff man pages from Docbook @<:@default=yes@:>@]),
c7b7bbfe
DB
35[case "${enableval}" in
36 yes) enable_man=yes ;;
37 no) enable_man=no ;;
38 *) AC_MSG_ERROR([bad value "${enableval}" for --enable-man, use "yes" (default) or "no".]) ;;
39esac],[])
62d4031f 40
e2eadb8a 41AC_ARG_ENABLE(more_warnings,
44b9b0f2 42 [AS_HELP_STRING([--enable-more-warnings],
e2eadb8a
JL
43 [Add more warnings @<:@default=no@:>@])],
44 [enable_more_warnings="${enableval}"],
45 [enable_more_warnings=no]
46)
47
8108db6a 48AC_ARG_ENABLE(gtk3,
44b9b0f2 49AS_HELP_STRING([--enable-gtk3],[enable to use gtk-3.0 instead of gtk-2.0]),
8108db6a
JL
50[case "${enableval}" in
51 yes) enable_gtk3=yes ;;
52 no) enable_gtk3=no ;;
53 *) AC_MSG_ERROR([bad value "${enableval}" for --enable-gtk3, use "yes" (default) or "no".]) ;;
54esac],[])
55
9f90caed
HJYP
56PKG_CHECK_MODULES(XLIB, "x11")
57AC_SUBST(XLIB_CFLAGS)
58AC_SUBST(XLIB_LIBS)
0cd84ed6 59
8108db6a
JL
60if test "x$enable_gtk3" = "xyes" ; then
61 CFLAGS="$CFLAGS -DENABLE_GTK3"
62 gtk_modules="gtk+-3.0 >= 3.0.0"
63else
64 gtk_modules="gtk+-2.0 >= 2.12.0 gthread-2.0"
65fi
66
756f0a66 67PKG_CHECK_MODULES(GTK, [$gtk_modules])
0cd84ed6
HJYP
68AC_SUBST(GTK_CFLAGS)
69AC_SUBST(GTK_LIBS)
70
c847cfdc
JL
71AC_ARG_ENABLE(dbus,
72 [AS_HELP_STRING([--enable-dbus],
73 [Use Dbus support (usefull for lxsession > 0.4.9) @<:@default=no@:>@])],
74 [enable_dbus="${enableval}"],
75 [enable_dbus=no]
76)
77
78
79if test x"$enable_dbus" = x"yes"; then
80 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.95 dbus-glib-1 >= 0.70])
81 CFLAGS="$CFLAGS -DENABLE_DBUS"
82fi
a9567f8c
JL
83AC_SUBST(DBUS_CFLAGS)
84AC_SUBST(DBUS_LIBS)
85
c847cfdc
JL
86
87
756f0a66
HJYP
88gmodule_modules="gmodule-export-2.0"
89PKG_CHECK_MODULES(GMODULE, [$gmodule_modules])
90AC_SUBST(GMODULE_CFLAGS)
91AC_SUBST(GMODULE_LIBS)
92
0cd84ed6
HJYP
93# gio_modules="gthread-2.0 gio-unix-2.0 glib-2.0 >= 2.18.0"
94# PKG_CHECK_MODULES(GIO, [$gio_modules])
95# AC_SUBST(GIO_CFLAGS)
96# AC_SUBST(GIO_LIBS)
97
98# menu_modules="libmenu-cache >= 0.3.2"
99# PKG_CHECK_MODULES(MENU_CACHE, [$menu_modules])
100# AC_SUBST(MENU_CACHE_CFLAGS)
101# AC_SUBST(MENU_CACHE_LIBS)
102
e2eadb8a 103if test x"$enable_more_warnings" = x"yes"; then
8f1bbe3f
JL
104 ADDITIONAL_FLAGS="-Wall -Werror=all -Werror=format -Werror=implicit-function-declaration -Werror=implicit-int -Werror=missing-braces -Werror=parentheses -Werror=return-type -Werror=strict-aliasing -Werror=switch -Wuninitialized -Werror=unused-label -Werror=unused-value -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Werror=missing-declarations -Wredundant-decls -Wmissing-noreturn -Wpointer-arith -Wcast-align -Wwrite-strings -Werror=inline -Werror=format-nonliteral -Wformat-nonliteral -Werror=format-security -Wformat-security -Winit-self -Werror=missing-include-dirs -Werror=undef -Werror=aggregate-return -Wmissing-format-attribute -Werror=nested-externs -fno-strict-aliasing -fmessage-length=0 -Wp,-D_FORTIFY_SOURCE=2 -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES"
105fi
106AC_SUBST(ADDITIONAL_FLAGS)
107
62d4031f 108AC_ARG_ENABLE(man,
44b9b0f2 109 [AS_HELP_STRING([--enable-man],
62d4031f
JL
110 [regenerate roff man pages from Docbook @<:@default=no@:>@])],
111 [enable_man="${enableval}"],
112 [enable_man=no]
0cd84ed6 113)
62d4031f 114
0cd84ed6
HJYP
115if test "$enable_debug" = "yes"; then
116 # turn on debug and disable optimization
117 CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG -O0 -g"
118else
119 # turn off glib debug checks
120 CPPFLAGS="$CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
121fi
122
123# Generate po/LINGUAS on the fly rather than relying on translators
124# to maintain it manually. This also overcome the problem that Transifex
125# cannot add a language to po/LINGUAS if a new po file is submitted.
126rm -f $srcdir/po/LINGUAS
127for po_file in `ls $srcdir/po/*.po | sort`;
128do
129 lang=`echo "$po_file" | sed "s|.*/po/\(.*\)\.po|\1|g"`
130 echo $lang >> $srcdir/po/LINGUAS
131done
132
108e166e 133GETTEXT_PACKAGE=lxappearance
0cd84ed6
HJYP
134AC_SUBST(GETTEXT_PACKAGE)
135AM_GLIB_GNU_GETTEXT
136AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
137
62d4031f
JL
138if test x"$enable_man" = x"yes"; then
139 AC_PATH_PROG([XSLTPROC], [xsltproc])
140 if test -z "$XSLTPROC"; then
141 enable_man=no
142 fi
143
144 dnl check for DocBook DTD and stylesheets in the local catalog.
145 JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
146 [DocBook XML DTD V4.1.2], [], enable_man=no)
147 JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
148 [DocBook XSL Stylesheets >= 1.70.1], [], enable_man=no)
149fi
150
bb69b4af 151AM_CONDITIONAL(ENABLE_MAN, test "x$enable_man" != "xno")
62d4031f 152
0cd84ed6
HJYP
153AC_CONFIG_FILES([
154 Makefile
155 src/Makefile
156 data/Makefile
157 data/ui/Makefile
39bff85f 158 data/ui/about.ui
756f0a66 159 data/lxappearance.pc
62d4031f 160 man/Makefile
0cd84ed6
HJYP
161 po/Makefile.in
162])
163
164AC_OUTPUT
165
166if test x"$sysconfdir" != x'/etc'; then
167 echo
168 echo
169 echo 'Error: sysconfdir is not /etc.'
170 echo 'Please consider passing --sysconfdir=/etc to configure.';
171 echo 'Otherwise default config files will be installed to wrong place.'
172 echo
173 echo
174else
175 echo
3a7d812e 176 echo lxappearance....................... : Version $VERSION
0cd84ed6
HJYP
177 echo
178 echo Enable debug....................: "$enable_debug"
c847cfdc 179 echo Enable Dbus support.............: "$enable_dbus"
0cd84ed6
HJYP
180 echo Prefix..........................: $prefix
181 echo
182 echo The binary will be installed in $prefix/bin
183 echo
184 echo http://lxde.org/
185 echo
3a7d812e 186 echo "Ready to make lxappearance. Type 'make' to continue."
0cd84ed6
HJYP
187 echo
188fi