Start applications without root, need a better solution
[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 96 data/Makefile
a0327145 97 data/media/Makefile
570d597a 98 po/Makefile.in
f64a3d56 99 src/Makefile
a082e85a 100 src/common/defs.py
8dbb3f99 101 src/common/Makefile
f64a3d56
JL
102 src/lxcc/Makefile
103 src/lxdmconf/Makefile
a48ca210
JL
104 src/lxfontconfig/Makefile
105 src/lxkeyboardconf/Makefile
f64a3d56 106 src/lxproxy/Makefile
a48ca210
JL
107 src/lxscreenshot/Makefile
108 src/lxservices/Makefile
f64a3d56 109 src/openbox-keyconf/Makefile
570d597a
JL
110])
111
112AC_OUTPUT
113
114if test x"$sysconfdir" != x'/etc'; then
115 echo
116 echo
117 echo 'Error: sysconfdir is not /etc.'
118 echo 'Please consider passing --sysconfdir=/etc to configure.';
119 echo 'Otherwise default config files will be installed to wrong place.'
120 echo
121 echo
122else
123 echo
124 echo lxadmin....................... : Version $VERSION
125 echo
126 echo Enable debug....................: "$enable_debug"
127 echo Prefix..........................: $prefix
128 echo
129 echo The binary will be installed in $prefix/bin
130 echo
131 echo http://lxde.org/
132 echo
133 echo "Ready to make lxadmin. Type 'make' to continue."
134 echo
135fi