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