configure.ac 4.68 KB
Newer Older
Debarshi Ray's avatar
Debarshi Ray committed
1
AC_INIT([Photos],
Debarshi Ray's avatar
Debarshi Ray committed
2
        [3.31.1],
3
        [https://gitlab.gnome.org/GNOME/gnome-photos/issues],
Debarshi Ray's avatar
Debarshi Ray committed
4
        [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 foreign 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 21 22 23 24
AX_COMPILER_FLAGS([WARN_CFLAGS],
                  [WARN_LDFLAGS],
                  [$ax_is_release],
                  [],
                  [-Wno-cast-function-type -Wno-error=cast-function-type])
25

26 27 28 29 30 31
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.])])

Debarshi Ray's avatar
Debarshi Ray committed
32 33 34 35 36 37 38
AC_PROG_CC
AC_PROG_CC_C_O
AC_HEADER_STDC

AC_CHECK_LIBM
AC_SUBST(LIBM)

Debarshi Ray's avatar
Debarshi Ray committed
39 40
GLIB_GSETTINGS

41
CAIRO_MIN_VERSION=1.14.0
42
DAZZLE_MIN_VERSION=3.26.0
Saurav Agarwalla's avatar
Saurav Agarwalla committed
43
GDATA_MIN_VERSION=0.15.2
44
GDK_PIXBUF_MIN_VERSION=2.32
45
GEGL_MIN_VERSION=0.4.0
Yi-Soo An's avatar
Yi-Soo An committed
46
GEXIV2_MIN_VERSION=0.10.8
Álvaro Peña's avatar
Álvaro Peña committed
47
GFBGRAPH_MIN_VERSION=0.2.1
48
GLIB_MIN_VERSION=2.44.0
49
GOA_MIN_VERSION=3.8.0
Yi-Soo An's avatar
Yi-Soo An committed
50
GRILO_MIN_VERSION=0.3.5
51
GTK_MIN_VERSION=3.22.16
52

53 54 55
G_LOG_DOMAIN=AC_PACKAGE_TARNAME
AC_DEFINE_UNQUOTED([G_LOG_DOMAIN], ["$G_LOG_DOMAIN"], [Log domain])

Debarshi Ray's avatar
Debarshi Ray committed
56 57 58 59
GETTEXT_PACKAGE=AC_PACKAGE_TARNAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"],
                   [GETTEXT package name])
60 61 62 63 64 65

AX_REQUIRE_DEFINED([AM_GNU_GETTEXT_VERSION])
AM_GNU_GETTEXT_VERSION([0.19.8])

AX_REQUIRE_DEFINED([AM_GNU_GETTEXT])
AM_GNU_GETTEXT([external])
Debarshi Ray's avatar
Debarshi Ray committed
66

67 68
AC_DEFINE([PHOTOS_EPSILON], [1e-5], [Tolerance when comparing single or double precision floating point values])

Debarshi Ray's avatar
Debarshi Ray committed
69 70
LT_INIT

71 72 73 74 75 76 77 78 79 80 81 82 83 84
# ****************************************************************
# 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

Debarshi Ray's avatar
Debarshi Ray committed
85
PKG_CHECK_MODULES(BABL, [babl])
86
PKG_CHECK_MODULES(CAIRO, [cairo >= $CAIRO_MIN_VERSION cairo-gobject])
87
PKG_CHECK_MODULES(DAZZLE, [libdazzle-1.0 >= $DAZZLE_MIN_VERSION])
Álvaro Peña's avatar
Álvaro Peña committed
88
PKG_CHECK_MODULES(GFBGRAPH, [libgfbgraph-0.2 >= $GFBGRAPH_MIN_VERSION])
Saurav Agarwalla's avatar
Saurav Agarwalla committed
89
PKG_CHECK_MODULES(GDATA, [libgdata >= $GDATA_MIN_VERSION])
90
PKG_CHECK_MODULES(GEGL, [gegl-0.4 >= $GEGL_MIN_VERSION])
91
PKG_CHECK_MODULES(GEOCODE, [geocode-glib-1.0])
Yi-Soo An's avatar
Yi-Soo An committed
92
PKG_CHECK_MODULES(GEXIV2, [gexiv2 >= $GEXIV2_MIN_VERSION])
93
PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0 >= $GDK_PIXBUF_MIN_VERSION])
94
PKG_CHECK_MODULES(GLIB, [glib-2.0 >= $GLIB_MIN_VERSION])
95
PKG_CHECK_MODULES(GIO, [gio-2.0 gio-unix-2.0])
96

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

100
PKG_CHECK_MODULES(GOBJECT, [gobject-2.0])
101
PKG_CHECK_MODULES(GRILO, [grilo-0.3 >= $GRILO_MIN_VERSION])
102
PKG_CHECK_MODULES(GSETTINGS_DESKTOP_SCHEMAS, [gsettings-desktop-schemas])
103
PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= $GTK_MIN_VERSION])
104
PKG_CHECK_MODULES(GTK_UNIX_PRINT, [gtk+-unix-print-3.0])
105
PKG_CHECK_MODULES(JPEG, [libjpeg])
106
PKG_CHECK_MODULES(PNG, [libpng16])
107
PKG_CHECK_MODULES(TRACKER, [tracker-control-2.0 tracker-sparql-2.0])
Debarshi Ray's avatar
Debarshi Ray committed
108

Ignacio Casal Quinteiro's avatar
Ignacio Casal Quinteiro committed
109
LIBGD_INIT([
Debarshi Ray's avatar
Debarshi Ray committed
110
  gtk-hacks
Debarshi Ray's avatar
Debarshi Ray committed
111
  main-box
Ignacio Casal Quinteiro's avatar
Ignacio Casal Quinteiro committed
112 113
  main-icon-view
  static
114
  tagged-entry
115
][subprojects/libgd])
Ignacio Casal Quinteiro's avatar
Ignacio Casal Quinteiro committed
116

117 118 119 120 121 122 123 124
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)

GLIB_TESTS

125 126 127
GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable glib_compile_resources gio-2.0`
AC_SUBST(GLIB_COMPILE_RESOURCES)

128 129 130 131 132 133
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

134 135 136 137
#############################################
#Documentation
#############################################

138
AX_REQUIRE_DEFINED([YELP_HELP_INIT])
139 140
YELP_HELP_INIT

Debarshi Ray's avatar
Debarshi Ray committed
141 142 143
AC_CONFIG_FILES([
Makefile
data/Makefile
144
data/org.gnome.Photos.desktop.in
Jakub Steiner's avatar
Jakub Steiner committed
145
data/icons/Makefile
146
help/Makefile
147
subprojects/libgd/Makefile
Debarshi Ray's avatar
Debarshi Ray committed
148
src/Makefile
149
tests/Makefile
Debarshi Ray's avatar
Debarshi Ray committed
150 151 152
po/Makefile.in
])
AC_OUTPUT