Complete Makefile.am
[lxde/lxadmin.git] / configure.ac
CommitLineData
570d597a
JL
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4prog_name = lxadmin
5
6AC_PREREQ([2.63])
7AC_INIT([lxadmin], [0.1.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
f64a3d56
JL
28# Python support
29AM_PATH_PYTHON([2.4])
30
570d597a
JL
31# PKG_CHECK_MODULES(XLIB, "x11")
32# AC_SUBST(XLIB_CFLAGS)
33# AC_SUBST(XLIB_LIBS)
34
f64a3d56
JL
35# pkg_modules="gtk+-2.0 >= 2.12.0"
36# PKG_CHECK_MODULES(GTK, [$pkg_modules])
37# AC_SUBST(GTK_CFLAGS)
38# AC_SUBST(GTK_LIBS)
570d597a
JL
39
40# gio_modules="gthread-2.0 gio-unix-2.0 glib-2.0 >= 2.18.0"
41# PKG_CHECK_MODULES(GIO, [$gio_modules])
42# AC_SUBST(GIO_CFLAGS)
43# AC_SUBST(GIO_LIBS)
44
45# menu_modules="libmenu-cache >= 0.3.2"
46# PKG_CHECK_MODULES(MENU_CACHE, [$menu_modules])
47# AC_SUBST(MENU_CACHE_CFLAGS)
48# AC_SUBST(MENU_CACHE_LIBS)
49
50AC_ARG_ENABLE(debug,
51 [AC_HELP_STRING([--enable-debug],
52 [build libfm with debug support @<:@default=no@:>@])],
53 [enable_debug="${enableval}"],
54 [enable_debug=no]
55)
56if test "$enable_debug" = "yes"; then
57 # turn on debug and disable optimization
58 CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG -O0 -g"
59else
60 # turn off glib debug checks
61 CPPFLAGS="$CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
62fi
63
64# Generate po/LINGUAS on the fly rather than relying on translators
65# to maintain it manually. This also overcome the problem that Transifex
66# cannot add a language to po/LINGUAS if a new po file is submitted.
67rm -f $srcdir/po/LINGUAS
68for po_file in `ls $srcdir/po/*.po | sort`;
69do
70 lang=`echo "$po_file" | sed "s|.*/po/\(.*\)\.po|\1|g"`
71 echo $lang >> $srcdir/po/LINGUAS
72done
73
74GETTEXT_PACKAGE=lxadmin
75AC_SUBST(GETTEXT_PACKAGE)
76AM_GLIB_GNU_GETTEXT
77AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
78
79AC_CONFIG_FILES([
80 Makefile
570d597a
JL
81 data/Makefile
82 data/ui/Makefile
f64a3d56
JL
83 data/ui/media/Makefile
84 data/ui/lxproxy/Makefile
570d597a 85 po/Makefile.in
f64a3d56
JL
86 src/Makefile
87 src/fontconfig/Makefile
88 src/keyboardconf/Makefile
89 src/lxcc/Makefile
90 src/lxdmconf/Makefile
91 src/lxproxy/Makefile
92 src/openbox-keyconf/Makefile
93 src/screenshot/Makefile
94 src/services/Makefile
570d597a
JL
95])
96
97AC_OUTPUT
98
99if test x"$sysconfdir" != x'/etc'; then
100 echo
101 echo
102 echo 'Error: sysconfdir is not /etc.'
103 echo 'Please consider passing --sysconfdir=/etc to configure.';
104 echo 'Otherwise default config files will be installed to wrong place.'
105 echo
106 echo
107else
108 echo
109 echo lxadmin....................... : Version $VERSION
110 echo
111 echo Enable debug....................: "$enable_debug"
112 echo Prefix..........................: $prefix
113 echo
114 echo The binary will be installed in $prefix/bin
115 echo
116 echo http://lxde.org/
117 echo
118 echo "Ready to make lxadmin. Type 'make' to continue."
119 echo
120fi