Add mkinstalldirs to gitignore
[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])
bd4dcc62
JL
9AC_CONFIG_MACRO_DIR([m4])
10AC_SUBST(ACLOCAL_AMFLAGS, "$ACLOCAL_FLAGS -I m4")
570d597a
JL
11
12AC_CONFIG_HEADERS([config.h])
13
14# Checks for programs.
15AC_PROG_CC
16# AM_PROG_LIBTOOL
17
18# Checks for libraries.
19
20# Checks for header files.
21AC_HEADER_STDC
22
23# Checks for typedefs, structures, and compiler characteristics.
24
25# Checks for library functions.
26
27# intltool
28IT_PROG_INTLTOOL([0.40.0])
29
f64a3d56
JL
30# Python support
31AM_PATH_PYTHON([2.4])
32
570d597a
JL
33# PKG_CHECK_MODULES(XLIB, "x11")
34# AC_SUBST(XLIB_CFLAGS)
35# AC_SUBST(XLIB_LIBS)
36
46cfee9c
JL
37#Support for xml-purge.c
38pkg_modules="gtk+-2.0 >= 2.12.0"
39PKG_CHECK_MODULES(GTK, [$pkg_modules])
40AC_SUBST(GTK_CFLAGS)
41AC_SUBST(GTK_LIBS)
570d597a
JL
42
43# gio_modules="gthread-2.0 gio-unix-2.0 glib-2.0 >= 2.18.0"
44# PKG_CHECK_MODULES(GIO, [$gio_modules])
45# AC_SUBST(GIO_CFLAGS)
46# AC_SUBST(GIO_LIBS)
47
48# menu_modules="libmenu-cache >= 0.3.2"
49# PKG_CHECK_MODULES(MENU_CACHE, [$menu_modules])
50# AC_SUBST(MENU_CACHE_CFLAGS)
51# AC_SUBST(MENU_CACHE_LIBS)
52
53AC_ARG_ENABLE(debug,
54 [AC_HELP_STRING([--enable-debug],
55 [build libfm with debug support @<:@default=no@:>@])],
56 [enable_debug="${enableval}"],
57 [enable_debug=no]
58)
59if test "$enable_debug" = "yes"; then
60 # turn on debug and disable optimization
61 CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG -O0 -g"
62else
63 # turn off glib debug checks
64 CPPFLAGS="$CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
65fi
66
67# Generate po/LINGUAS on the fly rather than relying on translators
68# to maintain it manually. This also overcome the problem that Transifex
69# cannot add a language to po/LINGUAS if a new po file is submitted.
70rm -f $srcdir/po/LINGUAS
71for po_file in `ls $srcdir/po/*.po | sort`;
72do
73 lang=`echo "$po_file" | sed "s|.*/po/\(.*\)\.po|\1|g"`
74 echo $lang >> $srcdir/po/LINGUAS
75done
76
77GETTEXT_PACKAGE=lxadmin
78AC_SUBST(GETTEXT_PACKAGE)
79AM_GLIB_GNU_GETTEXT
80AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
81
a082e85a
JL
82# Add system directory for defs.in
83
84AC_SUBST(VERSION)
85AC_SUBST(PACKAGE)
86
87AS_AC_EXPAND(PYTHONDIR, $pythondir)
88AS_AC_EXPAND(BINDIR, $bindir)
89AS_AC_EXPAND(LOCALEDIR, $datarootdir/locale)
90AS_AC_EXPAND(PKGDATADIR, $datarootdir/$PACKAGE)
91AS_AC_EXPAND(DATADIR, $datarootdir/$PACKAGE)
92AS_AC_EXPAND(DESKTOPFILEDIR, $datarootdir/applications)
93
570d597a
JL
94AC_CONFIG_FILES([
95 Makefile
570d597a
JL
96 data/Makefile
97 data/ui/Makefile
a0327145 98 data/media/Makefile
f64a3d56 99 data/ui/lxproxy/Makefile
570d597a 100 po/Makefile.in
f64a3d56 101 src/Makefile
a082e85a 102 src/common/defs.py
f64a3d56
JL
103 src/lxcc/Makefile
104 src/lxdmconf/Makefile
a48ca210
JL
105 src/lxfontconfig/Makefile
106 src/lxkeyboardconf/Makefile
f64a3d56 107 src/lxproxy/Makefile
a48ca210
JL
108 src/lxscreenshot/Makefile
109 src/lxservices/Makefile
f64a3d56 110 src/openbox-keyconf/Makefile
570d597a
JL
111])
112
113AC_OUTPUT
114
115if test x"$sysconfdir" != x'/etc'; then
116 echo
117 echo
118 echo 'Error: sysconfdir is not /etc.'
119 echo 'Please consider passing --sysconfdir=/etc to configure.';
120 echo 'Otherwise default config files will be installed to wrong place.'
121 echo
122 echo
123else
124 echo
125 echo lxadmin....................... : Version $VERSION
126 echo
127 echo Enable debug....................: "$enable_debug"
128 echo Prefix..........................: $prefix
129 echo
130 echo The binary will be installed in $prefix/bin
131 echo
132 echo http://lxde.org/
133 echo
134 echo "Ready to make lxadmin. Type 'make' to continue."
135 echo
136fi