configure.ac 1.44 KB
Newer Older
1
dnl Autoconf settings for mini-SAP-server
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
2
dnl $Id$
3

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
4
AC_COPYRIGHT([Copyright (C) the VideoLAN team 1998-2008])
5

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
6
AC_INIT(miniSAPserver,0.3.5,streaming@videolan.org)
7 8 9 10 11 12
AC_PREREQ(2.50)

AC_CONFIG_SRCDIR(configure.ac)
AC_CONFIG_AUX_DIR(admin)
AC_CONFIG_MACRO_DIR(m4)
AC_CONFIG_HEADERS(config.h)
13 14 15 16 17

dnl ****************************
dnl        General checks
dnl ****************************
AC_PROG_CC
18 19 20 21
AC_PROG_CXX
AC_C_CONST
AC_HEADER_STDBOOL

22 23
AC_CHECK_FUNCS([clearenv])
RDC_REPLACE_FUNC_GETOPT_LONG
24

25 26 27 28 29

dnl ****************************
dnl        Features
dnl ****************************

30
AM_INIT_AUTOMAKE([check-news dist-bzip2 no-dist-gzip std-options])
31

32 33 34
dnl On the fly charset transcoding
AM_ICONV

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
35 36
RDC_STRUCT_SOCKADDR_LEN

37
dnl Enable/Disable slp
38 39
AS_IF([test "x${enable_slp}" == "x"],
	[enable_slp="no"])
40
AC_ARG_ENABLE(slp,
41 42 43 44 45 46 47
	[AC_HELP_STRING([--enable-slp],
			[enable SLP announcing (default disabled)])],
	[AS_IF([test "${enable_slp}" != "no"],
		[AC_CHECK_HEADERS(slp.h,,
			[AC_MSG_ERROR(["Unable to find SLP headers"])])
		 AC_DEFINE(CONFIG_SLP,,[SLP announcing support])
        ])
48
	])
49
AM_CONDITIONAL(CONFIG_SLP, [test "${enable_slp}" != "no"])
50 51 52

dnl Debug Mode
AC_ARG_ENABLE(debug,
53 54
	AC_HELP_STRING([--enable-debug],
			[enable debug mode (default enabled)]))
55

56
AS_IF([test "${enable_debug}" != "no"],[CFLAGS="${CFLAGS} -g"])
57 58 59 60 61 62


dnl ****************************
dnl       Output Files
dnl ****************************

63 64
AC_SUBST(CONFIG_SLP)
AC_SUBST(CFLAGS)
65

66
AC_OUTPUT(Makefile)