[svn r342] Put back the do_get_file_info to the LiveTV.
2 # Process this file with autoconf to produce a configure script.
8 dnl AC_CONFIG_SRCDIR([src/mmyth_main.c])
9 AC_CONFIG_HEADER(config.h)
11 dnl when going to/from release please set the nano (fourth number) right !
12 dnl releases only do Wall, SVN and prerelease does Werror too
13 AS_VERSION(gmyth, GMYTH, 0, 1, 0, 3, GMYTH_SVN="no", GMYTH_SVN="yes")
14 GMYTH_MAJORMINOR=$GMYTH_MAJOR_VERSION.$GMYTH_MINOR_VERSION
15 AC_SUBST(GMYTH_MAJORMINOR)
17 dnl AM_MAINTAINER_MODE provides the option to enable maintainer mode
19 dnl make aclocal work in maintainer mode
20 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
22 # Checks for programs.
24 # Make sure CFLAGS is defined to stop AC_PROC_CC adding -g
25 CFLAGS="$CFLAGS -Wall"
29 dnl Generate doxygen documentation
38 DX_INIT_DOXYGEN(gmyth, doxygen.cfg, docs)
40 # Checks for libraries.
42 # Checks for header files.
44 AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h unistd.h])
46 # Checks for typedefs, structures, and compiler characteristics.
53 # Checks for library functions.
56 AC_FUNC_SELECT_ARGTYPES
57 AC_PROG_GCC_TRADITIONAL
62 AC_CHECK_FUNCS([memset socket stime strstr strtoul gethostname inet_ntoa localtime_r select strrchr localtime strptime])
64 ##############################
65 # Checks for Network functions
66 ##############################
68 AC_CHECK_FUNCS([socket])
69 AC_CHECK_FUNCS([inet_ntoa])
70 AC_CHECK_HEADERS([ifaddrs.h])
71 AC_CHECK_FUNCS([getifaddrs])
72 AC_CHECK_FUNCS([time])
74 AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
76 CFLAGS="$CFLAGS -I/usr/include"
77 LDFLAGS="$LDFLAGS -L/usr/lib"
79 # Checks required packages
81 dnl Test if --disable-debug given
83 AC_HELP_STRING([--disable-debug], [enable debugging mode]))
84 if test x"$enable_debug" != xno; then
85 CFLAGS="$CFLAGS -g -DGMYTH_USE_DEBUG"
87 CFLAGS="$CFLAGS -O2 -DG_DISABLE_CHECKS"
91 AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
92 # Give error and exit if we don't have pkgconfig
93 if test "x$HAVE_PKGCONFIG" = "xno"; then
94 AC_MSG_ERROR(you need to have pkgconfig installed !)
98 PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
100 # Give error and exit if we don't have glib
101 if test "x$HAVE_GLIB" = "xno"; then
102 AC_MSG_ERROR(you need glib-2.0 installed)
105 # make GLIB_CFLAGS and GLIB_LIBS available
106 AC_SUBST(GLIB_CFLAGS)
109 # Check for GObject2.0
110 PKG_CHECK_MODULES(GOBJECT,
112 HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
114 # Give error and exit if we don't have gobject
115 if test "x$HAVE_GOBJECT" = "xno"; then
116 AC_MSG_ERROR(you need gobject-2.0 installed)
119 # make GOBJECT_CFLAGS and GOBJECT_LIBS available
120 AC_SUBST(GOBJECT_CFLAGS)
121 AC_SUBST(GOBJECT_LIBS)
123 # Check for libxml-2.0
124 PKG_CHECK_MODULES(LIBXML, libxml-2.0, HAVE_LIBXML=yes,HAVE_LIBXML=no)
126 # Give error and exit if we don't have libxml
127 if test "x$HAVE_LIBXML" = "xno"; then
128 AC_MSG_ERROR(you need libxml-2.0 installed)
131 # make LIBXML_CFLAGS and LIBXML_LIBS available
132 AC_SUBST(LIBXML_CFLAGS)
133 AC_SUBST(LIBXML_LIBS)
136 PKG_CHECK_MODULES(LIBCURL, libcurl, HAVE_LIBCRUL=yes, HAVE_LIBCURL=no)
138 # Give error and exit if we don't have libcurl
139 if test "x$HAVE_LIBCURL" = "xno"; then
140 AC_MSG_ERROR(you need libcurl installed)
143 # make LIBCURL_CFLAGS and LIBCURL_LIBS available
144 AC_SUBST(LIBCURL_CFLAGS)
145 AC_SUBST(LIBCURL_LIBS)
151 AC_CHECK_PROG(MYSQL_CFLAGS,mysql_config,`mysql_config --cflags`)
152 if test -z "$MYSQL_CFLAGS"; then
153 AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed])
155 AC_SUBST(MYSQL_CFLAGS)
158 AC_CHECK_PROG(MYSQL_LIBS,mysql_config,`mysql_config --libs`)
159 if test -z "$MYSQL_LIBS"; then
160 AC_MSG_ERROR([Could not find mysql_config script. Make sure the mysql client libraries are installed])
177 if test "x$enable_debug" != "xno"; then
178 AC_MSG_NOTICE([Debug: Enabled])
180 AC_MSG_NOTICE([Debug: Disabled])