1 # This file is part of MiniDLNA.
3 # MiniDLNA is free software; you can redistribute it and/or modify it
4 # under the terms of the GNU Lesser General Public License as
5 # published by the Free Software Foundation; either version 2 of the
6 # License, or (at your option) any later version.
8 # MiniDLNA is distributed in the hope that it will be useful, but WITHOUT
9 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
11 # License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with MiniDLNA; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17 AC_INIT(MiniDLNA,1.1.3,,minidlna)
21 AM_INIT_AUTOMAKE([subdir-objects])
22 AC_CONFIG_HEADERS([config.h])
23 AM_SILENT_RULES([yes])
25 m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [AC_USE_SYSTEM_EXTENSIONS])
30 AM_GNU_GETTEXT([external])
31 AM_GNU_GETTEXT_VERSION(0.18)
32 AM_GNU_GETTEXT_REQUIRE_VERSION(0.18)
34 # Checks for programs.
42 # Default string definitions
43 AC_DEFINE_UNQUOTED([OS_URL],"http://sourceforge.net/projects/minidlna/",[OS URL])
44 AC_DEFINE_UNQUOTED([ROOTDEV_MANUFACTURER],"Justin Maggard", [Manufacturer])
45 AC_DEFINE_UNQUOTED([ROOTDEV_MANUFACTURERURL],"http://www.netgear.com/", [Manufacturer URL])
46 AC_DEFINE_UNQUOTED([ROOTDEV_MODELNAME],"Windows Media Connect compatible (MiniDLNA)", [Model name])
47 AC_DEFINE_UNQUOTED([ROOTDEV_MODELDESCRIPTION],"MiniDLNA on " OS_NAME, [Model description])
48 AC_DEFINE_UNQUOTED([ROOTDEV_MODELURL],OS_URL,[Model URL])
51 ################################################################################################################
52 # Checks for typedefs, structures, and compiler characteristics.
58 m4_ifdef([AC_TYPE_UINT8_T], [AC_TYPE_UINT8_T])
59 m4_ifdef([AC_TYPE_INT32_T], [AC_TYPE_INT32_T])
60 m4_ifdef([AC_TYPE_UINT32_T], [AC_TYPE_UINT32_T])
61 m4_ifdef([AC_TYPE_UINT64_T], [AC_TYPE_UINT64_T])
62 m4_ifdef([AC_TYPE_SSIZE_T], [AC_TYPE_SSIZE_T])
63 AC_STRUCT_DIRENT_D_TYPE
68 # Checks for library functions.
70 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
71 AC_CHECK_FUNCS([gethostname getifaddrs gettimeofday inet_ntoa memmove memset mkdir realpath select sendfile setlocale socket strcasecmp strchr strdup strerror strncasecmp strpbrk strrchr strstr strtol strtoul])
72 AC_CHECK_DECLS([SEEK_HOLE])
73 AC_SEARCH_LIBS([clock_gettime], [rt], [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [use clock_gettime])],)
76 # Check for struct ip_mreqn
78 AC_MSG_CHECKING(for struct ip_mreqn)
79 AC_TRY_COMPILE([#include <netinet/in.h>], [
81 mreq.imr_address.s_addr = 0;
85 AC_DEFINE([HAVE_STRUCT_IP_MREQN],[],[Support for struct ip_mreqn])
87 # We'll just have to try and use struct ip_mreq
89 AC_MSG_CHECKING(for struct ip_mreq)
90 AC_TRY_COMPILE([#include <netinet/in.h>], [
92 mreq.imr_interface.s_addr = 0;
96 AC_DEFINE([HAVE_STRUCT_IP_MREQ],[],[Support for struct ip_mreq])
98 # No multicast support
99 AC_MSG_ERROR([No multicast support])
103 ################################################################################################################
104 # Special include directories
108 SEARCH_DIR="/opt/local"
109 INCLUDE_DIR="$SEARCH_DIR/include"
112 AC_DEFINE([SOLARIS], [1], [we are on solaris])
124 if test -f /etc/redhat-release; then
125 INCLUDE_DIR="/usr/include/ffmpeg"
130 AC_CHECK_HEADERS(syscall.h sys/syscall.h mach/mach_time.h)
131 AC_MSG_CHECKING([for __NR_clock_gettime syscall])
135 #include <asm/unistd.h>
138 #ifndef __NR_clock_gettime
145 AC_DEFINE([HAVE_CLOCK_GETTIME_SYSCALL], [1], [Whether the __NR_clock_gettime syscall is defined])
151 AC_CHECK_HEADER(linux/netlink.h,
152 [AC_DEFINE([HAVE_NETLINK],[1],[Support for Linux netlink])], [], [#include <sys/socket.h>])
154 ################################################################################################################
157 CPPFLAGS_SAVE="$CPPFLAGS"
158 for dir in "" /usr/local $INCLUDE_DIR; do
159 if test -n "$dir"; then
160 CPPFLAGS="$CPPFLAGS_SAVE -I$dir"
162 AC_CHECK_HEADERS([libavutil/avutil.h ffmpeg/libavutil/avutil.h libav/libavutil/avutil.h avutil.h ffmpeg/avutil.h libav/avutil.h], [HAVE_LIBAVUTIL=1])
163 if test -z "$HAVE_LIBAVUTIL"; then
164 unset ac_cv_header_avutil_h
165 unset ac_cv_header_libavutil_avutil_h
166 unset ac_cv_header_ffmpeg_avutil_h
167 unset ac_cv_header_ffmpeg_libavutil_avutil_h
168 unset ac_cv_header_libav_avutil_h
169 unset ac_cv_header_libav_libavutil_avutil_h
174 if test -z "$HAVE_LIBAVUTIL"; then
175 AC_MSG_ERROR([libavutil headers not found or not usable])
178 CPPFLAGS_SAVE="$CPPFLAGS"
179 for dir in "" /usr/local $INCLUDE_DIR; do
180 if test -n "$dir"; then
181 CPPFLAGS="$CPPFLAGS_SAVE -I$dir"
183 AC_CHECK_HEADERS([libavcodec/avcodec.h ffmpeg/libavcodec/avcodec.h libav/libavcodec/avcodec.h avcodec.h ffmpeg/avcodec.h libav/avcodec.h], [HAVE_LIBAVCODEC=1])
184 if test -z "$HAVE_LIBAVCODEC"; then
185 unset ac_cv_header_avcodec_h
186 unset ac_cv_header_libavcodec_avcodec_h
187 unset ac_cv_header_ffmpeg_avcodec_h
188 unset ac_cv_header_ffmpeg_libavcodec_avcodec_h
189 unset ac_cv_header_libav_avcodec_h
190 unset ac_cv_header_libav_libavcodec_avcodec_h
195 if test -z "$HAVE_LIBAVCODEC"; then
196 AC_MSG_ERROR([libavcodec headers not found or not usable])
199 CPPFLAGS_SAVE="$CPPFLAGS"
200 for dir in "" /usr/local $INCLUDE_DIR; do
201 if test -n "$dir"; then
202 CPPFLAGS="$CPPFLAGS_SAVE -I$dir"
204 AC_CHECK_HEADERS([libavformat/avformat.h ffmpeg/libavformat/avformat.h libav/libavformat/avformat.h avformat.h ffmpeg/avformat.h libav/avformat.h], [HAVE_LIBAVFORMAT=1])
205 if test -z "$HAVE_LIBAVFORMAT"; then
206 unset ac_cv_header_avformat_h
207 unset ac_cv_header_libavformat_avformat_h
208 unset ac_cv_header_ffmpeg_avformat_h
209 unset ac_cv_header_ffmpeg_libavformat_avformat_h
210 unset ac_cv_header_libav_avformat_h
211 unset ac_cv_header_libav_libavformat_avformat_h
216 if test -z "$HAVE_LIBAVFORMAT"; then
217 AC_MSG_ERROR([libavformat headers not found or not usable])
220 CPPFLAGS_SAVE="$CPPFLAGS"
221 for dir in "" /usr/local $INCLUDE_DIR; do
222 if test -n "$dir"; then
223 CPPFLAGS="$CPPFLAGS -I$dir"
225 AC_CHECK_HEADERS([jpeglib.h sqlite3.h libexif/exif-loader.h id3tag.h ogg/ogg.h vorbis/codec.h FLAC/metadata.h],,[unset $as_ac_Header; break],)
226 if test x"$ac_cv_header_jpeglib_h" != x"yes"; then
227 CPPFLAGS="$CPPFLAGS_SAVE"
229 elif test x"$ac_cv_header_sqlite3_h" != x"yes"; then
230 CPPFLAGS="$CPPFLAGS_SAVE"
232 elif test x"$ac_cv_header_libexif_exif_loader_h" != x"yes"; then
233 CPPFLAGS="$CPPFLAGS_SAVE"
235 elif test x"$ac_cv_header_id3tag_h" != x"yes"; then
236 CPPFLAGS="$CPPFLAGS_SAVE"
238 elif test x"$ac_cv_header_ogg_ogg_h" != x"yes"; then
239 CPPFLAGS="$CPPFLAGS_SAVE"
241 elif test x"$ac_cv_header_vorbis_codec_h" != x"yes"; then
242 CPPFLAGS="$CPPFLAGS_SAVE"
244 elif test x"$ac_cv_header_FLAC_metadata_h" != x"yes"; then
245 CPPFLAGS="$CPPFLAGS_SAVE"
251 test x"$ac_cv_header_jpeglib_h" != x"yes" && AC_MSG_ERROR([libjpeg headers not found or not usable])
252 test x"$ac_cv_header_sqlite3_h" != x"yes" && AC_MSG_ERROR([libsqlite3 headers not found or not usable])
253 test x"$ac_cv_header_libexif_exif_loader_h" != x"yes" && AC_MSG_ERROR([libexif headers not found or not usable])
254 test x"$ac_cv_header_id3tag_h" != x"yes" && AC_MSG_ERROR([libid3tag headers not found or not usable])
255 test x"$ac_cv_header_ogg_ogg_h" != x"yes" && AC_MSG_ERROR([libogg headers not found or not usable])
256 test x"$ac_cv_header_vorbis_codec_h" != x"yes" && AC_MSG_ERROR([libvorbis headers not found or not usable])
257 test x"$ac_cv_header_FLAC_metadata_h" != x"yes" && AC_MSG_ERROR([libFLAC headers not found or not usable])
259 CFLAGS_SAVE="$CFLAGS"
260 CFLAGS="$CFLAGS -Wall -Werror"
261 AC_MSG_CHECKING([if we should use the daemon() libc function])
273 AC_DEFINE([USE_DAEMON], [1],
274 [use the system's builtin daemon()])
281 AC_MSG_CHECKING([if scandir declaration requires const char cast])
286 #include <sys/types.h>
290 int filter(struct dirent *d);
291 struct dirent **ptr = NULL;
293 (void)scandir(name, &ptr, filter, alphasort);
300 AC_DEFINE([SCANDIR_CONST], [1],
301 [scandir needs const char cast])
306 AC_MSG_CHECKING([for linux sendfile support])
310 #include <sys/types.h>
311 #include <sys/sendfile.h>
314 int tofd = 0, fromfd = 0;
317 ssize_t nwritten = sendfile(tofd, fromfd, &offset, total);
323 AC_DEFINE([HAVE_LINUX_SENDFILE_API], [1], [Whether linux sendfile() API is available])
329 AC_MSG_CHECKING([for darwin sendfile support])
334 #include <sys/types.h>
335 #include <sys/socket.h>
340 off_t offset = 0, len;
341 struct sf_hdtr *hdtr = NULL;
344 ret = sendfile(fd, s, offset, &len, hdtr, flags);
350 AC_DEFINE([HAVE_DARWIN_SENDFILE_API], [1], [Whether darwin sendfile() API is available])
356 AC_MSG_CHECKING([for freebsd sendfile support])
361 #include <sys/types.h>
362 #include <sys/socket.h>
366 int fromfd=0, tofd=0, ret, total=0;
367 off_t offset=0, nwritten;
370 hdr.headers = &hdtrl;
374 hdtrl.iov_base = NULL;
376 ret = sendfile(fromfd, tofd, offset, total, &hdr, &nwritten, 0);
381 AC_DEFINE([HAVE_FREEBSD_SENDFILE_API], [1], [Whether freebsd sendfile() API is available])
386 CFLAGS="$CFLAGS_SAVE"
388 LDFLAGS_SAVE="$LDFLAGS"
389 for dir in "" /usr/local $SEARCH_DIR; do
390 if test -n "$dir"; then
391 LDFLAGS="$LDFLAGS -L$dir/lib"
393 AC_CHECK_LIB([jpeg], [jpeg_set_defaults], [LIBJPEG_LIBS="-ljpeg"], [unset ac_cv_lib_jpeg_jpeg_set_defaults; LDFLAGS="$LDFLAGS_SAVE"; continue])
396 test x"$ac_cv_lib_jpeg_jpeg_set_defaults" = x"yes" || AC_MSG_ERROR([Could not find libjpeg])
397 AC_SUBST(LIBJPEG_LIBS)
399 LDFLAGS_SAVE="$LDFLAGS"
400 for dir in "" /usr/local $SEARCH_DIR; do
401 if test -n "$dir"; then
402 LDFLAGS="$LDFLAGS -L$dir/lib"
404 AC_CHECK_LIB([exif], [exif_data_new_from_file], [LIBEXIF_LIBS="-lexif"], [unset ac_cv_lib_exif_exif_data_new_from_file; LDFLAGS="$LDFLAGS_SAVE"; continue])
407 test x"$ac_cv_lib_exif_exif_data_new_from_file" = x"yes" || AC_MSG_ERROR([Could not find libexif])
408 AC_SUBST(LIBEXIF_LIBS)
410 LDFLAGS_SAVE="$LDFLAGS"
411 for dir in "" /usr/local $SEARCH_DIR; do
412 if test -n "$dir"; then
413 LDFLAGS="$LDFLAGS -L$dir/lib"
415 AC_CHECK_LIB([id3tag -lz], [id3_file_open], [LIBID3TAG_LIBS="-lid3tag -lz"], [unset ac_cv_lib_id3tag_id3_file_open; LDFLAGS="$LDFLAGS_SAVE"; continue])
418 if test x"$ac_cv_lib_id3tag__lz___id3_file_open" != x"yes" &&
419 test x"$ac_cv_lib_id3tag__lz_id3_file_open" != x"yes"; then
420 AC_MSG_ERROR([Could not find libid3tag])
422 AC_SUBST(LIBID3TAG_LIBS)
424 LDFLAGS_SAVE="$LDFLAGS"
425 for dir in "" /usr/local $SEARCH_DIR; do
426 if test -n "$dir"; then
427 LDFLAGS="$LDFLAGS -L$dir/lib"
429 AC_CHECK_LIB(sqlite3, sqlite3_open, [LIBSQLITE3_LIBS="-lsqlite3"], [unset ac_cv_lib_sqlite3_sqlite3_open; LDFLAGS="$LDFLAGS_SAVE"; continue])
430 AC_CHECK_LIB(sqlite3, sqlite3_malloc, [AC_DEFINE([HAVE_SQLITE3_MALLOC], [1], [Define to 1 if the sqlite3_malloc function exists.])])
431 AC_CHECK_LIB(sqlite3, sqlite3_prepare_v2, [AC_DEFINE([HAVE_SQLITE3_PREPARE_V2], [1], [Define to 1 if the sqlite3_prepare_v2 function exists.])])
434 test x"$ac_cv_lib_sqlite3_sqlite3_open" = x"yes" || AC_MSG_ERROR([Could not find libsqlite3])
435 AC_SUBST(LIBSQLITE3_LIBS)
437 LDFLAGS_SAVE="$LDFLAGS"
438 for dir in "" /usr/local $SEARCH_DIR; do
439 if test -n "$dir"; then
440 LDFLAGS="$LDFLAGS -L$dir/lib"
442 AC_CHECK_LIB([avformat -lavcodec -lavutil -lz], [avformat_open_input], [LIBAVFORMAT_LIBS="-lavformat -lavcodec -lavutil -lz"],
443 [AC_CHECK_LIB([avformat -lavcodec -lavutil -lz], [av_open_input_file], [LIBAVFORMAT_LIBS="-lavformat -lavcodec -lavutil -lz"],
444 [unset ac_cv_lib_avformat_av_open_input_file; unset ac_cv_lib_avformat_avformat_open_input; LDFLAGS="$LDFLAGS_SAVE"; continue])])
447 if test x"$ac_cv_lib_avformat__lavcodec__lavutil__lz___av_open_input_file" != x"yes" &&
448 test x"$ac_cv_lib_avformat__lavcodec__lavutil__lz___avformat_open_input" != x"yes" &&
449 test x"$ac_cv_lib_avformat__lavcodec__lavutil__lz_avformat_open_input" != x"yes"; then
450 AC_MSG_ERROR([Could not find libavformat - part of ffmpeg])
452 AC_SUBST(LIBAVFORMAT_LIBS)
454 AC_CHECK_LIB(pthread, pthread_create)
456 # test if we have vorbisfile
457 # prior versions had ov_open_callbacks in libvorbis, test that, too.
458 AC_CHECK_LIB(vorbisfile, ov_open_callbacks,
459 [AC_CHECK_HEADERS([vorbis/vorbisfile.h],
460 AM_CONDITIONAL(HAVE_VORBISFILE, true)
461 AC_DEFINE(HAVE_VORBISFILE,1,[Have vorbisfile]),
462 AM_CONDITIONAL(HAVE_VORBISFILE, false))],
463 AM_CONDITIONAL(HAVE_VORBISFILE, false),
465 AC_CHECK_LIB(FLAC, FLAC__stream_decoder_init_stream,
466 [AC_CHECK_HEADERS([FLAC/all.h],
467 AM_CONDITIONAL(HAVE_FLAC, true)
468 AC_DEFINE(HAVE_FLAC,1,[Have flac]),
469 AM_CONDITIONAL(HAVE_FLAC, false))],
470 AM_CONDITIONAL(HAVE_FLAC, false),
472 # test without -logg to see whether we really need it (libflac can be without)
473 AC_CHECK_LIB(FLAC, FLAC__stream_decoder_init_ogg_stream,
474 AM_CONDITIONAL(HAVE_FLAC, true)
475 AC_DEFINE(HAVE_FLAC,1,[Have flac])
476 AM_CONDITIONAL(NEED_OGG, false),
477 [AM_CONDITIONAL(NEED_OGG, true)])
478 AC_CHECK_LIB(vorbisfile, vorbis_comment_query,
479 AM_CONDITIONAL(NEED_VORBIS, false),
480 AM_CONDITIONAL(NEED_VORBIS, true),
483 AC_CHECK_LIB(avahi-client, avahi_threaded_poll_new,
484 [AC_CHECK_HEADERS([avahi-common/thread-watch.h],
485 AM_CONDITIONAL(HAVE_AVAHI, true)
486 AC_DEFINE(HAVE_AVAHI,1,[Have avahi]),
487 AM_CONDITIONAL(HAVE_AVAHI, false))],
488 AM_CONDITIONAL(HAVE_AVAHI, false),
489 -lavahi-client -lavahi-common)
491 ################################################################################################################
494 AC_CHECK_HEADERS([arpa/inet.h asm/unistd.h endian.h machine/endian.h fcntl.h libintl.h locale.h netdb.h netinet/in.h poll.h stddef.h stdlib.h string.h sys/file.h sys/inotify.h sys/ioctl.h sys/param.h sys/queue.h sys/socket.h sys/time.h unistd.h])
495 test x"$ac_cv_header_poll_h" != x"yes" && AC_MSG_ERROR([poll.h not found or not usable])
496 test x"$ac_cv_header_sys_queue_h" != x"yes" && AC_MSG_ERROR([sys/queue.h not found or not usable])
498 AC_CHECK_FUNCS(inotify_init,
500 AC_DEFINE(HAVE_INOTIFY,1,[Whether kernel has inotify support])
501 AM_CONDITIONAL(HAVE_INOTIFY, true)
504 AC_MSG_CHECKING([for __NR_inotify_init syscall])
508 #include <asm/unistd.h>
511 #ifndef __NR_inotify_init
518 AC_DEFINE(HAVE_INOTIFY,1,[Whether kernel has inotify support])
519 AM_CONDITIONAL(HAVE_INOTIFY, true)
523 AM_CONDITIONAL(HAVE_INOTIFY, false)
527 AC_CHECK_FUNCS(kqueue, AM_CONDITIONAL(HAVE_KQUEUE, true), AM_CONDITIONAL(HAVE_KQUEUE, false))
529 ################################################################################################################
532 AC_ARG_WITH(log-path,
533 AS_HELP_STRING([--with-log-path=PATH],[Default log path]),
534 [with_logpath="$withval"],[with_logpath="/var/log"])
535 AC_DEFINE_UNQUOTED([DEFAULT_LOG_PATH],"${with_logpath}",[Log path])
539 AS_HELP_STRING([--with-db-path=PATH],[Default DB path]),
540 [with_dbpath="$withval"],[with_dbpath="/var/cache/minidlna"])
541 AC_DEFINE_UNQUOTED([DEFAULT_DB_PATH],"${with_dbpath}",[DB path])
544 AS_HELP_STRING([--with-os-name=NAME],[OS Name]),
545 [with_osname="$withval"],[with_osname="$(uname -s)"])
546 AC_DEFINE_UNQUOTED([OS_NAME],"${with_osname}",[OS Name])
548 AC_ARG_WITH(os-version,
549 AS_HELP_STRING([--with-os-version=VERS],[OS Version]),
550 [with_osver="$withval"],[with_osver="$(uname -r)"])
551 AC_DEFINE_UNQUOTED([OS_VERSION],"${with_osver}",[OS Version])
554 AS_HELP_STRING([--with-os-url=URL],[OS URL]),
555 [with_osurl="$withval"],[with_osurl="http://www.netgear.com"])
556 AC_DEFINE_UNQUOTED([OS_URL],"${with_osurl}",[OS URL])
559 AC_MSG_CHECKING([whether to enable TiVo support])
561 [ --enable-tivo enable TiVo support],[
562 if test "$enableval" = "yes"; then
563 AC_DEFINE(TIVO_SUPPORT, 1, [Define to 1 if you want to enable TiVo support])
564 AM_CONDITIONAL(TIVO_SUPPORT, true)
567 AM_CONDITIONAL(TIVO_SUPPORT, false)
571 AM_CONDITIONAL(TIVO_SUPPORT, false)
576 AC_MSG_CHECKING([whether to enable generic NETGEAR device support])
577 AC_ARG_ENABLE(netgear,
578 [ --enable-netgear enable generic NETGEAR device support],[
579 if test "$enableval" = "yes"; then
580 AC_DEFINE([NETGEAR],[1],[Define to 1 if you want to enable generic NETGEAR device support])
581 AC_DEFINE_UNQUOTED([OS_URL],"http://www.netgear.com/")
582 AC_DEFINE_UNQUOTED([ROOTDEV_MANUFACTURERURL],"http://www.netgear.com/")
583 AC_DEFINE_UNQUOTED([ROOTDEV_MANUFACTURER],"NETGEAR")
584 AC_DEFINE_UNQUOTED([ROOTDEV_MODELNAME],"Windows Media Connect compatible (ReadyDLNA)")
585 AC_DEFINE_UNQUOTED([ROOTDEV_MODELDESCRIPTION],"ReadyDLNA")
595 AC_MSG_CHECKING([whether to enable NETGEAR ReadyNAS support])
596 AC_ARG_ENABLE(readynas,
597 [ --enable-readynas enable NETGEAR ReadyNAS support],[
598 if test "$enableval" = "yes"; then
599 AC_DEFINE([NETGEAR],[1],[Define to 1 if you want to enable generic NETGEAR device support])
600 AC_DEFINE([READYNAS],[1],[Define to 1 if you want to enable NETGEAR ReadyNAS support])
601 AC_DEFINE([TIVO_SUPPORT], 1, [Define to 1 if you want to enable TiVo support])
602 AC_DEFINE_UNQUOTED([OS_URL],"http://www.readynas.com/")
603 AC_DEFINE_UNQUOTED([ROOTDEV_MANUFACTURERURL],"http://www.netgear.com/")
604 AC_DEFINE_UNQUOTED([ROOTDEV_MANUFACTURER],"NETGEAR")
605 AC_DEFINE_UNQUOTED([ROOTDEV_MODELNAME],"Windows Media Connect compatible (ReadyDLNA)")
606 AC_DEFINE_UNQUOTED([ROOTDEV_MODELDESCRIPTION],"ReadyDLNA")
607 AM_CONDITIONAL(TIVO_SUPPORT, true)
617 AC_MSG_CHECKING([whether to build a static binary executable])
618 AC_ARG_ENABLE(static,
619 [ --enable-static build a static binary executable],[
620 if test "$enableval" = "yes"; then
621 CFLAGS="$CFLAGS -DSTATIC"
622 LDFLAGS="$LDFLAGS -static"
632 AC_MSG_CHECKING([whether to enable LTO])
634 [ --enable-lto enable link-time optimization],[
635 if test "$enableval" = "yes"; then
636 CFLAGS="$CFLAGS -flto"
651 VER=`grep '#define __FreeBSD_version' /usr/include/sys/param.h | awk '{print $3}'`
652 OS_URL=http://www.freebsd.org/
655 AC_DEFINE([USE_IPF], [1], [Define to enable IPF])
656 AC_DEFINE([LOG_PERROR], [0], [Define to enable logging])
657 AC_DEFINE([SOLARIS_KSTATS], [1], [Define to enable Solaris Kernel Stats])
660 OS_URL=http://www.debian.org/
665 OS_URL=http://www.openbsd.org/
668 echo "Unknown OS : $target_os"
673 AC_OUTPUT([ po/Makefile.in