configure.ac 17.3 KB
Newer Older
1
AC_PREREQ([2.69])
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
2

Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
3
4
dnl please read gstreamer/docs/random/autotools before changing this file

5
dnl initialize autoconf
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
6
7
dnl releases only do -Wall, cvs and prerelease does -Werror too
dnl use a three digit version number for releases, and four for cvs/prerelease
Sebastian Dröge's avatar
Sebastian Dröge committed
8
AC_INIT([GStreamer Ugly Plug-ins],[1.9.2],[http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer],[gst-plugins-ugly])
9

10
AG_GST_INIT
11
12

dnl initialize automake
13
AM_INIT_AUTOMAKE([-Wno-portability 1.14 no-dist-gzip dist-xz tar-ustar subdir-objects])
14
15
16
17
18

dnl define PACKAGE_VERSION_* variables
AS_VERSION

dnl check if this is a release version
19
AS_NANO(GST_GIT="no", GST_GIT="yes")
20
21
22
23
24

dnl can autoconf find the source ?
AC_CONFIG_SRCDIR([ext/mad/gstmad.c])

dnl define the output header for config
25
AC_CONFIG_HEADERS(config.h)
26

27
dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
28
AM_MAINTAINER_MODE([enable])
29

30
31
dnl sets host_* variables
AC_CANONICAL_HOST
32

33
34
35
36
37
dnl use pretty build output with automake >= 1.11
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],
  [AM_DEFAULT_VERBOSITY=1
   AC_SUBST(AM_DEFAULT_VERBOSITY)])

Sebastian Dröge's avatar
Sebastian Dröge committed
38
39
40
41
42
43
dnl our libraries and install dirs use GST_API_VERSION in the filename
dnl to allow side-by-side installation of different API versions
GST_API_VERSION=1.0
AC_SUBST(GST_API_VERSION)
AC_DEFINE_UNQUOTED(GST_API_VERSION, "$GST_API_VERSION",
  [GStreamer API Version])
44

Sebastian Dröge's avatar
Sebastian Dröge committed
45
AS_LIBTOOL(GST, 902, 0, 902)
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
46

Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
47
dnl *** required versions of GStreamer stuff ***
Sebastian Dröge's avatar
Sebastian Dröge committed
48
49
GST_REQ=1.9.2
GSTPB_REQ=1.9.2
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
50

51
dnl *** autotools stuff ****
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
52

53
54
dnl allow for different autotools
AS_AUTOTOOLS_ALTERNATE
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
55

56
57
dnl Add parameters for aclocal
AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I common/m4")
58

59
dnl set up gettext
60
dnl the version check needs to stay here because autopoint greps for it
61
AM_GNU_GETTEXT_VERSION(0.17)
62
AM_GNU_GETTEXT([external])
Sebastian Dröge's avatar
Sebastian Dröge committed
63
AG_GST_GETTEXT([gst-plugins-ugly-$GST_API_VERSION])
64

65
dnl *** check for arguments to configure ***
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
66

67
AG_GST_ARG_DISABLE_FATAL_WARNINGS
68
AG_GST_ARG_ENABLE_EXTRA_CHECKS
69

70
71
72
73
AG_GST_ARG_DEBUG
AG_GST_ARG_PROFILING
AG_GST_ARG_VALGRIND
AG_GST_ARG_GCOV
74

75
AG_GST_ARG_EXAMPLES
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
76

77
78
79
AG_GST_ARG_WITH_PKG_CONFIG_PATH
AG_GST_ARG_WITH_PACKAGE_NAME
AG_GST_ARG_WITH_PACKAGE_ORIGIN
80

81
AG_GST_ARG_WITH_PLUGINS
82

83
84
85
86
AG_GST_ARG_ENABLE_EXTERNAL

AG_GST_ARG_ENABLE_EXPERIMENTAL

87
dnl *** checks for platform ***
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
88

89
dnl * hardware/architecture *
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
90

91
92
dnl common/m4/gst-arch.m4
dnl check CPU type
93
AG_GST_ARCH
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
94

95
96
dnl Determine endianness
AC_C_BIGENDIAN
97

98
dnl *** checks for programs ***
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
99

100
101
dnl find a compiler
AC_PROG_CC
102
AC_PROG_CC_STDC
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
103

104
105
106
107
dnl determine c++ compiler
AC_PROG_CXX
dnl determine if c++ is available on this system
AC_CHECK_PROG(HAVE_CXX, $CXX, yes, no)
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
108

109
110
111
dnl check if the compiler supports '-c' and '-o' options
AM_PROG_CC_C_O

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

115
116
117
dnl check if the compiler supports do while(0) macros
AG_GST_CHECK_DOWHILE_MACROS

118
dnl check for documentation tools
119
GTK_DOC_CHECK([1.12])
120
AG_GST_PLUGIN_DOCS([1.12])
121

122
dnl *** checks for libraries ***
123

124
dnl check for libm, for sin()
125
LT_LIB_M
126
127
AC_SUBST(LIBM)

128
dnl *** checks for header files ***
129

130
131
dnl used by ext/a52dec
AX_CREATE_STDINT_H
Christian Schaller's avatar
Christian Schaller committed
132

133
134
dnl Check for malloc.h
AC_CHECK_HEADERS([malloc.h])
Christian Schaller's avatar
Christian Schaller committed
135

136
dnl *** checks for types/defines ***
137

138
dnl *** checks for structures ***
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
139

140
dnl *** checks for compiler characteristics ***
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
141

142
dnl *** checks for library functions ***
143

144
dnl Check for a way to display the function name in debug output
145
AG_GST_CHECK_FUNCTION
146

147
148
149
dnl *** checks for dependency libraries ***

dnl GLib is required
150
GLIB_REQ=2.40.0
151
152
AG_GST_GLIB_CHECK([$GLIB_REQ])

Tim-Philipp Müller's avatar
Tim-Philipp Müller committed
153
ORC_CHECK([0.4.16])
154

155
156
dnl checks for gstreamer
dnl uninstalled is selected preferentially -- see pkg-config(1)
Sebastian Dröge's avatar
Sebastian Dröge committed
157
158
159
160
AG_GST_CHECK_GST($GST_API_VERSION, [$GST_REQ], yes)
AG_GST_CHECK_GST_BASE($GST_API_VERSION, [$GST_REQ], yes)
AG_GST_CHECK_GST_CHECK($GST_API_VERSION, [$GST_REQ], no)
AG_GST_CHECK_GST_PLUGINS_BASE($GST_API_VERSION, [$GSTPB_REQ], yes)
161
AM_CONDITIONAL(HAVE_GST_CHECK, test "x$HAVE_GST_CHECK" = "xyes")
162

163
164
dnl Check for documentation xrefs
GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
Sebastian Dröge's avatar
Sebastian Dröge committed
165
166
GST_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-$GST_API_VERSION`"
GSTPB_PREFIX="`$PKG_CONFIG --variable=prefix gstreamer-plugins-base-$GST_API_VERSION`"
167
168
169
170
AC_SUBST(GLIB_PREFIX)
AC_SUBST(GST_PREFIX)
AC_SUBST(GSTPB_PREFIX)

171
172
173
dnl Needed by plugins that use g_module_*() API
PKG_CHECK_MODULES(GMODULE_NO_EXPORT, gmodule-no-export-2.0)

174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
dnl Check for -Bsymbolic-functions linker flag used to avoid
dnl intra-library PLT jumps, if available.
AC_ARG_ENABLE(Bsymbolic,
              [AS_HELP_STRING([--disable-Bsymbolic],[avoid linking with -Bsymbolic])],,
              [SAVED_LDFLAGS="${LDFLAGS}" SAVED_LIBS="${LIBS}"
               AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
               LDFLAGS=-Wl,-Bsymbolic-functions
               LIBS=
               AC_TRY_LINK([], [return 0],
                           AC_MSG_RESULT(yes)
                           enable_Bsymbolic=yes,
                           AC_MSG_RESULT(no)
                           enable_Bsymbolic=no)
               LDFLAGS="${SAVED_LDFLAGS}" LIBS="${SAVED_LIBS}"])

189
dnl *** set variables based on configure arguments ***
190

191
192
193
194
dnl set license and copyright notice
GST_LICENSE="LGPL"
AC_DEFINE_UNQUOTED(GST_LICENSE, "$GST_LICENSE", [GStreamer license])
AC_SUBST(GST_LICENSE)
195

196
dnl set location of plugin directory
197
AG_GST_SET_PLUGINDIR
198

199
200
201
202
203
dnl set release date/time
AG_GST_SET_PACKAGE_RELEASE_DATETIME_WITH_NANO([$PACKAGE_VERSION_NANO],
  ["${srcdir}/gst-plugins-ugly.doap"],
  [$PACKAGE_VERSION_MAJOR.$PACKAGE_VERSION_MINOR.$PACKAGE_VERSION_MICRO])

204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
dnl build static plugins or not
AC_MSG_CHECKING([whether to build static plugins or not])
AC_ARG_ENABLE(
  static-plugins,
  AC_HELP_STRING(
    [--enable-static-plugins],
    [build static plugins @<:@default=no@:>@]),
  [AS_CASE(
    [$enableval], [no], [], [yes], [],
    [AC_MSG_ERROR([bad value "$enableval" for --enable-static-plugins])])],
  [enable_static_plugins=no])
AC_MSG_RESULT([$enable_static_plugins])
if test "x$enable_static_plugins" = xyes; then
  AC_DEFINE(GST_PLUGIN_BUILD_STATIC, 1,
    [Define if static plugins should be built])
  GST_PLUGIN_LIBTOOLFLAGS=""
else
  GST_PLUGIN_LIBTOOLFLAGS="--tag=disable-static"
fi
AC_SUBST(GST_PLUGIN_LIBTOOLFLAGS)
AM_CONDITIONAL(GST_PLUGIN_BUILD_STATIC, test "x$enable_static_plugins" = "xyes")

226
dnl define an ERROR_CFLAGS Makefile variable
227
AG_GST_SET_ERROR_CFLAGS($FATAL_WARNINGS, [
Edward Hervey's avatar
Edward Hervey committed
228
    -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls
229
    -Wwrite-strings -Wformat-nonliteral -Wformat-security -Wold-style-definition
Thiago Santos's avatar
Thiago Santos committed
230
    -Winit-self -Wmissing-include-dirs -Waddress
231
    -Waggregate-return -Wno-multichar -Wnested-externs ])
232

233
dnl define an ERROR_CXXFLAGS Makefile variable
234
AG_GST_SET_ERROR_CXXFLAGS($FATAL_WARNINGS, [
Edward Hervey's avatar
Edward Hervey committed
235
    -Wmissing-declarations -Wredundant-decls
Thiago Santos's avatar
Thiago Santos committed
236
    -Wwrite-strings -Wformat-nonliteral -Wformat-security
237
238
    -Winit-self -Wmissing-include-dirs -Waddress -Waggregate-return
    -Wno-multichar])
239

240
dnl define correct level for debugging messages
241
AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
242

243
dnl used in examples
244
AG_GST_DEFAULT_ELEMENTS
245

246
247
248
249
250
251
dnl *** plug-ins to include ***

dnl these are all the gst plug-ins, compilable without additional libs
AG_GST_CHECK_PLUGIN(asfdemux)
AG_GST_CHECK_PLUGIN(dvdlpcmdec)
AG_GST_CHECK_PLUGIN(dvdsub)
252
AG_GST_CHECK_PLUGIN(xingmux)
253
254
AG_GST_CHECK_PLUGIN(realmedia)

255
256
257
258
259
260
261
AC_CHECK_HEADERS([winsock2.h], HAVE_WINSOCK2_H=yes)

if test "x$HAVE_WINSOCK2_H" = "xyes"; then
  WIN32_LIBS="-lws2_32"
  AC_SUBST(WIN32_LIBS)
fi

262
263
dnl *** ext plug-ins ***
dnl keep this list sorted alphabetically !
264

265
266
267
268
269
if test "x$BUILD_EXTERNAL" = "xyes"; then

echo
AC_MSG_NOTICE([Checking libraries for plugins in ext/])
echo
270

271
272
dnl *** a52dec ***
translit(dnm, m, l) AM_CONDITIONAL(USE_A52DEC, true)
273
AG_GST_CHECK_FEATURE(A52DEC, [a52dec], a52dec, [
274
275
276
  AC_CHECK_A52DEC(HAVE_A52DEC=yes, HAVE_A52DEC=no)
])

277
dnl *** amr-nb ***
278
translit(dnm, m, l) AM_CONDITIONAL(USE_AMRNB, true)
279
AG_GST_CHECK_FEATURE(AMRNB, [amrnb library], amrnb, [
280
  AG_GST_PKG_CHECK_MODULES(AMRNB, opencore-amrnb >= 0.1.3)
281
282
])

283
284
285
dnl *** amr-wb dec ***
translit(dnm, m, l) AM_CONDITIONAL(USE_AMRWB, true)
AG_GST_CHECK_FEATURE(AMRWB, [amrwb library], amrwbdec, [
286
  AG_GST_PKG_CHECK_MODULES(AMRWB, opencore-amrwb >= 0.1.3)
287
288
])

Jan Schmidt's avatar
Jan Schmidt committed
289
290
291
292
293
294
dnl *** cdio ***
translit(dnm, m, l) AM_CONDITIONAL(USE_CDIO, true)
AG_GST_CHECK_FEATURE(CDIO, [cdio library], cdio, [
  AG_GST_PKG_CHECK_MODULES(CDIO, libcdio >= 0.76)
])

295
296
dnl *** dvdread ***
translit(dnm, m, l) AM_CONDITIONAL(USE_DVDREAD, true)
297
298
AG_GST_CHECK_FEATURE(DVDREAD, [dvdread library], dvdreadsrc, [
  AG_GST_CHECK_LIBHEADER(DVDREAD, dvdread, DVDOpen, , dvdread/dvd_reader.h, DVDREAD_LIBS="-ldvdread")
299
300
  AC_SUBST(DVDREAD_LIBS)
])
301

Wim Taymans's avatar
Wim Taymans committed
302
303
dnl *** lame ***
translit(dnm, m, l) AM_CONDITIONAL(USE_LAME, true)
304
AG_GST_CHECK_FEATURE(LAME, [lame mp3 encoder library], lame, [
305
  AG_GST_CHECK_LIBHEADER(LAME, mp3lame, lame_init, $LIBM, lame/lame.h,
Wim Taymans's avatar
Wim Taymans committed
306
307
  [
    HAVE_LAME="yes"
308
    LAME_LIBS="-lmp3lame $LIBM"
Wim Taymans's avatar
Wim Taymans committed
309
310
    dnl is lame presets available
    LAME_CFLAGS=""
311
312
313
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <lame/lame.h>]], [[ int preset = MEDIUM ]])],[LAME_CFLAGS="-DGSTLAME_PRESET"],[LAME_CFLAGS=""
    ])
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <lame/lame.h>]], [[
314
        void *ptr = &lame_set_VBR_quality
315
316
      ]])],[LAME_CFLAGS="$LAME_CFLAGS -DHAVE_LAME_SET_VBR_QUALITY"],[LAME_CFLAGS="$LAME_CFLAGS"
    ])
Wim Taymans's avatar
Wim Taymans committed
317
318
319
320
  AC_SUBST(LAME_CFLAGS)
  AC_SUBST(LAME_LIBS)
  ])
])
321

322
323
dnl *** mad ***
translit(dnm, m, l) AM_CONDITIONAL(USE_MAD, true)
324
AG_GST_CHECK_FEATURE(MAD, [mad mp3 decoder], mad, [
325

326
327
  dnl check with pkg-config first
  AG_GST_PKG_CHECK_MODULES(MAD, mad >= 0.15)
328
  MAD_LIBS="$MAD_LIBS"
329
330
331
332
  if test "x$HAVE_MAD" = "xno"; then
    dnl fall back to oldskool detection
    AC_CHECK_HEADER(mad.h, [
      AC_CHECK_LIB(mad, mad_decoder_finish,
333
        HAVE_MAD="yes" MAD_LIBS="-lmad")
334
335
    ])
  fi
336
337
])
AC_SUBST(MAD_LIBS)
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
338

339
340
dnl *** mpeg2dec ***
translit(dnm, m, l) AM_CONDITIONAL(USE_MPEG2DEC, true)
341
AG_GST_CHECK_FEATURE(MPEG2DEC, [mpeg2dec], mpeg2dec, [
342
  AG_GST_PKG_CHECK_MODULES(MPEG2DEC, libmpeg2 >= 0.5.1)
343
344
])

345
346
347
348
349
350
351
352
dnl *** mpg123 ***
translit(dnm, m, l) AM_CONDITIONAL(USE_MPG123, true)
AG_GST_CHECK_FEATURE(MPG123, [mpg123 audio decoder], mpg123, [
  PKG_CHECK_MODULES(MPG123, libmpg123 >= 1.13, HAVE_MPG123="yes", HAVE_MPG123="no")
  AC_SUBST(MPG123_CFLAGS)
  AC_SUBST(MPG123_LIBS)
])

353
354
dnl *** sidplay : works with libsidplay 1.36.x (not 2.x.x) ***
translit(dnm, m, l) AM_CONDITIONAL(USE_SIDPLAY, true)
355
AG_GST_CHECK_FEATURE(SIDPLAY, [libsidplay], sid, [
356
  GST_PATH_SIDPLAY()
357
358
])

Jan Schmidt's avatar
Jan Schmidt committed
359
360
361
dnl *** twolame ***
translit(dnm, m, l) AM_CONDITIONAL(USE_TWOLAME, true)
AG_GST_CHECK_FEATURE(TWOLAME, [twolame], twolame, [
362
  PKG_CHECK_MODULES(TWOLAME, twolame >= 0.3.10, [
Jan Schmidt's avatar
Jan Schmidt committed
363
364
365
366
367
368
369
      HAVE_TWOLAME="yes"], [
      HAVE_TWOLAME="no"
  ])
  AC_SUBST(TWOLAME_CFLAGS)
  AC_SUBST(TWOLAME_LIBS)
])

370
371
372
dnl *** x264 (MPEG-4 part 10/h.264/AVC encoder) ***
translit(dnm, m, l) AM_CONDITIONAL(USE_X264, true)
AG_GST_CHECK_FEATURE(X264, [x264 plug-in], x264, [
373
  AG_GST_PKG_CHECK_MODULES(X264, x264 >= 0.120)
374
375
])

376
377
378
379
380
381
382
else

dnl not building plugins with external dependencies,
dnl but we still need to set the conditionals

AM_CONDITIONAL(USE_A52DEC, false)
AM_CONDITIONAL(USE_AMRNB, false)
383
AM_CONDITIONAL(USE_AMRWB, false)
Jan Schmidt's avatar
Jan Schmidt committed
384
AM_CONDITIONAL(USE_CDIO, false)
385
386
387
388
AM_CONDITIONAL(USE_DVDREAD, false)
AM_CONDITIONAL(USE_LAME, false)
AM_CONDITIONAL(USE_MAD, false)
AM_CONDITIONAL(USE_MPEG2DEC, false)
389
AM_CONDITIONAL(USE_MPG123, false)
390
AM_CONDITIONAL(USE_SIDPLAY, false)
Jan Schmidt's avatar
Jan Schmidt committed
391
AM_CONDITIONAL(USE_TWOLAME, false)
392
AM_CONDITIONAL(USE_X264, false)
393

394
fi dnl of EXT plugins
395

396
dnl *** finalize CFLAGS, LDFLAGS, LIBS
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
397

398
399
400
401
402
403
404
dnl Overview:
dnl GST_OPTION_CFLAGS:  common flags for profiling, debugging, errors, ...
dnl GST_*:              flags shared by built objects to link against GStreamer
dnl GST_ALL_LDFLAGS:    linker flags shared by all
dnl GST_LIB_LDFLAGS:    additional linker flags for all libaries
dnl GST_LT_LDFLAGS:     library versioning of our libraries
dnl GST_PLUGIN_LDFLAGS: flags to be used for all plugins
405

406
407
408
409
410
dnl GST_OPTION_CFLAGS
if test "x$USE_DEBUG" = xyes; then
   PROFILE_CFLAGS="-g"
fi
AC_SUBST(PROFILE_CFLAGS)
411

412
413
if test "x$PACKAGE_VERSION_NANO" = "x1"; then
  dnl Define _only_ during CVS (not pre-releases or releases)
414
  DEPRECATED_CFLAGS="-DGST_DISABLE_DEPRECATED"
415
416
417
else
  DEPRECATED_CFLAGS=""
fi
418
AC_SUBST(DEPRECATED_CFLAGS)
419

420
421
dnl every flag in GST_OPTION_CFLAGS and GST_OPTION_CXXFLAGS can be overridden
dnl at make time with e.g. make ERROR_CFLAGS=""
422
GST_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
Benjamin Otte's avatar
Benjamin Otte committed
423
GST_OPTION_CXXFLAGS="\$(WARNING_CXXFLAGS) \$(ERROR_CXXFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
424
AC_SUBST(GST_OPTION_CFLAGS)
425
AC_SUBST(GST_OPTION_CXXFLAGS)
426
427
428
429
430

dnl FIXME: do we want to rename to GST_ALL_* ?
dnl prefer internal headers to already installed ones
dnl also add builddir include for enumtypes and marshal
dnl add GST_OPTION_CFLAGS, but overridable
431
GST_CFLAGS="$GST_CFLAGS"
432
433
GST_CXXFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_CXXFLAGS)"
GST_CFLAGS="-I\$(top_srcdir)/gst-libs -I\$(top_builddir)/gst-libs $GST_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_CFLAGS)"
434
AC_SUBST(GST_CFLAGS)
435
AC_SUBST(GST_CXXFLAGS)
436
437
438
439
440
AC_SUBST(GST_LIBS)

dnl LDFLAGS really should only contain flags, not libs - they get added before
dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
GST_ALL_LDFLAGS="-no-undefined"
441
442
443
if test "x${enable_Bsymbolic}" = "xyes"; then
  GST_ALL_LDFLAGS="$GST_ALL_LDFLAGS -Wl,-Bsymbolic-functions"
fi
444
445
446
447
AC_SUBST(GST_ALL_LDFLAGS)

dnl this really should only contain flags, not libs - they get added before
dnl whatevertarget_LIBS and -L flags here affect the rest of the linking
448
GST_PLUGIN_LDFLAGS="-module -avoid-version -export-symbols-regex '^[_]*gst_plugin_.*' $GST_ALL_LDFLAGS"
449
450
451
AC_SUBST(GST_PLUGIN_LDFLAGS)

dnl *** output files ***
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
452

Andy Wingo Wingo's avatar
Andy Wingo Wingo committed
453
AC_CONFIG_FILES(
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
454
Makefile
Jan Schmidt's avatar
Jan Schmidt committed
455
456
common/Makefile
common/m4/Makefile
Jan Schmidt's avatar
Jan Schmidt committed
457
458
gst-libs/Makefile
gst-libs/gst/Makefile
459
gst/Makefile
460
gst/asfdemux/Makefile
Michael Smith's avatar
Michael Smith committed
461
gst/dvdlpcmdec/Makefile
Tim-Philipp Müller's avatar
Tim-Philipp Müller committed
462
gst/dvdsub/Makefile
463
gst/realmedia/Makefile
464
gst/xingmux/Makefile
465
ext/Makefile
466
ext/a52dec/Makefile
467
ext/amrnb/Makefile
468
ext/amrwbdec/Makefile
Jan Schmidt's avatar
Jan Schmidt committed
469
ext/cdio/Makefile
470
ext/dvdread/Makefile
Wim Taymans's avatar
Wim Taymans committed
471
ext/lame/Makefile
472
ext/mad/Makefile
473
ext/mpeg2dec/Makefile
474
ext/mpg123/Makefile
475
ext/sidplay/Makefile
Jan Schmidt's avatar
Jan Schmidt committed
476
ext/twolame/Makefile
477
ext/x264/Makefile
478
479
480
docs/Makefile
docs/plugins/Makefile
docs/version.entities
481
482
tests/Makefile
tests/check/Makefile
483
tests/files/Makefile
484
m4/Makefile
485
po/Makefile.in
486
487
pkgconfig/Makefile
pkgconfig/gstreamer-plugins-ugly-uninstalled.pc
488
gst-plugins-ugly.spec
Thomas Vander Stichele's avatar
Thomas Vander Stichele committed
489
)
490
491
492
493
494
495
496
497
498

dnl Create the config.h file for Visual Studio builds
dnl Beware of spaces and /'s in some of the shell variable contents.
sed \
    -e 's/.*config.h.in.*autoheader.*/\/* Autogenerated config.h created for win32 Visual Studio builds *\/\n\n\/* PREFIX -- specifically added for Windows for easier moving *\/\n#define PREFIX "C:\\\\gstreamer"\n\n/' \
    -e 's/.* GETTEXT_PACKAGE$/#define GETTEXT_PACKAGE "'$GETTEXT_PACKAGE'"/' \
    -e 's/.* GST_DATADIR$/#define GST_DATADIR PREFIX "\\\\share"/' \
    -e 's/.* GST_LEVEL_DEFAULT$/#define GST_LEVEL_DEFAULT GST_LEVEL_ERROR/' \
    -e 's/.* GST_LICENSE$/#define GST_LICENSE "'$GST_LICENSE'"/' \
Sebastian Dröge's avatar
Sebastian Dröge committed
499
    -e 's/.* GST_API_VERSION$/#define GST_API_VERSION "'$GST_API_VERSION'"/' \
500
501
    -e "s,.* GST_PACKAGE_NAME$,#define GST_PACKAGE_NAME \"${GST_PACKAGE_NAME}\"," \
    -e 's/.* GST_PACKAGE_ORIGIN$/#define GST_PACKAGE_ORIGIN "Unknown package origin"/' \
502
    -e "s,.* GST_PACKAGE_RELEASE_DATETIME$,#define GST_PACKAGE_RELEASE_DATETIME \"${GST_PACKAGE_RELEASE_DATETIME}\"," \
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
    -e 's/.* HAVE_CPU_I386$/#define HAVE_CPU_I386 1/' \
    -e 's/.* HAVE_FGETPOS$/#define HAVE_FGETPOS 1/' \
    -e 's/.* HAVE_FSETPOS$/#define HAVE_FSETPOS 1/' \
    -e 's/.* HAVE_LIBXML2$/#define HAVE_LIBXML2 1/' \
    -e 's/.* HAVE_PROCESS_H$/#define HAVE_PROCESS_H 1/' \
    -e 's/.* HAVE_STDLIB_H$/#define HAVE_STDLIB_H 1/' \
    -e 's/.* HAVE_STRING_H$/#define HAVE_STRING_H 1/' \
    -e 's/.* HAVE_SYS_STAT_H$/#define HAVE_SYS_STAT_H 1/' \
    -e 's/.* HAVE_SYS_TYPES_H$/#define HAVE_SYS_TYPES_H 1/' \
    -e 's/.* HAVE_WIN32$/#define HAVE_WIN32 1/' \
    -e 's/.* HAVE_WINSOCK2_H$/#define HAVE_WINSOCK2_H 1/' \
    -e 's/.* HOST_CPU$/#define HOST_CPU "i686"/' \
    -e 's/.* LIBDIR$/#ifdef _DEBUG\n#  define LIBDIR PREFIX "\\\\debug\\\\lib"\n#else\n#  define LIBDIR PREFIX "\\\\lib"\n#endif/' \
    -e 's/.* LOCALEDIR$/#define LOCALEDIR PREFIX "\\\\share\\\\locale"/' \
    -e "s/.* PACKAGE$/#define PACKAGE \"$PACKAGE\"/" \
    -e 's/.* PACKAGE_BUGREPORT$/#define PACKAGE_BUGREPORT "http:\/\/bugzilla.gnome.org\/enter_bug.cgi?product=GStreamer"/' \
    -e "s/.* PACKAGE_NAME$/#define PACKAGE_NAME \"$PACKAGE_NAME\"/" \
    -e "s/.* PACKAGE_STRING$/#define PACKAGE_STRING \"$PACKAGE_STRING\"/" \
    -e 's/.* PACKAGE_TARNAME$/#define PACKAGE_TARNAME "'$PACKAGE_TARNAME'"/' \
    -e 's/.* PACKAGE_VERSION$/#define PACKAGE_VERSION "'$PACKAGE_VERSION'"/' \
Wim Taymans's avatar
Wim Taymans committed
523
    -e 's/.* PLUGINDIR$/#ifdef _DEBUG\n#  define PLUGINDIR PREFIX "\\\\debug\\\\lib\\\\gstreamer-0.11"\n#else\n#  define PLUGINDIR PREFIX "\\\\lib\\\\gstreamer-0.11"\n#endif/' \
524
525
    -e 's/.* USE_BINARY_REGISTRY$/#define USE_BINARY_REGISTRY/' \
    -e 's/.* VERSION$/#define VERSION "'$VERSION'"/' \
526
    -e "s/.* DEFAULT_AUDIOSINK$/#define DEFAULT_AUDIOSINK \"directsoundsink\"/" \
527
528
529
530
531
    -e "s/.* DEFAULT_AUDIOSRC$/#define DEFAULT_AUDIOSRC \"audiotestsrc\"/" \
    -e "s/.* DEFAULT_VIDEOSRC$/#define DEFAULT_VIDEOSRC \"videotestsrc\"/" \
    -e "s/.* DEFAULT_VISUALIZER$/#define DEFAULT_VISUALIZER \"goom\"/" \
    config.h.in >win32/common/config.h-new

Andy Wingo Wingo's avatar
Andy Wingo Wingo committed
532
533
AC_OUTPUT

534
AG_GST_OUTPUT_PLUGINS
535
536

ORC_OUTPUT