~vanvugt/+junk/mediatomb

« back to all changes in this revision

Viewing changes to .pc/ffmpegthumbnailer-2.0.patch/configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc
  • Date: 2010-02-22 20:16:31 UTC
  • mfrom: (4.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100222201631-fgwswo4s4ogdr8x8
Tags: 0.12.0~svn2018-6ubuntu1
* Merge from debian unstable, Ubuntu remaining changes:
  - Add OR depends on abrowser.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#*MT*
 
2
#    
 
3
#    MediaTomb - http://www.mediatomb.cc/
 
4
#    
 
5
#    configure.ac - this file is part of MediaTomb.
 
6
#    
 
7
#    Copyright (C) 2005 Gena Batyan <bgeradz@mediatomb.cc>,
 
8
#                       Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
 
9
#    
 
10
#    Copyright (C) 2006-2009 Gena Batyan <bgeradz@mediatomb.cc>,
 
11
#                            Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>,
 
12
#                            Leonhard Wimmer <leo@mediatomb.cc>
 
13
#    
 
14
#    MediaTomb is free software; you can redistribute it and/or modify
 
15
#    it under the terms of the GNU General Public License version 2
 
16
#    as published by the Free Software Foundation.
 
17
#    
 
18
#    MediaTomb is distributed in the hope that it will be useful,
 
19
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
20
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
21
#    GNU General Public License for more details.
 
22
#    
 
23
#    You should have received a copy of the GNU General Public License
 
24
#    version 2 along with MediaTomb; if not, write to the Free Software
 
25
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
26
#    
 
27
#    $Id: configure.ac 2015 2009-01-11 23:22:17Z jin_eld $
 
28
#
 
29
#*MT*
 
30
 
 
31
AC_PREREQ(2.61)
 
32
AC_INIT([MediaTomb], [0.12.0], [jin@mediatomb.cc])
 
33
AM_CONFIG_HEADER([autoconfig.h tombupnp/upnp/inc/upnpconfig.h])
 
34
AC_CONFIG_AUX_DIR(configure_aux)
 
35
AC_CONFIG_SRCDIR([src/common.h])
 
36
AM_INIT_AUTOMAKE([1.9 -Wall])
 
37
 
 
38
if test "x${prefix}" = "xNONE"; then
 
39
    prefix="${ac_default_prefix}"
 
40
fi
 
41
 
 
42
SEARCH_DIR="/usr/local"
 
43
   
 
44
DARWIN_OS=0
 
45
CYGWIN_OS=0
 
46
FREEBSD_OS=0
 
47
OPENBSD_OS=0
 
48
 
 
49
LIBS_SAVE="$LIBS"
 
50
 
 
51
AC_CANONICAL_HOST
 
52
 
 
53
case $host in
 
54
    *-*-darwin*)
 
55
        DARWIN_OS=1
 
56
        SEARCH_DIR="/opt/local"
 
57
        ;;
 
58
    *-*-solaris*)
 
59
        AC_DEFINE([SOLARIS], [1], [we are on solaris])
 
60
        ;;
 
61
    *-*-cygwin*)
 
62
        CYGWIN_OS=1
 
63
        ;;
 
64
    *-*-freebsd*)
 
65
        FREEBSD_OS=1
 
66
        ;;
 
67
    *-*-openbsd*)
 
68
        OPENBSD_OS=1
 
69
        ;;
 
70
esac
 
71
 
 
72
MT_SET_SEARCHPATH
 
73
 
 
74
#AC_ARG_WITH(search, 
 
75
#        AC_HELP_STRING([--with-search=DIR], [Additionally search for packages in DIR]),
 
76
#        [
 
77
#            SEARCH_DIR=$withval
 
78
#            AC_MSG_NOTICE([Will also search for packages in $SEARCH_DIR])
 
79
#        ]
 
80
#)
 
81
 
 
82
SEARCH_DIR_HEADERS="$SEARCH_DIR/include"
 
83
SEARCH_DIR_LIBS="$SEARCH_DIR/lib"
 
84
SEARCH_DIR_PROGS="$SEARCH_DIR/bin"
 
85
    
 
86
# per package header and library search paths
 
87
 
 
88
AC_ARG_WITH(js-h,
 
89
        AC_HELP_STRING([--with-js-h=DIR], [search for js (spidermonkey) headers in DIR]),
 
90
        [
 
91
            JS_SEARCH_HEADERS="$withval"
 
92
        ]
 
93
)
 
94
 
 
95
AC_ARG_WITH(js-libs,
 
96
        AC_HELP_STRING([--with-js-libs=DIR], [search for js (spidermonkey) libraries in DIR]),
 
97
        [
 
98
            JS_SEARCH_LIBS="$withval"
 
99
        ]
 
100
)
 
101
 
 
102
AC_ARG_WITH(iconv-h,
 
103
        AC_HELP_STRING([--with-iconv-h=DIR], [search for iconv headers in DIR]),
 
104
        [
 
105
            ICONV_SEARCH_HEADERS="$withval"
 
106
            AC_MSG_NOTICE([Will search for iconv headers in $withval])
 
107
        ]
 
108
)
 
109
 
 
110
AC_ARG_WITH(iconv-libs,
 
111
        AC_HELP_STRING([--with-iconv-libs=DIR], [search for iconv libraries in DIR]),
 
112
        [
 
113
            ICONV_SEARCH_LIBS="$withval"
 
114
            AC_MSG_NOTICE([Will search for iconv libraries in $withval])
 
115
        ]
 
116
)
 
117
 
 
118
MT_OPTION([static], [enable],
 
119
          [build a static version of MediaTomb],
 
120
          [
 
121
            CFLAGS="$CFLAGS -static"
 
122
            CXXFLAGS="$CXXFLAGS -static"
 
123
            AC_MSG_NOTICE([Building a static executable.])
 
124
          ],
 
125
          [])
 
126
 
 
127
MT_OPTION([db-autocreate], [disable],
 
128
          [automatic creation of the database],[],[])
 
129
 
 
130
MT_OPTION([debug-malloc0], [enable],
 
131
          [only for debugging purposes: abort when we try to call malloc or realloc with a value of zero],
 
132
          [
 
133
            AC_DEFINE([DEBUG_MALLOC_0], [1], 
 
134
                      [debug: abort on malloc/realloc of zero bytes])
 
135
          ],
 
136
          [])
 
137
 
 
138
 
 
139
MT_OPTION([pthread-lib], [enable],
 
140
          [if this option is set we will try to link with -lpthread, else the flag for pthread will be autodetected], [], [])
 
141
 
 
142
MT_OPTION([iconv-lib], [enable],
 
143
          [if this option is set we will try to link with -liconv, else we will first try to use iconv built into glibc and only then search for libiconv],
 
144
          [],[])
 
145
 
 
146
 
 
147
ATOMIC_X86_SMP=0
 
148
ATOMIC_X86_SMP_REQ=0
 
149
X86=0
 
150
case $host_cpu in
 
151
    *86)
 
152
        ATOMIC_X86_SMP=1
 
153
        X86=1
 
154
    ;;
 
155
    *86*64)
 
156
        ATOMIC_X86_SMP=1
 
157
        X86=1
 
158
    ;;
 
159
esac
 
160
 
 
161
ATOMIC_X86=0
 
162
 
 
163
MT_OPTION([atomic-x86-single], [enable], 
 
164
          [use x86 singleprocessor code for atomic arithmetic operations, this will increase performance but you must not use the compiled binary on an SMP system. Doing so might result in crashes and unexpected behaviour],
 
165
          [
 
166
              if test "$X86" -eq 1; then
 
167
                    ATOMIC_X86=1
 
168
                    ATOMIC_X86_SMP=0
 
169
              else
 
170
                    AC_MSG_ERROR([Tried to activate x86 specific option for a non x86 host!])
 
171
              fi
 
172
          ],
 
173
          [])
 
174
 
 
175
AC_ARG_ENABLE([atomic-pthread],
 
176
              [
 
177
AC_HELP_STRING([--enable-atomic-pthread],
 
178
[use pthreads for atomic arithmetic operations, this will deliver the worst performance but is the only portable option (default: automatic, depending on architecture])
 
179
            ],
 
180
            [
 
181
                if test "x$enableval" = xyes; then
 
182
                    if test "$ATOMIC_X86" -eq 1; then
 
183
                        AC_MSG_ERROR([You can not use atomic-x86-single and atomic-pthread code at the same time!])
 
184
                    else
 
185
                        ATOMIC_X86=0 
 
186
                        ATOMIC_X86_SMP=0 
 
187
                    fi
 
188
                fi
 
189
            ]
 
190
)
 
191
 
 
192
MT_OPTION([atomic], [disable],
 
193
          [NEVER disable this! This is only for devel/debugging - disables all atomic arithmetics code],
 
194
          [],
 
195
          [
 
196
              ATOMIC_X86=0
 
197
              ATOMIC_X86_SMP=0
 
198
              AC_MSG_WARN(You disabled the use of atomic arithmetics! You have been warned!)
 
199
               AC_DEFINE([ATOMIC_TORTURE], [1], [NEVER use this! This is only for devel/debugging - disables all atomic arithmetics code.])
 
200
          ])
 
201
 
 
202
if ((test $ATOMIC_X86_SMP -eq 1) && (test $ATOMIC_X86 -eq 1)); then
 
203
    AC_MSG_ERROR([Cannot use atomic-x86-smp and atomic-x86 options at the same time!])
 
204
fi
 
205
 
 
206
if (((test $ATOMIC_X86_SMP -eq 1) || (test $ATOMIC_X86 -eq 1)) && 
 
207
     (test "$X86" -eq 0)); then
 
208
    AC_MSG_ERROR([Cannot use x86 specific code on a non a $host_cpu system!])
 
209
fi
 
210
 
 
211
if test $ATOMIC_X86_SMP -eq 1; then
 
212
    AC_DEFINE([ATOMIC_X86_SMP], [1], [use x86 assembler code for atomic arithmetic operations - default for SMP and UP systems])
 
213
elif test $ATOMIC_X86 -eq 1; then
 
214
    AC_DEFINE([ATOMIC_X86], [1], [use x86 assembler code for atomic arithmetic operations that will only work oni singleprocessor systems - compiled binary will be buggy on SMP])
 
215
    AC_MSG_WARN(You specified to use atomic arithmetics code for x86 single processor systems! The resulting binary must not be used on SMP machines!)
 
216
fi
 
217
 
 
218
 
 
219
SIGHUP=0
 
220
if test $X86 -eq 1; then
 
221
    SIGHUP=1
 
222
fi
 
223
 
 
224
AC_ARG_ENABLE([sighup],
 
225
              [
 
226
AC_HELP_STRING([--enable-sighup],
 
227
[enable SIGHUP handling, by default this is only enabled for x86 platforms, consult the README for more information (default: auto)])
 
228
            ],
 
229
            [
 
230
                if test "x$enableval" = xno; then
 
231
                    SIGHUP=0
 
232
                else
 
233
                    SIGHUP=1
 
234
                fi
 
235
            ]
 
236
)
 
237
 
 
238
if test $SIGHUP -eq 1; then
 
239
    AC_DEFINE([ENABLE_SIGHUP], [1], [enable SIGHUP handling])
 
240
fi
 
241
 
 
242
MT_OPTION([mrreg-service], [enable],
 
243
          [Enable the X_MS_MediaReceiverRegistrar UPnP service. This is for future XBox 360 support, other renderers will probably not need it],
 
244
          [
 
245
            AC_DEFINE([ENABLE_MRREG], [1], [Enable the X_MS_MediaReceiverRegistrar UPnP service. This is for future XBox 360 support, other renderers will probably not need it])
 
246
          ],[])
 
247
 
 
248
MT_OPTION([external-transcoding], [disable],
 
249
          [external transcoding support],
 
250
          [],[EXTERNAL_TRANSCODING_OPTION_ENABLED=disabled])
 
251
 
 
252
MT_OPTION([sopcast], [enable],
 
253
          [SopCast service support],
 
254
          [
 
255
            AC_DEFINE([SOPCAST], [1], [SopCast service support])
 
256
          ],[SOPCAST_OPTION_ENABLED=disabled])
 
257
 
 
258
 
 
259
MT_OPTION([youtube], [disable],
 
260
          [YouTube service support],
 
261
          [],[YOUTUBE_OPTION_ENABLED=disabled])
 
262
 
 
263
MT_OPTION([weborama], [enable],
 
264
          [Weborama service support],
 
265
          [],[WEBORAMA_OPTION_ENABLED=disabled])
 
266
 
 
267
MT_OPTION([atrailers], [disable],
 
268
          [Apple Trailers service support],
 
269
          [],[ATRAILERS_OPTION_ENABLED=disabled])
 
270
 
 
271
MT_OPTION([sqlite-backup-defaults], [enable],
 
272
          [enable sqlite database backup settings in config.xml by default],
 
273
          [],[])
 
274
 
 
275
MT_OPTION([protocolinfo-extension], [disable],
 
276
          [This is required for Playstation 3 support, it adds certain tags to the protocolInfo attribute],
 
277
          [
 
278
            AC_DEFINE([EXTEND_PROTOCOLINFO], [1], [This is required for Playstation 3 support, it adds certain tags to the protocolInfo attribute])
 
279
          ],[])
 
280
 
 
281
USE_CURL=1
 
282
CURL_REQUESTED=0
 
283
AC_ARG_ENABLE([curl],
 
284
              [
 
285
AC_HELP_STRING([--enable-curl],
 
286
[Enable curl support (required for YouTube support, provides additional functionality for the external transcoding feature (default: auto)])
 
287
              ],
 
288
              [
 
289
                if test "x$enableval" = xno; then
 
290
                    USE_CURL=0
 
291
                    CURL_REQUESTED=1
 
292
                else
 
293
                    CURL_REQUESTED=1
 
294
                    USE_CURL=1
 
295
                fi 
 
296
              ]
 
297
)
 
298
 
 
299
AC_ARG_WITH([curl-cfg],
 
300
            [
 
301
AC_HELP_STRING([--with-curl-cfg=curl-config],
 
302
                    [absolute path/name of curl-config])
 
303
            ],
 
304
            [
 
305
                CURL_SEARCH_CONFIG="$withval"
 
306
                AC_MSG_NOTICE([Will search for curl-config in $withval])
 
307
            ]
 
308
)
 
309
 
 
310
MT_OPTION([fseeko-check], [disable],
 
311
          [This is a workaround for a bug on some Debian distros, use this if configure fails complaining about off_t],
 
312
          [],[])
 
313
 
 
314
###############################################################################
 
315
# The following block is derived from the configure.ac script from the 
 
316
# libupnp-1.3.1 package
 
317
# (C) Copyright 2005-2006 Remi Turboult <r3mi@users.sourceforge.net>
 
318
upnpmaj=0
 
319
upnpmin=4
 
320
upnppatch=1
 
321
AC_DEFINE_UNQUOTED([UPNP_VERSION_STRING], "$PACKAGE_VERSION",
 
322
    [see upnpconfig.h])
 
323
AC_DEFINE_UNQUOTED([UPNP_VERSION_MAJOR], $upnpmaj, [see upnpconfig.h])
 
324
AC_DEFINE_UNQUOTED([UPNP_VERSION_MINOR], $upnpmin, [see upnpconfig.h])
 
325
AC_DEFINE_UNQUOTED([UPNP_VERSION_PATCH], $upnppatch, [see upnpconfig.h])
 
326
###############################################################################
 
327
 
 
328
AC_PROG_CXX
 
329
AC_PROG_CC
 
330
AC_PROG_RANLIB
 
331
AC_PROG_GCC_TRADITIONAL
 
332
AC_HEADER_DIRENT
 
333
AC_HEADER_STDC
 
334
AC_HEADER_SYS_WAIT
 
335
AC_HEADER_STDBOOL
 
336
AC_HEADER_TIME
 
337
AC_HEADER_STAT
 
338
AC_LANG_C
 
339
AM_PROG_CC_C_O
 
340
 
 
341
AC_CHECK_HEADERS([time.h syslog.h stddef.h unistd.h arpa/inet.h fcntl.h], [],
 
342
                 [AC_MSG_ERROR(required header not found)]) 
 
343
 
 
344
AC_CHECK_HEADERS([limits.h netdb.h netinet/in.h stdlib.h string.h sys/file.h],
 
345
                 [],
 
346
                 [AC_MSG_ERROR(required header not found)]) 
 
347
AC_CHECK_HEADERS([sys/ioctl.h sys/socket.h sys/time.h sys/types.h sys/wait.h],
 
348
                 [],
 
349
                 [AC_MSG_ERROR(required header not found)]) 
 
350
 
 
351
AC_CHECK_HEADERS([langinfo.h locale.h],[],[AC_MSG_WARN(Header that is required to retrieve system locale not found, will use default value)])
 
352
 
 
353
AC_CHECK_HEADERS([sys/utsname.h])
 
354
 
 
355
AC_CHECK_HEADERS([sched.h ctype.h],[],[])
 
356
AC_CHECK_FUNCS([sched_getparam sched_setparam sched_get_priority_min sched_get_priority_max],[],[])
 
357
   
 
358
AC_CHECK_FUNCS([mkdir], [],
 
359
              [AC_MSG_ERROR(required function not found)])
 
360
 
 
361
AC_CHECK_HEADERS([getopt.h],
 
362
        [
 
363
            AC_CHECK_FUNCS([getopt_long],[],
 
364
                           [AC_MSG_WARN(
 
365
             getopt_long not found - all command line options disabled)
 
366
                           ])
 
367
 
 
368
        ],
 
369
        [
 
370
    AC_MSG_WARN(getopt.h not found - all command line options disabled)
 
371
        ])
 
372
 
 
373
AC_CACHE_SAVE
 
374
 
 
375
 
 
376
 
 
377
CPPFLAGS_SAVE="$CPPFLAGS"
 
378
CFLAGS_SAVE="$CFLAGS"
 
379
CXXFLAGS_SAVE="$CXXFLAGS"
 
380
LDFLAGS_SAVE="$LDFLAGS"
 
381
 
 
382
if test "x$EXTERNAL_TRANSCODING_OPTION_ENABLED" = xyes; then
 
383
    AC_CHECK_FUNCS([mkfifo],
 
384
       [
 
385
            AC_DEFINE([EXTERNAL_TRANSCODING], [1], [external transcoding feature])
 
386
       ],
 
387
       [
 
388
           if test "x$EXTERNAL_TRANSCODING_OPTION_REQUESTED" = xyes; then
 
389
               AC_MSG_ERROR([mkfifo is required by the external transcoding feature])
 
390
           else
 
391
               AC_MSG_WARN([mkfifo is required by the external transcoding feature])
 
392
               EXTERNAL_TRANSCODING_OPTION_ENABLED=disabled
 
393
 
 
394
           fi
 
395
       ]
 
396
    )
 
397
fi
 
398
 
 
399
ICONV_CXXFLAGS=
 
400
ICONV_LIBS=
 
401
 
 
402
if test -n "$ICONV_SEARCH_HEADERS"; then
 
403
AC_CHECK_HEADER([$ICONV_SEARCH_HEADERS/iconv.h],
 
404
        [
 
405
            ICONV_CXXFLAGS="-I$ICONV_SEARCH_HEADERS"
 
406
        ],
 
407
        [
 
408
            AC_MSG_ERROR(iconv.h not found in requested location $ICONV_SEARCH_HEADERS)
 
409
        ]
 
410
)
 
411
        
 
412
else
 
413
AC_CHECK_HEADER([iconv.h],
 
414
        [ICONV_OK=yes],
 
415
        [
 
416
            unset ac_cv_header_iconv_h
 
417
            AC_CHECK_HEADER([/usr/local/include/iconv.h],
 
418
                [
 
419
                    ICONV_CXXFLAGS="-I/usr/local/include"
 
420
                    if test -z "$ICONV_SEARCH_LIBS"; then
 
421
                        LDFLAGS="-L/usr/local/lib"
 
422
                    fi
 
423
                ],
 
424
                [
 
425
                    unset ac_cv_header_iconv_h
 
426
                    AC_CHECK_HEADER([$SEARCH_DIR_HEADERS/iconv.h],
 
427
                        [
 
428
                            ICONV_CXXFLAGS="-I$SEARCH_DIR_HEADERS"
 
429
                            if test -z "$ICONV_SEARCH_LIBS"; then
 
430
                                LDFLAGS="-L$SEARCH_DIR_LIBS"
 
431
                            fi
 
432
                        ],
 
433
                        [AC_MSG_ERROR(required header iconv.h not found on your system)]
 
434
                    )
 
435
                ]
 
436
            )
 
437
        ]
 
438
)
 
439
fi
 
440
 
 
441
LIBICONV=0
 
442
if test -n "$ICONV_SEARCH_LIBS"; then
 
443
    if test "x$ICONV_LIB_OPTION_ENABLED" = xno; then
 
444
        LDFLAGS="-L$ICONV_SEARCH_LIBS"
 
445
        AC_CHECK_FUNC([iconv],
 
446
            [
 
447
                ICONV_LIBS="-L$ICONV_SEARCH_LIBS"
 
448
            ],
 
449
            [
 
450
                LDFLAGS="-L$ICONV_SEARCH_LIBS -liconv"
 
451
                AC_CHECK_LIB(iconv, iconv,
 
452
                    [
 
453
                        ICONV_LIBS="-L$ICONV_SEARCH_LIBS -liconv"
 
454
                        LIBICONV=1
 
455
                    ],
 
456
                    [
 
457
                        AC_CHECK_LIB(iconv, libiconv,
 
458
                            [
 
459
                                ICONV_LIBS="-L$ICONV_SEARCH_LIBS -liconv"
 
460
                                LIBICONV=1
 
461
                            ],
 
462
                            [AC_MSG_ERROR(required library iconv not found in requested location $ICONV_SEARCH_LIBS)]
 
463
                        )
 
464
                    ]
 
465
                ) 
 
466
            ]
 
467
        ) 
 
468
    else
 
469
        LDFLAGS="-L$ICONV_SEARCH_LIBS -liconv"
 
470
        AC_CHECK_LIB(iconv, iconv,
 
471
                [
 
472
                    ICONV_LIBS="-L$ICONV_SEARCH_LIBS -liconv"
 
473
                    LIBICONV=1
 
474
                ],
 
475
                [AC_MSG_ERROR(You specified to use libiconv but it was not found in the requested location $ICONV_SEARCH_LIBS)]
 
476
        )
 
477
    fi
 
478
else
 
479
    if test "x$ICONV_LIB_OPTION_ENABLED" = xno; then
 
480
        AC_CHECK_FUNC([iconv],
 
481
            [
 
482
                ICONV_LIBS="$LDFLAGS"
 
483
            ],
 
484
            [
 
485
        
 
486
                LDFLAGS="$LDFLAGS -liconv"
 
487
                AC_CHECK_LIB(iconv, iconv, 
 
488
                    [
 
489
                        ICONV_LIBS="$LDFLAGS"
 
490
                        LIBICONV=1
 
491
                    ], 
 
492
                    [
 
493
                        AC_CHECK_LIB(iconv, libiconv,
 
494
                            [
 
495
                                ICONV_LIBS="$LDFLAGS"
 
496
                                LIBICONV=1
 
497
                            ],
 
498
                            [AC_MSG_ERROR(required library iconv not found on your system)]
 
499
                        )
 
500
                    ]
 
501
                )
 
502
            ]
 
503
        )
 
504
    else
 
505
        LDFLAGS="$LDFLAGS -liconv"
 
506
        AC_CHECK_LIB(iconv, iconv,
 
507
                [
 
508
                    ICONV_LIBS="$LDFLAGS"
 
509
                    LIBICONV=1
 
510
                ],
 
511
                [
 
512
                    AC_MSG_ERROR(You specified to use libiconv but the library was not found)
 
513
                ]
 
514
       )
 
515
    fi
 
516
fi
 
517
 
 
518
if test $LIBICONV -eq 1; then
 
519
    AC_DEFINE([HAVE_LIBICONV], [1], [we are using the libiconv library])
 
520
fi
 
521
 
 
522
AC_SUBST(ICONV_CXXFLAGS)
 
523
AC_SUBST(ICONV_LIBS)
 
524
 
 
525
CFLAGS="$CFLAGS $ICONV_CXXFLAGS -Werror"
 
526
AC_MSG_CHECKING([if iconv declaration requires const char cast])
 
527
AC_COMPILE_IFELSE(
 
528
     [AC_LANG_PROGRAM(
 
529
         [
 
530
             #include <stdlib.h>
 
531
             #include <iconv.h>
 
532
         ],
 
533
         [
 
534
            char **ptr = NULL;
 
535
            size_t len;
 
536
            iconv_t cd = NULL;
 
537
            (void)iconv(cd, ptr, &len, ptr, &len);
 
538
         ]
 
539
     )],
 
540
     [
 
541
         AC_MSG_RESULT([no])
 
542
     ],
 
543
     [
 
544
         AC_DEFINE([ICONV_CONST], [1], 
 
545
                   [iconv needs const char cast])
 
546
 
 
547
         AC_MSG_RESULT([yes])
 
548
     ])
 
549
 
 
550
 
 
551
CFLAGS="$CFLAGS_SAVE"
 
552
CXXFLAGS="$CXXFLAGS_SAVE"
 
553
LDFLAGS="$LDFLAGS_SAVE"
 
554
 
 
555
AC_CHECK_HEADERS(execinfo.h,[],[])
 
556
 
 
557
AC_CHECK_TYPES([time_t], [], [], [#include <sys/types.h>])
 
558
 
 
559
AC_CACHE_SAVE
 
560
 
 
561
AC_SYS_LARGEFILE
 
562
AC_TYPE_OFF_T
 
563
AC_TYPE_SIZE_T
 
564
#AC_CHECK_TYPES([ssize_t], [], [], [#include <sys/types.h>])
 
565
 
 
566
if test "x$FSEEKO_CHECK_OPTION_ENABLED" = xyes; then
 
567
    AC_FUNC_FSEEKO
 
568
 
 
569
    if test "$ac_cv_func_fseeko" = no || test "$ac_cv_sys_largefile_source" = unknown; then
 
570
        AC_MSG_WARN([fseeko has not been found on your system, will use fseek instead.])
 
571
        AC_MSG_WARN([This has not been tested, please report if you have any problems.])
 
572
        AC_DEFINE([fseeko], [fseek], [fseeko not present])
 
573
    fi
 
574
else
 
575
    AC_MSG_WARN([Skipping fseeko test! (requested by user)])
 
576
fi
 
577
 
 
578
AC_CHECK_SIZEOF(off_t, 4)
 
579
AC_CHECK_SIZEOF(size_t, 4)
 
580
AC_CHECK_SIZEOF(time_t, 4)
 
581
AC_CHECK_SIZEOF(unsigned int)
 
582
AC_CHECK_SIZEOF(unsigned long)
 
583
AC_CHECK_FUNCS(strtoll nl_langinfo setlocale,[],[])
 
584
AC_CHECK_FUNCS(backtrace backtrace_symbols,[],[])
 
585
# Checks for typedefs, structures, and compiler characteristics.
 
586
AC_C_CONST
 
587
AC_C_INLINE
 
588
AC_C_VOLATILE
 
589
AC_TYPE_SIGNAL
 
590
AC_TYPE_PID_T
 
591
AC_TYPE_SIZE_T
 
592
AC_TYPE_INT64_T
 
593
AC_TYPE_SSIZE_T
 
594
AC_TYPE_UINT32_T
 
595
AC_STRUCT_TM
 
596
AC_C_BIGENDIAN
 
597
 
 
598
dnl This needs improvement!
 
599
AC_CHECK_DECL(LONG_MAX,
 
600
        [
 
601
            AC_DEFINE([HAVE_LONG_MAX], [1], [LONG_MAX definition available])
 
602
            have_long_max=1
 
603
        ], , [#include <limits.h>])
 
604
 
 
605
 
 
606
AC_CHECK_DECL(LLONG_MAX,
 
607
        [
 
608
            AC_DEFINE([MAXLLONG], [LLONG_MAX], [LLONG_MAX definition])
 
609
        ],
 
610
        [
 
611
            AC_CHECK_DECL(__LONG_LONG_MAX__, 
 
612
                [
 
613
                    AC_DEFINE([MAXLLONG], [__LONG_LONG_MAX__], 
 
614
                    [LLONG_MAX definition])],
 
615
                [
 
616
                    if test "$have_long_max" -eq 1; then
 
617
                        AC_DEFINE([MAXLLONG], [LONG_MAX], [LLONG_MAX not available])
 
618
                    fi
 
619
                ], [#include <limits.h>])
 
620
        ]
 
621
        , [#include <limits.h>])
 
622
 
 
623
AC_ARG_ENABLE(rpl-malloc, 
 
624
        AC_HELP_STRING([--disable-rpl-malloc], [disable redefinition of malloc to rpl_malloc and realloc to rpl_realloc. Use this if you are sure that you are compiling for the GNU C library (default: enabled)]),
 
625
        [
 
626
            if test "x$enableval" = xno; then
 
627
                ac_cv_func_malloc_0_nonnull=yes
 
628
                ac_cv_func_realloc_0_nonnull=yes
 
629
                AC_MSG_NOTICE([Disabling redefinition of malloc to rpl_malloc])
 
630
                AC_MSG_NOTICE([Disabling redefinition of realloc to rpl_realloc])
 
631
                AC_MSG_WARN([Use this feature only if you are sure that you are building for GNU C!])
 
632
            fi
 
633
        ]
 
634
)
 
635
 
 
636
 
 
637
# Checks for library functions.
 
638
AC_FUNC_ALLOCA
 
639
AC_FUNC_CLOSEDIR_VOID
 
640
AC_FUNC_ERROR_AT_LINE
 
641
AC_FUNC_FORK
 
642
AC_FUNC_MALLOC
 
643
AC_FUNC_MEMCMP
 
644
AC_FUNC_REALLOC
 
645
AC_FUNC_SELECT_ARGTYPES
 
646
AC_FUNC_STAT
 
647
AC_FUNC_STRTOD
 
648
AC_FUNC_VPRINTF
 
649
AC_FUNC_STRERROR_R
 
650
AC_FUNC_STRFTIME
 
651
 
 
652
AC_LANG_CPLUSPLUS
 
653
 
 
654
AC_CHECK_FUNCS([gethostname gettimeofday localtime_r memmove memset],
 
655
               [],
 
656
               [AC_MSG_ERROR(required library function not found)])
 
657
AC_CHECK_FUNCS([regcomp select strcasecmp strchr strdup strerror strncasecmp],
 
658
               [],
 
659
               [AC_MSG_ERROR(required library function not found)])
 
660
AC_CHECK_FUNCS([strrchr strstr strtol strtoul uname], [],
 
661
               [AC_MSG_ERROR(required library function not found)])
 
662
 
 
663
AC_CHECK_FUNCS([sigaction sigprocmask],[],
 
664
               [AC_MSG_ERROR(required library function not found)]) 
 
665
 
 
666
AC_CHECK_FUNCS([ioctl tolower toupper],[],
 
667
               [AC_MSG_ERROR(required library function not found)]) 
 
668
               
 
669
AC_CACHE_SAVE
 
670
 
 
671
AC_CHECK_FUNCS([inet_ntoa],
 
672
               [],
 
673
               [
 
674
                    AC_CHECK_LIB(nsl, inet_ntoa,
 
675
                                 [],
 
676
                                 [
 
677
                                    AC_MSG_ERROR(required library function not found)
 
678
                                 ])
 
679
               ])
 
680
 
 
681
AC_CHECK_FUNCS([socket],
 
682
               [],
 
683
               [AC_CHECK_LIB(socket, socket,
 
684
                                 [],
 
685
                                 [
 
686
                                    AC_MSG_ERROR(required library function not found)
 
687
                                 ])
 
688
               ])
 
689
               
 
690
 
 
691
 
 
692
AC_CHECK_FUNCS([gethostbyname],
 
693
               [],
 
694
               [
 
695
                    AC_CHECK_LIB(nsl, gethostbyname, 
 
696
                                 [],
 
697
                                 [
 
698
                                    AC_MSG_ERROR(required library function not found)
 
699
                                 ]) 
 
700
               ])
 
701
 
 
702
if test $DARWIN_OS -eq 1 ; then
 
703
        AC_MSG_NOTICE([You are running OSX, assuming threadsafe gethostbyname version])
 
704
elif test $CYGWIN_OS -eq 1; then
 
705
        AC_MSG_NOTICE([Your are building under Cygwin, assuming threadsafe gethostbyname implementation])
 
706
fi
 
707
 
 
708
AC_CHECK_FUNCS([gethostbyname_r],[],
 
709
        [
 
710
            AC_CHECK_HEADERS([lwres/netdb.h],
 
711
                [
 
712
                    AC_CHECK_LIB(lwres, lwres_gethostbyname_r,
 
713
                                 [
 
714
                                    LWRES_LIBS="-llwres"
 
715
                                    AC_DEFINE(HAVE_LIBLWRES, 1, [lwres library presence])
 
716
                                    AC_SUBST(LWRES_LIBS)
 
717
                                 ],
 
718
                                 [AC_MSG_ERROR(required library function not found)])
 
719
                ],
 
720
                [
 
721
                    if ((test $DARWIN_OS -eq 0) && (test $CYGWIN_OS -eq 0) && (test $OPENBSD_OS -eq 0)) ; then
 
722
                        AC_MSG_ERROR([required header not found])
 
723
                    fi
 
724
                ])
 
725
        ])
 
726
 
 
727
AC_CHECK_FUNCS([if_nameindex],[],
 
728
        [
 
729
            AC_CHECK_LIB(nsl, if_nameindex,
 
730
                [
 
731
                    NSL_LIBS="-lnsl"
 
732
                    AC_SUBST(NSL_LIBS)
 
733
                ],
 
734
                [
 
735
                    if test $CYGWIN_OS -eq 0; then
 
736
                        AC_MSG_ERROR(required library function not found)
 
737
                    fi
 
738
                ]
 
739
            )
 
740
        ]
 
741
)
 
742
 
 
743
AC_CHECK_FUNCS([if_freenameindex],[],
 
744
        [
 
745
            AC_CHECK_LIB(nsl, if_freenameindex,[],
 
746
                [
 
747
                    if ((test $CYGWIN_OS -eq 0) && (test $OPENBSD_OS -eq 0)); then
 
748
                        AC_MSG_ERROR(required library function not found)
 
749
                    fi
 
750
                ]
 
751
            )
 
752
        ]
 
753
)
 
754
 
 
755
 
 
756
# this is not optional, we need the device and the internal webserver
 
757
AC_DEFINE([UPNP_HAVE_DEVICE], [1], [Compile device API])
 
758
AC_DEFINE([UPNP_HAVE_WEBSERVER], [1], [Compile internal web server])    
 
759
 
 
760
    
 
761
ADD_PTHREAD_CFLAGS=
 
762
 
 
763
# see acinclude.m4 for the definition of ACX_PTHREAD
 
764
if test "x$PTHREAD_LIB_OPTION_ENABLED" = xyes; then
 
765
    MT_CHECK_LIBRARY([pthread], [pthread], [pthread_create])
 
766
    if test "x$PTHREAD_STATUS" != xyes; then
 
767
        AC_MSG_ERROR([pthread library not found, try running configure without the --enable-pthread-lib option])
 
768
    fi
 
769
else
 
770
    ACX_PTHREAD(,AC_MSG_ERROR(POSIX threads missing))
 
771
 
 
772
    if test $FREEBSD_OS -eq 1; then
 
773
        ADD_PTHREAD_CFLAGS="$PTHREAD_CFLAGS $PTHREAD_LIBS"
 
774
    fi
 
775
 
 
776
    if test "x$STATIC_OPTION_ENABLED" = xyes; then
 
777
        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 
778
        LIBS="$LIBS $PTHREAD_LIBS"
 
779
        CFLAGS_SAVE="$CFLAGS_SAVE $PTHREAD_CFLAGS"
 
780
        LIBS_SAVE="$LIBS_SAVE $PTHREAD_LIBS"
 
781
    fi
 
782
 
 
783
    AC_SUBST(PTHREAD_LIBS)
 
784
    AC_SUBST(PTHREAD_CFLAGS)
 
785
fi
 
786
 
 
787
unset LIBS
 
788
 
 
789
# we might need librt for sqlite
 
790
MT_CHECK_LIBRARY([rt], [rt], [clock_gettime])
 
791
 
 
792
if test "x$RT_STATUS" != xyes; then
 
793
    AC_CHECK_FUNC(clock_gettime)
 
794
fi
 
795
 
 
796
############ zlib
 
797
 
 
798
MT_CHECK_OPTIONAL_PACKAGE([zlib], [disable],
 
799
                 [zlib support required for automated database creation],
 
800
                 [zlib], [z], [uncompress])
 
801
    
 
802
 
 
803
if test "x$ZLIB_STATUS" = xyes; then
 
804
    if test "x$DB_AUTOCREATE_OPTION_ENABLED" = xyes; then
 
805
        AC_DEFINE([AUTO_CREATE_DATABASE], [1], [create database automatically if it does not exist])
 
806
    fi
 
807
else
 
808
    if test "x$DB_AUTOCREATE_OPTION_ENABLED" = xyes; then
 
809
        if test "x$DB_AUTOCREATE_OPTION_REQUESTED" = xyes; then
 
810
            AC_MSG_ERROR([Automatic database creation not possible due to missing zlib headers/libraries])
 
811
        else
 
812
            AC_MSG_WARN([Automatic database creation not possible due to missing zlib headers/libraries])
 
813
            DB_AUTOCREATE_OPTION_ENABLED=disabled
 
814
        fi
 
815
    fi
 
816
fi
 
817
 
 
818
AC_CACHE_SAVE
 
819
 
 
820
######### SQLite3
 
821
 
 
822
if test "x$RT_STATUS" = xyes; then
 
823
    LDFLAGS="$LDFLAGS $RT_LDFLAGS $RT_LIBS"
 
824
fi
 
825
 
 
826
MT_CHECK_OPTIONAL_PACKAGE([sqlite3], [disable], [sqlite3 database supprot],
 
827
                          [sqlite3], [sqlite3], [sqlite3_open])
 
828
 
 
829
if test "x$SQLITE3_STATUS" = xyes; then
 
830
    if test "x$RT_STATUS" = xyes; then
 
831
        SQLITE_LDFLAGS="$SQLITE_LDFLAGS $RT_LDFLAGS"
 
832
        SQLITE_LIBS="$SQLITE_LIBS $RT_LIBS"
 
833
    fi
 
834
 
 
835
    AC_SUBST(SQLITE3_LDFLAGS)
 
836
    AC_SUBST(SQLITE3_LIBS)
 
837
 
 
838
    if test "x$SQLITE_BACKUP_OPTION_ENABLED" = xyes; then
 
839
        AC_DEFINE([SQLITE_BACKUP_ENABLED], [1], [enable sqlite db backup settings in config.xml by default])
 
840
    fi
 
841
else
 
842
    if (test "x$SQLITE_BACKUP_OPTION_ENABLED" = xyes) &&
 
843
       (test "x$SQLITE_BACKUP_OPTION_REQUESTED" = xyes); then
 
844
        AC_MSG_ERROR(You specified the option to use sqlite backup settings but the sqlite support could not be configured)
 
845
    fi
 
846
 
 
847
fi
 
848
 
 
849
LDFLAGS="$LDFLAGS_SAVE"
 
850
CPPFLAGS="$CPPFLAGS_SAVE"
 
851
CXXFLAGS="$CXXFLAGS_SAVE"
 
852
 
 
853
########## MySQL
 
854
 
 
855
MT_CHECK_OPTIONAL_PACKAGE_CFG([mysql], 
 
856
                              [disable],
 
857
                              [mysql database support],
 
858
                              [mysql_config],
 
859
                              [mysql.h],
 
860
                              [], [mysql_init],[--libs_r])
 
861
 
 
862
if test "x$MYSQL_STATUS" = xyes; then
 
863
    AC_MSG_CHECKING(mysql version)
 
864
    MYSQL_VERSION_MAJOR=`echo $MYSQL_VERSION | sed 's/^\([[0-9]]\{1,\}\)\.\([[0-9]]\{1,\}\).\([[0-9]]\{1,\}\).*$/\1/'`
 
865
    MYSQL_VERSION_MINOR=`echo $MYSQL_VERSION | sed 's/^\([[0-9]]\{1,\}\)\.\([[0-9]]\{1,\}\).\([[0-9]]\{1,\}\).*$/\2/'`
 
866
    AC_MSG_RESULT($MYSQL_VERSION)
 
867
    if test -z $MYSQL_VERSION_MAJOR || test -z $MYSQL_VERSION_MINOR; then
 
868
        AC_MSG_WARN([could not parse mysql version string])
 
869
        MYSQL_STATUS=missing
 
870
    elif test $MYSQL_VERSION_MAJOR -le 3 ; then
 
871
       AC_MSG_WARN(MySQL version too old, we only support version 4.0.x or later)
 
872
       MYSQL_STATUS=missing
 
873
    fi
 
874
fi
 
875
 
 
876
LDFLAGS="$LDFLAGS_SAVE"
 
877
LIBS="$LIBS $MYSQL_LIBS"
 
878
CFLAGS="$CFLAGS $MYSQL_CFLAGS"
 
879
CXXFLAGS="$CXXFLAGS $MYSQL_CFLAGS"
 
880
CPPFLAGS="$CFLAGS $MYSQL_CFLAGS"
 
881
 
 
882
if test "x$MYSQL_STATUS" = xyes; then
 
883
    AC_DEFINE([HAVE_MYSQL], [1], [MySQL library presence])
 
884
    AC_SUBST(MYSQL_LIBS)
 
885
    AC_SUBST(MYSQL_CFLAGS)
 
886
    AC_CHECK_FUNCS([mysql_stmt_init],[],[])
 
887
    
 
888
    AC_MSG_CHECKING([MYSQL_OPT_RECONNECT])
 
889
    AC_COMPILE_IFELSE(
 
890
        [AC_LANG_PROGRAM(
 
891
            [
 
892
                #include <mysql.h>
 
893
            ],
 
894
            [
 
895
                (int)mysql_options(0, MYSQL_OPT_RECONNECT, 0);
 
896
            ]
 
897
        )],
 
898
        [
 
899
            AC_MSG_RESULT([yes])
 
900
            AC_DEFINE([HAVE_MYSQL_OPT_RECONNECT], [1], [MYSQL_OPT_RECONNECT parameter available])
 
901
        ],
 
902
        [
 
903
            AC_MSG_RESULT([no])
 
904
        ]
 
905
    )
 
906
else
 
907
    MYSQL_CFLAGS=
 
908
    MYSQL_LIBS=
 
909
fi
 
910
 
 
911
CPPFLAGS="$CPPFLAGS_SAVE"
 
912
CXXFLAGS="$CXXFLAGS_SAVE"
 
913
CFLAGS="$CFLAGS_SAVE"
 
914
LDFLAGS="$LDFLAGS_SAVE"
 
915
LIBS="$LIBS_SAVE"
 
916
 
 
917
#########  check if at least one database available
 
918
 
 
919
if ((test "x$SQLITE3_STATUS" != xyes) && (test "x$MYSQL_STATUS" != xyes)); then
 
920
    AC_MSG_ERROR(Support of at least one of mysql or sqlite3 must be configured)
 
921
fi
 
922
 
 
923
######### javascript
 
924
 
 
925
AC_ARG_ENABLE(libjs,
 
926
              AC_HELP_STRING([--enable-libjs], [compile with spidermonkey support (default: yes)]),
 
927
              [
 
928
                JS_EN=$enableval 
 
929
                if test "x$enableval" = xno; then
 
930
                    JS_OK=disabled
 
931
                else
 
932
                    JS_OK=yes
 
933
                fi
 
934
              ],
 
935
              [
 
936
                JS_OK=yes
 
937
              ]
 
938
)
 
939
 
 
940
XP_ADD=""
 
941
 
 
942
if test "x$JS_OK" = xyes; then
 
943
dnl    if test $DARWIN_OS -eq 1 ; then
 
944
dnl        XP_ADD="-DXP_MAC"
 
945
dnl    else
 
946
        XP_ADD="-DXP_UNIX"
 
947
dnl    fi
 
948
 
 
949
    CXXFLAGS="$CXXFLAGS $XP_ADD"
 
950
    CPPFLAGS="$CPPFLAGS $XP_ADD"
 
951
 
 
952
    if test -n "$JS_SEARCH_HEADERS" ; then
 
953
        AC_MSG_NOTICE([Will search for js (spidermonkey) headers in $JS_SEARCH_HEADERS])
 
954
        AC_CHECK_HEADER($JS_SEARCH_HEADERS/jsapi.h,
 
955
                [
 
956
                    JS_CXXFLAGS="-I$JS_SEARCH_HEADERS"
 
957
                ],
 
958
                [
 
959
                    AC_MSG_ERROR([jsapi.h not found in requested location $JS_SEARCH_HEADERS])
 
960
                ]
 
961
        )
 
962
    
 
963
    else
 
964
    AC_CHECK_HEADER(jsapi.h,
 
965
        [],
 
966
        [
 
967
            for sm_path in $SEARCH_DIR_HEADERS \
 
968
                           /usr/include/js \
 
969
                           /usr/include/smjs \
 
970
                           /usr/include/mozjs \
 
971
                           /usr/local/include/js \
 
972
                           /usr/local/include/smjs \
 
973
                           /usr/local/include/mozjs \
 
974
                           /usr/include/spidermonkey \
 
975
                           /usr/local/include/spidermonkey \
 
976
                           $SEARCH_DIR_HEADERS/js \
 
977
                           $SEARCH_DIR_HEADERS/smjs \
 
978
                           $SEARCH_DIR_HEADERS/mozjs \
 
979
                           $SEARCH_DIR_HEADERS/spidermonkey; do 
 
980
                if test "x$ac_cv_header_jsapi_h" != xyes ; then
 
981
                    AC_MSG_CHECKING([checking alternative libjs header location: $sm_path])
 
982
                    CXXFLAGS="$XP_ADD -I$sm_path"
 
983
                    CPPFLAGS="$XP_ADD -I$sm_path"
 
984
                    unset ac_cv_header_jsapi_h
 
985
                    AC_CHECK_HEADER(jsapi.h,
 
986
                                    [
 
987
                                        JS_CXXFLAGS="-I$sm_path"
 
988
                                        AC_MSG_RESULT([jsapi.h found in $sm_path])
 
989
                                    ],
 
990
                                    [])
 
991
               fi
 
992
            done
 
993
        ])
 
994
   
 
995
        if test "x$ac_cv_header_jsapi_h" != xyes ; then
 
996
                JS_OK=missing
 
997
                AC_MSG_RESULT([not found, giving up])
 
998
        fi
 
999
    fi
 
1000
fi
 
1001
 
 
1002
MOZLIB=
 
1003
if test "x$JS_OK" = xyes; then
 
1004
    if test -n "$JS_SEARCH_LIBS" ; then
 
1005
        AC_MSG_NOTICE([Will search for js (spidermonkey) libraries in $JS_SEARCH_LIBS])
 
1006
        LDFLAGS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -ljs $ADD_PTHREAD_CFLAGS"
 
1007
        AC_CHECK_LIB(js, JS_NewObject,
 
1008
                [
 
1009
                    JS_LIBS="-L$JS_SEARCH_LIBS -ljs"
 
1010
                    MOZLIB=js
 
1011
                ],
 
1012
                [
 
1013
                    LDFLAGS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -lsmjs $ADD_PTHREAD_CFLAGS"
 
1014
                    AC_CHECK_LIB(smjs, JS_NewObject,
 
1015
                        [
 
1016
                            JS_LIBS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -lsmjs $ADD_PTHREAD_CFLAGS"
 
1017
                            MOZLIB=smjs
 
1018
                        ],
 
1019
                        [
 
1020
                            LDFLAGS="-L$JS_SEARCH_LIBS $LDFLAGS_SAVE -lmozjs $ADD_PTHREAD_CFLAGS"
 
1021
                            AC_CHECK_LIB(mozjs, JS_NewObject,
 
1022
                                [
 
1023
                                    JS_LIBS="-L$JS_SEARCH_LIBS -lmozjs"
 
1024
                                    MOZLIB=mozjs
 
1025
                                ],
 
1026
                                [
 
1027
                                    AC_MSG_ERROR([Spidermonkey not found in requested location $JS_SEARCH_LIBS])
 
1028
                                ]
 
1029
                            )
 
1030
                        ]
 
1031
                    )
 
1032
                ]
 
1033
        )
 
1034
    else
 
1035
    LDFLAGS="$LDFLAGS_SAVE $ADD_PTHREAD_CFLAGS"
 
1036
    AC_CHECK_LIB(js, JS_NewObject,
 
1037
        [
 
1038
            MOZLIB=js
 
1039
            JS_LIBS="-ljs"
 
1040
        ],
 
1041
        [
 
1042
            unset ac_cv_lib_js_JS_NewObject
 
1043
            AC_CHECK_LIB(smjs, JS_NewObject,
 
1044
                [
 
1045
                    JS_LIBS="-lsmjs"
 
1046
                    MOZLIB=smjs
 
1047
                ],
 
1048
                [
 
1049
                    unset ac_cv_lib_smjs_JS_NewObject
 
1050
                    AC_CHECK_LIB(mozjs, JS_NewObject,
 
1051
                        [
 
1052
                            MOZLIB=mozjs
 
1053
                            JS_LIBS="-lmozjs"
 
1054
                        ],
 
1055
                        [
 
1056
                            LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE $ADD_PTHREAD_CFLAGS"
 
1057
                            unset ac_cv_lib_js_JS_NewObject
 
1058
                            AC_CHECK_LIB(js, JS_NewObject,
 
1059
                                [
 
1060
                                    JS_LIBS="-L$SEARCH_DIR_LIBS -ljs"
 
1061
                                    MOZLIB=js
 
1062
                                ],
 
1063
                                [
 
1064
                                    unset ac_cv_lib_smjs_JS_NewObject
 
1065
                                    AC_CHECK_LIB(smjs, JS_NewObject,
 
1066
                                        [
 
1067
                                            JS_LIBS="-L$SEARCH_DIR_LIBS -lsmjs"
 
1068
                                            MOZLIB=smjs
 
1069
                                        ],
 
1070
                                        [
 
1071
                                            LDFLAGS="-L$SEARCH_DIR_LIBS $LDFLAGS_SAVE -lmozjs"
 
1072
                                            unset ac_cv_lib_mozjs_JS_NewObject
 
1073
                                            AC_CHECK_LIB(mozjs, JS_NewObject,
 
1074
                                                [
 
1075
                                                    JS_LIBS="-L$SEARCH_DIR_LIBS -lmozjs"
 
1076
                                                    MOZLIB=mozjs
 
1077
                                                ],
 
1078
                                                [
 
1079
                                                    JS_OK=missing
 
1080
                                                    AC_MSG_RESULT(libjs/libsmjs link failed, giving up)
 
1081
                                                ]
 
1082
                                            )
 
1083
                                        ]
 
1084
                                    )
 
1085
                                ]
 
1086
                            )
 
1087
                        ]
 
1088
                    )
 
1089
                ]
 
1090
            )
 
1091
       ]
 
1092
    )
 
1093
    fi
 
1094
fi
 
1095
if test "x$JS_OK" = xyes; then
 
1096
    AC_DEFINE([HAVE_JS], [1], [libjs presence])
 
1097
    AC_SUBST(JS_CXXFLAGS)
 
1098
    AC_SUBST(JS_LIBS)
 
1099
 
 
1100
    LDFLAGS="$LDFLAGS $JS_LIBS"
 
1101
    CFLAGS="$CFLAGS $JS_CXXFLAGS"
 
1102
    CXXFLAGS="$CXXFLAGS $JS_CXXFLAGS"
 
1103
 
 
1104
    AC_CHECK_LIB($MOZLIB, JS_ClearContextThread,
 
1105
            [
 
1106
                AC_DEFINE([JS_THREADSAFE], [1],
 
1107
                          [this version of spidermonkey is threadsafe])
 
1108
            ])
 
1109
else
 
1110
    if test "x$JS_EN" = xyes; then
 
1111
        AC_MSG_ERROR(unable to configure libjs support)
 
1112
    fi
 
1113
fi
 
1114
 
 
1115
CXXFLAGS="$CXXFLAGS_SAVE"
 
1116
CPPFLAGS="$CPPFLAGS_SAVE"
 
1117
LDFLAGS="$LDFLAGS_SAVE"
 
1118
 
 
1119
########### libmagic
 
1120
MT_OPTION([libmagic], [disable],
 
1121
          [filemagic for automatic mimetype recognition],[],[])
 
1122
 
 
1123
if test "x$LIBMAGIC_OPTION_ENABLED" = xyes; then
 
1124
    MT_CHECK_PACKAGE([libmagic], [magic], [magic], [magic_load])
 
1125
 
 
1126
    if test "x$LIBMAGIC_STATUS" != xyes; then
 
1127
        if test "x$ZLIB_STATUS" != xyes; then
 
1128
            MT_CHECK_LIBRARY([zlib], [z], [compress])
 
1129
            LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
 
1130
            LIBS="$LIBS $ZLIB_LIBS"
 
1131
            AC_MSG_NOTICE([retrying libmagic check with zlib flags])
 
1132
            MT_CHECK_PACKAGE([libmagic], [magic], [magic], [magic_load])
 
1133
            if test "x$LIBMAGIC_STATUS" = xyes; then
 
1134
                LIBMAGIC_LIBS="$LIBMAGIC_LIBS $ZLIB_LIBS"
 
1135
                LIBMAGIC_LDFLAGS="$LIBMAGIC_LDFLAGS $ZLIB_LDFLAGS"
 
1136
            fi
 
1137
        else
 
1138
            LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
 
1139
            LIBS="$LIBS $ZLIB_LIBS"
 
1140
            AC_MSG_NOTICE([retrying libmagic check with zlib flags])
 
1141
            MT_CHECK_PACKAGE([libmagic], [magic], [magic], [magic_load])
 
1142
            if test "x$LIBMAGIC_STATUS" = xyes; then
 
1143
                LIBMAGIC_LIBS="$LIBMAGIC_LIBS $ZLIB_LIBS"
 
1144
                LIBMAGIC_LDFLAGS="$LIBMAGIC_LDFLAGS $ZLIB_LDFLAGS"
 
1145
            fi
 
1146
        fi
 
1147
 
 
1148
        AC_SUBST(LIBMAGIC_LIBS)
 
1149
        AC_SUBST(LIBMAGIC_LDFLAGS)
 
1150
    fi
 
1151
fi
 
1152
 
 
1153
if test "x$LIBMAGIC_STATUS" = xyes; then
 
1154
    AC_MSG_CHECKING([if libmagic is broken (Slackware check)])
 
1155
    CFLAGS="$CFLAGS $LIBMAGIC_CXXLAGS"
 
1156
    CXXFLAGS="$CXXFLAGS $LIBMAGIC_CFLAGS"
 
1157
    LDFLAGS="$LDFLAGS $LIBMAGIC_LDFLAGS $LIBMAGIC_LIBS"
 
1158
    AC_LANG_SAVE
 
1159
    AC_LANG_C
 
1160
    AC_RUN_IFELSE(
 
1161
        AC_LANG_PROGRAM([[ #include <magic.h> ]],
 
1162
         [[
 
1163
            struct magic_set *ms;
 
1164
            ms = magic_open(MAGIC_MIME);
 
1165
            if (ms == 0)
 
1166
                return 0;
 
1167
            magic_load(ms, 0);
 
1168
            magic_close(ms);
 
1169
            return 0;
 
1170
         ]]
 
1171
        ),
 
1172
        [
 
1173
            AC_MSG_RESULT([no]);
 
1174
        ],
 
1175
        [
 
1176
            AC_MSG_RESULT([yes])
 
1177
            MAGIC_OK=broken
 
1178
            AC_MSG_WARN([your magic library is broken, if you are using Slackware install the 'file' package manually])
 
1179
        ],
 
1180
        [
 
1181
            AC_MSG_RESULT([passing for cross compiling])
 
1182
        ])
 
1183
 
 
1184
   AC_LANG_RESTORE
 
1185
fi
 
1186
 
 
1187
if test "x$LIBMAGIC_STATUS" = xyes; then
 
1188
    AC_DEFINE([HAVE_MAGIC], [1], [filemagic library presence])
 
1189
else
 
1190
    if (test "x$LIBMAGIC_OPTION_REQUESTED" = xyes) && 
 
1191
       (test "x$LIBMAGIC_OPTION_ENABLED" = xyes); then
 
1192
        AC_MSG_ERROR(unable to configure libmagic support)
 
1193
    fi
 
1194
fi
 
1195
 
 
1196
CFLAGS="$CFLAGS_SAVE"
 
1197
CXXFLAGS="$CXXFLAGS_SAVE"
 
1198
CPPFLAFS="$CPPFLAFS_SAVE"
 
1199
LDFLGAS="$LDFLAGS_SAVE"
 
1200
 
 
1201
######### taglib or id3lib selection
 
1202
 
 
1203
TAGLIB_STATUS=
 
1204
ID3LIB_STATUS=
 
1205
 
 
1206
MT_OPTION([id3lib], [enable],
 
1207
          [id3 metadata extraction with the help of id3lib],[],[])
 
1208
 
 
1209
MT_OPTION([taglib], [disable],
 
1210
          [id3 metadata extraction with the help of taglib],[],[])
 
1211
 
 
1212
if ((test "x$TAGLIB_OPTION_ENABLED" = xno) && (test "x$ID3LIB_OPTION_ENABLED" = xyes)) ; then
 
1213
    TAGLIB_STATUS=disabled
 
1214
    TAGLIB_OPTION_ENABLED=no
 
1215
    AC_MSG_WARN([taglib disabled])
 
1216
elif ((test "x$TAGLIB_OPTION_ENABLED" = xyes) && (test "x$ID3LIB_OPTION_ENABLED" = xno)) ; then
 
1217
    ID3LIB_STATUS=disabled
 
1218
    ID3LIB_OPTION_ENABLED=no
 
1219
    AC_MSG_WARN([id3lib disabled])
 
1220
elif ((test "x$TAGLIB_OPTION_ENABLED" = xyes) && (test "x$ID3LIB_OPTION_ENABLED" = xyes)) ; then
 
1221
    AC_MSG_ERROR([Please select either taglib or id3lib, but not both.])
 
1222
fi
 
1223
 
 
1224
if test "x$TAGLIB_OPTION_ENABLED" = xyes; then
 
1225
    MT_CHECK_PACKAGE_CFG([taglib],  
 
1226
                         [taglib-config], 
 
1227
                         [taglib.h fileref.h tag.h audioproperties.h tstring.h textidentificationframe.h attachedpictureframe.h],
 
1228
                         [tag], [main])
 
1229
else
 
1230
    TAGLIB_STATUS=disabled
 
1231
    if test "x$ID3_OPTION_REQUESTED" = no; then
 
1232
        ID3_OPTION_ENABLED=yes
 
1233
    fi
 
1234
fi
 
1235
 
 
1236
if test "x$TAGLIB_STATUS" = xyes; then
 
1237
    AC_DEFINE([HAVE_ID3_ALBUMART], [1], [not aware of taglib versions that do not support album art])
 
1238
    ID3LIB_STATUS=disabled
 
1239
    ID3LIB_OPTION_ENABLED=no
 
1240
else
 
1241
    if (test "x$TAGLIB_OPTION_REQUESTED" = xyes) && 
 
1242
       (test "x$TAGLIB_OPTION_ENABLED" = xyes); then
 
1243
        AC_MSG_ERROR([unable to configure taglib support])
 
1244
    fi
 
1245
fi
 
1246
 
 
1247
######### id3lib
 
1248
 
 
1249
if test "x$ID3LIB_OPTION_ENABLED" = xyes; then
 
1250
    MT_CHECK_PACKAGE([id3lib], [id3/tag], [id3], [main])
 
1251
 
 
1252
    if test "x$ID3LIB_STATUS" != xyes; then
 
1253
        if test "x$ZLIB_STATUS" != xyes; then
 
1254
            MT_CHECK_LIBRARY([zlib], [z], [compress])
 
1255
            LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
 
1256
            LIBS="$LIBS $ZLIB_LIBS"
 
1257
            AC_MSG_NOTICE([retrying id3lib check with zlib flags])
 
1258
            MT_CHECK_PACKAGE([id3lib], [id3/tag], [id3], [main])
 
1259
            if test "x$ID3LIB_STATUS" = xyes; then
 
1260
                ID3LIB_LIBS="$ID3LIB_LIBS $ZLIB_LIBS"
 
1261
                ID3LIB_LDFLAGS="$ID3LIB_LDFLAGS $ZLIB_LDFLAGS"
 
1262
            fi
 
1263
        else
 
1264
            LDFLAGS="$LDFLAGS $ZLIB_LDFLAGS"
 
1265
            LIBS="$LIBS $ZLIB_LIBS"
 
1266
            AC_MSG_NOTICE([retrying id3lib check with zlib flags])
 
1267
            MT_CHECK_PACKAGE([id3lib], [id3/tag], [id3], [main])
 
1268
            if test "x$ID3LIB_STATUS" = xyes; then
 
1269
                ID3LIB_LIBS="$ID3LIB_LIBS $ZLIB_LIBS"
 
1270
                ID3LIB_LDFLAGS="$ID3LIB_LDFLAGS $ZLIB_LDFLAGS"
 
1271
            fi
 
1272
        fi
 
1273
 
 
1274
        AC_SUBST(ID3LIB_LIBS)
 
1275
        AC_SUBST(ID3LIB_LDFLAGS)
 
1276
    fi
 
1277
fi
 
1278
 
 
1279
if test "x$ID3LIB_STATUS" = xyes; then
 
1280
   CFLAGS="$CFLAGS $ID3_CFLAGS"
 
1281
   CXXFLAGS="$CXXFLAGS $ID3_CFLAGS"
 
1282
   LDFLAGS="$LDFLAGS $ID3LIB_LDFLAGS $ID3LIB_LIBS"
 
1283
   AC_LANG_SAVE
 
1284
   AC_LANG_CPLUSPLUS
 
1285
   AC_MSG_CHECKING([for album art support in id3lib])
 
1286
   AC_COMPILE_IFELSE(
 
1287
        [AC_LANG_PROGRAM(
 
1288
            [
 
1289
                #include <id3/tag.h>
 
1290
                #include <id3/misc_support.h>
 
1291
            ],
 
1292
            [
 
1293
                (void)ID3_HasPicture(0);
 
1294
            ]
 
1295
        )],
 
1296
        [
 
1297
            AC_MSG_RESULT([yes])
 
1298
            AC_DEFINE([HAVE_ID3_ALBUMART], [1], 
 
1299
                      [this version of id3lib has album art support])
 
1300
        ],
 
1301
        [
 
1302
            AC_MSG_RESULT([no])
 
1303
        ])
 
1304
   AC_LANG_RESTORE
 
1305
else
 
1306
    if (test "x$ID3LIB_OPTION_REQUESTED" = xyes) &&
 
1307
       (test "x$ID3LIB_OPEION_ENABLED" = xyes); then
 
1308
        if test "x$TAGLIB_STATUS" = xyes; then
 
1309
            AC_MSG_ERROR([Please select either taglib or id3lib, but not both.])
 
1310
        else
 
1311
            AC_MSG_ERROR(unable to configure id3lib support)
 
1312
        fi
 
1313
    else
 
1314
        ID3LIB_STATUS=disabled
 
1315
    fi
 
1316
fi
 
1317
 
 
1318
LDFLAGS="$LDFLAGS_SAVE"
 
1319
LIBS="$LIBS_SAVE"
 
1320
CXXFLAGS="$CXXFLAGS_SAVE"
 
1321
CPPFLAGS="$CPPFLAGS_SAVE"
 
1322
######## curl
 
1323
 
 
1324
CURL_PROG_FOUND=0
 
1325
CURL_LIBS=
 
1326
CURL_CFLAGS=
 
1327
CURL_OK=no
 
1328
 
 
1329
if ((test "x$YOUTUBE_OPTION_ENABLED" = xyes) && (test "x$YOUTUBE_OPTION_REQUESTED" = xyes) && (test $USE_CURL -eq 0) && (test $CURL_REQUESTED -eq 1)); then
 
1330
    AC_MSG_ERROR([You enabled YouTube but disabled curl, however curl is required by the YouTube feature])
 
1331
fi
 
1332
 
 
1333
if ((test "x$WEBORAMA_OPTION_ENABLED" = xyes) && (test "x$WEBORAMA_OPTION_REQUESTED" = xyes) && (test $USE_CURL -eq 0) && (test $CURL_REQUESTED -eq 1)); then
 
1334
    AC_MSG_ERROR([You enabled Weborama but disabled curl, however curl is required by the Weborama feature])
 
1335
fi
 
1336
 
 
1337
if ((test "x$ATRAILERS_OPTION_ENABLED" = xyes) && (test "x$ATRAILERS_OPTION_REQUESTED" = xyes) && (test $USE_CURL -eq 0) && (test $CURL_REQUESTED -eq 1)); then
 
1338
    AC_MSG_ERROR([You enabled Apple Trailers but disabled curl, however curl is required by the Apple Trailers feature])
 
1339
fi
 
1340
 
 
1341
if ((test "x$YOUTUBE_OPTION_ENABLED" != xyes) && (test "x$SOPCAST_OPTION_ENABLED" != xyes) && (test "x$EXTERNAL_TRANSCODING_OPTION" != xyes) && (test "x$ATRAILERS_OPTION_ENABLED" != xyes) && (test "x$WEBORAMA_OPTION_ENABLED" != xyes)); then
 
1342
    if test $USE_CURL -eq 1; then
 
1343
        if test $CURL_REQUESTED -eq 1; then
 
1344
            AC_MSG_ERROR([You enabled curl support but the external transcoding, YouTube and SopCast features are disabled - curl is not needed without it])
 
1345
        else
 
1346
            CURL_OK=no
 
1347
            USE_CURL=0
 
1348
        fi
 
1349
    fi
 
1350
fi
 
1351
 
 
1352
if (((test "x$YOUTUBE_OPTION_ENABLED" = xyes) || (test "x$SOPCAST_OPTION_ENABLED" = xyes) || (test "x$ATRAILERS_OPTION_ENABLED" = xyes) || (test "x$WEBORAMA_OPTION_ENABLED" = xyes) || (test "x$EXTERNAL_TRANSCODING_OPTION" = xyes)) && (test $USE_CURL -eq 1)); then
 
1353
    AC_MSG_NOTICE([Checking for curl (needed for extended external transcoding/YouTube/SopCast support)])
 
1354
    CURL_OK=yes
 
1355
    if test -n "$CURL_SEARCH_CONFIG"; then
 
1356
        AC_MSG_NOTICE([You specified $CURL_SEARCH_CONFIG for curl-config])
 
1357
        
 
1358
        if test -f "$CURL_SEARCH_CONFIG"; then 
 
1359
            curlconfig="$CURL_SEARCH_CONFIG"
 
1360
        else
 
1361
            curlconfig="no"
 
1362
        fi
 
1363
        
 
1364
        if test "x$curlconfig" = xno; then
 
1365
            AC_MSG_ERROR([$CURL_SEARCH_CONFIG not found])
 
1366
        else
 
1367
            CURL_TEST=`${curlconfig} --version 2>/dev/null`
 
1368
            if test -z "$CURL_TEST"; then
 
1369
                AC_MSG_ERROR([${curlconfig} could not be executed or returned invalid values])
 
1370
            fi
 
1371
            CURL_PROG_FOUND=1
 
1372
        fi
 
1373
    else
 
1374
        AC_PATH_PROG(curlconfig, curl-config, no)
 
1375
        if test "x$curlconfig" = xno; then
 
1376
            unset ac_cv_path_curlconfig
 
1377
            AC_PATH_PROG(curlconfig, curl-config, no, $SEARCH_DIR_PROGS)
 
1378
            if test "x$curlconfig" = xno; then
 
1379
                CURL_OK=missing
 
1380
                AC_MSG_RESULT([curl-config not found, please install the curl-devel package])
 
1381
            else
 
1382
                CURL_PROG_FOUND=1
 
1383
            fi
 
1384
        else
 
1385
            CURL_PROG_FOUND=1
 
1386
        fi
 
1387
   fi 
 
1388
 
 
1389
   if test $CURL_PROG_FOUND -eq 1 ; then
 
1390
        AC_MSG_CHECKING(curl cflags)
 
1391
        CURL_CFLAGS=`${curlconfig} --cflags`
 
1392
        AC_MSG_RESULT($CURL_CFLAGS)
 
1393
 
 
1394
        AC_MSG_CHECKING(curl libraries)
 
1395
        CURL_LIBS=`${curlconfig} --libs`
 
1396
        AC_MSG_RESULT($CURL_LIBS)
 
1397
    fi
 
1398
fi
 
1399
 
 
1400
if test "x$CURL_OK" = xyes; then
 
1401
    CPPFLAGS="$CPPFLAGS $CURL_CFLAGS"
 
1402
    CXXFLAGS="$CXXFLAGS $CURL_CFLAGS"
 
1403
    AC_CHECK_HEADERS([curl/curl.h],
 
1404
        [],
 
1405
        [CURL_OK=missing]
 
1406
    )
 
1407
fi
 
1408
 
 
1409
if test "x$CURL_OK" = xyes; then
 
1410
    LDFLAGS="$CURL_LIBS"
 
1411
    AC_CHECK_LIB(curl, curl_easy_init, [],
 
1412
        [CURL_OK=missing]
 
1413
    )
 
1414
fi
 
1415
 
 
1416
if test "x$CURL_OK" = xyes; then
 
1417
    AC_DEFINE([HAVE_CURL], [1], [curl library presence])
 
1418
    AC_SUBST(CURL_CFLAGS)
 
1419
    AC_SUBST(CURL_LIBS)
 
1420
else
 
1421
    if (test "x$YOUTUBE_OPTION_ENABLED" = xyes) && (test "x$YOUTUBE_OPTION_REQUESTED" = xyes); then
 
1422
        AC_MSG_ERROR([unable to configure curl which is required for YouTube support!])
 
1423
    fi
 
1424
 
 
1425
    if (test "x$YOUTUBE_OPTION_ENABLED" = xyes) && (test "x$YOUTUBE_OPTION_REQUESTED" != xyes); then
 
1426
        AC_MSG_WARN([curl not found, disabling YouTube])
 
1427
        YOUTUBE_OPTION_ENABLED="missing"
 
1428
    fi
 
1429
 
 
1430
    if (test "x$WEBORAMA_OPTION_ENABLED" = xyes) && (test "x$WEBORAMA_OPTION_REQUESTED" = xyes); then
 
1431
        AC_MSG_ERROR([unable to configure curl which is required for Weborama support!])
 
1432
    fi
 
1433
 
 
1434
    if (test "x$WEBORAMA_OPTION_ENABLED" = xyes) && (test "x$WEBORAMA_OPTION_REQUESTED" != xyes); then
 
1435
        AC_MSG_WARN([curl not found, disabling Weborama])
 
1436
        WEBORAMA_OPTION_ENABLED="missing"
 
1437
    fi
 
1438
 
 
1439
    if (test "x$ATRAILERS_OPTION_ENABLED" = xyes) && (test "x$ATRAILERS_OPTION_REQUESTED" = xyes); then
 
1440
        AC_MSG_ERROR([unable to configure curl which is required for Apple Trailers support!])
 
1441
    fi
 
1442
 
 
1443
    if (test "x$ATRAILERS_OPTION_ENABLED" = xyes) && (test "x$ATRAILERS_OPTION_REQUESTED" != xyes); then
 
1444
        AC_MSG_WARN([curl not found, disabling Apple Trailers])
 
1445
        ATRAILERS_OPTION_ENABLED="missing"
 
1446
    fi
 
1447
 
 
1448
    if (test "x$SOPCAST_OPTION_ENABLED" = xyes) && (test "x$SOPCAST_OPTION_REQUESTED" = xyes); then
 
1449
        AC_MSG_ERROR([unable to configure curl which is required for SopCast support!])
 
1450
    fi
 
1451
 
 
1452
    if (test "x$SOPCAST_OPTION_ENABLED" = xyes) && (test "x$SOPCAST_OPTION_REQUESTED" != xyes); then
 
1453
        AC_MSG_WARN([curl not found, disabling SopCast])
 
1454
        SOPCAST_OPTION_ENABLED="missing"
 
1455
    fi
 
1456
 
 
1457
    if test "x$EXTERNAL_TRANSCODING_OPTION" = xyes; then
 
1458
        if ((test $USE_CURL -eq 1) && (test $CURL_REQUESTED -eq 0)); then
 
1459
            AC_MSG_WARN([unable to configure curl, external transcoding will have limited functionality!])
 
1460
        fi
 
1461
 
 
1462
        if ((test $USE_CURL -eq 1) && (test $CURL_REQUESTED -eq 1)); then
 
1463
            AC_MSG_ERROR([You enabled curl support but the curl library could not be configured])
 
1464
        fi
 
1465
    fi
 
1466
 
 
1467
    if (test "x$YOUTUBE_OPTION_ENABLED" != xyes) && (test "x$WEBORAMA_OPTION_ENABLED" != xyes) && (test "x$ATRAILERS_OPTION_ENABLED" != xyes) && (test "x$EXTERNAL_TRANSCODING_OPTION" = !xyes) && (test "x$SOPCAST_OPTION_ENABLED" != xyes); then
 
1468
        CURL_CFLAGS=
 
1469
        CURL_LIBS=
 
1470
    fi
 
1471
fi
 
1472
CPPFLAGS="$CPPFLAGS_SAVE"
 
1473
CXXFLAGS="$CXXFLAGS_SAVE"
 
1474
LDFLAGS="$LDFLAGS_SAVE"
 
1475
 
 
1476
######## ffmpeg or extractor?
 
1477
 
 
1478
FFMPEG_STATUS=
 
1479
LIBEXTRACTOR_STATUS=
 
1480
 
 
1481
MT_OPTION([libextractor], [enable],
 
1482
          [metadata extraction with the help of libextractor],[],[])
 
1483
 
 
1484
MT_OPTION([ffmpeg], [disable],
 
1485
          [metadata extraction with the help of ffmpeg],[],[])
 
1486
 
 
1487
if ((test "x$FFMPEG_OPTION_ENABLED" = xno) && (test "x$LIBEXTRACTOR_OPTION_ENABLED" = xyes)) ; then
 
1488
    FFMPEG_STATUS=disabled
 
1489
    FFMPEG_OPTION_ENABLED=no
 
1490
    AC_MSG_WARN([ffmpeg disabled])
 
1491
elif ((test "x$FFMPEG_OPTION_ENABLED" = xyes) && (test "x$LIBEXTRACTOR_OPTION_ENABLED" = xno)) ; then
 
1492
    LIBEXTRACTOR_STATUS=disabled
 
1493
    LIBEXTRACTOR_OPTION_ENABLED=no
 
1494
elif ((test "x$FFMPEG_OPTION_ENABLED" = xyes) && (test "x$LIBEXTRACTOR_OPTION_ENABLED" = xyes)) ; then
 
1495
    if ((test "x$FFMPEG_OPTION_REQUESTED" = xyes) && (test "x$LIBEXTRACTOR_OPTION_REQUESTED" = xyes)); then
 
1496
    AC_MSG_ERROR([Please select either ffmpeg or libextractor, but not both.])
 
1497
    elif ((test "x$FFMPEG_OPTION_REQUESTED" = xyes) && (test "x$LIBEXTRACTOR_OPTION_REQUESTED" = xno)); then
 
1498
       LIBEXTRACTOR_STATUS=disabled
 
1499
       LIBEXTRACTOR_OPTION_ENABLED=no
 
1500
    elif ((test "x$FFMPEG_OPTION_REQUESTED" = xno) && (test "x$LIBEXTRACTOR_OPTION_REQUESTED" = xyes)); then
 
1501
       FFMPEG_STATUS=disabled
 
1502
       FFMPEG_OPTION_ENABLED=no
 
1503
       AC_MSG_WARN([ffmpeg disabled])
 
1504
    fi
 
1505
fi
 
1506
 
 
1507
######## ffmpeg
 
1508
 
 
1509
if test "x$FFMPEG_OPTION_ENABLED" = xyes; then
 
1510
       AC_LANG_SAVE
 
1511
       AC_LANG_C
 
1512
 
 
1513
    # the header location of the older and newer ffmpeg version is different
 
1514
    MT_CHECK_HEADER([avformat], [ffmpeg/avformat], [pass])
 
1515
    if test "x$AVFORMAT_STATUS" != xyes; then
 
1516
        MT_CHECK_HEADER([avformat], [libavformat/avformat])
 
1517
        if test "x$AVFORMAT_STATUS" = xyes; then
 
1518
            AC_DEFINE_UNQUOTED([AVFORMAT_INCLUDE], [<libavformat/avformat.h>], [libavformat/avformat.h])
 
1519
        fi
 
1520
    else
 
1521
       AC_DEFINE_UNQUOTED([AVFORMAT_INCLUDE], [<ffmpeg/avformat.h>], [ffmpeg/avformat.h])
 
1522
    fi
 
1523
 
 
1524
    if test "x$AVFORMAT_STATUS" = xyes; then
 
1525
        MT_CHECK_LIBRARY([avformat], [avformat], [av_register_all])
 
1526
        MT_CHECK_LIBRARY([avutil], [avutil], [av_log_set_callback])
 
1527
    fi
 
1528
    AC_LANG_RESTORE
 
1529
 
 
1530
    if ((test "x$AVFORMAT_STATUS" = xyes) && (test "x$AVUTIL_STATUS" = xyes)); then
 
1531
        FFMPEG_STATUS=yes
 
1532
    else
 
1533
        FFMPEG_STATUS=missing
 
1534
    fi
 
1535
fi
 
1536
 
 
1537
if test "x$FFMPEG_STATUS" = xyes; then
 
1538
    AC_DEFINE([HAVE_FFMPEG], [1], [FFMPEG library presence])
 
1539
    FFMPEG_CFLAGS="$AVFORMAT_CFLAGS $AVUTIL_CFLAGS"
 
1540
    FFMPEG_LDFLAGS="$AVFORMAT_LDFLAGS $AVUTIL_LDFLAGS"
 
1541
    FFMPEG_LIBS="$AVFORMAT_LIBS $AVUTIL_LIBS"
 
1542
    AC_SUBST(FFMPEG_CFLAGS)
 
1543
    AC_SUBST(FFMPEG_LDFLAGS)
 
1544
    AC_SUBST(FFMPEG_LIBS)
 
1545
else
 
1546
    if test "x$FFMPEG_OPTIEON_REQUESTED" = xyes; then
 
1547
        AC_MSG_ERROR(unable to configure ffmpeg support)
 
1548
    fi
 
1549
fi
 
1550
 
 
1551
MT_CHECK_OPTIONAL_PACKAGE([ffmpegthumbnailer], [disable], 
 
1552
        [compile with ffmpegthumbnailer support for video thumbnail generation],
 
1553
        [libffmpegthumbnailer/videothumbnailerc], 
 
1554
        [ffmpegthumbnailer], [create_thumbnailer])
 
1555
 
 
1556
if ((test "x$FFMPEG_STATUS" != xyes) && (test "x$FFMPEGTHUMBNAILER_STATUS" = xyes)); then
 
1557
    if test "x$FFMPEGTHUMBNAILER_OPTION_REQUESTED" = xyes; then
 
1558
      AC_MSG_ERROR([ffmpeg libraries are required in order to use ffmpegthumbnailer])
 
1559
    else
 
1560
      AC_MSG_WARN([ffmpegthumbnailer disabled: ffmpeg libraries required])
 
1561
      FFMPEGTHUMBNAILER_STATUS="disabled"
 
1562
      FFMPEGTHUMBNAILER_CFLAGS=""
 
1563
      FFMPEGTHUMBNAILER_LDFLAGS=""
 
1564
      FFMPEGTHUMBNAILER_LIBS=""
 
1565
    fi
 
1566
 
 
1567
fi
 
1568
CXXFLAGS="$CXXFLAGS_SAVE"
 
1569
LDFLAGS="$LDFLAGS_SAVE"
 
1570
CPPFLAGS="$CPPFLAGS_SAVE"
 
1571
 
 
1572
######## extractor
 
1573
 
 
1574
if test "x$LIBEXTRACTOR_OPTION_ENABLED" = xyes; then
 
1575
    MT_CHECK_PACKAGE([libextractor], [extractor], [extractor], [EXTRACTOR_getKeywords])
 
1576
fi
 
1577
 
 
1578
if test "x$LIBEXTRACTOR_STATUS" = xyes; then
 
1579
    FFMPEG_STATUS=disabled
 
1580
    FFMPEG_OPTION_ENABLED=no
 
1581
else
 
1582
    if (test "x$LIBEXTRACTOR_OPTION_REQUESTED" = xyes) &&
 
1583
       (test "x$LIBEXTRACTOR_OPTION_ENABLED" = xyes); then
 
1584
        AC_MSG_ERROR([unable to configure libextractor support])
 
1585
    fi
 
1586
fi
 
1587
 
 
1588
######## libexif
 
1589
 
 
1590
MT_CHECK_OPTIONAL_PACKAGE([libexif], [disable], 
 
1591
             [compile with libexif for exif thumbnail and metadata extraction], 
 
1592
             [libexif/exif-content], [exif], [exif_data_new_from_file])
 
1593
 
 
1594
if test "x$LIBEXIF_STATUS" = xyes; then
 
1595
    CFLAGS="$CFLAGS $LIBEXIF_CFLAGS"
 
1596
    CXXFLAGS="$CXXFLAGS $LIBEXIF_CFLAGS"
 
1597
    LDFLAGS="$LDFLAGS $LIBEXIF_LDFLAGS $LIBEXIF_LIBS"
 
1598
 
 
1599
    # try 1 argument signature
 
1600
    AC_MSG_CHECKING([exif_entry_get_value signature])
 
1601
    AC_COMPILE_IFELSE(
 
1602
        [AC_LANG_PROGRAM(
 
1603
            [
 
1604
                #include <libexif/exif-data.h>
 
1605
                #include <libexif/exif-content.h>
 
1606
            ],
 
1607
            [
 
1608
                (void)exif_entry_get_value(0);
 
1609
            ]
 
1610
        )],
 
1611
        [
 
1612
            AC_MSG_RESULT([requires 1 argument])
 
1613
            EXIF_EGV_1=yes
 
1614
        ],
 
1615
        [
 
1616
            # try 3 argument signature
 
1617
            AC_COMPILE_IFELSE(
 
1618
                [AC_LANG_PROGRAM(
 
1619
                    [
 
1620
                        #include <libexif/exif-data.h>
 
1621
                        #include <libexif/exif-content.h>
 
1622
                    ],
 
1623
                    [
 
1624
                        (void)exif_entry_get_value(0, 0, 0);
 
1625
                    ]
 
1626
                )],
 
1627
                [
 
1628
                    AC_MSG_RESULT([requires 3 arguments])
 
1629
                    EXIF_EGV_3=yes
 
1630
                ],
 
1631
                [
 
1632
                    AC_MSG_RESULT([unsupported, disabling])
 
1633
                    EXIF_OK="disabled (unsupported version)"
 
1634
                ]
 
1635
            )
 
1636
        ]
 
1637
    )
 
1638
 
 
1639
    if test "x$EXIF_EGV_1" = xyes; then
 
1640
        AC_DEFINE([EXIF_EGV_1], [1], [exif_entry_get_value() has 1 parameter])
 
1641
    fi
 
1642
    if test "x$EXIF_EGV_3" = xyes; then
 
1643
        AC_DEFINE([EXIF_EGV_3], [1], [exif_entry_get_value() has 3 parameters])
 
1644
    fi
 
1645
fi
 
1646
 
 
1647
LDFLAGS="$LDFLAGS_SAVE"
 
1648
CFLAGS="$CFLAGS_SAVE"
 
1649
CXXFLAGS="$CXXFLAGS_SAVE"
 
1650
 
 
1651
######## expat
 
1652
 
 
1653
MT_CHECK_REQUIRED_PACKAGE([expat], [expat], [expat], [XML_ParserCreate])
 
1654
 
 
1655
####### libmp4v2
 
1656
 
 
1657
MT_CHECK_OPTIONAL_PACKAGE([libmp4v2], [disable],
 
1658
                 [libmp4v2 support for mp4 metadata extraction],
 
1659
                 [mp4], [mp4v2], [MP4Read]) 
 
1660
 
 
1661
if test "x$LIBMP4V2_STATUS" = xyes; then
 
1662
   CFLAGS="$CFLAGS $LIBMP4V2_CFLAGS"
 
1663
   CXXFLAGS="$CXXFLAGS $LIBMP4V2_CFLAGS"
 
1664
   LDFLAGS="$LDFLAGS $LIBMP4V2_LDFLAGS $LIBMP4V2_LIBS"
 
1665
   AC_LANG_SAVE
 
1666
   AC_LANG_CPLUSPLUS
 
1667
   AC_MSG_CHECKING([for MP4GetMetadataCoverArtCount() libmp4v2])
 
1668
   AC_COMPILE_IFELSE(
 
1669
        [AC_LANG_PROGRAM(
 
1670
            [
 
1671
                #include <mp4.h>
 
1672
            ],
 
1673
            [
 
1674
                (void)MP4GetMetadataCoverArtCount(0);
 
1675
            ]
 
1676
        )],
 
1677
        [
 
1678
            AC_MSG_RESULT([yes])
 
1679
            AC_DEFINE([HAVE_MP4_GET_METADATA_COVER_ART_COUNT], [1],
 
1680
                      [this version of libmp4v2 has MP4GetMetadataCoverArtCount() support])
 
1681
        ],
 
1682
        [
 
1683
            AC_MSG_RESULT([no])
 
1684
        ])
 
1685
 
 
1686
   AC_MSG_CHECKING([for MP4GetTrackAudioChannels() in libmp4v2])
 
1687
   AC_COMPILE_IFELSE(
 
1688
        [AC_LANG_PROGRAM(
 
1689
            [
 
1690
                #include <mp4.h>
 
1691
            ],
 
1692
            [
 
1693
                (void)MP4GetTrackAudioChannels(0, 0);
 
1694
            ]
 
1695
        )],
 
1696
        [
 
1697
            AC_MSG_RESULT([yes])
 
1698
            AC_DEFINE([HAVE_MP4_GET_TRACK_AUDIO_CHANNELS], [1],
 
1699
                      [this version of libmp4 has MP4GetTrackAudioChannels support])
 
1700
        ],
 
1701
        [
 
1702
            AC_MSG_RESULT([no])
 
1703
        ])
 
1704
 
 
1705
   AC_LANG_RESTORE
 
1706
fi
 
1707
 
 
1708
########## INOTIFY TOOLS
 
1709
 
 
1710
MT_OPTION([inotify], [disable], [inotify support for imporved autoscan], [], 
 
1711
          [INOTIFY_STATUS=disabled])
 
1712
 
 
1713
if test "x$INOTIFY_OPTION_ENABLED" = xyes; then
 
1714
    MT_CHECK_HEADER([inotify], [sys/inotify])
 
1715
fi
 
1716
 
 
1717
if test "x$INOTIFY_STATUS" = xyes; then
 
1718
    AC_CHECK_FUNCS([inotify_init], [], [INOTIFY_STATUS=missing])
 
1719
fi
 
1720
 
 
1721
if test "x$INOTIFY_STATUS" = xyes; then
 
1722
dnl The check below was inspired by configure.ac from the inotify tools
 
1723
dnl package, see the "Acknowledgements" section in our README file for more 
 
1724
dnl information.
 
1725
    CXXFLAGS="$CXXFLAGS $INOTIFY_CFLAGS"
 
1726
    CFLAGS="$CFLAGS $INOTIFY_CFLAGS"
 
1727
    AC_MSG_CHECKING([whether sys/inotify.h works])
 
1728
    AC_RUN_IFELSE(
 
1729
        AC_LANG_PROGRAM([[#include <sys/inotify.h>]],
 
1730
                         [[return (-1 == inotify_init());]]
 
1731
                       ),
 
1732
                [
 
1733
                    AC_MSG_RESULT([yes]); 
 
1734
                    AC_DEFINE([SYS_INOTIFY_H_OK],[1],[sys/inotify.h exists and works on this system])],
 
1735
                [
 
1736
                    AC_MSG_RESULT([no, using own inotify headers])
 
1737
                    AC_MSG_CHECKING([whether inotify-nosys.h works on this system])
 
1738
                    AC_RUN_IFELSE(
 
1739
                        AC_LANG_PROGRAM([[#include "src/inotify-nosys.h"]],
 
1740
                         [[return (-1 == inotify_init());]]
 
1741
                        ),
 
1742
                        [
 
1743
                            AC_MSG_RESULT([yes]);
 
1744
                        ],
 
1745
                        [
 
1746
                            if ((test "x$INOTIFY_OPTION_REQUESTED" != xyes) &&
 
1747
                                (test "x$INOTIFY_OPTION_ENABLED" = xyes)); then
 
1748
                                AC_MSG_RESULT([no, disabling inotify support])
 
1749
                            elif ((test "x$INOTIFY_OPTION_REQUESTED" != xyes) &&
 
1750
                               (test "x$INOTIFY_OPTION_ENABLED" != xyes)); then
 
1751
                                AC_MSG_RESULT([no])
 
1752
                            fi
 
1753
                                INOTIFY_STATUS=no
 
1754
                        ],
 
1755
                        [
 
1756
                            if ((test "x$INOTIFY_OPTION_REQUESTED" = xyes) &&
 
1757
                                (test "x$INOTIFY_OPTION_ENABLED" = xyes)); then
 
1758
                                AC_MSG_RESULT([selecting yes for cross compiling]) 
 
1759
                                INOTIFY_STATUS=yes
 
1760
                            else
 
1761
                                AC_MSG_RESULT([selecting no for cross compiling]) 
 
1762
                                INOTIFY_STATUS=no
 
1763
                            fi
 
1764
                        ])
 
1765
 
 
1766
                ],
 
1767
                [
 
1768
                    if ((test "x$INOTIFY_OPTION_REQUESTED" = xyes) &&
 
1769
                        (test "x$INOTIFY_OPTION_ENABLED" = xyes)); then
 
1770
                       AC_MSG_RESULT([selecting yes for cross compiling]) 
 
1771
                       INOTIFY_STATUS=yes
 
1772
                    else
 
1773
                       AC_MSG_RESULT([selecting no for cross compiling]) 
 
1774
                       INOTIFY_STATUS=no
 
1775
                    fi
 
1776
                ])
 
1777
fi
 
1778
 
 
1779
if test "x$INOTIFY_STATUS" = xyes; then
 
1780
    AC_DEFINE([HAVE_INOTIFY], [1], [inotify presence])
 
1781
    AC_SUBST(INOTIFY_CFLAGS)
 
1782
else
 
1783
    if ((test "x$INOTIFY_OPTION_REQUESTED" = xyes) &&
 
1784
        (test "x$INOTIFY_OPTION_ENABLED" = xyes)); then
 
1785
        AC_MSG_NOTICE([enabling runtime inotify detection])
 
1786
        # if system inotify header exists, go with it, otherwise take our own
 
1787
        if test "x$ac_cv_header_sys_inotify_h" = xyes; then
 
1788
             AC_DEFINE([SYS_INOTIFY_H_OK],[1],[sys/inotify.h exists])
 
1789
        fi
 
1790
        AC_DEFINE([HAVE_INOTIFY], [1], [inotify presence])
 
1791
        AC_SUBST(INOTIFY_CFLAGS)
 
1792
        INOTIFY_STATUS=yes
 
1793
    fi
 
1794
fi
 
1795
 
 
1796
LDFLAGS="$LDFLAGS_SAVE"
 
1797
CPPFLAGS="$CPPFLAGS_SAVE"
 
1798
CXXFLAGS="$CXXFLAGS_SAVE"
 
1799
 
 
1800
AC_DEFINE([__STDC_CONSTANT_MACROS], [1], [needed for stdint.h])
 
1801
AC_DEFINE([__STDC_LIMIT_MACROS], [1], [needed for stdint.h])
 
1802
 
 
1803
MT_CHECK_OPTIONAL_PACKAGE_CFG([libdvdnav], [disable],
 
1804
             [compile with libdvdnav support for extended DVD image parsing],
 
1805
             [dvdnav-config],
 
1806
             [dvdnav/dvdnav.h], [dvdnav], [dvdnav_get_audio_attr], [])
 
1807
 
 
1808
 
 
1809
MT_OPTION([tombdebug], [enable], [enable debug code for MediaTomb],
 
1810
          [
 
1811
            AC_DEFINE(TOMBDEBUG, 1, [if defined compile with debug log output])
 
1812
          ],
 
1813
          [])
 
1814
 
 
1815
MT_OPTION([upnpdebug], [enable], [enable debug output for TombUPnP/libupnp],
 
1816
          [
 
1817
            AC_DEFINE(UPNP_HAVE_DEBUG, 1, [see upnpconfig.h])
 
1818
            AC_DEFINE(DEBUG, 1, [Define to 1 to compile debug code])
 
1819
          ],
 
1820
          [])
 
1821
 
 
1822
if (test "x$TOMBDEBUG_OPTION_ENABLED" != xyes) && 
 
1823
   (test "x$UPNPDEBUG_OPTION_ENABLED" != xyes); then
 
1824
    AC_DEFINE(NDEBUG, 1, [make sure there are no asserts in the retail build])
 
1825
fi
 
1826
 
 
1827
MT_OPTION([log], [disable], [disable all console output],
 
1828
          [
 
1829
            AC_DEFINE(LOG_ENABLED, 1, [if defined compile with log output])
 
1830
          ],
 
1831
          [])
 
1832
 
 
1833
MT_OPTION([debug-log], [disable], [compile without debug messages],
 
1834
          [
 
1835
            AC_DEFINE(DEBUG_LOG_ENABLED, 1, [compile with debug messages])
 
1836
          ],
 
1837
          [])
 
1838
 
 
1839
 
 
1840
eval PACKAGE_DATADIR="${datadir}/${PACKAGE}"
 
1841
eval PACKAGE_DATADIR="${PACKAGE_DATADIR}"
 
1842
AC_DEFINE_UNQUOTED(PACKAGE_DATADIR, "$PACKAGE_DATADIR", [MediaTomb data directory])
 
1843
 
 
1844
if (test "x$YOUTUBE_OPTION_ENABLED" = xyes) || (test "x$WEBORAMA_OPTION_ENABLED" = xyes) || (test "x$ATRAILERS_OPTION_ENABLED" = xyes) || (test "x$SOPCAST_OPTION_ENABLED" = xyes); then
 
1845
    AC_DEFINE(ONLINE_SERVICES, 1, [at least one online service is supported])
 
1846
fi
 
1847
 
 
1848
if (test "x$YOUTUBE_OPTION_ENABLED" = xyes); then
 
1849
    AC_DEFINE([YOUTUBE], [1], [Enable support for the YouTube service])
 
1850
fi
 
1851
 
 
1852
if (test "x$WEBORAMA_OPTION_ENABLED" = xyes); then
 
1853
    AC_DEFINE([WEBORAMA], [1], [Enable support for the Weborama service])
 
1854
fi
 
1855
 
 
1856
if (test "x$ATRAILERS_OPTION_ENABLED" = xyes); then
 
1857
    AC_DEFINE([ATRAILERS], [1], [Enable support for the apple trailers])
 
1858
fi
 
1859
 
 
1860
if (test "x$SOPCAST_OPTION_ENABLED" = xyes); then
 
1861
    AC_DEFINE([SOPCAST], [1], [Enable support for the SopCast service])
 
1862
fi
 
1863
 
 
1864
AC_DEFINE_UNQUOTED([COMPILE_INFO], "host: $host; sqlite3: $SQLITE3_STATUS; mysql: $MYSQL_STATUS libjs: $JS_OK; libmagic: $LIBMAGIC_STATUS; inotify: $INOTIFY_STATUS; libexif: $LIBEXIF_STATUS; id3lib: $ID3LIB_STATUS; taglib: $TAGLIB_STATUS; ffmpeg: $FFMPEG_STATUS; libmp4v2: $LIBMP4V2_STATUS; external transcoding: $EXTERNAL_TRANSCODING_OPTION_ENABLED; curl: $CURL_OK; YouTube: $YOUTUBE_OPTION_ENABLED; SopCast: $SOPCAST_OPTION_ENABLED; Weborama: $WEBORAMA_OPTION_ENABLED; Apple Trailers: $ATRAILERS_OPTION_ENABLED; libdvdnav: $LIBDVDNAV_STATUS; libextractor: $LIBEXTRACTOR_STATUS; db-autocreate: $DB_AUTOCREATE_OPTION_ENABLED; debug log: $DEBUG_LOG_OPTION_ENABLED; protocol info extensions: $PROTOCOLINFO_EXTENSION_OPTION_ENABLED; data directory: $PACKAGE_DATADIR; ffmpegthumbnailer: $FFMPEGTHUMBNAILER_STATUS", [compile option summary])
 
1865
 
 
1866
###############
 
1867
AC_CONFIG_FILES([
 
1868
    Makefile
 
1869
    build/Makefile
 
1870
    doc/Makefile
 
1871
    scripts/Makefile
 
1872
    scripts/js/Makefile
 
1873
    scripts/mediatomb-service-optware
 
1874
    tombupnp/Makefile
 
1875
    tombupnp/build/Makefile
 
1876
    web/Makefile
 
1877
    config/Makefile
 
1878
    artwork/Makefile
 
1879
    mediatomb.spec
 
1880
])
 
1881
 
 
1882
AC_OUTPUT
 
1883
 
 
1884
echo
 
1885
echo "CONFIGURATION SUMMARY ----"
 
1886
#                        disabled
 
1887
echo
 
1888
echo "sqlite3               : $SQLITE3_STATUS"
 
1889
echo "mysql                 : $MYSQL_STATUS"
 
1890
##echo "postgresql          : $PGSQL_OK"
 
1891
echo "libjs                 : $JS_OK"
 
1892
echo "libmagic              : $LIBMAGIC_STATUS"
 
1893
echo "inotify               : $INOTIFY_STATUS"
 
1894
echo "libexif               : $LIBEXIF_STATUS"
 
1895
#echo "expat                 : $EXPAT_STATUS"
 
1896
echo "id3lib                : $ID3LIB_STATUS"
 
1897
echo "taglib                : $TAGLIB_STATUS"
 
1898
echo "libmp4v2              : $LIBMP4V2_STATUS"
 
1899
echo "libdvdnav             : $LIBDVDNAV_STATUS"
 
1900
echo "ffmpeg                : $FFMPEG_STATUS"
 
1901
echo "ffmpegthumbnailer     : $FFMPEGTHUMBNAILER_STATUS"
 
1902
echo "external transcoding  : $EXTERNAL_TRANSCODING_OPTION_ENABLED"
 
1903
echo "curl                  : $CURL_OK"
 
1904
echo "YouTube               : $YOUTUBE_OPTION_ENABLED"
 
1905
echo "Weborama              : $WEBORAMA_OPTION_ENABLED"
 
1906
echo "Apple Trailers        : $ATRAILERS_OPTION_ENABLED"
 
1907
echo "SopCast               : $SOPCAST_OPTION_ENABLED"
 
1908
echo "libextractor          : $LIBEXTRACTOR_STATUS"
 
1909
echo "db-autocreate         : $DB_AUTOCREATE_OPTION_ENABLED"
 
1910
        
 
1911
if test "x$TOMBDEBUG_OPTION_ENABLED" = xyes; then
 
1912
    echo "debug log             : $TOMBDEBUG_OPTION_ENABLED"
 
1913
fi
 
1914
 
 
1915
if test "x$UPNPDEBUG_OPTION_ENABLED" = xyes; then
 
1916
    echo "upnpdebug             : $UPNPDEBUG_OPTION_ENABLED"
 
1917
fi
 
1918
 
 
1919
if test "x$STATIC_OPTION_ENABLED" = xyes; then
 
1920
    echo "static build          : $STATIC_OPTION_ENABLED"
 
1921
fi
 
1922
 
 
1923
echo
 
1924