1 AC_INIT([yandex-fotki-sharing-plugin], [0.1])
2 AM_INIT_AUTOMAKE([foreign])
5 AM_CONFIG_HEADER([config.h])
8 dnl =======================================================
9 dnl ===== Checks for programs
10 dnl =======================================================
26 dnl =======================================================
27 dnl ===== Extra CFLAGS
28 dnl =======================================================
30 # -Wunreachable-code can't be used with library
31 CFLAGS="$CFLAGS -pedantic-errors -Wall -Wmissing-prototypes -Wcast-align -std=c99"
33 # set -fgnu89-inline for GCC4 compilers
34 if test -z "$ac_cv_prog_CC"; then
37 configure_gcc="$ac_cv_prog_CC"
39 if $configure_gcc --version | sed -e 's,\..*,.,' -e q | grep -q 4.$ ; then
40 CFLAGS="$CFLAGS -fgnu89-inline"
44 dnl =======================================================
45 dnl ===== Checks for libraries
46 dnl =======================================================
48 dnl PKG_CHECK_MODULES(PACKAGE, [glib-2.0 gtk+-2.0 libsharing conic libosso])
49 PKG_CHECK_MODULES(PACKAGE, [glib-2.0 gtk+-2.0 libsharing conic libxml-2.0 libcurl])
50 AC_SUBST(PACKAGE_CFLAGS)
51 AC_SUBST(PACKAGE_LIBS)
53 dnl = Check that we have libsharing ============================================
54 PKG_CHECK_MODULES(SHARING, libsharing)
56 dnl = Check that we have libxml2 ============================================
57 PKG_CHECK_MODULES(XML, libxml-2.0)
59 dnl = Check that we have libcurl ============================================
60 PKG_CHECK_MODULES(CURL, libcurl)
62 dnl =======================================================
63 dnl ===== Checks for dirs
64 dnl =======================================================
68 pluginsdir=`$PKG_CONFIG libsharing --variable=pluginsdir`
71 servicesdir=`$PKG_CONFIG libsharing --variable=servicesdir`
75 dnl =======================================================
76 dnl ===== Debug messages
77 dnl =======================================================
79 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Turn on debug messages]),
80 enable_debug=yes, enable_debug=no)
82 if test x$enable_debug = xyes; then
83 DEBUG_CFLAGS="-DOSSOLOG_COMPILE"
84 AC_SUBST(DEBUG_CFLAGS)
88 dnl =======================================================
89 dnl ===== Localisation
90 dnl =======================================================
92 dnl Set PACKAGE_LOCALE_DIR in config.h
94 if test "x${prefix}" = "xNONE"; then
95 AC_DEFINE_UNQUOTED([PACKAGE_LOCALE_DIR], ["${ac_default_prefix}/${DATADIRNAME}/locale"],[Locale directory])
97 AC_DEFINE_UNQUOTED([PACKAGE_LOCALE_DIR], ["${prefix}/${DATADIRNAME}/locale"], [Locale directory])
99 AC_SUBST(PACKAGE_LOCALE_DIR)
102 dnl =======================================================
103 dnl ===== Creating output files
104 dnl =======================================================
109 data/yandexfotki.service.xml
114 dnl =======================================================
116 dnl =======================================================
119 echo " $PACKAGE $VERSION"
120 echo " ==================="
122 echo " Debug messages: ${enable_debug}"
123 echo " Plug-ins directory: ${pluginsdir}"
124 echo " Services directory: ${servicesdir}"