-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure.in
More file actions
231 lines (197 loc) · 6.93 KB
/
configure.in
File metadata and controls
231 lines (197 loc) · 6.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
dnl Process this file with autoconf to produce a configure script.
AC_INIT([pcmanfm], [0.5.2.4])
AC_CONFIG_SRCDIR([src/main.c])
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
AM_DISABLE_STATIC
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_LIBTOOL
AM_PROG_CC_STDC
AC_PROG_INTLTOOL
AC_HEADER_STDC
# libtool option to control which symbols are exported
# right now, symbols starting with _ are not exported
LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
# check for mmap()
AC_FUNC_MMAP
AC_CHECK_LIB(m, pow,, AC_MSG_FAILURE([libm not found]))
AC_CHECK_LIB(X11, XSendEvent,, AC_MSG_FAILURE([libX11 not found]))
gtk_modules="gtk+-2.0 >= 2.12.0 \
gthread-2.0"
PKG_CHECK_MODULES(GTK, [$gtk_modules])
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
sn_modules="libstartup-notification-1.0"
PKG_CHECK_MODULES(SN, [$sn_modules])
AC_SUBST(SN_CFLAGS)
AC_SUBST(SN_LIBS)
dnl linker optimizations
AC_MSG_CHECKING([whether $LD accepts --as-needed])
case `$LD --as-needed -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
LDFLAGS="$LDFLAGS -Wl,--as-needed"
AC_MSG_RESULT([yes])
;;
*)
AC_MSG_RESULT([no])
;;
esac
AC_MSG_CHECKING([whether $LD accepts -O1])
case `$LD -O1 -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
LDFLAGS="$LDFLAGS -Wl,-O1"
AC_MSG_RESULT([yes])
;;
*)
AC_MSG_RESULT([no])
;;
esac
AC_MSG_CHECKING([whether $LD accepts -Bsymbolic-functions])
case `$LD -Bsymbolic-functions -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions"
AC_MSG_RESULT([yes])
;;
*)
AC_MSG_RESULT([no])
;;
esac
AC_ARG_ENABLE(
[cast-checks],
AS_HELP_STRING([--enable-cast-checks],
[enable Glib casting checks (default: disable)]),
cast_checks=$enableval, cast_checks="no")
G_CAST_CHECKS=""
if test x"$cast_checks" = "xno"; then
G_CAST_CHECKS="-DG_DISABLE_CAST_CHECKS"
fi
AC_SUBST(G_CAST_CHECKS)
AC_ARG_ENABLE(
[hal],
AS_HELP_STRING([--enable-hal],
[build with Linux HAL support (default: yes)]),
use_hal=$enableval, use_hal="yes")
if test x"$use_hal" = x"yes"; then
dnl Check HAL support
hal_modules="dbus-glib-1 >= 0.31 hal >= 0.5.0 hal-storage"
PKG_CHECK_MODULES(HAL, [$hal_modules], [have_hal=yes], [have_hal=no])
if test x"$have_hal" = x"yes"; then
AC_DEFINE([HAVE_HAL], [1], [Define to 1 if you have HAL.])
else
AC_MSG_ERROR([To use HAL support, you must have developing packages of dbus-glib-1 (>=0.31), hal(>=0.5.0), and hal-storage, or you can use --disable-hal to disable HAL support.])
fi
fi
AM_CONDITIONAL(USE_HAL, test "$use_hal" = "yes")
AC_SUBST(HAL_CFLAGS)
AC_SUBST(HAL_LIBS)
AC_ARG_ENABLE([inotify],
AS_HELP_STRING([--enable-inotify],
[enable experimental Linux inotify support for file alteration monitor (currently broken) (default: no)]),
use_inotify=$enableval, use_inotify="no")
if test x"$use_inotify" = x"yes"; then
dnl Linux inotify is enabled.
dnl So, both of FAM and gamin are not needed.
AC_DEFINE(USE_INOTIFY, 1, [Whether to enable Linux inotify support])
else
dnl ***************************
dnl *** Check for Gamin/FAM ***
dnl ***************************
dnl *Modified from XFCE Thunar*
FAM_CFLAGS=""
FAM_LIBS=""
have_libfam=no
AC_CHECK_HEADERS([fam.h],
[
AC_CHECK_LIB([fam], [FAMOpen], [have_libfam="yes" FAM_LIBS="-lfam"])
])
if test x"$have_libfam" = x"yes"; then
dnl Define appropriate symbols
AC_DEFINE([HAVE_FAM_H], [1], [Define to 1 if you have the <fam.h> header file.])
AC_DEFINE([HAVE_LIBFAM], [1], [Define to 1 if the File Alteration Monitor is available.])
dnl Check for FAMNoExists (currently Gamin only)
save_LIBS="$LIBS"
LIBS="$LIBS $FAM_LIBS"
AC_CHECK_FUNCS([FAMNoExists])
LIBS="$save_LIBS"
else
AC_MSG_ERROR([Fatal Error: no fam or gamin detected.])
fi
fi
AC_SUBST([FAM_CFLAGS])
AC_SUBST([FAM_LIBS])
AC_ARG_ENABLE([largefile],
AS_HELP_STRING([--enable-largefile],
[enable Large file support (default: yes)]),
largefile=$enableval, largefile="yes")
if test x"$largefile" = x"yes"; then
CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support])
AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits])
fi
AC_ARG_ENABLE(
[superuser-checks],
AS_HELP_STRING([--disable-superuser-checks],
[disable checks running as super user (useful to LiveCD or embedded) (default: enable)]),
superuser_checks=$enableval, superuser_checks="yes")
if test x"$superuser_checks" = "xyes"; then
AC_DEFINE(SUPER_USER_CHECKS, 1, [Whether to check running as super user or not])
fi
AC_ARG_WITH(
[preferable-sudo],
AS_HELP_STRING([--with-preferable-sudo=PROG],
[Specify preferable program to switch to super user]),
[ preferable_sudo="$withval" ])
if test ! -z "$preferable_sudo"; then
CPPFLAGS="$CPPFLAGS -DPREFERABLE_SUDO_PROG=\\\"$preferable_sudo\\\""
fi
AC_ARG_ENABLE(
[desktop-integration],
AS_HELP_STRING([--disable-desktop-integration],
[disable desktop integrations such as icons (default: enable)]),
desktop_integration=$enableval, desktop_integration="yes")
if test x"$desktop_integration" = "xyes"; then
AC_DEFINE(DESKTOP_INTEGRATION, 1, [Whether to integrate desktop or not.])
fi
AM_CONDITIONAL(DESKTOP_INTEGRATION, test "$desktop_integration" = "yes")
dnl advanced compiler tweaking
CPPFLAGS="$CPPFLAGS -fstrict-aliasing -fmessage-length=0"
AC_CHECK_FUNC(euidaccess,[AC_DEFINE(HAVE_EUIDACCESS,[],[Define to 1 if euidaccess is available])])
AC_CHECK_FUNC(eaccess,[AC_DEFINE(HAVE_EACCESS,[],[Define to 1 if eaccess is available])])
AC_CHECK_FUNC(statvfs,[AC_DEFINE(HAVE_STATVFS,[],[Define to 1 if statvfs is available])])
# Gtk Builder
#AC_PATH_PROG([GTK_BUILDER_CONVERT],[gtk-builder-convert],[false])
#if test "$GTK_BUILDER_CONVERT" = "false"; then
# AC_MSG_ERROR([gtk-builder-convert not found])
#fi
GETTEXT_PACKAGE=pcmanfm
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
AM_GLIB_GNU_GETTEXT
AC_OUTPUT([
Makefile
src/Makefile
po/Makefile.in
data/Makefile
])
echo
echo PCMan File Manager........................... : Version $VERSION
echo
echo Prefix....................................... : $prefix
echo Linux HAL support............................ : $use_hal
echo Linux inotify support \(currently broken\)..... : $use_inotify
echo 64-bit Large file support.................... : $largefile
echo Show warnings if run as super user........... : $superuser_checks
if test ! -z "$preferable_sudo"; then
echo Preferable program to switch to super user... : $preferable_sudo
fi
echo Desktop icon integration..................... : $desktop_integration
echo
echo The binary will be installed in $prefix/bin
echo
echo https://github.com/ib/pcmanfm
echo
echo Please read README carefully if you are packaging PCManFM.
echo
echo