Adding upstream version 0.5.0.
[debian/lxappearance.git] / configure.ac
CommitLineData
09ea0a61
DB
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4prog_name = lxappearance
5
6AC_PREREQ([2.63])
7AC_INIT([lxappearance], [0.5.0], [http://lxde.org/])
8AM_INIT_AUTOMAKE([-Wall -Werror foreign])
9
10AC_CONFIG_HEADERS([config.h])
11
12# Checks for programs.
13AC_PROG_CC
14# AM_PROG_LIBTOOL
15
16# Checks for libraries.
17
18# Checks for header files.
19AC_HEADER_STDC
20
21# Checks for typedefs, structures, and compiler characteristics.
22
23# Checks for library functions.
24
25# intltool
26IT_PROG_INTLTOOL([0.40.0])
27
28PKG_CHECK_MODULES(XLIB, "x11")
29AC_SUBST(XLIB_CFLAGS)
30AC_SUBST(XLIB_LIBS)
31
32gtk_modules="gtk+-2.0 >= 2.12.0 gthread-2.0"
33PKG_CHECK_MODULES(GTK, [$gtk_modules])
34AC_SUBST(GTK_CFLAGS)
35AC_SUBST(GTK_LIBS)
36
37gmodule_modules="gmodule-export-2.0"
38PKG_CHECK_MODULES(GMODULE, [$gmodule_modules])
39AC_SUBST(GMODULE_CFLAGS)
40AC_SUBST(GMODULE_LIBS)
41
42# gio_modules="gthread-2.0 gio-unix-2.0 glib-2.0 >= 2.18.0"
43# PKG_CHECK_MODULES(GIO, [$gio_modules])
44# AC_SUBST(GIO_CFLAGS)
45# AC_SUBST(GIO_LIBS)
46
47# menu_modules="libmenu-cache >= 0.3.2"
48# PKG_CHECK_MODULES(MENU_CACHE, [$menu_modules])
49# AC_SUBST(MENU_CACHE_CFLAGS)
50# AC_SUBST(MENU_CACHE_LIBS)
51
52AC_ARG_ENABLE(debug,
53 [AC_HELP_STRING([--enable-debug],
54 [build libfm with debug support @<:@default=no@:>@])],
55 [enable_debug="${enableval}"],
56 [enable_debug=no]
57)
58if test "$enable_debug" = "yes"; then
59 # turn on debug and disable optimization
60 CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG -O0 -g"
61else
62 # turn off glib debug checks
63 CPPFLAGS="$CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
64fi
65
66# Generate po/LINGUAS on the fly rather than relying on translators
67# to maintain it manually. This also overcome the problem that Transifex
68# cannot add a language to po/LINGUAS if a new po file is submitted.
69rm -f $srcdir/po/LINGUAS
70for po_file in `ls $srcdir/po/*.po | sort`;
71do
72 lang=`echo "$po_file" | sed "s|.*/po/\(.*\)\.po|\1|g"`
73 echo $lang >> $srcdir/po/LINGUAS
74done
75
76GETTEXT_PACKAGE=lxappearance
77AC_SUBST(GETTEXT_PACKAGE)
78AM_GLIB_GNU_GETTEXT
79AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
80
81AC_CONFIG_FILES([
82 Makefile
83 src/Makefile
84 data/Makefile
85 data/ui/Makefile
86 data/ui/about.glade
87 data/lxappearance.pc
88 po/Makefile.in
89])
90
91AC_OUTPUT
92
93if test x"$sysconfdir" != x'/etc'; then
94 echo
95 echo
96 echo 'Error: sysconfdir is not /etc.'
97 echo 'Please consider passing --sysconfdir=/etc to configure.';
98 echo 'Otherwise default config files will be installed to wrong place.'
99 echo
100 echo
101else
102 echo
103 echo lxappearance....................... : Version $VERSION
104 echo
105 echo Enable debug....................: "$enable_debug"
106 echo Prefix..........................: $prefix
107 echo
108 echo The binary will be installed in $prefix/bin
109 echo
110 echo http://lxde.org/
111 echo
112 echo "Ready to make lxappearance. Type 'make' to continue."
113 echo
114fi