Revert "Added configurable timeout for non-immediate config saving."
[lxde/pcmanfm.git] / configure.ac
CommitLineData
b6e3c554
HJYP
1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ([2.63])
1bba6c9c 5AC_INIT([pcmanfm], [1.0.1~beta], [http://pcmanfm.sf.net/])
b6e3c554
HJYP
6AM_INIT_AUTOMAKE([-Wall -Werror foreign])
7
8AC_CONFIG_HEADERS([config.h])
9
10# Checks for programs.
11AC_ISC_POSIX
12AC_PROG_CC
b6e3c554 13AM_PROG_CC_STDC
8893ba14 14AM_PROG_CC_C_O
b6e3c554
HJYP
15
16# Checks for header files.
17AC_HEADER_STDC
18
19# Checks for typedefs, structures, and compiler characteristics.
20
21# Checks for library functions.
22
23# Large file support
24AC_ARG_ENABLE([largefile],
25 AS_HELP_STRING([--enable-largefile],
26 [enable Large file support (default: yes)]),
27 largefile=$enableval, largefile="yes")
28
29if test x"$largefile" = x"yes"; then
30 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
31 AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support])
32 AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits])
33fi
34
35AC_ARG_ENABLE(
36 [cast-checks],
37 AS_HELP_STRING([--enable-cast-checks],
38 [enable Glib casting checks (default: disable)]),
39 cast_checks=$enableval, cast_checks="no")
40G_CAST_CHECKS=""
41if test x"$cast_checks" = "xno"; then
42 G_CAST_CHECKS="-DG_DISABLE_CAST_CHECKS"
43fi
44AC_SUBST(G_CAST_CHECKS)
45
05ece184 46AC_ARG_ENABLE(debug,
fc789786
HJYP
47 [AC_HELP_STRING([--enable-debug],
48 [build pcmanfm with debug support @<:@default=no@:>@])],
49 [enable_debug="${enableval}"],
50 [enable_debug=no]
05ece184
HJYP
51)
52if test "$enable_debug" = "yes"; then
53 # turn on debug and disable optimization
54 CPPFLAGS="$CPPFLAGS -DG_ENABLE_DEBUG -O0 -g"
fbb7b12d
AG
55 case "$CC" in
56 gcc*)
5a89e062 57 CPPFLAGS="$CPPFLAGS -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers"
fbb7b12d
AG
58 ;;
59 *)
60 ;;
61 esac
05ece184
HJYP
62else
63 # turn off glib debug checks
64 # G_DISABLE_CAST_CHECKS is already handled by $(G_CAST_CHECKS)
65 CPPFLAGS="$CPPFLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
66fi
67
b6e3c554
HJYP
68# intltool
69IT_PROG_INTLTOOL([0.40.0])
70
71# Checks for libraries.
6b110820 72
73PKG_CHECK_MODULES(XLIB, "x11")
74AC_SUBST(XLIB_CFLAGS)
75AC_SUBST(XLIB_LIBS)
76
b6e3c554
HJYP
77gtk_modules="gtk+-2.0 >= 2.16.0"
78PKG_CHECK_MODULES(GTK, [$gtk_modules])
79AC_SUBST(GTK_CFLAGS)
80AC_SUBST(GTK_LIBS)
81
25a6a7b1
HJYP
82pango_modules="pango >= 1.20.0"
83PKG_CHECK_MODULES(PANGO, [$pango_modules])
84AC_SUBST(PANGO_CFLAGS)
85AC_SUBST(PANGO_LIBS)
86
87glib_modules="glib-2.0 >= 2.16.0"
88PKG_CHECK_MODULES(GLIB, [$glib_modules])
89AC_SUBST(GLIB_CFLAGS)
90AC_SUBST(GLIB_LIBS)
91
92gio_modules="gthread-2.0 gio-unix-2.0 >= 2.18.0"
b6e3c554
HJYP
93PKG_CHECK_MODULES(GIO, [$gio_modules])
94AC_SUBST(GIO_CFLAGS)
95AC_SUBST(GIO_LIBS)
96
97gmodule_modules="gmodule-2.0"
98PKG_CHECK_MODULES(GMODULE, [$gmodule_modules])
99AC_SUBST(GMODULE_CFLAGS)
100AC_SUBST(GMODULE_LIBS)
101
1bba6c9c 102fm_modules="libfm >= 1.0 libfm-gtk >= 1.0"
b6e3c554
HJYP
103PKG_CHECK_MODULES(FM, [$fm_modules])
104AC_SUBST(FM_CFLAGS)
105AC_SUBST(FM_LIBS)
106
9b7ac5a0 107menu_modules="libmenu-cache >= 0.3.2"
b6e3c554
HJYP
108PKG_CHECK_MODULES(MENU_CACHE, [$menu_modules])
109AC_SUBST(MENU_CACHE_CFLAGS)
110AC_SUBST(MENU_CACHE_LIBS)
111
ab86a7a2 112GETTEXT_PACKAGE=pcmanfm
b6e3c554 113AC_SUBST(GETTEXT_PACKAGE)
121e58ff
HJYP
114
115# Generate po/LINGUAS on the fly rather than relying on translators
116# to maintain it manually. This also overcome the problem that Transifex
117# cannot add a language to po/LINGUAS if a new po file is submitted.
118rm -f $srcdir/po/LINGUAS
119for po_file in `ls $srcdir/po/*.po | sort`;
120do
121 lang=`echo "$po_file" | sed "s|.*/po/\(.*\)\.po|\1|g"`
122 echo $lang >> $srcdir/po/LINGUAS
123done
124
08e70fea 125AM_GLIB_GNU_GETTEXT
b6e3c554
HJYP
126AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
127
128AC_CONFIG_FILES([
129 Makefile
130 src/Makefile
131 po/Makefile.in
f2a36fcd 132 data/Makefile
77cb39fa 133 data/pcmanfm.1
f2a36fcd
HJYP
134 data/ui/Makefile
135 data/ui/about.glade
b6e3c554
HJYP
136])
137
138AC_OUTPUT
139
140echo Ready to make pcmanfm