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
|
AC_PREREQ([2.63])
AC_INIT([growl-for-linux], m4_esyscmd([cat VERSION | tr -d '\n']), [mattn.jp@gmail.com])
AC_CONFIG_SRCDIR([gol.c])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])
# Smart output for automake.
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# Checks for programs.
AC_PROG_CC_C99
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AM_PROG_CC_C_O
# Enable -Werror.
AC_ARG_ENABLE([werror], [AS_HELP_STRING([--enable-werror], [enable -Werror])], [werror_flag=yes])
case ${werror_flag} in
yes) CFLAGS="-Werror ${CFLAGS}";;
esac
# Checks for libraries.
PKG_CHECK_MODULES(GLIB2, glib-2.0)
PKG_CHECK_MODULES(GTHREAD2, gthread-2.0)
PKG_CHECK_MODULES(GTK2, gtk+-2.0)
PKG_CHECK_MODULES(GMODULE2, gmodule-2.0)
PKG_CHECK_MODULES(LIBCURL, libcurl)
PKG_CHECK_MODULES(LIBXML2, libxml-2.0)
PKG_CHECK_MODULES(OPENSSL, openssl)
PKG_CHECK_MODULES(SQLITE3, sqlite3)
PKG_CHECK_MODULES(NOTIFY, libnotify,
[ENABLE_LIBNOTIFY="display/libnotify"
AC_SUBST([ENABLE_LIBNOTIFY])
AC_CONFIG_FILES([display/libnotify/Makefile])],
[ENABLE_LIBNOTIFY=""])
AYATANA_APPINDICATOR_REQUIRED=0.5.4
AC_ARG_ENABLE(ayatana-appindicator,
AS_HELP_STRING([--enable-ayatana-appindicator[=@<:@no/auto/yes@:>@]],
[Build support for Ayatana application indicators ]),
[enable_ayatana_appindicator=$enableval],
[enable_ayatana_appindicator="auto"])
if test x$enable_ayatana_appindicator = xauto ; then
PKG_CHECK_EXISTS([ayatana-appindicator-0.1 >= $AYATANA_APPINDICATOR_REQUIRED],
enable_ayatana_indicator="yes",
enable_ayatana_indicator="no")
fi
if test x$enable_ayatana_appindicator = xyes ; then
PKG_CHECK_EXISTS([ayatana-appindicator-0.1 >= $AYATANA_APPINDICATOR_REQUIRED],,
AC_MSG_ERROR([ayatana-appindicator-0.1 is not installed]))
PKG_CHECK_MODULES(AYATANA_APPINDICATOR,
ayatana-appindicator-0.1 >= $AYATANA_APPINDICATOR_REQUIRED)
AC_DEFINE(HAVE_AYATANA_APPINDICATOR, [1], [Have Ayatana application indicator])
fi
AM_CONDITIONAL(HAVE_AYATANA_APPINDICATOR, test x"$enable_ayatana_appindicator" = xyes)
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h memory.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/socket.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_C_RESTRICT
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_CHECK_TYPES([ptrdiff_t])
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([inet_ntoa memset socket strcasecmp strchr strncasecmp strndup strpbrk strstr strtol])
AC_CONFIG_FILES([Makefile
plugins/Makefile
data/Makefile
display/balloon/Makefile
display/fog/Makefile
display/nico2/Makefile
subscribe/tweets/Makefile
subscribe/rhythmbox/Makefile
data/gol.desktop])
AC_OUTPUT
|