configure.in.in 10.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# vi:set et ai sw=2 sts=2 ts=2: */
#-
# Copyright (c) 2004-2007 Benedikt Meurer <benny@xfce.org>
# Copyright (c) 2009 Jannis Pohlmann <jannis@xfce.org>
#
# This program is free software; you can redistribute it and/or 
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of 
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public 
# License along with this program; if not, write to the Free 
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
20

21 22 23
dnl ***************************
dnl *** Version information ***
dnl ***************************
24 25
m4_define([thunarx_verinfo], [0:0:0])
m4_define([thunarx_version_api], [2])
Stephan Arts's avatar
Stephan Arts committed
26 27
m4_define([thunar_version_major], [1])
m4_define([thunar_version_minor], [0])
Stephan Arts's avatar
Stephan Arts committed
28
m4_define([thunar_version_micro], [1])
Stephan Arts's avatar
Stephan Arts committed
29
m4_define([thunar_version_nano], [])
30 31 32
m4_define([thunar_version_build], [@REVISION@])
m4_define([thunar_version_tag], [git])
m4_define([thunar_version], [thunar_version_major().thunar_version_minor().thunar_version_micro()ifelse(thunar_version_nano(), [], [], [.thunar_version_nano()])ifelse(thunar_version_tag(), [git], [thunar_version_tag()-thunar_version_build()], [thunar_version_tag()])])
33

34 35 36
dnl *******************************************
dnl *** Debugging support for SVN snapshots ***
dnl *******************************************
37
m4_define([thunar_debug_default], [ifelse(thunar_version_tag(), [git], [yes], [minimum])])
38

39 40 41
dnl ***************************
dnl *** Initialize autoconf ***
dnl ***************************
42
AC_COPYRIGHT([Copyright (c) 2004-2009 The Thunar development team. All rights reserved.])
43
AC_INIT([Thunar], [thunar_version], [http://bugzilla.xfce.org/], [Thunar])
44
AC_PREREQ([2.50])
45
AC_CANONICAL_TARGET()
46 47
AC_REVISION([$Id$])

48 49 50
dnl ***************************
dnl *** Initialize automake ***
dnl ***************************
51
AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar])
52 53
AM_CONFIG_HEADER([config.h])
AM_MAINTAINER_MODE()
54
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
55

56 57 58
dnl *******************************
dnl *** Check for UNIX variants ***
dnl *******************************
59 60 61 62
AC_AIX()
AC_ISC_POSIX()
AC_MINIX()

63 64 65 66
if test "x$target_os" = "xlinux-gnu"; then
  AC_DEFINE([HAVE_LINUX], [], [Whether we are building on Linux or not])
fi

67 68 69
dnl ********************************
dnl *** Check for basic programs ***
dnl ********************************
70
AC_PROG_CC()
71
AC_PROG_LD()
72
AM_PROG_CC_C_O()
73
AC_PROG_INSTALL()
74
AC_PROG_INTLTOOL()
75 76 77 78 79 80
AC_CHECK_PROGS([PERL], [perl5 perl])

dnl **************************
dnl *** Initialize libtool ***
dnl **************************
AC_DISABLE_STATIC()
81 82
AC_PROG_LIBTOOL()

83 84 85
dnl **************************************
dnl *** Substitute version information ***
dnl **************************************
86 87
THUNARX_VERINFO=thunarx_verinfo()
THUNARX_VERSION_API=thunarx_version_api()
88 89 90
THUNAR_VERSION_MAJOR=thunar_version_major()
THUNAR_VERSION_MINOR=thunar_version_minor()
THUNAR_VERSION_MICRO=thunar_version_micro()
91 92
AC_SUBST([THUNARX_VERINFO])
AC_SUBST([THUNARX_VERSION_API])
93 94 95
AC_SUBST([THUNAR_VERSION_MAJOR])
AC_SUBST([THUNAR_VERSION_MINOR])
AC_SUBST([THUNAR_VERSION_MICRO])
96

97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
dnl ***********************************************
dnl *** Determine the u32 type required for tdb ***
dnl ***********************************************
AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([long])
AC_CHECK_SIZEOF([short])
AC_MSG_CHECKING([for 32bit unsigned integer])
case 4 in
$ac_cv_sizeof_int)   TDB_U32_TYPE="unsigned int" ;;
$ac_cv_sizeof_long)  TDB_U32_TYPE="unsigned long" ;;
$ac_cv_sizeof_short) TDB_U32_TYPE="unsigned short" ;;
esac
AC_SUBST([TDB_U32_TYPE])
AC_MSG_RESULT([$TDB_U32_TYPE])

112 113 114 115 116
dnl ***********************************************
dnl *** Work-around system-specific limitations ***
dnl ***********************************************
AC_SYS_LARGEFILE()

117 118 119
dnl **********************************
dnl *** Check for standard headers ***
dnl **********************************
120 121 122 123
AC_CHECK_HEADERS([ctype.h errno.h fcntl.h grp.h limits.h locale.h memory.h \
                  paths.h pwd.h sched.h signal.h stdarg.h stdlib.h string.h \
                  sys/mman.h sys/stat.h sys/time.h sys/types.h sys/uio.h \
                  sys/wait.h time.h])
124

125 126 127
dnl ************************************
dnl *** Check for standard functions ***
dnl ************************************
128
AC_FUNC_MMAP()
129 130
AC_CHECK_FUNCS([localeconv mkdtemp pread pwrite sched_yield setgroupent \
                setpassent strcoll strlcpy strptime symlink])
131

Benedikt Meurer's avatar
 
Benedikt Meurer committed
132 133 134
dnl ******************************
dnl *** Check for i18n support ***
dnl ******************************
135
XDT_I18N([@LINGUAS@])
Benedikt Meurer's avatar
 
Benedikt Meurer committed
136

137 138 139
dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
140 141 142 143 144 145
XDT_CHECK_PACKAGE([EXO], [exo-1], [0.3.101])
XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [2.18.0])
XDT_CHECK_PACKAGE([GIO], [gio-2.0], [2.18.0])
XDT_CHECK_PACKAGE([GTHREAD], [gthread-2.0], [2.18.0])
XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0])
XDT_CHECK_PACKAGE([GDK_PIXBUF], [gdk-pixbuf-2.0], [2.14.0])
Stephan Arts's avatar
Stephan Arts committed
146
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.6.0])
147
XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.7.1])
148

149 150 151 152 153
dnl ********************************************
dnl *** Check for session management support ***
dnl ********************************************
XDT_CHECK_LIBSM()

154
dnl **********************************
155
dnl *** Optional GIO UNIX features ***
156
dnl **********************************
157 158
XDT_CHECK_OPTIONAL_PACKAGE([GIO_UNIX], [gio-unix-2.0],
                           [2.18.0], [gio-unix], [GIO UNIX features])
159

160 161
dnl *******************************************************
dnl *** Optional support for gconf (GNOME thumbnailers) ***
162 163 164 165 166
dnl **********************************
dnl *** Optional support for D-BUS ***
dnl **********************************
XDT_CHECK_OPTIONAL_PACKAGE([DBUS], [dbus-glib-1],
                           [0.34], [dbus], [D-BUS support])
167 168 169 170 171 172 173 174 175

dnl *************************************************
dnl *** Optional support for startup notification ***
dnl *************************************************
XDT_CHECK_OPTIONAL_PACKAGE([LIBSTARTUP_NOTIFICATION],
                           [libstartup-notification-1.0],
                           [0.4], [startup-notification],
                           [startup notification library])

176 177 178 179 180
dnl *************************
dnl *** Check for gtk-doc ***
dnl *************************
GTK_DOC_CHECK([1.0])

181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
dnl ***************************************************
dnl *** Check if we need to build the documentation ***
dnl ***************************************************
AC_ARG_ENABLE([gen-doc], [AC_HELP_STRING([--enable-gen-doc], 
              [Generate HTML documentation (requires xsltproc, xml2po and xmllint) [default=no]])],, [enable_gen_doc=no])
if test x"$enable_gen_doc" = x"yes"; then
    AC_PATH_PROG([XSLTPROC], [xsltproc], [no])
    if test x"$XSLTPROC" = x"no"; then
        enable_gen_doc=no
    fi

    AC_PATH_PROG([XML2PO], [xml2po], [no])
    if test x"$XML2PO" = x"no"; then
        enable_gen_doc=no
    fi
196

197 198 199 200
    AC_PATH_PROG([XMLLINT], [xmllint], [no])
    if test x"$XML2PO" = x"no"; then
        enable_gen_doc=no
    fi
201
fi
202
AM_CONDITIONAL([GENERATE_DOCUMENTATION], [test x"$enable_gen_doc" = x"yes"])
203

204 205 206
dnl ***********************************
dnl *** Check for debugging support ***
dnl ***********************************
207
XDT_FEATURE_DEBUG([thunar_debug_default])
208

209 210 211 212 213 214
dnl *************************************
dnl *** Compensate for broken gtk-doc ***
dnl *************************************
XDT_SUPPORTED_FLAGS([GTK_DOC_EXTRA_CFLAGS], [-Wno-sign-compare])
AC_SUBST([GTK_DOC_EXTRA_CFLAGS])

215 216 217
dnl **************************************
dnl *** Check for linker optimizations ***
dnl **************************************
218
XDT_FEATURE_LINKER_OPTS()
219

220 221 222 223
dnl dnl ****************************************
dnl dnl *** Check for ELF visibility support ***
dnl dnl ****************************************
dnl XDT_FEATURE_VISIBILITY()
224

225 226 227
dnl *********************************
dnl *** Substitute platform flags ***
dnl *********************************
228 229
AC_MSG_CHECKING([PLATFORM_CPPFLAGS])
AC_MSG_RESULT([$PLATFORM_CPPFLAGS])
230
AC_SUBST([PLATFORM_CPPFLAGS])
231 232 233 234 235
AC_MSG_CHECKING([PLATFORM_CFLAGS])
AC_MSG_RESULT([$PLATFORM_CFLAGS])
AC_SUBST([PLATFORM_CFLAGS])
AC_MSG_CHECKING([PLATFORM_LDFLAGS])
AC_MSG_RESULT([$PLATFORM_LDFLAGS])
236 237
AC_SUBST([PLATFORM_LDFLAGS])

238 239 240
dnl ************************************
dnl *** Check for additional plugins ***
dnl ************************************
241
BM_THUNAR_PLUGIN_APR()
242
BM_THUNAR_PLUGIN_SBR()
243
BM_THUNAR_PLUGIN_TPA()
244
BM_THUNAR_PLUGIN_UCA()
245
BM_THUNAR_PLUGIN_WALLPAPER()
246

247 248
AC_OUTPUT([
Makefile
249
Thunar.spec
250 251
docs/Makefile
docs/design/Makefile
252
docs/manual/Makefile
253 254 255 256
docs/manual/images/Makefile
docs/manual/images/fr/Makefile
docs/manual/images/ja/Makefile
docs/manual/images/pl/Makefile
257
docs/papers/Makefile
258 259 260 261
docs/reference/Makefile
docs/reference/thunarx/Makefile
docs/reference/thunarx/version.xml
examples/Makefile
262
examples/tex-open-terminal/Makefile
263
icons/Makefile
264
icons/16x16/Makefile
265 266
icons/24x24/Makefile
icons/48x48/Makefile
267
icons/scalable/Makefile
268 269
pixmaps/Makefile
plugins/Makefile
270
plugins/thunar-apr/Makefile
271
plugins/thunar-sbr/Makefile
272
plugins/thunar-sendto-email/Makefile
273
plugins/thunar-tpa/Makefile
274
plugins/thunar-uca/Makefile
275
plugins/thunar-wallpaper/Makefile
Benedikt Meurer's avatar
 
Benedikt Meurer committed
276
po/Makefile.in
277
po-doc/Makefile
278 279
tdb/Makefile
tdb/tdbconfig.h
280
thunar/Makefile
281
thunarx/Makefile
282
thunarx/thunarx-2.pc
283
thunarx/thunarx-config.h
284
])
285 286 287 288 289 290 291 292

dnl ***************************
dnl *** Print configuration ***
dnl ***************************
echo
echo "Build Configuration:"
echo
if test x"$DBUS_FOUND" = x"yes"; then
293
echo "* D-BUS support:             yes"
294
else
295
echo "* D-BUS support:             no"
296
fi
297 298
if test x"$GIO_UNIX_FOUND" = x"yes"; then
echo "* GIO UNIX features:         yes"
299
else
300
echo "* GIO UNIX features:         no"
301 302
fi
if test x"$LIBSTARTUP_NOTIFICATION_FOUND" = x"yes"; then
303
echo "* Startup Notification:      yes"
304
else
305
echo "* Startup Notification:      no"
306
fi
307
echo "* Debug Support:             $enable_debug"
308
echo "* Generate Documentation:    $enable_gen_doc"
309 310 311
echo
echo "Additional Plugins:"
echo
312
echo "* Advanced Properties:       $ac_bm_thunar_plugin_apr"
313
echo "* Simple Builting Renamers:  $ac_bm_thunar_plugin_sbr"
314
echo "* Trash Panel Applet:        $ac_bm_thunar_plugin_tpa"
315
echo "* User Customizable Actions: $ac_bm_thunar_plugin_uca"
316
echo "* Wallpaper support:         $ac_bm_thunar_plugin_wallpaper"
317
echo