File: configure.ac

package info (click to toggle)
eog 3.20.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 23,520 kB
  • ctags: 4,242
  • sloc: ansic: 26,464; sh: 4,094; makefile: 557; xml: 354; python: 347
file content (366 lines) | stat: -rw-r--r-- 10,254 bytes parent folder | download
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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
AC_PREREQ(2.59)

m4_define(eog_major_version,  3)
m4_define(eog_minor_version, 20)
m4_define(eog_micro_version,  5)
m4_define(eog_version, eog_major_version.eog_minor_version.eog_micro_version)

AC_INIT([eog], eog_version, [http://bugzilla.gnome.org/enter_bug.cgi?product=eog], [eog])
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])

AC_CONFIG_MACRO_DIR([m4])

# Support silencing the build output if supported (automake-1.11+)
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

AC_DEFINE(EOG_MAJOR_VERSION, eog_major_version, [EOG major version])
AC_SUBST(EOG_MAJOR_VERSION,  eog_major_version)
AC_DEFINE(EOG_MINOR_VERSION, eog_minor_version, [EOG minor version])
AC_SUBST(EOG_MINOR_VERSION,  eog_minor_version)
AC_DEFINE(EOG_MICRO_VERSION, eog_micro_version, [EOG micro version])
AC_SUBST(EOG_MICRO_VERSION,  eog_micro_version)

EOG_API_VERSION=3.0
AC_SUBST(EOG_API_VERSION)

AC_CONFIG_HEADERS([config.h])

AM_MAINTAINER_MODE([enable])

GNOME_MAINTAINER_MODE_DEFINES
GNOME_COMPILE_WARNINGS
GNOME_DEBUG_CHECK

# Disable building static archives by default
LT_PREREQ([2.2.6])
LT_INIT([disable-static])

AC_PROG_CC
AM_PROG_CC_C_O
AC_PATH_PROG([GLIB_COMPILE_RESOURCES], [glib-compile-resources])
AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])

PKG_PROG_PKG_CONFIG

GTK_DOC_CHECK([1.16], [--flavour no-tmpl])

AC_CHECK_FUNCS(strptime)

# ****************************************************************
# Support for nl_langinfo (_NL_MEASUREMENT_MEASUREMENT) (optional)
# ****************************************************************
AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#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

# ***********
# Translation
# ***********

AM_GLIB_GNU_GETTEXT
IT_PROG_INTLTOOL([0.50.1])

GETTEXT_PACKAGE=AC_PACKAGE_NAME
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package.])

AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)

# ***************
# User documentation
# ***************
YELP_HELP_INIT

# **********
# GNOME Libs
# **********

GTK_REQUIRED=3.19.11
GLIB_REQUIRED=2.42.0
GNOME_DESKTOP_REQUIRED=2.91.2
GDKPIXBUF_REQUIRED=2.30.0
GTK_PRINT_REQUIRED=3.5.4
SHARED_MIME_INFO_REQUIRED=0.20
EXEMPI_REQUIRED=1.99.5
DESKTOP_SCHEMAS_REQUIRED=2.91.92
LIBPEAS_REQUIRED=0.7.4
LIBPEAS_GTK_REQUIRED=0.7.4

EOG_MODULES="gtk+-3.0 >= $GTK_REQUIRED \
             glib-2.0 >= $GLIB_REQUIRED \
             gio-2.0 >= $GLIB_REQUIRED \
             gio-unix-2.0 >= $GLIB_REQUIRED \
             gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED \
             gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED \
             gtk+-unix-print-3.0 >= $GTK_PRINT_REQUIRED \
             shared-mime-info >= $SHARED_MIME_INFO_REQUIRED \
             gsettings-desktop-schemas >= $DESKTOP_SCHEMAS_REQUIRED \
             libpeas-1.0 >= $LIBPEAS_REQUIRED \
             libpeas-gtk-1.0 >= $LIBPEAS_GTK_REQUIRED"

# Introspection
GOBJECT_INTROSPECTION_CHECK([0.9.3])

if test "$found_introspection" = "yes"; then
  have_introspection=yes
  AC_DEFINE([HAVE_INTROSPECTION], [1], [Define to enable GObject Introspection])
else
  have_introspection=no
fi

# ***************
# libm (required)
# ***************

LT_LIB_M

# ***************
# ZLIB (required)
# ***************

have_zlib=yes
AC_CHECK_HEADERS([zlib.h],
		 [AC_CHECK_LIB([z], [inflate],
			       [AC_CHECK_LIB([z], [crc32], [],
					     [have_zlib=no])],
			       [have_zlib=no])],
		 [have_zlib=no])

if test x$have_zlib = xno; then
  AC_MSG_ERROR([No sufficient zlib library found on your system.])
fi

# ***************
# EXIF (optional)
# ***************

LIBEXIF_REQUIRED=0.6.14

AC_ARG_WITH([libexif], AS_HELP_STRING([--without-libexif], [disable EXIF support]))
have_exif=no
if test x$with_libexif != xno; then
  PKG_CHECK_MODULES(EXIF, libexif >= $LIBEXIF_REQUIRED, have_exif=yes, have_exif=no)
  if test "x$have_exif" = "xyes"; then
    AC_CHECK_HEADER([libexif/exif-data.h],[],[have_exif=no])
  fi
fi
if test "x$have_exif" = "xyes"; then
  AC_DEFINE(HAVE_EXIF, 1, [EXIF Support.])
  EOG_MODULES="$EOG_MODULES libexif >= $LIBEXIF_REQUIRED"
fi

AM_CONDITIONAL([HAVE_EXIF], [test "x$have_exif" = "xyes"])

# *********************
# Little CMS (optional)
# *********************

AC_ARG_WITH([cms], AS_HELP_STRING([--without-cms], [disable colour management support]))
have_lcms=no
if test x$with_cms != xno; then
  PKG_CHECK_MODULES(LCMS, lcms2, have_lcms=yes, have_lcms=no)
fi
if test "x$have_lcms" = "xyes"; then
  AC_DEFINE(HAVE_LCMS, 1, [Little CMS Support.])
  EOG_MODULES="$EOG_MODULES lcms2"
fi

AM_CONDITIONAL([HAVE_LCMS], [test "x$have_lcms" = "xyes"])

# *********************
# Exempi (optional)
# *********************
AC_ARG_WITH(xmp, AS_HELP_STRING([--without-xmp], [disable special XMP support]))
have_exempi=no
if test x$with_xmp != xno; then
  PKG_CHECK_MODULES(EXEMPI, exempi-2.0 >= $EXEMPI_REQUIRED, have_exempi=yes, have_exempi=no)
fi
if test "x$have_exempi" = "xyes"; then
  AC_DEFINE(HAVE_EXEMPI,1, [XMP support.])
  EOG_MODULES="$EOG_MODULES exempi-2.0 >= $EXEMPI_REQUIRED"
fi

AM_CONDITIONAL([HAVE_EXEMPI], [test "x$have_exempi" = "xyes"])

# Build EXIF-related documentation if we really have support for it
if test "x$have_exif" = "xyes" || test "x$have_exempi" = "xyes"; then
  EOG_DOC_EXIF_START=""
  EOG_DOC_EXIF_STOP=""
else
  EOG_DOC_EXIF_START="<!--"
  EOG_DOC_EXIF_STOP="-->"
fi

AC_SUBST([EOG_DOC_EXIF_START])
AC_SUBST([EOG_DOC_EXIF_STOP])

# ********************
# Jpeg (semi-optional)
# ********************

AC_ARG_WITH(libjpeg, AS_HELP_STRING([--without-libjpeg], [disable special JPEG support]))
have_jpeg=no
have_libjpeg_80=no
if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
  AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
    have_jpeg=yes,
    have_jpeg=no
    AC_MSG_WARN(*** JPEG loader will not be built (JPEG library not found) ***))
  if test "$have_jpeg" = yes; then
    AC_MSG_CHECKING([for jpeglib.h])
    AC_PREPROC_IFELSE([AC_LANG_SOURCE(
                                      [[
#include <stdio.h>
#undef PACKAGE
#undef VERSION
#undef HAVE_STDLIB_H
#include <jpeglib.h>
                                       ]])],
                      [have_jpeg=yes], [have_jpeg=no])
    AC_MSG_RESULT($have_jpeg)
    if test "$have_jpeg" = "yes"; then
      LIBJPEG='-ljpeg'
      AC_DEFINE(HAVE_JPEG, 1, [Jpeg Support.])
      AC_DEFINE(HAVE_LIBJPEG, 1, [libjpeg is Present.])
      AC_CHECK_LIB(jpeg, jpeg_simple_progression,
        AC_DEFINE(HAVE_PROGRESSIVE_JPEG, 1, [Jpeg Progressive Saving Support.]),
        AC_MSG_WARN(JPEG library does not support progressive saving.))
	AC_MSG_CHECKING([[libjpeg version is 8 or greater]])
	AC_PREPROC_IFELSE([ AC_LANG_SOURCE(
					   [[
#include <stdio.h>
#include <jpeglib.h>
#if JPEG_LIB_VERSION < 80
#error "wrong version"
#endif					   ]])],
			  [AC_MSG_RESULT(yes)
			   have_libjpeg_80=yes],
		          [AC_MSG_RESULT(no)
		           have_libjpeg_80=no])
    else
      AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***)
    fi
  fi
fi

if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
  AC_MSG_ERROR([
*** Checks for JPEG loader failed. You can build without it by passing
*** --without-libjpeg to configure but some programs using GTK+ may
*** not work properly])
fi
AC_SUBST(LIBJPEG)
AM_CONDITIONAL(ENABLE_JPEG, test x$have_jpeg = xyes)
AM_CONDITIONAL(HAVE_LIBJPEG_80, test "x$have_libjpeg_80" = xyes)

# ***************
# RSVG (optional for scaling svg image)
# ***************

LIBRSVG_REQUIRED=2.36.2

AC_ARG_WITH([librsvg], AS_HELP_STRING([--without-librsvg], [disable RSVG support]))
have_rsvg=no
if test x$with_librsvg != xno; then
  PKG_CHECK_MODULES(RSVG, librsvg-2.0 >= $LIBRSVG_REQUIRED, have_rsvg=yes, have_rsvg=no)
fi
if test "x$have_rsvg" = "xyes"; then
  AC_DEFINE(HAVE_RSVG, 1, [RSVG Support.])
  EOG_MODULES="$EOG_MODULES librsvg-2.0 >= $LIBRSVG_REQUIRED"
fi

AM_CONDITIONAL([HAVE_RSVG], [test "x$have_rsvg" = "xyes"])

# ****************
# CFLAGS/LIBS init
# ****************

PKG_CHECK_MODULES(EOG, $EOG_MODULES)
AC_SUBST(EOG_CFLAGS)
AC_SUBST(EOG_LIBS)

# *******************************************************
# libX11 (required for TotemScrSaver and Color Profiling)
# *******************************************************

# Check GDK rendering target
gdk_target=`$PKG_CONFIG --variable=targets gdk-3.0`

if test "x$have_lcms" = "xyes" || test "$gdk_target" = "x11"; then
  PKG_CHECK_MODULES(X11, [x11], have_x11=yes, have_x11=no)

  if test "x$have_x11" != "xyes"; then
    # Fallback for X11 releases without .pc-files
    AC_PATH_XTRA
    if test x$no_x = xyes ; then
      AC_MSG_ERROR([X development libraries (libX11) not found])
    else
      X11_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
      AC_SUBST(X11_LIBS)
      have_x11=yes
    fi
  fi
fi

# *********
# GSettings
# *********

GLIB_GSETTINGS

# ***************
# Installed tests
# ***************
BEHAVE_INSTALLED_TESTS

AC_CONFIG_FILES([
Makefile
src/Makefile
jpegutils/Makefile
help/Makefile
po/Makefile.in
data/Makefile
data/eog.pc
data/eog.desktop.in
data/org.gnome.eog.gschema.xml
data/pixmaps/Makefile
data/icons/Makefile
data/icons/16x16/Makefile
data/icons/22x22/Makefile
data/icons/24x24/Makefile
data/icons/32x32/Makefile
data/icons/48x48/Makefile
data/icons/256x256/Makefile
data/icons/scalable/Makefile
doc/Makefile
doc/reference/Makefile
doc/reference/version.xml
doc/reference/eog-docs.xml
plugins/Makefile
])

AC_OUTPUT

echo "
Configure summary:

	Source code location .......:  ${srcdir}
	Compiler ...................:  ${CC}
	Extra Compiler Warnings ....:  ${WARN_CFLAGS}

	EXIF support ...............:  ${have_exif}
	XMP support ................:  ${have_exempi}
	JPEG support ...............:  ${have_jpeg}
	Colour management support ..:  ${have_lcms}
	GObject Introspection.......:  ${have_introspection}
"