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 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
|
AC_PREREQ(2.52)
AC_INIT([nautilus-sendto],
[3.0.3],
[https://bugzilla.gnome.org/enter_bug.cgi?product=nautilus-sendto],
[nautilus-sendto])
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip check-news])
# Enable silent build when available (Automake 1.11)
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AM_MAINTAINER_MODE
AM_DISABLE_STATIC
AC_PROG_CC
AM_PROG_LIBTOOL
AC_PROG_INSTALL
AC_PROG_MAKE_SET
GLIB_GSETTINGS
dnl gtk-doc checks
GTK_DOC_CHECK(1.9)
GNOME_COMMON_INIT
GNOME_DEBUG_CHECK
GNOME_COMPILE_WARNINGS([maximum])
GNOME_CXX_WARNINGS
GNOME_MAINTAINER_MODE_DEFINES
ERROR_CFLAGS="-Wall -Wextra -Werror -Wno_missing_field_initializers -Wno_unused_parameter"
dnl --------------------------------------------------
GLIB_REQUIRED=2.25.9
GTHREAD_REQUIRED=2.6.0
GTK_REQUIRED=2.90.3
EBOOK_REQUIRED=1.5.3
NAUTILUS_EXTENSION=2.31.3
DBUS_REQUIRED=1.0
DBUS_GLIB_REQUIRED=0.60
GUPNP_REQUIRED=0.13
AC_SUBST(GLIB_REQUIRED)
AC_SUBST(GTHREAD_REQUIRED)
AC_SUBST(GTK_REQUIRED)
AC_SUBST(EBOOK_REQUIRED)
AC_SUBST(NAUTILUS_EXTENSION)
AC_SUBST(BLUETOOTH_REQUIRED)
AC_SUBST(DBUS_REQUIRED)
AC_SUBST(GUPNP_REQUIRED)
PKG_CHECK_MODULES(NAUTILUS_SENDTO,\
glib-2.0 >= $GLIB_REQUIRED \
gthread-2.0 >= $GTHREAD_REQUIRED \
gmodule-2.0 >= $GLIB_REQUIRED \
gtk+-3.0 >= $GTK_REQUIRED)
AC_SUBST(NAUTILUS_SENDTO_CFLAGS)
AC_SUBST(NAUTILUS_SENDTO_LIBS)
PKG_CHECK_MODULES(NAUTILUS_EXT_SENDTO,\
libnautilus-extension >= $NAUTILUS_EXTENSION)
AC_SUBST(NAUTILUS_EXT_SENDTO_CFLAGS)
AC_SUBST(NAUTILUS_EXT_SENDTO_LIBS)
dnl Get nautilus extensions directory
dnl ---------------------------------
AC_ARG_WITH(nautilusdir,
AS_HELP_STRING([--with-nautilusdir=DIR],[Installation path for Nautilus extension @<:@auto@:>@]),
[ac_with_nautilusdir=$withval],
[ac_with_nautilusdir=""])
if test "${ac_with_nautilusdir}" = ""; then
ac_with_nautilusdir=`pkg-config --variable=extensiondir libnautilus-extension`
fi
AC_MSG_NOTICE([installing nautilus plugin in ${ac_with_nautilusdir}])
AC_SUBST([NAUTILUS_EXTENSION_DIR],[${ac_with_nautilusdir}])
# The full list of plugins
allowed_plugins="evolution gajim nautilus-burn pidgin removable-devices upnp"
plugin_error_or_ignore()
{
if test "${error_on_bad_plugin}" = "1" ; then
AC_MSG_ERROR([$1])
else
AC_MSG_WARN([$1 (disabling plugin)])
fi
}
AC_ARG_WITH([plugins],
[AS_HELP_STRING([--with-plugins],[Which nautilus-sendto plugins to compile (default: auto; "all", "autodetect" are valid)])],
[], [with_plugins=autodetect])
used_plugins=""
used_plugins2=""
if test "x${with_plugins}" = "xautodetect" ; then
# Default to all plugins and just ignore them if they won't compile
with_plugins="all"
error_on_bad_plugin="0"
else
# Clean up the plugin list and error if a plugin won't compile
with_plugins=`echo ,"${with_plugins}", | sed -e 's/[[ ,]][[ ,]]*/ /g' -e 's/,$//'`
error_on_bad_plugin="1"
fi
# Iterate through the wanted plugins and weed out bad ones (or error)
for wanted_plugin in ${with_plugins}; do
for allowed_plugin in ${allowed_plugins}; do
case ${wanted_plugin} in
all)
# List all plugins as being used
used_plugins=${allowed_plugins}
;;
autodetect)
# List all plugins as being used
used_plugins=${allowed_plugins}
;;
${allowed_plugin}) used_plugins="${used_plugins} ${wanted_plugin}";; # List the plugin
*) ;;
esac
done
done
# Check for plugin-specific requirements and error if necessary
for plugin in ${used_plugins}; do
add_plugin="1"
case ${plugin} in
evolution)
PKG_CHECK_MODULES(NST_EBOOK, libebook-1.2 >= $EBOOK_REQUIRED libedataserverui-3.0,
enable_evolution=yes, enable_evolution=no)
if test "${enable_evolution}" != "yes" ; then
plugin_error_or_ignore "you need libebook from evolution-data-server to build the Evolution plugin"
add_plugin="0"
else
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $NST_EBOOK_CFLAGS"
AC_CHECK_TYPES([EContactPhotoType], , , [#include <libebook/e-contact.h>])
CPPFLAGS="$saved_CPPFLAGS"
fi
;;
gajim)
AC_ARG_WITH(gajim,
[AS_HELP_STRING(--with-gajim,[Path to Gajim install prefix])],
[GAJIM_PATH="$withval"],[GAJIM_PATH="$prefix"])
GAJIM_SHARE_DIR="$GAJIM_PATH"/share/gajim
PKG_CHECK_MODULES(DBUS, dbus-1 >= $DBUS_REQUIRED dbus-glib-1 >= $DBUS_GLIB_REQUIRED,
[
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
enable_gajim=yes
AC_DEFINE_UNQUOTED(GAJIM_SHARE_DIR, "$GAJIM_SHARE_DIR", [path to gajim share dir])
],
[
enable_gajim=no
]
)
if test "${enable_gajim}" != "yes" ; then
plugin_error_or_ignore "you need gajim and dbus-glib installed for the gajim plugin"
add_plugin="0"
fi
;;
nautilus-burn)
PKG_CHECK_MODULES(GIO, gio-2.0,
enable_burn=yes, enable_burn=no)
if test "${enable_burn}" != "yes" ; then
plugin_error_or_ignore "you need gio installed for the nautilus-burn plugin"
add_plugin="0"
fi
;;
pidgin)
PKG_CHECK_MODULES(PIDGIN, dbus-glib-1 >= $DBUS_GLIB_REQUIRED,
enable_pidgin=yes, enable_pidgin=no)
if test "${enable_pidgin}" != "yes" ; then
plugin_error_or_ignore "you need dbus-glib to build the pidgin plugin"
add_plugin="0"
fi
;;
removable-devices)
PKG_CHECK_MODULES(GIO, gio-2.0,
enable_removable=yes, enable_removable=no)
if test "${enable_removable}" != "yes" ; then
plugin_error_or_ignore "you need gio-2.0 to build the removable-devices plugin"
add_plugin="0"
fi
;;
upnp)
PKG_CHECK_MODULES(UPNP, gupnp-1.0 >= $GUPNP_REQUIRED,
enable_upnp=yes, enable_upnp=no)
if test "${enable_upnp}" != "yes" ; then
plugin_error_or_ignore "you need gupnp installed for the upnp plugin"
add_plugin="0"
fi
;;
esac
# Add the specified plugin
if test "${add_plugin}" = "1" ; then
used_plugins2="${used_plugins2} ${plugin}"
fi
done
ALL_PLUGINS=$allowed_plugins
PLUGINS=$used_plugins2
dnl Error out if no plugins will be built
if test -z "${PLUGINS}" ; then
AC_MSG_ERROR([No plugins will be built, and nautilus-sendto requires at least one])
fi
AC_MSG_CHECKING([which plugins to compile])
AC_MSG_RESULT([$PLUGINS])
AC_SUBST([ALL_PLUGINS])
AC_SUBST([PLUGINS])
dnl For the pidgin plugin
AM_CONDITIONAL(HAVE_PIDGIN, test "x$enable_pidgin" = "xyes")
dnl For the GIO based plugins
enable_nst_common=no
if test "x$enable_burn" = "xyes" -o "x$enable_removable" = "xyes"; then
enable_nst_common=yes
fi
AM_CONDITIONAL(HAVE_GIO, test "x$enable_nst_common" = "xyes")
GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)
IT_PROG_INTLTOOL([0.35.0])
GETTEXT_PACKAGE=nautilus-sendto
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [GetText Package])
AM_GLIB_GNU_GETTEXT
AC_OUTPUT([
Makefile
src/Makefile
src/nautilus-sendto.pc
src/plugins/Makefile
src/plugins/evolution/Makefile
src/plugins/gajim/Makefile
src/plugins/nautilus-burn/Makefile
src/plugins/pidgin/Makefile
src/plugins/removable-devices/Makefile
src/plugins/upnp/Makefile
docs/Makefile
docs/nautilus-sendto/Makefile
docs/nautilus-sendto/version.xml
po/Makefile.in
])
echo "-------------------------------------------------------"
echo " "
if test "x${PLUGINS}" != "x" ; then
for allowed_plugin in ${ALL_PLUGINS}; do
for plugin in ${PLUGINS}; do
case ${allowed_plugin} in
${plugin})
AC_MSG_NOTICE([** ${allowed_plugin} plugin enabled])
continue 2
;;
*);;
esac
done
AC_MSG_NOTICE([ ${allowed_plugin} plugin disabled])
done
else
AC_MSG_NOTICE([ No nautilus-sendto plugins enabled])
fi
echo " "
echo "-------------------------------------------------------"
|