| 1 |
AC_INIT([caja-extensions], 1.26.1, [https://github.com/mate-desktop/caja-extensions], [caja-extensions], [https://mate-desktop.org]) |
| 2 |
|
| 3 |
AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-xz tar-ustar check-news]) |
| 4 |
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) |
| 5 |
AC_CONFIG_HEADERS(config.h) |
| 6 |
AC_CONFIG_MACRO_DIR([m4]) |
| 7 |
|
| 8 |
AM_DISABLE_STATIC |
| 9 |
AC_PROG_CC |
| 10 |
AM_PROG_LIBTOOL |
| 11 |
AC_PROG_INSTALL |
| 12 |
AC_PROG_MAKE_SET |
| 13 |
|
| 14 |
CAJA_REQUIRED=1.21.3 |
| 15 |
LIBMATE_DESKTOP_REQUIRED=1.17.0 |
| 16 |
GLIB_REQUIRED=2.50.0 |
| 17 |
GTK_REQUIRED=3.22.0 |
| 18 |
|
| 19 |
GLIB_GSETTINGS |
| 20 |
|
| 21 |
GTK_DOC_CHECK(1.9) |
| 22 |
|
| 23 |
MATE_COMMON_INIT |
| 24 |
MATE_COMPILE_WARNINGS |
| 25 |
|
| 26 |
# Check for pkgconfig first |
| 27 |
AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no) |
| 28 |
AC_PATH_PROG(PKG_CONFIG, pkg-config, no) |
| 29 |
|
| 30 |
# Give error and exit if we dont have pkgconfig |
| 31 |
if test "x$HAVE_PKGCONFIG" = "xno"; then |
| 32 |
AC_MSG_ERROR([you need to have pkgconfig installed !]) |
| 33 |
fi |
| 34 |
|
| 35 |
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` |
| 36 |
AC_SUBST(GLIB_GENMARSHAL) |
| 37 |
|
| 38 |
# GLIB_COMPILE_RESOURCES |
| 39 |
|
| 40 |
AC_ARG_VAR([GLIB_COMPILE_RESOURCES],[glib-compile-resources bin]) |
| 41 |
AC_PATH_PROG([GLIB_COMPILE_RESOURCES],[glib-compile-resources],[]) |
| 42 |
if test -z "$GLIB_COMPILE_RESOURCES"; then |
| 43 |
AC_MSG_ERROR([glib-compile-resources not found]) |
| 44 |
fi |
| 45 |
|
| 46 |
# XMLLINT |
| 47 |
|
| 48 |
AC_ARG_VAR([XMLLINT],[xmllint bin]) |
| 49 |
AC_PATH_PROG([XMLLINT],[xmllint],[]) |
| 50 |
if test -z "$XMLLINT"; then |
| 51 |
AC_MSG_ERROR([xmllint not found]) |
| 52 |
fi |
| 53 |
|
| 54 |
# Common requirements |
| 55 |
PKG_CHECK_MODULES(CAJA, |
| 56 |
libcaja-extension >= $CAJA_REQUIRED) |
| 57 |
AC_SUBST(CAJA_CFLAGS) |
| 58 |
AC_SUBST(CAJA_LIBS) |
| 59 |
|
| 60 |
# image-converter extension |
| 61 |
AC_ARG_ENABLE([image-converter], |
| 62 |
AS_HELP_STRING([--enable-image-converter], [Enable image-converter plugin]), |
| 63 |
[enable_image_converter=$enableval], |
| 64 |
[enable_image_converter=yes]) |
| 65 |
|
| 66 |
if test "x$enable_image-converter" = "xyes"; then |
| 67 |
PKG_CHECK_MODULES(IMAGE_CONVERTER, |
| 68 |
gtk+-3.0 >= $GTK_REQUIRED |
| 69 |
glib-2.0 >= $GLIB_REQUIRED |
| 70 |
gio-2.0 >= $GLIB_REQUIRED) |
| 71 |
AC_SUBST(IMAGE_CONVERTER_CFLAGS) |
| 72 |
AC_SUBST(IMAGE_CONVERTER_LIBS) |
| 73 |
fi |
| 74 |
|
| 75 |
AM_CONDITIONAL(ENABLE_IMAGE_CONVERTER, test x"$enable_image_converter" = "xyes") |
| 76 |
|
| 77 |
# open-terminal extension |
| 78 |
AC_ARG_ENABLE([open-terminal], |
| 79 |
AS_HELP_STRING([--enable-open-terminal], [Enable open-terminal plugin]), |
| 80 |
[enable_open_terminal=$enableval], |
| 81 |
[enable_open_terminal=yes]) |
| 82 |
|
| 83 |
if test "x$enable_open_terminal" = "xyes"; then |
| 84 |
PKG_CHECK_MODULES(OPENTERMINAL, |
| 85 |
glib-2.0 >= $GLIB_REQUIRED |
| 86 |
mate-desktop-2.0 >= $LIBMATE_DESKTOP_REQUIRED) |
| 87 |
AC_SUBST(OPENTERMINAL_CFLAGS) |
| 88 |
AC_SUBST(OPENTERMINAL_LIBS) |
| 89 |
fi |
| 90 |
|
| 91 |
AM_CONDITIONAL(ENABLE_OPEN_TERMINAL, test x"$enable_open_terminal" = "xyes") |
| 92 |
|
| 93 |
# sendto extension |
| 94 |
AC_ARG_ENABLE([sendto], |
| 95 |
AS_HELP_STRING([--enable-sendto], [Enable sendto plugin]), |
| 96 |
[enable_sendto=$enableval], |
| 97 |
[enable_sendto=yes]) |
| 98 |
|
| 99 |
if test "x$enable_sendto" = "xyes"; then |
| 100 |
GTHREAD_REQUIRED=2.6.0 |
| 101 |
DBUS_REQUIRED=1.0 |
| 102 |
DBUS_GLIB_REQUIRED=0.60 |
| 103 |
GUPNP_REQUIRED=0.13 |
| 104 |
PKG_CHECK_MODULES(SENDTO, |
| 105 |
glib-2.0 >= $GLIB_REQUIRED |
| 106 |
gthread-2.0 >= $GTHREAD_REQUIRED |
| 107 |
gmodule-2.0 >= $GLIB_REQUIRED |
| 108 |
gobject-2.0 >= $GLIB_REQUIRED |
| 109 |
gtk+-3.0 >= $GTK_REQUIRED) |
| 110 |
AC_SUBST(SENDTO_CFLAGS) |
| 111 |
AC_SUBST(SENDTO_LIBS) |
| 112 |
|
| 113 |
# The full list of plugins |
| 114 |
allowed_sendto_plugins="emailclient gajim caja-burn pidgin removable-devices upnp" |
| 115 |
|
| 116 |
sendto_plugin_error_or_ignore() |
| 117 |
{ |
| 118 |
if test "${error_on_bad_sendto_plugin}" = "1" ; then |
| 119 |
AC_MSG_ERROR([$1]) |
| 120 |
else |
| 121 |
AC_MSG_WARN([$1 (disabling sendto plugin)]) |
| 122 |
fi |
| 123 |
} |
| 124 |
|
| 125 |
AC_ARG_WITH([sendto-plugins], |
| 126 |
[AS_HELP_STRING([--with-sendto-plugins],[Which caja-sendto plugins to compile (default: auto; "all", "autodetect" are valid)])], |
| 127 |
[], [with_sendto_plugins=autodetect]) |
| 128 |
|
| 129 |
used_sendto_plugins="" |
| 130 |
used_sendto_plugins2="" |
| 131 |
|
| 132 |
if test "x${with_sendto_plugins}" = "xautodetect" ; then |
| 133 |
# Default to all plugins and just ignore them if they won't compile |
| 134 |
with_sendto_plugins="all" |
| 135 |
error_on_bad_sendto_plugin="0" |
| 136 |
else |
| 137 |
# Clean up the plugin list and error if a plugin won't compile |
| 138 |
with_sendto_plugins=`echo ,"${with_sendto_plugins}", | sed -e 's/[[ ,]][[ ,]]*/ /g' -e 's/,$//'` |
| 139 |
error_on_bad_sendto_plugin="1" |
| 140 |
fi |
| 141 |
|
| 142 |
# Iterate through the wanted plugins and weed out bad ones (or error) |
| 143 |
for wanted_sendto_plugin in ${with_sendto_plugins}; do |
| 144 |
for allowed_sendto_plugin in ${allowed_sendto_plugins}; do |
| 145 |
case ${wanted_sendto_plugin} in |
| 146 |
all) |
| 147 |
# List all plugins as being used |
| 148 |
used_sendto_plugins=${allowed_sendto_plugins} |
| 149 |
;; |
| 150 |
autodetect) |
| 151 |
# List all plugins as being used |
| 152 |
used_sendto_plugins=${allowed_sendto_plugins} |
| 153 |
;; |
| 154 |
${allowed_sendto_plugin}) used_sendto_plugins="${used_sendto_plugins} ${wanted_sendto_plugin}";; # List the plugin |
| 155 |
*) ;; |
| 156 |
esac |
| 157 |
done |
| 158 |
done |
| 159 |
|
| 160 |
# Check for plugin-specific requirements and error if necessary |
| 161 |
for sendto_plugin in ${used_sendto_plugins}; do |
| 162 |
add_sendto_plugin="1" |
| 163 |
|
| 164 |
case ${sendto_plugin} in |
| 165 |
emailclient) |
| 166 |
PKG_CHECK_MODULES(EMAILCLIENT, gio-2.0, |
| 167 |
enable_emailclient=yes, enable_emailclient=no) |
| 168 |
if test "${enable_emailclient}" != "yes" ; then |
| 169 |
sendto_plugin_error_or_ignore "you need gio-2.0 to build the emailclient plugin" |
| 170 |
add_sendto_plugin="0" |
| 171 |
fi |
| 172 |
;; |
| 173 |
gajim) |
| 174 |
AC_ARG_WITH(sendto_gajim, |
| 175 |
[AS_HELP_STRING(--with-sendto-gajim,[Path to Gajim install prefix])], |
| 176 |
[GAJIM_PATH="$withval"],[GAJIM_PATH="$prefix"]) |
| 177 |
|
| 178 |
GAJIM_SHARE_DIR="$GAJIM_PATH"/share/gajim |
| 179 |
|
| 180 |
PKG_CHECK_MODULES(DBUS, dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED, |
| 181 |
[AC_SUBST(DBUS_CFLAGS) |
| 182 |
AC_SUBST(DBUS_LIBS) |
| 183 |
enable_gajim=yes |
| 184 |
AC_DEFINE_UNQUOTED(GAJIM_SHARE_DIR, "$GAJIM_SHARE_DIR", [path to gajim share dir])], |
| 185 |
[enable_gajim=no]) |
| 186 |
|
| 187 |
if test "${enable_gajim}" != "yes" ; then |
| 188 |
sendto_plugin_error_or_ignore "you need dbus-glib installed to build the gajim plugin" |
| 189 |
add_sendto_plugin="0" |
| 190 |
fi |
| 191 |
;; |
| 192 |
caja-burn) |
| 193 |
PKG_CHECK_MODULES(GIO, gio-2.0, |
| 194 |
enable_burn=yes, enable_burn=no) |
| 195 |
if test "${enable_burn}" != "yes" ; then |
| 196 |
sendto_plugin_error_or_ignore "you need gio installed to build the caja-burn plugin" |
| 197 |
add_sendto_plugin="0" |
| 198 |
fi |
| 199 |
;; |
| 200 |
pidgin) |
| 201 |
PKG_CHECK_MODULES(PIDGIN, dbus-glib-1 >= $DBUS_GLIB_REQUIRED, |
| 202 |
enable_pidgin=yes, enable_pidgin=no) |
| 203 |
if test "${enable_pidgin}" != "yes" ; then |
| 204 |
sendto_plugin_error_or_ignore "you need dbus-glib installed to build the pidgin plugin" |
| 205 |
add_sendto_plugin="0" |
| 206 |
fi |
| 207 |
;; |
| 208 |
removable-devices) |
| 209 |
PKG_CHECK_MODULES(GIO, gio-2.0, |
| 210 |
enable_removable=yes, enable_removable=no) |
| 211 |
if test "${enable_removable}" != "yes" ; then |
| 212 |
sendto_plugin_error_or_ignore "you need gio-2.0 installed to build the removable-devices plugin" |
| 213 |
add_sendto_plugin="0" |
| 214 |
fi |
| 215 |
;; |
| 216 |
upnp) |
| 217 |
PKG_CHECK_MODULES(UPNP, gupnp-1.2 >= $GUPNP_REQUIRED, |
| 218 |
enable_upnp=yes AC_DEFINE([HAS_GUPNP_VERSION_1_2], 1, ["Version is at least 1.2"]), enable_upnp=no) |
| 219 |
PKG_CHECK_MODULES(UPNP, gupnp-1.0 >= $GUPNP_REQUIRED, |
| 220 |
enable_upnp=yes, enable_upnp=no) |
| 221 |
if test "${enable_upnp}" != "yes" ; then |
| 222 |
sendto_plugin_error_or_ignore "you need gupnp installed to build the upnp plugin" |
| 223 |
add_sendto_plugin="0" |
| 224 |
fi |
| 225 |
;; |
| 226 |
esac |
| 227 |
|
| 228 |
# Add the specified plugin |
| 229 |
if test "${add_sendto_plugin}" = "1" ; then |
| 230 |
used_sendto_plugins2="${used_sendto_plugins2} ${sendto_plugin}" |
| 231 |
fi |
| 232 |
done |
| 233 |
|
| 234 |
ALL_SENDTO_PLUGINS=$allowed_sendto_plugins |
| 235 |
SENDTO_PLUGINS=$used_sendto_plugins2 |
| 236 |
|
| 237 |
dnl Error out if no plugins will be built |
| 238 |
if test -z "${SENDTO_PLUGINS}" ; then |
| 239 |
AC_MSG_ERROR([No sendto plugins will be built, and caja-sendto requires at least one]) |
| 240 |
fi |
| 241 |
|
| 242 |
AC_MSG_CHECKING([which sendto plugins to compile]) |
| 243 |
AC_MSG_RESULT([$SENDTO_PLUGINS]) |
| 244 |
|
| 245 |
AC_SUBST([ALL_SENDTO_PLUGINS]) |
| 246 |
AC_SUBST([SENDTO_PLUGINS]) |
| 247 |
|
| 248 |
dnl For the pidgin sendto plugin |
| 249 |
AM_CONDITIONAL(HAVE_SENDTO_PIDGIN, test "x$enable_pidgin" = "xyes") |
| 250 |
|
| 251 |
dnl For the GIO based plugins |
| 252 |
enable_nst_common=no |
| 253 |
if test "x$enable_burn" = "xyes" -o "x$enable_removable" = "xyes"; then |
| 254 |
enable_nst_common=yes |
| 255 |
fi |
| 256 |
AM_CONDITIONAL(HAVE_GIO, test "x$enable_nst_common" = "xyes") |
| 257 |
|
| 258 |
if test "x${SENDTO_PLUGINS}" != "x" ; then |
| 259 |
for allowed_sendto_plugin in ${ALL_SENDTO_PLUGINS}; do |
| 260 |
for sendto_plugin in ${SENDTO_PLUGINS}; do |
| 261 |
case ${allowed_sendto_plugin} in |
| 262 |
${sendto_plugin}) |
| 263 |
AC_MSG_NOTICE([** ${allowed_sendto_plugin} sendto plugin enabled]) |
| 264 |
continue 2 |
| 265 |
;; |
| 266 |
*);; |
| 267 |
esac |
| 268 |
done |
| 269 |
AC_MSG_NOTICE([ ${allowed_sendto_plugin} sendto plugin disabled]) |
| 270 |
done |
| 271 |
else |
| 272 |
AC_MSG_NOTICE([ No caja-sendto plugins enabled]) |
| 273 |
fi |
| 274 |
fi |
| 275 |
AM_CONDITIONAL(ENABLE_SENDTO, test x"$enable_sendto" = "xyes") |
| 276 |
|
| 277 |
# share extension |
| 278 |
AC_ARG_ENABLE([share], |
| 279 |
AS_HELP_STRING([--enable-share], [Enable share plugin]), |
| 280 |
[enable_share=$enableval], |
| 281 |
[enable_share=yes]) |
| 282 |
|
| 283 |
if test "x$enable_share" = "xyes"; then |
| 284 |
PKG_CHECK_MODULES(SHARE, |
| 285 |
glib-2.0 >= $GLIB_REQUIRED) |
| 286 |
AC_SUBST(SHARE_CFLAGS) |
| 287 |
AC_SUBST(SHARE_LIBS) |
| 288 |
fi |
| 289 |
|
| 290 |
AM_CONDITIONAL(ENABLE_SHARE, test x"$enable_share" = "xyes") |
| 291 |
|
| 292 |
# gksu extension |
| 293 |
AC_ARG_ENABLE([gksu], |
| 294 |
AS_HELP_STRING([--enable-gksu], [Enable gksu plugin]), |
| 295 |
[enable_gksu=$enableval], |
| 296 |
[enable_gksu=yes]) |
| 297 |
|
| 298 |
AM_CONDITIONAL(ENABLE_GKSU, test x"$enable_gksu" = "xyes") |
| 299 |
|
| 300 |
# wallpaper extension |
| 301 |
AC_ARG_ENABLE([wallpaper], |
| 302 |
AS_HELP_STRING([--enable-wallpaper], [Enable set as wallpaper plugin]), |
| 303 |
[enable_wallpaper=$enableval], |
| 304 |
[enable_wallpaper=yes]) |
| 305 |
|
| 306 |
AM_CONDITIONAL(ENABLE_WALLPAPER, test x"$enable_wallpaper" = "xyes") |
| 307 |
|
| 308 |
# xattr-tags extension |
| 309 |
AC_ARG_ENABLE([xattr-tags], |
| 310 |
AS_HELP_STRING([--enable-xattr-tags], [Enable xattr tags plugin]), |
| 311 |
[enable_xattr_tags=$enableval], |
| 312 |
[enable_xattr_tags=yes]) |
| 313 |
|
| 314 |
AM_CONDITIONAL(ENABLE_XATTR_TAGS, test x"$enable_xattr_tags" = "xyes") |
| 315 |
|
| 316 |
# Get caja extensions directory |
| 317 |
AC_ARG_WITH(cajadir, |
| 318 |
AS_HELP_STRING([--with-cajadir=DIR],[Installation path for Caja extension @<:@auto@:>@]), |
| 319 |
[ac_with_cajadir=$withval], |
| 320 |
[ac_with_cajadir=""]) |
| 321 |
if test "${ac_with_cajadir}" = ""; then |
| 322 |
ac_with_cajadir=`$PKG_CONFIG --variable=extensiondir libcaja-extension` |
| 323 |
fi |
| 324 |
AC_MSG_NOTICE([Installing caja plugins in ${ac_with_cajadir}]) |
| 325 |
AC_SUBST([CAJA_EXTENSION_DIR],[${ac_with_cajadir}]) |
| 326 |
|
| 327 |
# gettext |
| 328 |
GETTEXT_PACKAGE=AC_PACKAGE_NAME |
| 329 |
AC_SUBST(GETTEXT_PACKAGE) |
| 330 |
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext package]) |
| 331 |
|
| 332 |
AM_GNU_GETTEXT([external]) |
| 333 |
AM_GNU_GETTEXT_VERSION([0.19.8]) |
| 334 |
AM_CONDITIONAL([USE_NLS], [test "x${USE_NLS}" = "xyes"]) |
| 335 |
|
| 336 |
DISABLE_DEPRECATED_CPPFLAGS="-DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED" |
| 337 |
AC_SUBST(DISABLE_DEPRECATED_CPPFLAGS) |
| 338 |
|
| 339 |
AC_OUTPUT([ |
| 340 |
Makefile |
| 341 |
sendto/org.mate.Caja.Sendto.gschema.xml |
| 342 |
open-terminal/org.mate.caja-open-terminal.gschema.xml |
| 343 |
gksu/libcaja-gksu.caja-extension.desktop.in |
| 344 |
gksu/Makefile |
| 345 |
image-converter/libcaja-image-converter.caja-extension.desktop.in |
| 346 |
image-converter/Makefile |
| 347 |
open-terminal/libcaja-open-terminal.caja-extension.desktop.in |
| 348 |
open-terminal/Makefile |
| 349 |
sendto/libcaja-sendto.caja-extension.desktop.in |
| 350 |
sendto/Makefile |
| 351 |
sendto/caja-sendto.pc |
| 352 |
sendto/docs/Makefile |
| 353 |
sendto/docs/version.xml |
| 354 |
sendto/plugins/Makefile |
| 355 |
sendto/plugins/emailclient/Makefile |
| 356 |
sendto/plugins/gajim/Makefile |
| 357 |
sendto/plugins/caja-burn/Makefile |
| 358 |
sendto/plugins/pidgin/Makefile |
| 359 |
sendto/plugins/removable-devices/Makefile |
| 360 |
sendto/plugins/upnp/Makefile |
| 361 |
share/libcaja-share.caja-extension.desktop.in |
| 362 |
share/Makefile |
| 363 |
wallpaper/libcaja-wallpaper.caja-extension.desktop.in |
| 364 |
wallpaper/Makefile |
| 365 |
xattr-tags/libcaja-xattr-tags.caja-extension.desktop.in |
| 366 |
xattr-tags/Makefile |
| 367 |
po/Makefile.in |
| 368 |
]) |
| 369 |
|
| 370 |
echo " |
| 371 |
Configure summary: |
| 372 |
|
| 373 |
${PACKAGE_STRING} |
| 374 |
`echo $PACKAGE_STRING | sed "s/./=/g"` |
| 375 |
prefix: ${prefix} |
| 376 |
compiler: ${CC} |
| 377 |
cflags: ${CFLAGS} |
| 378 |
warning flags: ${WARN_CFLAGS} |
| 379 |
caja-extension dir: ${ac_with_cajadir} |
| 380 |
Native Language support: ${USE_NLS} |
| 381 |
|
| 382 |
Plugins to be built |
| 383 |
`echo "Plugins to be built" | sed "s/./=/g"` |
| 384 |
Image Converter: $enable_image_converter |
| 385 |
Open Terminal: $enable_open_terminal |
| 386 |
Sendto: $enable_sendto |
| 387 |
Share: $enable_share |
| 388 |
Gksu: $enable_gksu |
| 389 |
Wallpaper: $enable_wallpaper |
| 390 |
xattr Tags: $enable_xattr_tags |
| 391 |
" |