Initial import.
[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])
5AC_INIT([pcmanfm], [0.7], [http://pcmanfm.sf.net/])
6AM_INIT_AUTOMAKE([-Wall -Werror foreign])
7
8AC_CONFIG_HEADERS([config.h])
9
10# Checks for programs.
11AC_ISC_POSIX
12AC_PROG_CC
13AM_PROG_LIBTOOL
14AM_PROG_CC_STDC
15AC_HEADER_STDC
16
17# Checks for header files.
18AC_HEADER_STDC
19
20# Checks for typedefs, structures, and compiler characteristics.
21
22# Checks for library functions.
23
24# Large file support
25AC_ARG_ENABLE([largefile],
26 AS_HELP_STRING([--enable-largefile],
27 [enable Large file support (default: yes)]),
28 largefile=$enableval, largefile="yes")
29
30if test x"$largefile" = x"yes"; then
31 CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
32 AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support])
33 AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits])
34fi
35
36AC_ARG_ENABLE(
37 [cast-checks],
38 AS_HELP_STRING([--enable-cast-checks],
39 [enable Glib casting checks (default: disable)]),
40 cast_checks=$enableval, cast_checks="no")
41G_CAST_CHECKS=""
42if test x"$cast_checks" = "xno"; then
43 G_CAST_CHECKS="-DG_DISABLE_CAST_CHECKS"
44fi
45AC_SUBST(G_CAST_CHECKS)
46
47# intltool
48IT_PROG_INTLTOOL([0.40.0])
49
50# Checks for libraries.
51gtk_modules="gtk+-2.0 >= 2.16.0"
52PKG_CHECK_MODULES(GTK, [$gtk_modules])
53AC_SUBST(GTK_CFLAGS)
54AC_SUBST(GTK_LIBS)
55
56gio_modules="gthread-2.0 gio-unix-2.0"
57PKG_CHECK_MODULES(GIO, [$gio_modules])
58AC_SUBST(GIO_CFLAGS)
59AC_SUBST(GIO_LIBS)
60
61gmodule_modules="gmodule-2.0"
62PKG_CHECK_MODULES(GMODULE, [$gmodule_modules])
63AC_SUBST(GMODULE_CFLAGS)
64AC_SUBST(GMODULE_LIBS)
65
66fm_modules="libfm"
67PKG_CHECK_MODULES(FM, [$fm_modules])
68AC_SUBST(FM_CFLAGS)
69AC_SUBST(FM_LIBS)
70
71menu_modules="libmenu-cache"
72PKG_CHECK_MODULES(MENU_CACHE, [$menu_modules])
73AC_SUBST(MENU_CACHE_CFLAGS)
74AC_SUBST(MENU_CACHE_LIBS)
75
76GETTEXT_PACKAGE=pcmanfm
77AC_SUBST(GETTEXT_PACKAGE)
78AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
79
80AC_CONFIG_FILES([
81 Makefile
82 src/Makefile
83 po/Makefile.in
84])
85
86AC_OUTPUT
87
88echo Ready to make pcmanfm
89