File: configure.ac

package info (click to toggle)
gupnp-igd 0.2.5-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 2,160 kB
  • sloc: sh: 4,393; ansic: 1,991; xml: 1,059; makefile: 177
file content (71 lines) | stat: -rw-r--r-- 2,356 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
AC_PREREQ(2.53)
AC_INIT(gupnp-igd, 0.2.5, http://www.gupnp.org/)
AM_INIT_AUTOMAKE()
AC_CONFIG_SRCDIR(libgupnp-igd/gupnp-simple-igd.h)
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_MACRO_DIR([m4])

AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AC_PROG_LIBTOOL
AC_FUNC_MMAP

PKG_CHECK_MODULES(LIBGUPNP, glib-2.0 >= 2.26 gobject-2.0 >= 2.26 gssdp-1.0 gupnp-1.0 >= 0.18 gthread-2.0)

# glib-genmarshal
GLIB_GENMARSHAL=`pkg-config --variable=glib_genmarshal glib-2.0`
AC_SUBST(GLIB_GENMARSHAL)

dnl use pretty build output with automake >= 1.11
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],
  [AM_DEFAULT_VERBOSITY=1
   AC_SUBST(AM_DEFAULT_VERBOSITY)])

GTK_DOC_CHECK([1.10],[--flavour no-tmpl])

AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_26], [Version 2.26 is required])
AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_26], [Ignore post 2.26 deprecations])

GOBJECT_INTROSPECTION_CHECK([0.10])
if test "x$found_introspection" = "xyes"; then
   INTROSPECTION_TYPELIBDIR=`$PKG_CONFIG --variable=typelibdir --define-variable="libdir=${libdir}" gobject-introspection-1.0`
   INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir --define-variable="datadir=${datadir}" gobject-introspection-1.0`
   AC_SUBST(INTROSPECTION_TYPELIBDIR)
   AC_SUBST(INTROSPECTION_GIRDIR)
fi

AC_ARG_ENABLE([python],
	AC_HELP_STRING([--enable-python], [Enable pre-introspection Python bindings]),
	[case "${enableval}" in
	    yes) WANT_PYTHON=yes ;;
	    no)  WANT_PYTHON=no ;;
	    *) AC_MSG_ERROR(bad value ${enableval} for --enable-python) ;;
        esac],
	WANT_PYTHON=no)

if test "x$WANT_PYTHON" = "xyes"; then
   AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
   PKG_CHECK_MODULES(PYGUPNP_IGD, [ pygobject-2.0 >= 2.12.0 ] )
   PKG_CHECK_MODULES(PYCODEGEN, [ pygobject-2.0 >= 2.16.0 ],
     PYCODEGEN=pygobject-codegen-2.0,
     PKG_CHECK_MODULES(PYCODEGEN, [ pygtk-2.0 >= 2.10 ],
       PYCODEGEN=pygtk-codegen-2.0,
       AC_MSG_ERROR([You need pygobject 2.16+ or pygtk for the codegen])))
   AM_PATH_PYTHON([], [], [AC_MSG_ERROR([You need python installed])])
fi
AC_SUBST(PYCODEGEN)
AM_CONDITIONAL(WANT_PYTHON, test "x$WANT_PYTHON" = "xyes")

AC_OUTPUT([
Makefile
libgupnp-igd/Makefile
python/Makefile
tests/Makefile
tests/gtest/Makefile
tests/examples/Makefile
doc/Makefile
doc/version.xml
gupnp-igd-1.0.pc
gupnp-igd-1.0-uninstalled.pc
])