File: configure.ac

package info (click to toggle)
pigment 0.3.6-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 7,060 kB
  • ctags: 7,318
  • sloc: ansic: 34,269; xml: 11,990; sh: 9,155; makefile: 560; perl: 383
file content (458 lines) | stat: -rw-r--r-- 15,504 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
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
AC_PREREQ(2.53)

dnl *** Pigment package ***

dnl When going to/from release please set the nano (4th number) right!
dnl Releases only do -Wall, Subversion and prerelease does -Werror too.
AC_INIT([Pigment], [0.3.6],
        [https://code.fluendo.com/pigment/trac/newticket],
        [pigment])
AG_GST_INIT

AC_CONFIG_SRCDIR([pgm/pgm.c])
AC_CONFIG_AUX_DIR([build-aux])
AM_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([1.7 dist-bzip2])
AS_VERSION
AS_NANO(PGM_SVN="no", PGM_SVN="yes")
AM_MAINTAINER_MODE
AC_GNU_SOURCE

dnl *** Versioning ***

PGM_MAJORMINOR=$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR
AC_SUBST(PGM_MAJORMINOR)
AC_DEFINE_UNQUOTED(PGM_MAJORMINOR, "PGM_MAJORMINOR",
                   [library major.minor version])

dnl CURRENT, REVISION, AGE
dnl - library source changed -> increment REVISION
dnl - interfaces added/removed/changed -> increment CURRENT, REVISION = 0
dnl - interfaces added -> increment AGE
dnl - interfaces removed -> AGE = 0
PGM_LT_CURRENT=5
PGM_LT_REV=0
PGM_LT_AGE=0
PGM_LT_VERSION="$PGM_LT_CURRENT:$PGM_LT_REV:$PGM_LT_AGE"
PGM_LT_LDFLAGS="-version-info $PGM_LT_VERSION"
AC_SUBST(PGM_LT_VERSION)
AC_SUBST(PGM_LT_LDFLAGS)

dnl *** Checks for arguments to configure ***

AG_GST_ARG_PROFILING
AG_GST_ARG_VALGRIND
AG_GST_ARG_GCOV
AG_GST_ARG_EXAMPLES

dnl define an ERROR_CFLAGS Makefile variable
AG_GST_SET_ERROR_CFLAGS($PGM_SVN)

dnl We want to have GST_INFO* messages printed when running Subversion builds
if test "x[$PGM_SVN]" = "xyes"; then
  PGM_DEFAULT_LOG_LEVEL=GST_LEVEL_INFO
else
  PGM_DEFAULT_LOG_LEVEL=GST_LEVEL_NONE
fi
AC_DEFINE_UNQUOTED(PGM_DEFAULT_LOG_LEVEL, $PGM_DEFAULT_LOG_LEVEL,
                   [Default error level to use for logging])

dnl *** Checks for typedefs, structures, functions and programs ***

AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_LIBTOOL
AC_C_CONST
AC_C_INLINE

AC_CHECK_LIB(m, fabs, AC_DEFINE(HAVE_FABS, 1,
             [Define to 1 if you have the `fabs' function.]))
AC_CHECK_LIB(m, sinf, AC_DEFINE(HAVE_SINF, 1,
             [Define to 1 if you have the `sinf' function.]))
AC_CHECK_LIB(m, cosf, AC_DEFINE(HAVE_COSF, 1,
             [Define to 1 if you have the `cosf' function.]))
AC_CHECK_LIB(m, sincosf, AC_DEFINE(HAVE_SINCOSF, 1,
             [Define to 1 if you have the `sincosf' function.]))
AC_CHECK_LIBM

dnl Perl is used in building documentation
AC_PATH_PROG(PERL_PATH, perl, no)
if test x$PERL_PATH = xno; then
  AC_MSG_ERROR(Could not find Perl)
fi

AC_PATH_PROG(VALGRIND_PATH, valgrind, no)
AM_CONDITIONAL(HAVE_VALGRIND, test ! "x$VALGRIND_PATH" = "xno")

dnl *** Check for host ****

AC_CANONICAL_HOST
case $host_os in
  darwin*)
    HOST_IS_DARWIN="yes"
    ;;
  *)
    HOST_IS_DARWIN="no"
    ;;
esac

dnl *** Versions of package requirements ***

AC_SUBST(glib_req, 2.8.0)
AC_SUBST(gstreamer_req, 0.10.0)
AC_SUBST(gstreamer_plugins_base_req, 0.10.0)
AC_SUBST(pango_req, 1.8)
AC_SUBST(pangocairo_req, 1.8)
AC_SUBST(cairo_req, 1.4)

dnl *** Core library checks ***

GTK_DOC_CHECK([1.3])

PKG_CHECK_MODULES(GLIB, glib-2.0 >= $glib_req)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)

GST_MAJORMINOR=0.10
AG_GST_CHECK_GST($GST_MAJORMINOR, [$gstreamer_req])
AG_GST_CHECK_GST_BASE($GST_MAJORMINOR, [$gstreamer_req])
AG_GST_CHECK_GST_PLUGINS_BASE($GST_MAJORMINOR, [$gstreamer_plugins_base_req])
AG_GST_CHECK_GST_CHECK($GST_MAJORMINOR, [$gstreamer_req], no)

dnl checks for GStreamer >= 0.10.13 to workaround a bug in older versions which
dnl prevent to register static plugins.
PKG_CHECK_MODULES(GST_0_10_13, gstreamer-0.10 >= 0.10.13,
                  [HAVE_GST_0_10_13=yes], [HAVE_GST_0_10_13=no])
if test "x$HAVE_GST_0_10_13" = xyes; then
  AC_DEFINE(HAVE_GST_0_10_13, 1, [Defined to 1 if you have gstreamer-0.10.13])
fi

dnl FIXME: Get rid of this by making sure gstreamer-check brings it in
dnl        check for "check", unit testing library/header.
AM_PATH_CHECK(0.9.2, HAVE_CHECK=yes, HAVE_CHECK=no)
AM_CONDITIONAL(HAVE_CHECK, test "x$HAVE_CHECK" = "xyes")

PKG_CHECK_MODULES(GDKPIXBUF, gdk-pixbuf-2.0)
AC_SUBST(GDKPIXBUF_CFLAGS)
AC_SUBST(GDKPIXBUF_LIBS)

dnl *** GTK+ widget checks ***

AC_ARG_ENABLE(gtk-widget,
  AC_HELP_STRING([--disable-gtk-widget], [disable building GTK+ widget]),
    [
      case "${enableval}" in
        yes) BUILD_GTK_WIDGET=yes ;;
        no)  BUILD_GTK_WIDGET=no ;;
        *)   AC_MSG_ERROR(bad value ${enableval} for --disable-gtk-widget) ;;
      esac
    ],
    [BUILD_GTK_WIDGET=yes])
AM_CONDITIONAL(BUILD_GTK_WIDGET, test "x$BUILD_GTK_WIDGET" = "xyes")

PKG_CHECK_MODULES(GTK, gtk+-2.0, [HAVE_GTK=yes], [HAVE_GTK=no])
AM_CONDITIONAL(HAVE_GTK, test x$HAVE_GTK = xyes)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)

if test x$HAVE_GTK = xyes -a x$BUILD_GTK_WIDGET = xyes; then
  HAVE_GTK_WIDGET="yes"
else
  HAVE_GTK_WIDGET="no"
fi
AC_SUBST(HAVE_GTK_WIDGET)

AM_CONDITIONAL(USE_GTK_WIDGET,
               test x$HAVE_GTK = xyes -a x$BUILD_GTK_WIDGET = xyes)

dnl *** Example checks ***

PKG_CHECK_MODULES(CAIRO, cairo >= [$cairo_req],
                  [HAVE_CAIRO=yes], [HAVE_CAIRO=no])
AM_CONDITIONAL(HAVE_CAIRO, test x$HAVE_CAIRO = xyes)
AC_SUBST(CAIRO_CFLAGS)
AC_SUBST(CAIRO_LIBS)

PKG_CHECK_MODULES(CAIROXLIB, cairo-xlib,
                  [HAVE_CAIRO_XLIB=yes], [HAVE_CAIRO_XLIB=no])
AM_CONDITIONAL(HAVE_CAIRO_XLIB, test x$HAVE_CAIRO_XLIB = xyes)
AC_SUBST(CAIROXLIB_CFLAGS)
AC_SUBST(CAIROXLIB_LIBS)

PKG_CHECK_MODULES(XCOMPOSITE, xcomposite,
                  [HAVE_XCOMPOSITE=yes], [HAVE_XCOMPOSITE=no])
AM_CONDITIONAL(HAVE_XCOMPOSITE, test x$HAVE_XCOMPOSITE = xyes)
AC_SUBST(XCOMPOSITE_CFLAGS)
AC_SUBST(XCOMPOSITE_LIBS)

dnl *** common plugin checks ***

PKG_CHECK_MODULES(X11, x11, [HAVE_X11=yes], [HAVE_X11=no])
if test x$HAVE_X11 = xno; then
  AC_PATH_XTRA
  if test "x$no_x" = xyes; then
    AC_MSG_NOTICE(X11 development libraries not found);
  else
    XLIB_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
    XLIB_CFLAGS="$X_CFLAGS"
    HAVE_X11="yes"
  fi
else
  XLIB_LIBS="$X11_LIBS"
  XLIB_CFLAGS="$X11_CFLAGS"
fi

if test x$HOST_IS_DARWIN = xyes; then
  AC_CHECK_HEADERS([AGL/agl.h], [HAVE_AGL=yes], [HAVE_AGL=no])
else
  AC_CHECK_HEADERS([GL/glx.h], [HAVE_GLX=yes], [HAVE_GLX=no])
fi
AM_CONDITIONAL(USE_AGL, test x$HAVE_AGL = xyes)
AM_CONDITIONAL(USE_GLX, test x$HAVE_GLX = xyes)

PKG_CHECK_MODULES(PANGO, pango >= [$pango_req],
                  [HAVE_PANGO=yes], [HAVE_PANGO=no])
AC_SUBST(PANGO_CFLAGS)
AC_SUBST(PANGO_LIBS)

dnl Check for Pango 1.16 to ifdef out gravity related calls
PKG_CHECK_MODULES(PANGO_1_16, pango >= 1.16,
                  [HAVE_PANGO_1_16=yes], [HAVE_PANGO_1_16=no])
if test "x$HAVE_PANGO_1_16" = xyes; then
  AC_DEFINE(HAVE_PANGO_1_16, 1, [Defined to 1 if you have pango-1.16])
fi

PKG_CHECK_MODULES(PANGOCAIRO, pangocairo >= [$pangocairo_req],
                  [HAVE_PANGOCAIRO=yes], [HAVE_PANGOCAIRO=no])
AC_SUBST(PANGOCAIRO_CFLAGS)
AC_SUBST(PANGOCAIRO_LIBS)

dnl *** OpenGL plugin checks ***

PKG_CHECK_MODULES(GDKPIXBUFXLIB, gdk-pixbuf-xlib-2.0,
                  [HAVE_GDKPIXBUFXLIB=yes], [HAVE_GDKPIXBUFXLIB=no])
AC_SUBST(GDKPIXBUFXLIB_CFLAGS)
AC_SUBST(GDKPIXBUFXLIB_LIBS)

if test x$HOST_IS_DARWIN = xyes; then
  AC_CHECK_HEADERS([OpenGL/gl.h], [HAVE_GL=yes], [HAVE_GL=no])
  if test x$HAVE_GL = xno; then
    AC_MSG_NOTICE(OSX OpenGL development libraries not found);
  else
    GL_LIBS="-framework OpenGL -framework AGL -framework CoreFoundation -framework Carbon"
    GL_CFLAGS=""
  fi
elif test x$HAVE_X11 = xyes; then
  AC_CHECK_HEADERS([GL/gl.h], [HAVE_GL=yes], [HAVE_GL=no])
  if test x$HAVE_GL = xyes; then
    GL_LIBS="-lGL"
    GL_CFLAGS=""
  fi
fi
AM_CONDITIONAL(USE_GL, test x$HAVE_GL = xyes)

if test x$HAVE_GL = xyes -a x$HAVE_X11 = xyes -a x$HAVE_GDKPIXBUFXLIB = xyes -a x$HAVE_GLX = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes; then
  PGM_GL_LIBS="$XLIB_LIBS $GDKPIXBUFXLIB_LIBS $GL_LIBS $PANGO_LIBS $PANGOCAIRO_LIBS"
  PGM_GL_CFLAGS="$XLIB_CFLAGS $GDKPIXBUFXLIB_CFLAGS $GL_CFLAGS $PANGO_CFLAGS $PANGOCAIRO_CFLAGS"
  HAVE_OPENGL_PLUGIN="yes"
  OPENGL_BACKEND="(Xlib/GLX backend)"
  AC_SUBST(PGM_GL_CFLAGS)
  AC_SUBST(PGM_GL_LIBS)
elif test x$HAVE_GL = xyes -a x$HOST_IS_DARWIN = xyes -a x$HAVE_AGL = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes; then
  PGM_GL_LIBS="$GL_LIBS $PANGO_LIBS $PANGOCAIRO_LIBS"
  PGM_GL_CFLAGS="$GL_CFLAGS $PANGO_CFLAGS $PANGOCAIRO_CFLAGS"
  HAVE_OPENGL_PLUGIN="yes"
  OPENGL_BACKEND="(OSX/AGL backend)"
  AC_SUBST(PGM_GL_CFLAGS)
  AC_SUBST(PGM_GL_LIBS)
else
  HAVE_OPENGL_PLUGIN="no"
  OPENGL_BACKEND=""
fi
AC_SUBST(HAVE_OPENGL_PLUGIN)
AC_SUBST(OPENGL_BACKEND)
AM_CONDITIONAL(USE_OPENGL, test \( x$HAVE_X11 = xyes -a x$HAVE_GLX = xyes -a x$HAVE_GDKPIXBUFXLIB = xyes \) -o \( x$HOST_IS_DARWIN = xyes -a x$HAVE_AGL = xyes \) -a x$HAVE_GL = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes)

dnl *** OpenGL ES plugin checks ***

AC_ARG_ENABLE(opengles-pc-emulation,
  AC_HELP_STRING([--enable-opengles-pc-emulation],
                 [enable the emulation of OpenGL ES on PC [[default=no]]]),
    [
      case "${enableval}" in
        yes) OPENGLES_PC_EMULATION=yes ;;
        no)  OPENGLES_PC_EMULATION=no ;;
        *)   AC_MSG_ERROR(bad value ${enableval} for --enable-opengles-pc-emulation) ;;
      esac
    ],
    [OPENGLES_PC_EMULATION=no])
AM_CONDITIONAL(USE_OPENGLES_PC_EMULATION, test "x$OPENGLES_PC_EMULATION" = "xyes")
if test x$OPENGLES_PC_EMULATION = xyes; then
  AC_DEFINE(HAVE_OPENGLES_PC_EMULATION, 1, [Defined to 1 if you enabled OpenGL ES PC emulation])
fi

AC_CHECK_HEADERS([GLES/egl.h], [HAVE_EGL=yes], [HAVE_EGL=no])
AC_CHECK_HEADERS([GLES/gl.h], [HAVE_GLES=yes], [HAVE_GLES=no])
if test x$HAVE_GLES = xyes; then
  GLES_LIBS="-lGLES_CM"
  GLES_CFLAGS=""
fi

AC_ARG_ENABLE(touchscreen,
  AC_HELP_STRING([--enable-touchscreen], [enable touchscreen support]),
    [
      case "${enableval}" in
        yes) ENABLE_TOUCHSCREEN=yes ;;
        no)  ENABLE_TOUCHSCREEN=no ;;
        *)   AC_MSG_ERROR(bad value ${enableval} for --enable-touchscreen) ;;
      esac
    ],
    [ENABLE_TOUCHSCREEN=yes])
AM_CONDITIONAL(ENABLE_TOUCHSCREEN, test "x$ENABLE_TOUCHSCREEN" = "xyes")
PKG_CHECK_MODULES(TSLIB, tslib-0.0, [HAVE_TSLIB=yes], [HAVE_TSLIB=no])
if test x$HAVE_TSLIB = xyes -a x$ENABLE_TOUCHSCREEN = xyes; then
  AC_DEFINE(HAVE_TSLIB, 1, [Defined to 1 if you have tslib])
fi
AC_SUBST(TSLIB_CFLAGS)
AC_SUBST(TSLIB_LIBS)

if test x$OPENGLES_PC_EMULATION = xyes -a x$HAVE_GLES = xyes -a x$HAVE_X11 = xyes -a x$HAVE_GLX = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes; then
  PGM_GLES_LIBS="$XLIB_LIBS $GLES_LIBS $PANGO_LIBS $PANGOCAIRO_LIBS"
  PGM_GLES_CFLAGS="$XLIB_CFLAGS $GLES_CFLAGS $PANGO_CFLAGS $PANGOCAIRO_CFLAGS"
  HAVE_OPENGLES_PLUGIN="yes"
  OPENGLES_BACKEND="(Xlib/GLX PC emulation backend)"
  AC_SUBST(PGM_GLES_CFLAGS)
  AC_SUBST(PGM_GLES_LIBS)
elif test x$HAVE_EGL = xyes -a x$HAVE_GLES = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes; then
  PGM_GLES_LIBS="$GLES_LIBS $PANGO_LIBS $PANGOCAIRO_LIBS $TSLIB_LIBS"
  PGM_GLES_CFLAGS="$GLES_CFLAGS $PANGO_CFLAGS $PANGOCAIRO_CFLAGS $TSLIB_CFLAGS"
  HAVE_OPENGLES_PLUGIN="yes"
  if test "x$HAVE_TSLIB" = xyes -a "x$ENABLE_TOUCHSCREEN" = xyes; then
    OPENGLES_BACKEND="(EGL backend with tslib)"
  else
    OPENGLES_BACKEND="(EGL backend without tslib)"
  fi
  AC_SUBST(PGM_GLES_CFLAGS)
  AC_SUBST(PGM_GLES_LIBS)
else
  HAVE_OPENGLES_PLUGIN="no"
  OPENGLES_BACKEND=""
fi
AC_SUBST(HAVE_OPENGLES_PLUGIN)
AC_SUBST(OPENGLES_BACKEND)
AM_CONDITIONAL(USE_OPENGLES, test \( x$OPENGLES_PC_EMULATION = xyes -a x$HAVE_X11 = xyes -a x$HAVE_GLX = xyes \) -o \( x$HAVE_EGL = xyes \) -a x$HAVE_GLES = xyes -a x$HAVE_PANGO = xyes -a x$HAVE_PANGOCAIRO = xyes)

dnl *** Unit tests checks ***

dnl Interactive tests uses GtkBuilder, but reverts to libglade if GTK+ < 2.12
PKG_CHECK_MODULES(LIBGLADE_2_0, libglade-2.0,
                  [HAVE_LIBGLADE_2_0=yes], [HAVE_LIBGLADE_2_0=no])
AM_CONDITIONAL(HAVE_LIBGLADE_2_0, test "x$HAVE_LIBGLADE_2_0" = "xyes")
AC_SUBST(LIBGLADE_2_0_CFLAGS)
AC_SUBST(LIBGLADE_2_0_LIBS)

dnl FIXME: enable this by default when pigment runs in XvFB
AC_ARG_ENABLE(opengl-tests, AS_HELP_STRING([--enable-opengl-tests],
              [enable the tests requiring OpenGL [[default=no]]]),
              enable_opengl_tests=$enableval,
              enable_opengl_tests=no)
AM_CONDITIONAL(OPENGL_TESTS_ENABLED,
               test x$HAVE_OPENGL_PLUGIN = xyes -a x$enable_opengl_tests = xyes)

dnl *** Finalize CFLAGS, LDFLAGS, LIBS ***

dnl Overview:
dnl PGM_OPTION_CFLAGS:  common cflags for profiling, debugging, errors, ...
dnl PGM_ALL_*:          vars shared by all built objects
dnl PGM_LIB_LDFLAGS:    additional linker flags for all libaries
dnl PGM_OBJ_*:          additional vars to link to the core (include PGM_ALL_*)
dnl PGM_LT_LDFLAGS:     library versioning of our libraries
dnl PGM_PLUGIN_LDFLAGS: flags to be used for all plugins

if test "x$USE_DEBUG" = xyes; then
  PROFILE_CFLAGS="-g"
fi
AC_SUBST(PROFILE_CFLAGS)

dnl Every flag in PGM_OPTION_CFLAGS can be overridden at make time via e.g.
dnl make PROFILE_CFLAGS=''.
PGM_OPTION_CFLAGS="\$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS)"
AC_SUBST(PGM_OPTION_CFLAGS)

PGM_ALL_CFLAGS="-I\$(top_srcdir) -I\$(top_builddir)/pgm $GST_CFLAGS $GST_PLUGINS_BASE_CFLAGS $GDKPIXBUF_CFLAGS \$(PGM_OPTION_CFLAGS)"
PGM_ALL_LIBS="$GST_LIBS $GST_BASE_LIBS $GST_PLUGINS_BASE_LIBS -lgstvideo-0.10 $GDKPIXBUF_LIBS $LIBM \$(GCOV_LIBS)"
PGM_ALL_LDFLAGS="-no-undefined"
AC_SUBST(PGM_ALL_CFLAGS)
AC_SUBST(PGM_ALL_LIBS)
AC_SUBST(PGM_ALL_LDFLAGS)

dnl LDFLAGS modifier defining exported symbols from built libraries
PGM_LIB_LDFLAGS="-export-symbols-regex \^[_]*\(pgm_\|Pgm\|PGM_\).*"
AC_SUBST(PGM_LIB_LDFLAGS)

PGM_OBJ_CFLAGS="\$(PGM_ALL_CFLAGS)"
PGM_OBJ_LIBS="\$(top_builddir)/pgm/libpigment-$PGM_MAJORMINOR.la \$(PGM_ALL_LIBS)"
AC_SUBST(PGM_OBJ_CFLAGS)
AC_SUBST(PGM_OBJ_LIBS)

dnl LDFLAGS for plugins; includes PGM_ALL_LDFLAGS
PGM_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*pgm_plugin_desc\$\$' $PGM_ALL_LDFLAGS"
AC_SUBST(PGM_PLUGIN_LDFLAGS)

dnl Plugin path
AS_AC_EXPAND(PLUGIN_PATH, ${libdir}/pigment-$PGM_MAJORMINOR/$VERSION)
AC_SUBST(PLUGIN_PATH)
AC_DEFINE_UNQUOTED(PGM_PLUGIN_PATH, "$PLUGIN_PATH",
                   [The path where Pigment plugins are located])

dnl *** Configuration files ***

AC_CONFIG_FILES(
  Makefile
  pigment.spec
  pgm/Makefile
  pgm/pgmversion.h
  pgm/gtk/Makefile
  plugins/Makefile
  plugins/boilerplate/Makefile
  plugins/opengl/Makefile
  plugins/opengles/Makefile
  tests/Makefile
  tests/check/Makefile
  tests/check/common/Makefile
  tests/check/pgm/Makefile
  tests/check/plugins/Makefile
  tests/check/plugins/common/Makefile
  tests/check/plugins/opengl/Makefile
  tests/check/plugins/boilerplate/Makefile
  tests/interactive/Makefile
  examples/Makefile
  examples/pictures/Makefile
  docs/Makefile
  docs/pgm/Makefile
  docs/pgm/version-short.xml
  docs/pgm/version-full.xml
  pkgconfig/Makefile
  pkgconfig/pigment.pc
  pkgconfig/pigment-uninstalled.pc
  pkgconfig/pigment-gtk.pc
  pkgconfig/pigment-gtk-uninstalled.pc
  win32/Makefile
  win32/common/Makefile
  win32/vs6/Makefile
  win32/vs9/Makefile
  misc/Makefile
)
AC_OUTPUT

dnl *** Configuration summary ***

echo ""
echo "  Pigment $PACKAGE_VERSION"
echo "  ==============="
echo "  Prefix:           ${prefix}"
echo "  Documentation:    ${enable_gtk_doc}"
echo "  GTK+ widget:      ${HAVE_GTK_WIDGET}"
echo "  Examples:         ${BUILD_EXAMPLES}"
echo "  OpenGL plugin:    ${HAVE_OPENGL_PLUGIN} ${OPENGL_BACKEND}"
echo "  OpenGL ES plugin: ${HAVE_OPENGLES_PLUGIN} ${OPENGLES_BACKEND}"