renatofilho@930
|
1 |
AC_INIT(gmyth-upnp, 0.7.1)
|
renatofilho@929
|
2 |
AC_PREREQ(2.52)
|
renatofilho@929
|
3 |
AC_CONFIG_SRCDIR(configure.ac)
|
renatofilho@929
|
4 |
AC_CANONICAL_BUILD
|
renatofilho@929
|
5 |
AC_CANONICAL_HOST
|
renatofilho@929
|
6 |
AC_ISC_POSIX
|
melunko@249
|
7 |
|
renatofilho@929
|
8 |
AM_INIT_AUTOMAKE(1.6 dist-bzip2)
|
renatofilho@929
|
9 |
AM_CONFIG_HEADER(config.h)
|
melunko@249
|
10 |
|
melunko@249
|
11 |
dnl make aclocal work in maintainer mode
|
melunko@249
|
12 |
AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
|
melunko@249
|
13 |
|
renatofilho@929
|
14 |
AC_PROG_CXX
|
melunko@249
|
15 |
AC_PROG_CC
|
renatofilho@929
|
16 |
AM_PROG_CC_STDC
|
renatofilho@929
|
17 |
AC_HEADER_STDC
|
renatofilho@929
|
18 |
AC_C_BIGENDIAN
|
renatofilho@929
|
19 |
AC_C_CONST
|
renatofilho@929
|
20 |
|
renatofilho@929
|
21 |
AC_LIBTOOL_WIN32_DLL
|
renatofilho@929
|
22 |
define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
|
melunko@249
|
23 |
AC_PROG_LIBTOOL
|
melunko@249
|
24 |
|
melunko@249
|
25 |
# Checks required packages
|
melunko@249
|
26 |
|
melunko@249
|
27 |
# Check for Glib2.0
|
melunko@249
|
28 |
PKG_CHECK_MODULES(GLIB, glib-2.0, HAVE_GLIB=yes,HAVE_GLIB=no)
|
melunko@249
|
29 |
|
melunko@249
|
30 |
# Give error and exit if we don't have glib
|
melunko@249
|
31 |
if test "x$HAVE_GLIB" = "xno"; then
|
melunko@249
|
32 |
AC_MSG_ERROR(you need glib-2.0 installed)
|
melunko@249
|
33 |
fi
|
melunko@249
|
34 |
|
melunko@249
|
35 |
# make GLIB_CFLAGS and GLIB_LIBS available
|
melunko@249
|
36 |
AC_SUBST(GLIB_CFLAGS)
|
melunko@249
|
37 |
AC_SUBST(GLIB_LIBS)
|
melunko@249
|
38 |
|
melunko@249
|
39 |
# Check for GObject2.0
|
melunko@249
|
40 |
PKG_CHECK_MODULES(GOBJECT,
|
melunko@249
|
41 |
gobject-2.0,
|
melunko@249
|
42 |
HAVE_GOBJECT=yes, HAVE_GOBJECT=no)
|
melunko@249
|
43 |
|
melunko@249
|
44 |
# Give error and exit if we don't have gobject
|
melunko@249
|
45 |
if test "x$HAVE_GOBJECT" = "xno"; then
|
melunko@249
|
46 |
AC_MSG_ERROR(you need gobject-2.0 installed)
|
melunko@249
|
47 |
fi
|
melunko@249
|
48 |
|
melunko@249
|
49 |
# make GOBJECT_CFLAGS and GOBJECT_LIBS available
|
melunko@249
|
50 |
AC_SUBST(GOBJECT_CFLAGS)
|
melunko@249
|
51 |
AC_SUBST(GOBJECT_LIBS)
|
melunko@249
|
52 |
|
renatofilho@909
|
53 |
## Check for gmyth-0.7
|
renatofilho@909
|
54 |
PKG_CHECK_MODULES(LIBGMYTH, gmyth >= 0.7, HAVE_LIBGMYTH=yes,HAVE_LIBGMYTH=no)
|
melunko@249
|
55 |
|
renatofilho@909
|
56 |
# Give error and exit if we don't have gmyth-0.7
|
rosfran@252
|
57 |
if test "x$HAVE_LIBGMYTH" = "xno"; then
|
renatofilho@909
|
58 |
AC_MSG_ERROR([you need gmyth installed])
|
rosfran@252
|
59 |
fi
|
rosfran@252
|
60 |
|
rosfran@252
|
61 |
# make LIBXML_CFLAGS and LIBXML_LIBS available
|
rosfran@252
|
62 |
AC_SUBST(LIBGMYTH_CFLAGS)
|
rosfran@252
|
63 |
AC_SUBST(LIBGMYTH_LIBS)
|
rosfran@252
|
64 |
|
renatofilho@909
|
65 |
PKG_CHECK_MODULES(LIBUPNP, libupnp, HAVE_LIBUPNP=yes, HAVE_LIBUPNP=no)
|
rosfran@252
|
66 |
|
renatofilho@909
|
67 |
if test "x$HAVE_LIBUPNP" = "xno"; then
|
renatofilho@909
|
68 |
AC_MSG_ERROR([you need libupnp installed])
|
rosfran@252
|
69 |
fi
|
rosfran@252
|
70 |
|
renatofilho@909
|
71 |
AC_SUBST(LIBUPNP_CFLAGS)
|
renatofilho@909
|
72 |
AC_SUBST(LIBIPNP_LIBS)
|
melunko@249
|
73 |
|
melunko@249
|
74 |
AC_OUTPUT([
|
melunko@249
|
75 |
Makefile
|
melunko@249
|
76 |
src/Makefile
|
renatofilho@923
|
77 |
tests/Makefile
|
rosfran@252
|
78 |
gmyth-upnp.pc])
|