233
AC_ARG_WITH(ffmpeg-h,
234
AC_HELP_STRING([--with-ffmpeg-h=DIR], [search for ffmpeg headers in DIR]),
236
FFMPEG_SEARCH_HEADERS="$withval"
237
AC_MSG_NOTICE([Will search for ffmpeg headers in $withval])
241
AC_ARG_WITH(ffmpeg-libs,
242
AC_HELP_STRING([--with-ffmpeg-libs=DIR], [search for ffmpeg libraries in DIR]),
244
FFMPEG_SEARCH_LIBS="$withval"
245
AC_MSG_NOTICE([Will search for ffmpeg libraries in $withval])
249
AC_ARG_WITH(extractor-h,
250
AC_HELP_STRING([--with-extractor-h=DIR], [search for extractor headers in DIR]),
252
EXTRACTOR_SEARCH_HEADERS="$withval"
253
AC_MSG_NOTICE([Will search for extractor headers in $withval])
257
AC_ARG_WITH(extractor-libs,
258
AC_HELP_STRING([--with-extractor-libs=DIR], [search for extractor libraries in DIR]),
260
EXTRACTOR_SEARCH_LIBS="$withval"
261
AC_MSG_NOTICE([Will search for extractor libraries in $withval])
267
AC_ARG_ENABLE(static,
268
AC_HELP_STRING([--enable-static], [build a static version of MediaTomb (default: no)]),
270
if test "x$enableval" = xyes; then
271
CFLAGS="$CFLAGS -static"
272
CXXFLAGS="$CXXFLAGS -static"
273
AC_MSG_NOTICE([Building a static executable.])
281
AUTOCREATE_REQUESTED=0
282
AC_ARG_ENABLE(db-autocreate,
283
AC_HELP_STRING([--enable-db-autocreate], [enable automatic creation of the media database (default: yes)]),
285
if test "x$enableval" = xno; then
287
AUTOCREATE_PRINT="disabled"
289
AUTOCREATE_REQUESTED=1
290
AUTOCREATE_PRINT="yes"
300
AC_ARG_ENABLE([debug-malloc0],
302
AC_HELP_STRING([--enable-debug-malloc0],
303
[only for debugging purposes: abort when we try to call malloc or realloc with a value of zero (default: no)])
306
if test "x$enableval" = xno; then
314
if test $DEBUG_MALLOC_0 -eq 1; then
315
AC_DEFINE([DEBUG_MALLOC_0], [1], [debug: abort on malloc/realloc of zero bytes])
319
AC_ARG_ENABLE([pthread-lib],
321
AC_HELP_STRING([--enable-pthread-lib],
322
[if this option is set we will try to link with -lpthread, else the flag for pthread will be autodetected (default: no)])
325
if test "x$enableval" = xno; then
334
AC_ARG_ENABLE([iconv-lib],
336
AC_HELP_STRING([--enable-iconv-lib],
337
[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 (default: no)])
340
if test "x$enableval" = xno; then
118
MT_OPTION([static], [enable],
119
[build a static version of MediaTomb],
121
CFLAGS="$CFLAGS -static"
122
CXXFLAGS="$CXXFLAGS -static"
123
AC_MSG_NOTICE([Building a static executable.])
127
MT_OPTION([db-autocreate], [disable],
128
[automatic creation of the database],[],[])
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],
133
AC_DEFINE([DEBUG_MALLOC_0], [1],
134
[debug: abort on malloc/realloc of zero bytes])
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], [], [])
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],
349
148
ATOMIC_X86_SMP_REQ=0
452
239
AC_DEFINE([ENABLE_SIGHUP], [1], [enable SIGHUP handling])
455
AC_ARG_ENABLE([mrreg-service],
457
AC_HELP_STRING([--enable-mrreg-service],
458
[Enable the X_MS_MediaReceiverRegistrar UPnP service. This is for future XBox 360 support, other renderers will probably not need it (default: no)])
461
if test "x$enableval" = xyes; then
462
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])
467
EXTERNAL_TRANSCODING=1
468
AC_ARG_ENABLE([external-transcoding],
470
AC_HELP_STRING([--disable-external-transcoding],
471
[enable external transcoding support (default: yes)])
474
if test "x$enableval" = xno; then
475
EXTERNAL_TRANSCODING=0
477
EXTERNAL_TRANSCODING=1
483
AC_ARG_ENABLE([protocolinfo-extension],
485
AC_HELP_STRING([--enable-protocolinfo-extension],
486
[This is required for Playstation 3 support, it adds certain tags to the protocolInfo attribute (default: yes)])
489
if test "x$enableval" = xno; then
497
if test $EXTEND_PROTINFO -eq 1; then
498
AC_DEFINE([EXTEND_PROTOCOLINFO], [1], [This is required for Playstation 3 support, it adds certain tags to the protocolInfo attribute])
504
dnl AC_ARG_ENABLE([youtube],
506
dnl AC_HELP_STRING([--enable-youtube],
507
dnl [Enable support for the YouTube service (default: yes)])
510
dnl if test "x$enableval" = xno; then
513
dnl YOUTUBE_REQUESTED=1
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],
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])
248
MT_OPTION([external-transcoding], [disable],
249
[external transcoding support],
250
[],[EXTERNAL_TRANSCODING_OPTION_ENABLED=disabled])
252
MT_OPTION([sopcast], [enable],
253
[SopCast service support],
255
AC_DEFINE([SOPCAST], [1], [SopCast service support])
256
],[SOPCAST_OPTION_ENABLED=disabled])
259
MT_OPTION([youtube], [disable],
260
[YouTube service support],
261
[],[YOUTUBE_OPTION_ENABLED=disabled])
263
MT_OPTION([weborama], [enable],
264
[Weborama service support],
265
[],[WEBORAMA_OPTION_ENABLED=disabled])
267
MT_OPTION([atrailers], [disable],
268
[Apple Trailers service support],
269
[],[ATRAILERS_OPTION_ENABLED=disabled])
271
MT_OPTION([sqlite-backup-defaults], [enable],
272
[enable sqlite database backup settings in config.xml by default],
275
MT_OPTION([protocolinfo-extension], [disable],
276
[This is required for Playstation 3 support, it adds certain tags to the protocolInfo attribute],
278
AC_DEFINE([EXTEND_PROTOCOLINFO], [1], [This is required for Playstation 3 support, it adds certain tags to the protocolInfo attribute])
522
283
AC_ARG_ENABLE([curl],
524
285
AC_HELP_STRING([--enable-curl],
525
[Enable curl support (provides additional functionality for the external transcoding feature (default: auto)])
286
[Enable curl support (required for YouTube support, provides additional functionality for the external transcoding feature (default: auto)])
528
289
if test "x$enableval" = xno; then
1007
773
ADD_PTHREAD_CFLAGS="$PTHREAD_CFLAGS $PTHREAD_LIBS"
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"
1010
783
AC_SUBST(PTHREAD_LIBS)
1011
784
AC_SUBST(PTHREAD_CFLAGS)
1017
# check librt stuff - clock_gettime
1018
AC_CHECK_FUNC([clock_gettime],
1020
AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [clock_gettime presense])
1021
# we sill might need -lrt for sqlite3, so let's check for it
1022
if test "x$SQLITE3_OK" = xyes; then
1023
AC_CHECK_LIB(rt, clock_gettime,
1028
LDFLAGS="-L$SEARCH_DIR_LIBS"
1029
unset ac_cv_lib_rt_clock_gettime
1030
AC_CHECK_LIB(rt, clock_gettime,
1032
RT_LIBS="-L$SEARCH_DIR_LIBS -lrt"
1040
AC_CHECK_LIB(rt, clock_gettime,
1043
AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [clock_gettime presense])
1046
LDFLAGS="-L$SEARCH_DIR_LIBS"
1047
unset ac_cv_lib_rt_clock_gettime
1048
AC_CHECK_LIB(rt, clock_gettime,
1050
RT_LIBS="-L$SEARCH_DIR_LIBS -lrt"
1051
AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [clock_gettime presense])
1060
LDFLAGS="$LDFLAGS_SAVE"
1067
if test -n "$Z_SEARCH_HEADERS" ; then
1068
AC_MSG_NOTICE([Will search for zlib headers in $Z_SEARCH_HEADERS])
1069
AC_CHECK_HEADER([$Z_SEARCH_HEADERS/zlib.h],
1071
Z_CXXFLAGS="-I$Z_SEARCH_HEADERS"
1074
AC_MSG_ERROR([zlib.h not found in requested location $Z_SEARCH_HEADERS])
1078
AC_CHECK_HEADER([zlib.h], [],
1080
unset ac_cv_header_zlib_h
1081
AC_CHECK_HEADER([$SEARCH_DIR_HEADERS/zlib.h],
1083
Z_CXXFLAGS="-I$SEARCH_DIR_HEADERS"
1091
if test -n "$Z_SEARCH_LIBS" ; then
1092
AC_MSG_NOTICE([Will search for zlib libraries in $Z_SEARCH_LIBS])
1093
LDFLAGS="-L$Z_SEARCH_LIBS"
1094
AC_CHECK_LIB(z, uncompress,
1096
Z_LIBS="-L$Z_SEARCH_LIBS -lz"
1099
AC_MSG_ERROR([zlib libraries not found in requested location $Z_SEARCH_LIBS])
1103
AC_CHECK_LIB(z,uncompress,
1106
LDFLAGS="-L$SEARCH_DIR_LIBS"
1107
unset ac_cv_lib_z_uncompress
1108
AC_CHECK_LIB(z, uncompress,
1110
Z_LIBS="-L$SEARCH_DIR_LIBS -lz"
1121
if test "x$ZLIB_OK" = xyes; then
1122
AC_SUBST(Z_CXXFLAGS)
1125
if test $AUTOCREATE -eq 1; then
789
# we might need librt for sqlite
790
MT_CHECK_LIBRARY([rt], [rt], [clock_gettime])
792
if test "x$RT_STATUS" != xyes; then
793
AC_CHECK_FUNC(clock_gettime)
798
MT_CHECK_OPTIONAL_PACKAGE([zlib], [disable],
799
[zlib support required for automated database creation],
800
[zlib], [z], [uncompress])
803
if test "x$ZLIB_STATUS" = xyes; then
804
if test "x$DB_AUTOCREATE_OPTION_ENABLED" = xyes; then
1126
805
AC_DEFINE([AUTO_CREATE_DATABASE], [1], [create database automatically if it does not exist])
1129
if test $AUTOCREATE_REQUESTED -eq 1; then
1130
AC_MSG_ERROR([Automatic database creation not possible due to missing zlib headers/libraries])
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])
812
AC_MSG_WARN([Automatic database creation not possible due to missing zlib headers/libraries])
813
DB_AUTOCREATE_OPTION_ENABLED=disabled
1136
820
######### SQLite3
1138
AC_ARG_ENABLE(sqlite3,
1139
AC_HELP_STRING([--enable-sqlite3], [compile with sqlite3 support (default: yes)]),
1141
SQLITE3_EN=$enableval
1142
if test "x$enableval" = xno; then
1153
if test "x$SQLITE3_OK" = xyes; then
1154
if test -n "$SQLITE3_SEARCH_HEADERS"; then
1155
AC_MSG_NOTICE([Will search for sqlite3 headers in $SQLITE3_SEARCH_HEADERS])
1156
AC_CHECK_HEADER([$SQLITE3_SEARCH_HEADERS/sqlite3.h],
1158
SQLITE3_CXXFLAGS="-I$SQLITE3_SEARCH_HEADERS"
1162
AC_MSG_ERROR(sqlite3.h not found in requested locatoin $SQLITE3_SEARCH_HEADERS)
1167
AC_CHECK_HEADER(sqlite3.h, [],
1170
for sqlite3_path in $SEARCH_DIR_HEADERS; do
1171
if test "x$ac_cv_header_sqlite3_h" != xyes ; then
1172
unset ac_cv_header_sqlite3_h
1173
AC_CHECK_HEADER($sqlite3_path/sqlite3.h,
1175
SQLITE3_CXXFLAGS="-I$sqlite3_path"
822
if test "x$RT_STATUS" = xyes; then
823
LDFLAGS="$LDFLAGS $RT_LDFLAGS $RT_LIBS"
1185
if test "x$SQLITE3_OK" = xyes; then
1186
if test -n "$SQLITE3_SEARCH_LIBS"; then
1187
LDFLAGS="$LDFLAGS_SAVE -L$SQLITE3_SEARCH_LIBS $RT_LIBS $ADD_PTHREAD_CFLAGS"
1188
AC_MSG_NOTICE([Will search for sqlite3 libraries in $SQLITE3_SEARCH_LIBS])
1189
AC_CHECK_LIB(sqlite3, sqlite3_open,
1191
SQLITE3_LIBS="-L$SQLITE3_SEARCH_LIBS $RT_LIBS -lsqlite3"
1195
AC_MSG_ERROR(sqlite3 library not found in requested location $SQLITE3_SEARCH_LIBS)
1199
LDFLAGS="$LDFLAGS_SAVE $RT_LIBS $ADD_PTHREAD_CFLAGS"
1200
AC_CHECK_LIB(sqlite3, sqlite3_open, [],
1203
for sqlite3_path in $SEARCH_DIR_LIBS; do
1204
if test "x$ac_cv_lib_sqlite3_sqlite3_open" != xyes ; then
1205
unset ac_cv_lib_sqlite3_sqlite3_open
1206
LDFLAGS="$LDFLAGS_SAVE -L$sqlite3_path $RT_LIBS $ADD_PTHREAD_CFLAGS"
1207
AC_CHECK_LIB(sqlite3, sqlite3_open,
1209
SQLITE3_LIBS="-L$sqlite3_path $RT_LIBS -lsqlite3"
826
MT_CHECK_OPTIONAL_PACKAGE([sqlite3], [disable], [sqlite3 database supprot],
827
[sqlite3], [sqlite3], [sqlite3_open])
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"
1223
if test "x$SQLITE3_OK" = xyes; then
1224
AC_DEFINE([HAVE_SQLITE3], [1], [sqlite3 library presence])
1225
AC_SUBST(SQLITE3_CXXFLAGS)
835
AC_SUBST(SQLITE3_LDFLAGS)
1226
836
AC_SUBST(SQLITE3_LIBS)
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])
1228
if test "x$SQLITE3_EN" = xyes; then
1229
AC_MSG_ERROR(unable to configure sqlite3 support)
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)
1233
849
LDFLAGS="$LDFLAGS_SAVE"
1237
853
########## MySQL
1239
AC_ARG_ENABLE(mysql,
1240
AC_HELP_STRING([--enable-mysql], [compile with mysql support (default: yes)]),
1243
if test "x$enableval" = xno; then
1256
if test "x$MYSQL_OK" = xyes; then
1257
if test -n "$MYSQL_SEARCH_CONFIG"; then
1258
AC_MSG_NOTICE([You specified $MYSQL_SEARCH_CONFIG for mysql_config])
1260
if test -f "$MYSQL_SEARCH_CONFIG"; then
1261
mysqlconfig="$MYSQL_SEARCH_CONFIG"
1266
if test "x$mysqlconfig" = xno; then
1267
AC_MSG_ERROR([$MYSQL_SEARCH_CONFIG not found])
1269
MYSQL_TEST=`${mysqlconfig} --version 2>/dev/null`
1270
if test -z "$MYSQL_TEST"; then
1271
AC_MSG_ERROR([${mysqlconfig} could not be executed or returned invalid values])
1277
AC_PATH_PROG(mysqlconfig, mysql_config, no)
1278
if test "x$mysqlconfig" = xno; then
1279
unset ac_cv_path_mysqlconfig
1281
AC_PATH_PROG(mysqlconfig, mysql_config, no, $SEARCH_DIR_PROGS)
1282
if test "x$mysqlconfig" = xno; then
1284
AC_MSG_RESULT([mysql_config script not found])
1293
if test $MYSQL_PROG_FOUND -eq 1 ; then
1294
AC_MSG_CHECKING(mysql version)
1295
MYSQL_VERSION_MAJOR=`${mysqlconfig} --version 2>/dev/null | sed 's/^\([[0-9]]\{1,\}\)\.\([[0-9]]\{1,\}\).\([[0-9]]\{1,\}\).*$/\1/'`
1296
MYSQL_VERSION_MINOR=`${mysqlconfig} --version 2>/dev/null | sed 's/^\([[0-9]]\{1,\}\)\.\([[0-9]]\{1,\}\).\([[0-9]]\{1,\}\).*$/\2/'`
1298
MYSQL_PRINT_VERSION=`${mysqlconfig} --version`
1299
AC_MSG_RESULT([$MYSQL_PRINT_VERSION])
1301
if test -z $MYSQL_VERSION_MAJOR || test -z $MYSQL_VERSION_MINOR; then
1302
AC_MSG_WARN(${mysqlconfig} could not be executed or returned invalid values)
1304
elif test $MYSQL_VERSION_MAJOR -le 3 ; then
1305
AC_MSG_WARN(MySQL version too old, we only support version 4.0.x or later)
1308
if test "$MYSQL_VERSION_MAJOR" -gt 3 ; then
1309
AC_MSG_CHECKING(mysql includes)
1310
MYSQL_CFLAGS=`${mysqlconfig} --include`
1311
AC_MSG_RESULT($MYSQL_CFLAGS)
1313
AC_MSG_CHECKING(mysql libraries)
1314
MYSQL_LIBS=`${mysqlconfig} --libs_r`
1315
AC_MSG_RESULT($MYSQL_LIBS)
1317
AC_MSG_WARN(Unsupported mysql version)
1322
CXXFLAGS="$CXXFLAGS $MYSQL_CFLAGS"
1323
CFLAGS="$CFLAGS $MYSQL_CFLAGS"
1324
CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS"
1325
LDFLAGS="$LDFLAGS $MYSQL_LIBS"
855
MT_CHECK_OPTIONAL_PACKAGE_CFG([mysql],
857
[mysql database support],
860
[], [mysql_init],[--libs_r])
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])
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)
876
LDFLAGS="$LDFLAGS_SAVE"
1330
877
LIBS="$LIBS $MYSQL_LIBS"
878
CFLAGS="$CFLAGS $MYSQL_CFLAGS"
879
CXXFLAGS="$CXXFLAGS $MYSQL_CFLAGS"
880
CPPFLAGS="$CFLAGS $MYSQL_CFLAGS"
1332
dnl we are not doing an extra search in $SEARCH_DIR because the
1333
dnl mysql_config set the correct flags already, if not - something
1334
dnl is anyway wrong with the mysql installation
1335
dnl we will however accept custom user flags
1336
if test "x$MYSQL_OK" = xyes; then
1337
AC_CHECK_HEADER(mysql.h,
1340
AC_MSG_RESULT(mysql.h failed)
1345
if test "x$MYSQL_OK" = xyes; then
1346
AC_CHECK_FUNCS(mysql_init,
1350
AC_MSG_RESULT(mysqlclient link failed)
1354
if test "x$MYSQL_OK" = xyes; then
882
if test "x$MYSQL_STATUS" = xyes; then
1355
883
AC_DEFINE([HAVE_MYSQL], [1], [MySQL library presence])
1356
884
AC_SUBST(MYSQL_LIBS)
1357
885
AC_SUBST(MYSQL_CFLAGS)
1389
914
LDFLAGS="$LDFLAGS_SAVE"
1390
915
LIBS="$LIBS_SAVE"
1392
######### PostgreSQL
1393
##AC_ARG_ENABLE(postgresql,
1394
## AC_HELP_STRING([--enable-postgresql], [compile with postgresql support (default: yes)]),
1396
## PGSQL_EN=$enableval
1397
## if test "x$enableval" = xno; then
1398
## PGSQL_OK=disabled
1409
##PGSQL_PROG_FOUND=0
1410
##if test "x$PGSQL_OK" = xyes; then
1411
## if test -n "$PGSQL_SEARCH_CONFIG"; then
1412
## AC_MSG_NOTICE([You specified $PGSQL_SEARCH_CONFIG for pg_config])
1414
## if test -f "$PGSQL_SEARCH_CONFIG"; then
1415
## pgconfig="$PGSQL_SEARCH_CONFIG"
1420
## if test "x$pgconfig" = xno; then
1421
## AC_MSG_ERROR([$PGSQL_SEARCH_CONFIG not found])
1423
## PGSQL_TEST=`${pgconfig} --version 2>/dev/null`
1424
## if test -z "$PGSQL_TEST"; then
1425
## AC_MSG_ERROR([${pgconfig} could not be executed or returned invalid values])
1427
## PGSQL_PROG_FOUND=1
1430
## AC_PATH_PROG(pgconfig, pg_config, no)
1431
## if test "x$pgconfig" = xno; then
1432
## unset ac_cv_path_pgconfig
1433
## AC_PATH_PROG(pgconfig, pg_config, no, $SEARCH_DIR_PROGS)
1434
## if test "x$pgconfig" = xno; then
1436
## AC_MSG_RESULT([pg_config not found, please install the postgresql-devel package])
1438
## PGSQL_PROG_FOUND=1
1441
## PGSQL_PROG_FOUND=1
1445
## if test "$PGSQL_PROG_FOUND" -eq 1 ; then
1446
## AC_MSG_CHECKING(if postgresql version is threadsafe)
1447
## PGSQL_THREADSAFE=`${pgconfig} --configure | grep -- '--enable-thread-safety'`
1449
## if test -z "$PGSQL_THREADSAFE"; then
1450
## if test "x$PGSQL_EN" = xyes; then
1451
## AC_MSG_ERROR([this PostgreSQL version is not thread safe!])
1453
## PGSQL_OK=disabled
1457
## if test "x$PGSQL_OK" = xyes; then
1458
## AC_MSG_RESULT(yes)
1459
## AC_MSG_CHECKING(postgresql cflags)
1460
## PGSQL_CFLAGS=`${pgconfig} --includedir`
1461
## PGSQL_CFLAGS="-I${PGSQL_CFLAGS}"
1462
## AC_MSG_RESULT($PGSQL_CFLAGS)
1464
## AC_MSG_CHECKING(postgresql libraries)
1465
## PGSQL_LIBS=`${pgconfig} --libdir`
1466
## PGSQL_LIBS="-L${PGSQL_LIBS} -lpq"
1467
## AC_MSG_RESULT($PGSQL_LIBS)
1469
## AC_MSG_RESULT([no, disabling])
1474
##if test "x$PGSQL_OK" = xyes; then
1475
## CPPFLAGS="$CPPFLAGS $PGSQL_CFLAGS"
1476
## CXXFLAGS="$CXXFLAGS $PGSQL_CFLAGS"
1477
## AC_CHECK_HEADERS([libpq-fe.h],
1479
## [PGSQL_OK=missing]
1483
##if test "x$PGSQL_OK" = xyes; then
1484
## LDFLAGS="$PGSQL_LIBS"
1485
## AC_CHECK_LIB(pq, PQconnectdb, [],
1486
## [PGSQL_OK=missing]
1490
##if test "x$PGSQL_OK" = xyes; then
1491
## LDFLAGS="$PGSQL_LIBS"
1492
## AC_CHECK_LIB(pq, PQisthreadsafe, [AC_DEFINE([HAVE_PQISTHREADSAFE], [1], [PQisthreadsafe function availability])],
1496
##if test "x$PGSQL_OK" = xyes; then
1497
## AC_DEFINE([HAVE_PGSQL], [1], [PostgreSQL library presence])
1498
## AC_SUBST(PGSQL_CFLAGS)
1499
## AC_SUBST(PGSQL_LIBS)
1501
## if test "x$PGSQL_EN" = xyes; then
1502
## AC_MSG_ERROR(unable to configure PostgreSQL support)
1505
##CPPFLAGS="$CPPFLAGS_SAVE"
1506
##CXXFLAGS="$CXXFLAGS_SAVE"
1507
##LDFLAGS="$LDFLAGS_SAVE"
1512
917
######### check if at least one database available
1514
##if ((test "x$SQLITE3_OK" != xyes) && (test "x$MYSQL_OK" != xyes) && (test "x$PGSQL_OK" != xyes)); then
1515
## AC_MSG_ERROR(Support of at least one of mysql, postgresql or sqlite3 must be configured)
1517
if ((test "x$SQLITE3_OK" != xyes) && (test "x$MYSQL_OK" != xyes)); then
919
if ((test "x$SQLITE3_STATUS" != xyes) && (test "x$MYSQL_STATUS" != xyes)); then
1518
920
AC_MSG_ERROR(Support of at least one of mysql or sqlite3 must be configured)
1523
923
######### javascript
1525
925
AC_ARG_ENABLE(libjs,
1717
1117
LDFLAGS="$LDFLAGS_SAVE"
1719
1119
########### libmagic
1721
AC_ARG_ENABLE(libmagic,
1722
AC_HELP_STRING([--enable-libmagic], [compile with filemagic support (default: yes)]),
1725
if test "x$enableval" = xno; then
1736
if test "x$MAGIC_OK" = xyes; then
1737
if test -n "$MAGIC_SEARCH_HEADERS" ; then
1738
AC_MSG_NOTICE([Will search for filemagic headers in $MAGIC_SEARCH_HEADERS])
1739
AC_CHECK_HEADER($MAGIC_SEARCH_HEADERS/magic.h,
1741
MAGIC_CXXFLAGS="-I$MAGIC_SEARCH_HEADERS"
1744
AC_MSG_ERROR([filemagic headers not found in requested location $MAGIC_SEARCH_HEADERS])
1748
AC_CHECK_HEADER(magic.h,
1751
unset ac_cv_header_magic_h
1752
AC_CHECK_HEADER($SEARCH_DIR_HEADERS/magic.h,
1754
MAGIC_CXXFLAGS="-I$SEARCH_DIR_HEADERS"
1763
if test "x$MAGIC_OK" = xyes; then
1764
if test -n "$MAGIC_SEARCH_LIBS" ; then
1765
LDFLAGS="$LDFLAGS $Z_LIBS"
1766
AC_CHECK_LIB(z,compress,
1768
LDFLAGS="-L$MAGIC_SEARCH_LIBS $Z_LIBS"
1769
AC_MSG_NOTICE([Will search for filemagic libraries in $MAGIC_SEARCH_LIBS])
1770
AC_CHECK_LIB(magic,magic_load,
1772
MAGIC_LIBS="-L$MAGIC_SEARCH_LIBS -lmagic $Z_LIBS"
1775
AC_MSG_ERROR([filemagic libraries not found in requested location $MAGIC_SEARCH_LIBS])
1781
LDFLAGS="-L$MAGIC_SEARCH_LIBS"
1782
AC_CHECK_LIB(magic,magic_load,
1784
MAGIC_LIBS="-L$MAGIC_SEARCH_LIBS -lmagic"
1787
AC_MSG_ERROR([filemagic libraries not found in requested location $MAGIC_SEARCH_LIBS])
1793
LDFLAGS="$LDFLAGS $Z_LIBS"
1794
AC_CHECK_LIB(z,compress,
1796
AC_CHECK_LIB(magic,magic_load,
1797
[MAGIC_LIBS="$Z_LIBS -lmagic"],
1799
LDFLAGS="$LDFLAGS -L$SEARCH_DIR_LIBS"
1800
unset ac_cv_lib_magic_magic_load
1801
AC_CHECK_LIB(magic,magic_load,
1802
[MAGIC_LIBS="-L$SEARCH_DIR_LIBS $Z_LIBS -lmagic"],
1803
[MAGIC_OK=missing],[-lz])
1808
AC_CHECK_LIB(magic,magic_load,
1811
LDFLAGS="-L$SEARCH_DIR_LIBS"
1812
unset ac_cv_lib_magic_magic_load
1813
AC_CHECK_LIB(magic,magic_load,
1814
[MAGIC_LIBS="-L$SEARCH_DIR_LIBS -lmagic"],
1823
if test "x$MAGIC_OK" = xyes; then
1120
MT_OPTION([libmagic], [disable],
1121
[filemagic for automatic mimetype recognition],[],[])
1123
if test "x$LIBMAGIC_OPTION_ENABLED" = xyes; then
1124
MT_CHECK_PACKAGE([libmagic], [magic], [magic], [magic_load])
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"
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"
1148
AC_SUBST(LIBMAGIC_LIBS)
1149
AC_SUBST(LIBMAGIC_LDFLAGS)
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"
1161
AC_LANG_PROGRAM([[ #include <magic.h> ]],
1163
struct magic_set *ms;
1164
ms = magic_open(MAGIC_MIME);
1173
AC_MSG_RESULT([no]);
1176
AC_MSG_RESULT([yes])
1178
AC_MSG_WARN([your magic library is broken, if you are using Slackware install the 'file' package manually])
1181
AC_MSG_RESULT([passing for cross compiling])
1187
if test "x$LIBMAGIC_STATUS" = xyes; then
1824
1188
AC_DEFINE([HAVE_MAGIC], [1], [filemagic library presence])
1825
AC_SUBST(MAGIC_CXXFLAGS)
1826
AC_SUBST(MAGIC_LIBS)
1828
if test "x$MAGIC_EN" = xyes; then
1190
if (test "x$LIBMAGIC_OPTION_REQUESTED" = xyes) &&
1191
(test "x$LIBMAGIC_OPTION_ENABLED" = xyes); then
1829
1192
AC_MSG_ERROR(unable to configure libmagic support)
1196
CFLAGS="$CFLAGS_SAVE"
1197
CXXFLAGS="$CXXFLAGS_SAVE"
1198
CPPFLAFS="$CPPFLAFS_SAVE"
1833
1199
LDFLGAS="$LDFLAGS_SAVE"
1835
######### taglib or id3lib
1839
AC_ARG_ENABLE(id3lib,
1840
AC_HELP_STRING([--enable-id3lib], [compile with id3lib support (default: yes, if taglib is not available)]),
1843
if test "x$enableval" = xno; then
1855
AC_ARG_ENABLE(taglib,
1856
AC_HELP_STRING([--enable-taglib], [compile with taglib support (default: yes, preferred over id3lib)]),
1858
TAGLIB_EN=$enableval
1859
if test "x$enableval" = xno; then
1862
TAGLIB_REQUESTED=yes
1871
if ((test "x$TAGLIB_REQUESTED" = xno) && (test "x$ID3_REQUESTED" = xyes)) ; then
1201
######### taglib or id3lib selection
1206
MT_OPTION([id3lib], [enable],
1207
[id3 metadata extraction with the help of id3lib],[],[])
1209
MT_OPTION([taglib], [disable],
1210
[id3 metadata extraction with the help of taglib],[],[])
1212
if ((test "x$TAGLIB_OPTION_ENABLED" = xno) && (test "x$ID3LIB_OPTION_ENABLED" = xyes)) ; then
1213
TAGLIB_STATUS=disabled
1214
TAGLIB_OPTION_ENABLED=no
1873
1215
AC_MSG_WARN([taglib disabled])
1874
elif ((test "x$TAGLIB_REQUESTED" = xyes) && (test "x$ID3_REQUESTED" = xno)) ; then
1216
elif ((test "x$TAGLIB_OPTION_ENABLED" = xyes) && (test "x$ID3LIB_OPTION_ENABLED" = xno)) ; then
1217
ID3LIB_STATUS=disabled
1218
ID3LIB_OPTION_ENABLED=no
1876
1219
AC_MSG_WARN([id3lib disabled])
1877
elif ((test "x$TAGLIB_REQUESTED" = xyes) && (test "x$ID3_REQUESTED" = xyes)) ; then
1220
elif ((test "x$TAGLIB_OPTION_ENABLED" = xyes) && (test "x$ID3LIB_OPTION_ENABLED" = xyes)) ; then
1878
1221
AC_MSG_ERROR([Please select either taglib or id3lib, but not both.])
1886
if test "x$TAGLIB_OK" = xyes; then
1887
if test -n "$TAGLIB_SEARCH_CONFIG"; then
1888
AC_MSG_NOTICE([You specified $TAGLIB_SEARCH_CONFIG for taglib-config])
1890
if test -f "$TAGLIB_SEARCH_CONFIG"; then
1891
taglibconfig="$TAGLIB_SEARCH_CONFIG"
1896
if test "x$taglibconfig" = xno; then
1897
AC_MSG_ERROR([$TAGLIB_SEARCH_CONFIG not found])
1899
TAGLIB_TEST=`${taglibconfig} --version 2>/dev/null`
1900
if test -z "$TAGLIB_TEST"; then
1901
AC_MSG_ERROR([${taglibconfig} could not be executed or returned invalid values])
1906
AC_PATH_PROG(taglibconfig, taglib-config, no)
1907
if test "x$taglibconfig" = xno; then
1908
unset ac_cv_path_taglibconfig
1909
AC_PATH_PROG(taglibconfig, taglib-config, no, $SEARCH_DIR_PROGS)
1910
if test "x$taglibconfig" = xno; then
1912
AC_MSG_RESULT([taglib-config not found, please install the taglib-devel package])
1921
if test "$TAGLIB_PROG_FOUND" -eq 1 ; then
1922
AC_MSG_CHECKING(taglib cflags)
1923
TAGLIB_CFLAGS=`${taglibconfig} --cflags`
1924
AC_MSG_RESULT($TAGLIB_CFLAGS)
1926
AC_MSG_CHECKING(taglib libraries)
1927
TAGLIB_LIBS=`${taglibconfig} --libs`
1928
AC_MSG_RESULT($TAGLIB_LIBS)
1929
TAGLIB_LIBS="$TAGLIB_LIBS $Z_LIBS"
1933
if test "x$TAGLIB_OK" = xyes; then
1934
CPPFLAGS="$CPPFLAGS $TAGLIB_CFLAGS"
1935
CXXFLAGS="$CXXFLAGS $TAGLIB_CFLAGS"
1936
AC_CHECK_HEADERS([taglib.h fileref.h tag.h audioproperties.h tstring.h textidentificationframe.h attachedpictureframe.h],
1938
AC_DEFINE([HAVE_ID3_ALBUMART], [1],
1939
[not aware of taglib versions that do not support album art])
1945
if test "x$TAGLIB_OK" = xyes; then
1946
LDFLAGS="$TAGLIB_LIBS"
1947
AC_CHECK_LIB(tag, main, [],
1952
if test "x$TAGLIB_OK" = xyes; then
1954
AC_DEFINE([HAVE_TAGLIB], [1], [taglib library presence])
1955
AC_SUBST(TAGLIB_CFLAGS)
1956
AC_SUBST(TAGLIB_LIBS)
1958
if test "x$TAGLIB_EN" = xyes; then
1959
AC_MSG_ERROR(unable to configure taglib support)
1964
CPPFLAGS="$CPPFLAGS_SAVE"
1965
CXXFLAGS="$CXXFLAGS_SAVE"
1966
LDFLAGS="$LDFLAGS_SAVE"
1224
if test "x$TAGLIB_OPTION_ENABLED" = xyes; then
1225
MT_CHECK_PACKAGE_CFG([taglib],
1227
[taglib.h fileref.h tag.h audioproperties.h tstring.h textidentificationframe.h attachedpictureframe.h],
1230
TAGLIB_STATUS=disabled
1231
if test "x$ID3_OPTION_REQUESTED" = no; then
1232
ID3_OPTION_ENABLED=yes
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
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])
1969
1247
######### id3lib
1971
#AC_ARG_ENABLE(id3lib,
1972
# [ --enable-id3lib id3lib support],
1975
# if test "x$enableval" = xno; then
1981
if test "x$ID3_OK" = xyes; then
1982
if test -n "$ID3_SEARCH_HEADERS" ; then
1983
CPPFLAGS="-I$ID3_SEARCH_HEADERS"
1984
AC_CHECK_HEADER($ID3_SEARCH_HEADERS/id3/tag.h,
1986
ID3_CXXFLAGS="-I$ID3_SEARCH_HEADERS"
1989
AC_MSG_ERROR([id3lib headers not found in requested location $ID3_SEARCH_HEADERS])
1993
AC_CHECK_HEADER(id3/tag.h,
1996
unset ac_cv_header_id3_tag_h
1997
CPPFLAGS="-I$SEARCH_DIR_HEADERS"
1998
AC_CHECK_HEADER(id3/tag.h,
2000
ID3_CXXFLAGS="-I$SEARCH_DIR_HEADERS"
2012
if test "x$ID3_OK" = xyes; then
2013
if test -n "$ID3_SEARCH_HEADERS" ; then
2014
CPPFLAGS="-I$ID3_SEARCH_HEADERS"
2015
AC_CHECK_HEADER(id3/misc_support.h,
2017
ID3_CXXFLAGS="-I$ID3_SEARCH_HEADERS"
2020
AC_MSG_ERROR([id3lib headers not found in requested location $ID3_SEARCH_HEADERS])
2024
AC_CHECK_HEADER(id3/misc_support.h,
2027
unset ac_cv_header_id3_misc_support_h
2028
CPPFLAGS="-I$SEARCH_DIR_HEADERS"
2029
AC_CHECK_HEADER(id3/misc_support.h,
2031
ID3_CXXFLAGS="-I$SEARCH_DIR_HEADERS"
2043
if test "x$ID3_OK" = xyes; then
2044
if test -n "$ID3_SEARCH_LIBS" ; then
2045
LDFLAGS="$LDFLAGS $Z_LIBS"
2046
AC_CHECK_LIB(z,compress,
2048
LDFLAGS="-L$ID3_SEARCH_LIBS $Z_LIBS"
2049
AC_MSG_NOTICE([Will search for id3lib libraries in $ID3_SEARCH_LIBS])
2050
AC_CHECK_LIB(id3, main,
2052
ID3_LIBS="-L$ID3_SEARCH_LIBS $Z_LIBS -lid3 "
2055
AC_MSG_ERROR([id3lib libraries not found in requested location $ID3_SEARCH_LIBS])
2061
LDFLAGS="-L$ID_SEARCH_LIBS"
2062
AC_CHECK_LIB(id3, main,
2064
ID3_LIBS="-L$ID3_SEARCH_LIBS -lid3"
2067
AC_MSG_ERROR([id3lib libraries not found in requested location $ID3_SEARCH_LIBS])
2073
LDFLAGS="$LDFLAGS $Z_LIBS"
2074
AC_CHECK_LIB(z,compress,
2076
AC_CHECK_LIB(id3, main,
2078
ID3_LIBS="$Z_LIBS -lid3"
2081
LDFLAGS="$LDFLAGS -L$SEARCH_DIR_LIBS"
2082
unset ac_cv_lib_id3_main
2083
AC_CHECK_LIB(id3, main,
2085
ID3_LIBS="$Z_LIBS -L$SEARCH_DIR_LIBS -lid3"
2095
AC_CHECK_LIB(id3,main,[],
2097
LDFLAGS="-L$SEARCH_DIR_LIBS"
2098
unset ac_cv_lib_id3_main
2099
AC_CHECK_LIB(id3, main,
2101
ID3_LIBS="-L$SEARCH_DIR_LIBS -lid3"
2115
if test "x$ID3_OK" = xyes; then
2116
AC_DEFINE([HAVE_ID3], [1], [id3lib presence])
2117
AC_SUBST(ID3_CXXFLAGS)
2119
CFLAGS="$CFLAGS $ID3_CXXFLAGS"
2120
CXXFLAGS="$CXXFLAGS $ID3_CXXFLAGS"
2121
LDFLAGS="$LDFLAGS $ID3_LIBS"
1249
if test "x$ID3LIB_OPTION_ENABLED" = xyes; then
1250
MT_CHECK_PACKAGE([id3lib], [id3/tag], [id3], [main])
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"
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"
1274
AC_SUBST(ID3LIB_LIBS)
1275
AC_SUBST(ID3LIB_LDFLAGS)
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"
2123
1284
AC_LANG_CPLUSPLUS
2124
1285
AC_MSG_CHECKING([for album art support in id3lib])
2270
1473
CXXFLAGS="$CXXFLAGS_SAVE"
2271
1474
LDFLAGS="$LDFLAGS_SAVE"
2273
######### extractor or ffmpeg
2276
EXTRACTOR_REQUESTED=no
2278
AC_ARG_ENABLE(ffmpeg,
2279
AC_HELP_STRING([--enable-ffmpeg], [compile with ffmpeg support (default: yes, preferred over extractor)]),
2281
FFMPEG_EN=$enableval
2282
if test "x$enableval" = xno; then
2286
FFMPEG_REQUESTED=yes
2294
AC_ARG_ENABLE(libextractor,
2295
AC_HELP_STRING([--enable-libextractor], [compile with libextractor support (default: no)]),
2297
EXTRACTOR_EN=$enableval
2298
if test "x$enableval" = xno; then
2299
EXTRACTOR_OK=disabled
2302
EXTRACTOR_REQUESTED=yes
2306
EXTRACTOR_OK=disabled
2310
if ((test "x$EXTRACTOR_REQUESTED" = xno) && (test "x$FFMPEG_REQUESTED" = xyes)) ; then
2311
EXTRACTOR_OK=disabled
2312
if test "x$EXTRACTOR_REQUESTED" = xyes; then
2313
AC_MSG_WARN([libextractor disabled])
2315
elif ((test "x$EXTRACTOR_REQUESTED" = xyes) && (test "x$FFMPEG_REQUESTED" = xno)) ; then
1476
######## ffmpeg or extractor?
1479
LIBEXTRACTOR_STATUS=
1481
MT_OPTION([libextractor], [enable],
1482
[metadata extraction with the help of libextractor],[],[])
1484
MT_OPTION([ffmpeg], [disable],
1485
[metadata extraction with the help of ffmpeg],[],[])
1487
if ((test "x$FFMPEG_OPTION_ENABLED" = xno) && (test "x$LIBEXTRACTOR_OPTION_ENABLED" = xyes)) ; then
1488
FFMPEG_STATUS=disabled
1489
FFMPEG_OPTION_ENABLED=no
2317
1490
AC_MSG_WARN([ffmpeg disabled])
2318
elif ((test "x$EXTRACTOR_REQUESTED" = xyes) && (test "x$FFMPEG_REQUESTED" = xyes)) ; then
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
2319
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])
2322
1507
######## ffmpeg
2327
if test "x$FFMPEG_OK" = xyes; then
2328
if test -n "$FFMPEG_SEARCH_HEADERS" ; then
2329
CPPFLAGS="-I$FFMPEG_SEARCH_HEADERS"
2330
AC_CHECK_HEADER($FFMPEG_SEARCH_HEADERS/ffmpeg/avformat.h,
2332
FFMPEG_CXXFLAGS="-I$FFMPEG_SEARCH_HEADERS"
2335
AC_MSG_ERROR([ffmpeg headers not found in requested location $FFMPEG_SEARCH_HEADERS])
2338
#define __STDC_CONSTANT_MACROS
2343
AC_CHECK_HEADER(ffmpeg/avformat.h,
2346
CPPFLAGS="-I$SEARCH_DIR_HEADERS"
2347
unset ac_cv_header_ffmpeg_avformat_h
2348
AC_CHECK_HEADER($SEARCH_DIR_HEADERS/ffmpeg/avformat.h,
2350
FFMPEG_CXXFLAGS="-I$SEARCH_DIR_HEADERS"
2356
#define __STDC_CONSTANT_MACROS
2362
#define __STDC_CONSTANT_MACROS
2371
if test "x$FFMPEG_OK" = xyes; then
2372
if test -n "$FFMPEG_SEARCH_LIBS" ; then
2373
LDFLAGS="-L$FFMPEG_SEARCH_LIBS $ADD_PTHREAD_CFLAGS"
2374
AC_CHECK_LIB(avformat, av_register_all,
2376
AC_CHECK_LIB(avutil, av_log_set_callback,
2378
FFMPEG_LIBS="-L$FFMPEG_SEARCH_LIBS -lavformat -lavutil -lz"
2381
AC_MSG_ERROR([avutil libraries not found in requested path $FFMPEG_SEARCH_LIBS])
2383
[ -lavcodec -lavutil -lz $ADD_PTHREAD_CFLAGS ])
2386
AC_MSG_ERROR([avformat libraries not found in requested path $FFMPEG_SEARCH_LIBS])
2388
[ -lavcodec -lavutil -lz $ADD_PTHREAD_CFLAGS ]
2391
AC_CHECK_LIB(avformat, av_register_all,
2393
AC_CHECK_LIB(avutil, av_log_set_callback,
2395
FFMPEG_LIBS="-lavformat -lavutil"
2398
LDFLAGS="-L$SEARCH_DIR_LIBS"
2399
unset ac_cv_lib_avutil_av_log_set_callback
2400
AC_CHECK_LIB(avutil, av_log_set_callback,
2402
FFMPEG_LIBS="-L$SEARCH_DIR_LIBS -lavformat -lavutil -lz"
2407
[ -lavcodec -lavutil -lz $ADD_PTHREAD_CFLAGS ])
2411
LDFLAGS="-L$SEARCH_DIR_LIBS $ADD_PTHREAD_CFLAGS"
2412
unset ac_cv_lib_avformat_av_register_all
2413
AC_CHECK_LIB(avformat, av_register_all,
2415
unset ac_cv_lib_avutil_av_log_set_callback
2416
AC_CHECK_LIB(avutil, av_log_set_callback,
2418
FFMPEG_LIBS="-L$SEARCH_DIR_LIBS -lavformat -lavutil -lz"
2423
[ -lavcodec -lavutil -lz $ADD_PTHREAD_CFLAGS ])
2425
[ FFMPEG_OK=missing ],
2426
[ -lavcodec -lavutil -lz $ADD_PTHREAD_CFLAGS ]
2429
[ -lavcodec -lavutil -lz $ADD_PTHREAD_CFLAGS ]
2434
# last check, my Fedora 7 is somehow broken, and allthough the above tests
2435
# succeed it still has unresolved symbols when linking
2437
CXXFLAGS="$CXXFLAGS $FFMPEG_CXXFLAGS"
2438
LDFLAGS="$LDFLAGS $FFMPEG_LIBS"
2439
LIBS="$LIBS $FFMPEG_LIBS"
2443
if test "x$FFMPEG_OK" = xyes; then
2444
AC_MSG_CHECKING([ffmpeg linking / if extern "C" is needed])
2448
#define __STDC_CONSTANT_MACROS
2450
#include <ffmpeg/avformat.h>
2462
#define __STDC_CONSTANT_MACROS
2465
#include <ffmpeg/avformat.h>
2474
AC_DEFINE([FFMPEG_NEEDS_EXTERN_C], [1],[ffmpeg header include needs to be wrapped into extern "C"])
2477
AC_MSG_RESULT([failed, check your ffmpeg installation])
2484
LIBS="$LIBS_SAVE $LIBS"
2487
if test "x$FFMPEG_OK" = xyes; then
1509
if test "x$FFMPEG_OPTION_ENABLED" = xyes; then
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])
1521
AC_DEFINE_UNQUOTED([AVFORMAT_INCLUDE], [<ffmpeg/avformat.h>], [ffmpeg/avformat.h])
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])
1530
if ((test "x$AVFORMAT_STATUS" = xyes) && (test "x$AVUTIL_STATUS" = xyes)); then
1533
FFMPEG_STATUS=missing
1537
if test "x$FFMPEG_STATUS" = xyes; then
2488
1538
AC_DEFINE([HAVE_FFMPEG], [1], [FFMPEG library presence])
2489
AC_SUBST(FFMPEG_CXXFLAGS)
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)
2490
1544
AC_SUBST(FFMPEG_LIBS)
2492
if test "x$FFMPEG_EN" = xyes; then
1546
if test "x$FFMPEG_OPTIEON_REQUESTED" = xyes; then
2493
1547
AC_MSG_ERROR(unable to configure ffmpeg support)
1551
MT_CHECK_OPTIONAL_PACKAGE([ffmpegthumbnailer], [disable],
1552
[compile with ffmpegthumbnailer support for video thumbnail generation],
1553
[libffmpegthumbnailer/videothumbnailerc],
1554
[ffmpegthumbnailer], [create_thumbnailer])
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])
1560
AC_MSG_WARN([ffmpegthumbnailer disabled: ffmpeg libraries required])
1561
FFMPEGTHUMBNAILER_STATUS="disabled"
1562
FFMPEGTHUMBNAILER_CFLAGS=""
1563
FFMPEGTHUMBNAILER_LDFLAGS=""
1564
FFMPEGTHUMBNAILER_LIBS=""
2497
1568
CXXFLAGS="$CXXFLAGS_SAVE"
2498
1569
LDFLAGS="$LDFLAGS_SAVE"
2499
1570
CPPFLAGS="$CPPFLAGS_SAVE"
2501
1572
######## extractor
2503
#AC_ARG_ENABLE(libextractor,
2504
# AC_HELP_STRING([--enable-libextractor], [compile with libextractor support (default: no)]),
2506
# EXTRACTOR_EN=$enableval
2507
# if test "x$enableval" = xno; then
2508
# EXTRACTOR_OK=disabled
2514
# EXTRACTOR_OK=disabled
2518
if test "x$EXTRACTOR_OK" = xyes; then
2519
if test -n "$EXTRACTOR_SEARCH_HEADERS" ; then
2520
AC_CHECK_HEADER($EXTRACTOR_SEARCH_HEADERS/extractor.h,
2521
[ EXTRACTOR_CXXFLAGS="-I$EXTRACTOR_SEARCH_HEADERS" ],
2522
[ AC_MSG_ERROR([extractor headers not found in requested location $EXTRACTOR_SEARCH_HEADERS])]
2525
AC_CHECK_HEADER(extractor.h,
2528
unset ac_cv_header_extractor_h
2529
AC_CHECK_HEADER($SEARCH_DIR_HEADERS/extractor.h,
2530
[ EXTRACTOR_CXXFLAGS="-I$SEARCH_DIR_HEADERS" ],
2531
[ EXTRACTOR_OK=missing ]
2538
if test "x$EXTRACTOR_OK" = xyes; then
2539
if test -n "$EXTRACTOR_SEARCH_HEADERS" ; then
2540
LDFLAGS="-L$EXTRACTOR_SEARCH_LIBS"
2541
AC_CHECK_LIB(extractor, EXTRACTOR_getKeywords,
2542
[ EXTRACTOR_LIBS="-L$EXTRACTOR_SEARCH_LIBS -lextractor" ],
2544
AC_MSG_ERROR([extractor libraries not found in requested location $EXTRACTOR_SEARCH_LIBS])
2548
AC_CHECK_LIB(extractor, EXTRACTOR_getKeywords,
2551
LDFLAGS="-L$SEARCH_DIR_LIBS"
2552
unset ac_cv_lib_extractor_EXTRACTOR_getKeywords
2553
AC_CHECK_LIB(extractor, EXTRACTOR_getKeywords,
2554
[ EXTRACTOR_LIBS="-L$SEARCH_DIR_LIBS -lextractor" ],
2555
[ EXTRACTOR_OK=missing ]
2562
if test "x$EXTRACTOR_OK" = xyes; then
2563
AC_DEFINE([HAVE_EXTRACTOR], [1], [libextractor library presence])
2564
AC_SUBST(EXTRACTOR_CXXFLAGS)
2565
AC_SUBST(EXTRACTOR_LIBS)
1574
if test "x$LIBEXTRACTOR_OPTION_ENABLED" = xyes; then
1575
MT_CHECK_PACKAGE([libextractor], [extractor], [extractor], [EXTRACTOR_getKeywords])
1578
if test "x$LIBEXTRACTOR_STATUS" = xyes; then
1579
FFMPEG_STATUS=disabled
1580
FFMPEG_OPTION_ENABLED=no
2567
if test "x$EXTRACTOR_EN" = xyes; then
2568
AC_MSG_ERROR(unable to configure libextractor support)
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])
2572
1588
######## libexif
2574
AC_ARG_ENABLE(libexif,
2575
AC_HELP_STRING([--enable-libexif], [compile with libexif support (default: yes)]),
2578
if test "x$enableval" = xno; then
2589
if test "x$EXIF_OK" = xyes; then
2590
if test -n "$EXIF_SEARCH_HEADERS" ; then
2591
CPPFLAGS="-I$EXIF_SEARCH_HEADERS"
2592
AC_CHECK_HEADER($EXIF_SEARCH_HEADERS/libexif/exif-content.h,
2594
EXIF_CXXFLAGS="-I$EXIF_SEARCH_HEADERS"
2597
AC_MSG_ERROR([libexif headers not found in requested location $EXIF_SEARCH_HEADERS])
2601
AC_CHECK_HEADER(libexif/exif-content.h,
2604
CPPFLAGS="-I$SEARCH_DIR_HEADERS"
2605
unset ac_cv_header_libexif_exif_content_h
2606
AC_CHECK_HEADER($SEARCH_DIR_HEADERS/libexif/exif-content.h,
2608
EXIF_CXXFLAGS="-I$SEARCH_DIR_HEADERS"
2621
if test "x$EXIF_OK" = xyes; then
2622
if test -n "$EXIF_SEARCH_LIBS" ; then
2623
LDFLAGS="-L$EXIF_SEARCH_LIBS"
2624
AC_CHECK_LIB(exif, exif_data_new_from_file,
2626
EXIF_LIBS="-L$EXIF_SEARCH_LIBS -lexif"
2629
AC_MSG_ERROR([libexif libraries not found in requested path $EXIF_SEARCH_LIBS])
2633
AC_CHECK_LIB(exif, exif_data_new_from_file,
2636
LDFLAGS="-L$SEARCH_DIR_LIBS"
2637
unset ac_cv_lib_exif_exif_data_new_from_file
2638
AC_CHECK_LIB(exif, exif_data_new_from_file,
2640
EXIF_LIBS="-L$SEARCH_DIR_LIBS -lexif"
2649
if test "x$EXIF_OK" = xyes; then
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])
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"
2650
1599
# try 1 argument signature
2651
1600
AC_MSG_CHECKING([exif_entry_get_value signature])
2652
1601
AC_COMPILE_IFELSE(
2692
LIBS="$LIBS_SAVE $LIBS"
2694
if test "x$EXIF_OK" = xyes; then
2695
AC_DEFINE([HAVE_EXIF], [1], [EXIF library presence])
2696
AC_SUBST(EXIF_CXXFLAGS)
2698
1639
if test "x$EXIF_EGV_1" = xyes; then
2699
1640
AC_DEFINE([EXIF_EGV_1], [1], [exif_entry_get_value() has 1 parameter])
2701
1642
if test "x$EXIF_EGV_3" = xyes; then
2702
1643
AC_DEFINE([EXIF_EGV_3], [1], [exif_entry_get_value() has 3 parameters])
2705
if test "x$EXIF_EN" = xyes; then
2706
AC_MSG_ERROR(unable to configure libexif support)
2710
1647
LDFLAGS="$LDFLAGS_SAVE"
2711
CPPFLAGS="$CPPFLAGS_SAVE"
1648
CFLAGS="$CFLAGS_SAVE"
1649
CXXFLAGS="$CXXFLAGS_SAVE"
2716
dnl AC_ARG_ENABLE(libexpat,
2717
dnl AC_HELP_STRING([--enable-libexpat], [compile with libexpat support (default: yes)]),
2719
dnl EXPAT_EN=$enableval
2720
dnl if test "x$enableval" = xno; then
2721
dnl EXPAT_OK=disabled
2731
# expat is now required
2735
if test "x$EXPAT_OK" = xyes; then
2736
if test -n "$EXPAT_SEARCH_HEADERS" ; then
2737
CPPFLAGS="-I$EXPAT_SEARCH_HEADERS"
2738
AC_CHECK_HEADER($EXPAT_SEARCH_HEADERS/expat.h,
2740
EXPAT_CXXFLAGS="-I$EXPAT_SEARCH_HEADERS"
2743
AC_MSG_ERROR([libexpat headers not found in requested location $EXPAT_SEARCH_HEADERS])
2747
AC_CHECK_HEADER(expat.h,
2750
CPPFLAGS="-I$SEARCH_DIR_HEADERS"
2751
unset ac_cv_header_expat_h
2752
AC_CHECK_HEADER($SEARCH_DIR_HEADERS/expat.h,
2754
EXPAT_CXXFLAGS="-I$SEARCH_DIR_HEADERS"
2767
if test "x$EXPAT_OK" = xyes; then
2768
if test -n "$EXPAT_SEARCH_LIBS" ; then
2769
LDFLAGS="-L$EXPAT_SEARCH_LIBS"
2770
AC_CHECK_LIB(expat, XML_ParserCreate,
2772
EXPAT_LIBS="-L$EXPAT_SEARCH_LIBS -lexpat"
2775
AC_MSG_ERROR([libexpat libraries not found in requested path $EXPAT_SEARCH_LIBS])
2779
AC_CHECK_LIB(expat, XML_ParserCreate,
2782
LDFLAGS="-L$SEARCH_DIR_LIBS"
2783
unset ac_cv_lib_expat_XML_ParserCreate
2784
AC_CHECK_LIB(expat, XML_ParserCreate,
2786
EXPAT_LIBS="-L$SEARCH_DIR_LIBS -lexpat"
2788
[ EXPAT_OK=missing ]
2795
LIBS="$LIBS_SAVE $LIBS"
2797
if test "x$EXPAT_OK" = xyes; then
2798
AC_DEFINE([HAVE_EXPAT], [1], [expat library presence])
2799
AC_SUBST(EXPAT_CXXFLAGS)
2800
AC_SUBST(EXPAT_LIBS)
2802
if test "x$EXPAT_EN" = xyes; then
2803
AC_MSG_ERROR(unable to configure expat support)
2807
LDFLAGS="$LDFLAGS_SAVE"
2808
CPPFLAGS="$CPPFLAGS_SAVE"
2811
# TEMPORARILY DISABLED BECAUSE EXIV2 HAS MEMORY LEAKS
2813
#EXIV2_OK="disabled (force with --enable-exiv2)"
2814
#AC_ARG_ENABLE(exiv2,
2815
# [ --enable-exiv2 exiv2 support],
2817
# EXIV2_EN=$enableval
2818
# if test "x$enableval" = xno; then
2821
# if test "x$enableval" = xyes; then
2826
#if test "x$EXIV2_OK" = xyes; then
2827
# AC_CHECK_HEADER(exiv2/exif.hpp,
2829
# [EXIV2_OK=missing],
2830
# /* checking for exiv2/exif.h */
2833
#if test "x$EXIV2_OK" = xyes; then
2834
# LDFLAGS="$LDFLAGS -lexiv2"
2835
# AC_DEFINE(HAVE_EXIV2)
2837
# if test "x$EXIV2_EN" = xyes; then
2838
# AC_MSG_ERROR(unable to configure exiv2 support)
1653
MT_CHECK_REQUIRED_PACKAGE([expat], [expat], [expat], [XML_ParserCreate])
1657
MT_CHECK_OPTIONAL_PACKAGE([libmp4v2], [disable],
1658
[libmp4v2 support for mp4 metadata extraction],
1659
[mp4], [mp4v2], [MP4Read])
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"
1667
AC_MSG_CHECKING([for MP4GetMetadataCoverArtCount() libmp4v2])
1674
(void)MP4GetMetadataCoverArtCount(0);
1678
AC_MSG_RESULT([yes])
1679
AC_DEFINE([HAVE_MP4_GET_METADATA_COVER_ART_COUNT], [1],
1680
[this version of libmp4v2 has MP4GetMetadataCoverArtCount() support])
1686
AC_MSG_CHECKING([for MP4GetTrackAudioChannels() in libmp4v2])
1693
(void)MP4GetTrackAudioChannels(0, 0);
1697
AC_MSG_RESULT([yes])
1698
AC_DEFINE([HAVE_MP4_GET_TRACK_AUDIO_CHANNELS], [1],
1699
[this version of libmp4 has MP4GetTrackAudioChannels support])
2842
1708
########## INOTIFY TOOLS
2844
AC_ARG_ENABLE(inotify,
2845
AC_HELP_STRING([--enable-inotify], [compile with inotify support (default: yes)]),
2847
INOTIFY_EN=$enableval
2848
if test "x$enableval" = xno; then
2859
if test "x$INOTIFY_OK" = xyes; then
2860
if test -n "$INOTIFY_SEARCH_HEADERS"; then
2861
AC_MSG_NOTICE([Will search for inotify header in $INOTIFY_SEARCH_HEADERS])
2862
AC_CHECK_HEADER([$INOTIFY_SEARCH_HEADERS/sys/inotify.h],
2864
INOTIFY_CXXFLAGS="-I$INOTIFY_SEARCH_HEADERS"
2868
AC_MSG_ERROR(inotify.h not found in requested location $INOTIFY_SEARCH_HEADERS)
2873
AC_CHECK_HEADER(sys/inotify.h, [],
2876
for inotify_path in $SEARCH_DIR_HEADERS; do
2877
if test "x$ac_cv_header_sys_inotify_h" != xyes ; then
2878
unset ac_cv_header_sys_inotify_h
2879
AC_CHECK_HEADER($inotify_path/sys/inotify.h,
2881
INOTIFY_CXXFLAGS="-I$inotify_path"
2891
if test "x$INOTIFY_EN" != xno; then
1710
MT_OPTION([inotify], [disable], [inotify support for imporved autoscan], [],
1711
[INOTIFY_STATUS=disabled])
1713
if test "x$INOTIFY_OPTION_ENABLED" = xyes; then
1714
MT_CHECK_HEADER([inotify], [sys/inotify])
1717
if test "x$INOTIFY_STATUS" = xyes; then
1718
AC_CHECK_FUNCS([inotify_init], [], [INOTIFY_STATUS=missing])
1721
if test "x$INOTIFY_STATUS" = xyes; then
2892
1722
dnl The check below was inspired by configure.ac from the inotify tools
2893
1723
dnl package, see the "Acknowledgements" section in our README file for more
2894
1724
dnl information.
2895
CXXFLAGS="$CXXFLAGS $INOTIFY_CXXFLAGS"
1725
CXXFLAGS="$CXXFLAGS $INOTIFY_CFLAGS"
1726
CFLAGS="$CFLAGS $INOTIFY_CFLAGS"
2896
1727
AC_MSG_CHECKING([whether sys/inotify.h works])
2898
1729
AC_LANG_PROGRAM([[#include <sys/inotify.h>]],
2944
1797
CPPFLAGS="$CPPFLAGS_SAVE"
2945
1798
CXXFLAGS="$CXXFLAGS_SAVE"
2947
AC_ARG_ENABLE(tombdebug,
2948
AC_HELP_STRING([--enable-tombdebug], [enable debug output for MediaTomb (default: no)]),
2950
LOGDEBUG_EN=$enableval
2951
if test "x$enableval" = xno; then
2952
LOGDEBUG_OK=disabled
2958
LOGDEBUG_OK=disabled
2961
if test "x$LOGDEBUG_OK" = xyes; then
2962
AC_DEFINE(LOG_TOMBDEBUG, 1, [if defined compile with debug log output])
2966
AC_ARG_ENABLE(upnpdebug,
2967
AC_HELP_STRING([--enable-upnpdebug], [enable debug output for TombUPnP (default: no)]),
2969
UPNPDEBUG_EN=$enableval
2970
if test "x$enableval" = xno; then
2971
UPNPDEBUG_OK=disabled
2977
UPNPDEBUG_OK=disabled
2981
if test "x$UPNPDEBUG_OK" = xyes; then
2982
AC_DEFINE(UPNP_HAVE_DEBUG, 1, [see upnpconfig.h])
2983
AC_DEFINE(DEBUG, 1, [Define to 1 to compile debug code])
2986
if (test "x$LOGDEBUG_OK" != xyes) && (test "x$UPNPDEBUG_OK" != xyes); then
1800
AC_DEFINE([__STDC_CONSTANT_MACROS], [1], [needed for stdint.h])
1801
AC_DEFINE([__STDC_LIMIT_MACROS], [1], [needed for stdint.h])
1803
MT_CHECK_OPTIONAL_PACKAGE_CFG([libdvdnav], [disable],
1804
[compile with libdvdnav support for extended DVD image parsing],
1806
[dvdnav/dvdnav.h], [dvdnav], [dvdnav_get_audio_attr], [])
1809
MT_OPTION([tombdebug], [enable], [enable debug code for MediaTomb],
1811
AC_DEFINE(TOMBDEBUG, 1, [if defined compile with debug log output])
1815
MT_OPTION([upnpdebug], [enable], [enable debug output for TombUPnP/libupnp],
1817
AC_DEFINE(UPNP_HAVE_DEBUG, 1, [see upnpconfig.h])
1818
AC_DEFINE(DEBUG, 1, [Define to 1 to compile debug code])
1822
if (test "x$TOMBDEBUG_OPTION_ENABLED" != xyes) &&
1823
(test "x$UPNPDEBUG_OPTION_ENABLED" != xyes); then
2987
1824
AC_DEFINE(NDEBUG, 1, [make sure there are no asserts in the retail build])
2991
AC_HELP_STRING([--disable-log], [disable all output from MediaTomb (default: no)]),
2993
LOG_OK_EN=$enableval
2994
if test "x$enableval" = xno; then
3005
if test "x$LOG_OK" = xyes; then
3006
AC_DEFINE(LOG_ENABLED, 1, [if defined compile with log output])
1827
MT_OPTION([log], [disable], [disable all console output],
1829
AC_DEFINE(LOG_ENABLED, 1, [if defined compile with log output])
1833
MT_OPTION([debug-log], [disable], [compile without debug messages],
1835
AC_DEFINE(DEBUG_LOG_ENABLED, 1, [compile with debug messages])
3009
1840
eval PACKAGE_DATADIR="${datadir}/${PACKAGE}"
3010
1841
eval PACKAGE_DATADIR="${PACKAGE_DATADIR}"
3011
1842
AC_DEFINE_UNQUOTED(PACKAGE_DATADIR, "$PACKAGE_DATADIR", [MediaTomb data directory])
3013
if test $YOUTUBE -eq 1; then
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
3015
1845
AC_DEFINE(ONLINE_SERVICES, 1, [at least one online service is supported])
1848
if (test "x$YOUTUBE_OPTION_ENABLED" = xyes); then
3016
1849
AC_DEFINE([YOUTUBE], [1], [Enable support for the YouTube service])
3018
YOUTUBE_OK="disabled"
1852
if (test "x$WEBORAMA_OPTION_ENABLED" = xyes); then
1853
AC_DEFINE([WEBORAMA], [1], [Enable support for the Weborama service])
1856
if (test "x$ATRAILERS_OPTION_ENABLED" = xyes); then
1857
AC_DEFINE([ATRAILERS], [1], [Enable support for the apple trailers])
1860
if (test "x$SOPCAST_OPTION_ENABLED" = xyes); then
1861
AC_DEFINE([SOPCAST], [1], [Enable support for the SopCast service])
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])
3021
1866
###############
3022
1867
AC_CONFIG_FILES([
3039
1885
echo "CONFIGURATION SUMMARY ----"
3042
echo "sqlite3 : $SQLITE3_OK"
3043
echo "mysql : $MYSQL_OK"
1888
echo "sqlite3 : $SQLITE3_STATUS"
1889
echo "mysql : $MYSQL_STATUS"
3044
1890
##echo "postgresql : $PGSQL_OK"
3045
1891
echo "libjs : $JS_OK"
3046
echo "libmagic : $MAGIC_OK"
3047
echo "inotify : $INOTIFY_OK"
3048
echo "libexif : $EXIF_OK"
3049
echo "expat : $EXPAT_OK"
3050
echo "id3lib : $ID3_OK"
3051
echo "taglib : $TAGLIB_OK"
3052
echo "ffmpeg : $FFMPEG_OK"
3053
echo "external transcoding : $EXTERNAL_TRANSCODING_OK"
3054
# echo "YouTube : $YOUTUBE_OK"
3055
echo "libextractor : $EXTRACTOR_OK"
3059
if test $AUTOCREATE_PRINT != "0"; then
3060
echo "db-autocreate : $AUTOCREATE_PRINT"
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"
3063
if test "$LOG_OK" != "yes"; then
3064
echo "log output : $LOG_OK"
3067
if test "$LOGDEBUG_OK" != "disabled"; then
3068
echo "debug log : $LOGDEBUG_OK"
3071
if test "$UPNPDEBUG_OK" != "disabled"; then
3072
echo "upnpdebug : $UPNPDEBUG_OK"
3075
if test "$STATIC" = "yes"; then
3076
echo "static build : $STATIC"
3078
# echo " libjpeg : $LIBJPEG_OK"
3079
# echo " exiv2 : $EXIV2_OK"
1911
if test "x$TOMBDEBUG_OPTION_ENABLED" = xyes; then
1912
echo "debug log : $TOMBDEBUG_OPTION_ENABLED"
1915
if test "x$UPNPDEBUG_OPTION_ENABLED" = xyes; then
1916
echo "upnpdebug : $UPNPDEBUG_OPTION_ENABLED"
1919
if test "x$STATIC_OPTION_ENABLED" = xyes; then
1920
echo "static build : $STATIC_OPTION_ENABLED"