configure.ac 5.07 KB
Newer Older
Debarshi Ray's avatar
Debarshi Ray committed
1
AC_INIT([Photos],
Debarshi Ray's avatar
Debarshi Ray committed
2
        [3.23.92],
Debarshi Ray's avatar
Debarshi Ray committed
3 4
        [https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-photos],
        [gnome-photos],
5
        [https://wiki.gnome.org/Apps/Photos])
Debarshi Ray's avatar
Debarshi Ray committed
6 7 8 9 10 11 12 13 14
AC_PREREQ(2.63)

AC_CONFIG_AUX_DIR([config])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src])

m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

15
AM_INIT_AUTOMAKE([dist-xz no-dist-gzip serial-tests tar-ustar])
16
AM_MAINTAINER_MODE([enable])
Debarshi Ray's avatar
Debarshi Ray committed
17

Pranav Kant's avatar
Pranav Kant committed
18 19
AX_IS_RELEASE([git-directory])

20
AX_CHECK_ENABLE_DEBUG([yes],,, [$ax_is_release])
21
AX_COMPILER_FLAGS([WARN_CFLAGS], [WARN_LDFLAGS], [$ax_is_release])
22

23 24 25 26 27 28
AS_IF([test "x$ax_is_release" != "xyes"], [PACKAGE_COMMIT_ID=$(git describe)])
AS_IF([test -n "$PACKAGE_COMMIT_ID"],
      [AC_DEFINE_UNQUOTED([PACKAGE_COMMIT_ID],
                          ["$PACKAGE_COMMIT_ID"],
                          [Define to the description of this package's latest commit.])])

29
AC_CANONICAL_HOST
Debarshi Ray's avatar
Debarshi Ray committed
30 31 32 33 34 35 36
AC_PROG_CC
AC_PROG_CC_C_O
AC_HEADER_STDC

AC_CHECK_LIBM
AC_SUBST(LIBM)

Debarshi Ray's avatar
Debarshi Ray committed
37 38
GLIB_GSETTINGS

39
CAIRO_MIN_VERSION=1.14.0
Saurav Agarwalla's avatar
Saurav Agarwalla committed
40
GDATA_MIN_VERSION=0.15.2
41
GEGL_MIN_VERSION=0.3.14
Álvaro Peña's avatar
Álvaro Peña committed
42
GFBGRAPH_MIN_VERSION=0.2.1
43
GLIB_MIN_VERSION=2.44.0
44
GOA_MIN_VERSION=3.8.0
45
GRILO_MIN_VERSION=0.3.0
46
GTK_MIN_VERSION=3.22.10
47

48
AX_REQUIRE_DEFINED([IT_PROG_INTLTOOL])
49
IT_PROG_INTLTOOL([0.50.1])
Debarshi Ray's avatar
Debarshi Ray committed
50 51 52 53 54 55 56 57 58

GETTEXT_PACKAGE=AC_PACKAGE_TARNAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"],
                   [GETTEXT package name])
AM_GLIB_GNU_GETTEXT

LT_INIT

59 60 61 62 63 64 65 66 67 68 69 70 71 72
AC_CHECK_LIB([jpeg], [jpeg_destroy_decompress], , AC_MSG_ERROR([JPEG library not found]))
AC_MSG_CHECKING([for jpeglib.h])
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
#include <stdio.h>
#undef HAVE_STDDEF_H
#undef HAVE_STDLIB_H
#undef PACKAGE
#undef VERSION
#include <jpeglib.h>]])],
                  AC_MSG_RESULT([yes]),
                  AC_MSG_ERROR([JPEG header file not found]))
AC_CHECK_LIB([jpeg], [jpeg_save_markers], JPEG_LIBS='-ljpeg', AC_MSG_ERROR([JPEG library is too old]))
AC_SUBST(JPEG_LIBS)

73 74 75 76 77 78 79 80 81 82 83 84 85 86
# ****************************************************************
# Support for nl_langinfo (_NL_MEASUREMENT_MEASUREMENT) (optional)
# ****************************************************************
AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT])
AC_TRY_LINK([#include <langinfo.h>], [
char c;
c = *((unsigned char *)  nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
], have_langinfo_measurement=yes, have_langinfo_measurement=no)
AC_MSG_RESULT($have_langinfo_measurement)
if test "$have_langinfo_measurement" = "yes"; then
  AC_DEFINE([HAVE__NL_MEASUREMENT_MEASUREMENT], [1],
            [Define if _NL_MEASUREMENT_MEASUREMENT is available])
fi

87 88
GB_ENABLE_RDTSCP
AS_IF([test "x$enable_rdtscp" = "xyes"], [CFLAGS="$CFLAGS -DEGG_HAVE_RDTSCP"])
Debarshi Ray's avatar
Debarshi Ray committed
89 90 91 92 93
AC_CHECK_FUNCS([sched_getcpu])

AC_CHECK_FUNCS([shm_open], [LIBRT=], [AC_CHECK_LIB([rt], [shm_open], [LIBRT=-lrt], [LIBRT=])])
AC_SUBST(LIBRT)

Debarshi Ray's avatar
Debarshi Ray committed
94
PKG_CHECK_MODULES(BABL, [babl])
95
PKG_CHECK_MODULES(CAIRO, [cairo >= $CAIRO_MIN_VERSION cairo-gobject])
Álvaro Peña's avatar
Álvaro Peña committed
96
PKG_CHECK_MODULES(GFBGRAPH, [libgfbgraph-0.2 >= $GFBGRAPH_MIN_VERSION])
Saurav Agarwalla's avatar
Saurav Agarwalla committed
97
PKG_CHECK_MODULES(GDATA, [libgdata >= $GDATA_MIN_VERSION])
98
PKG_CHECK_MODULES(GEGL, [gegl-0.3 >= $GEGL_MIN_VERSION])
99
PKG_CHECK_MODULES(GEOCODE, [geocode-glib-1.0])
100
PKG_CHECK_MODULES(GEXIV2, [gexiv2])
101
PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0])
102
PKG_CHECK_MODULES(GLIB, [glib-2.0 >= $GLIB_MIN_VERSION])
103
PKG_CHECK_MODULES(GIO, [gio-2.0 gio-unix-2.0])
104

105 106 107
PKG_CHECK_MODULES(GNOME_DESKTOP, [gnome-desktop-3.0])
AC_DEFINE([GNOME_DESKTOP_USE_UNSTABLE_API], [], [We are aware that GNOME_DESKTOP's API can change])

108
PKG_CHECK_MODULES(GOA, [goa-1.0 >= $GOA_MIN_VERSION])
109 110
AC_DEFINE([GOA_API_IS_SUBJECT_TO_CHANGE], [], [We are aware that GOA's API can change])

111
PKG_CHECK_MODULES(GRILO, [grilo-0.3 >= $GRILO_MIN_VERSION])
112
PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= $GTK_MIN_VERSION])
113
PKG_CHECK_MODULES(GTK_UNIX_PRINT, [gtk+-unix-print-3.0])
114
PKG_CHECK_MODULES(PNG, [libpng16])
115
PKG_CHECK_MODULES(TRACKER, [tracker-control-1.0 tracker-sparql-1.0])
Debarshi Ray's avatar
Debarshi Ray committed
116

117
AX_REQUIRE_DEFINED([LIBGD_INIT])
Ignacio Casal Quinteiro's avatar
Ignacio Casal Quinteiro committed
118
LIBGD_INIT([
Debarshi Ray's avatar
Debarshi Ray committed
119
  gtk-hacks
Debarshi Ray's avatar
Debarshi Ray committed
120
  main-box
Ignacio Casal Quinteiro's avatar
Ignacio Casal Quinteiro committed
121 122
  main-icon-view
  static
123
  tagged-entry
Ignacio Casal Quinteiro's avatar
Ignacio Casal Quinteiro committed
124 125
])

126 127 128 129 130 131
AC_ARG_ENABLE(dogtail,
              [AS_HELP_STRING([--enable-dogtail],
                              [test using dogtail [default=yes]])],,
              enable_dogtail=yes)
AM_CONDITIONAL(ENABLE_DOGTAIL, test "$enable_dogtail" != no)

132
AX_REQUIRE_DEFINED([GLIB_TESTS])
133 134
GLIB_TESTS

135 136 137
GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable glib_compile_resources gio-2.0`
AC_SUBST(GLIB_COMPILE_RESOURCES)

138 139 140 141 142 143
AC_ARG_VAR([DESKTOP_FILE_VALIDATE], [the desktop-file-validate program])
AC_PATH_PROG([DESKTOP_FILE_VALIDATE], [desktop-file-validate], [])
if test -z "$DESKTOP_FILE_VALIDATE"; then
  AC_MSG_ERROR([desktop-file-validate not found])
fi

144 145 146 147
#############################################
#Documentation
#############################################

148
AX_REQUIRE_DEFINED([YELP_HELP_INIT])
149 150
YELP_HELP_INIT

151 152 153 154 155
# work around intltool-update issues during 'make distcheck'
AS_IF([test "x$0" != "x./configure"], [
  AC_SUBST([INTLTOOL_UPDATE], [/bin/true])
])

Debarshi Ray's avatar
Debarshi Ray committed
156 157 158
AC_CONFIG_FILES([
Makefile
data/Makefile
159
data/org.gnome.Photos.desktop.in
Jakub Steiner's avatar
Jakub Steiner committed
160
data/icons/Makefile
161
help/Makefile
162
libgd/Makefile
Debarshi Ray's avatar
Debarshi Ray committed
163
src/Makefile
164
tests/Makefile
Debarshi Ray's avatar
Debarshi Ray committed
165 166 167
po/Makefile.in
])
AC_OUTPUT