configure.ac 2.82 KB
Newer Older
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
1
# Process this file with autoconf to produce a configure script.
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15

AC_INIT(vinagre, 0.1)

AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE

dnl make sure we keep ACLOCAL_FLAGS around for maintainer builds to work
AC_SUBST(ACLOCAL_AMFLAGS, "\${ACLOCAL_FLAGS}")

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
16
17
18
AM_PROG_LIBTOOL

CFLAGS="${CFLAGS} -Wall"
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
19
20


Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
21
22
23
#*******************************************************************************
# Internationalization
#*******************************************************************************
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
24
25
26
27
28
29
30
31
GETTEXT_PACKAGE=vinagre
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])

IT_PROG_INTLTOOL([0.35.0])
AM_GLIB_GNU_GETTEXT


Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
32
33
34
#*******************************************************************************
# Check required GNOME libraries
#*******************************************************************************
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
35

Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
36
37
38
39
40
41
42
43
44
45
GLIB_REQUIRED=2.10.0
GTK_REQUIRED=2.10.0
LIBGLADE_REQUIRED=2.6.0
GCONF_REQUIRED=2.16.0

PKG_CHECK_MODULES(VINAGRE, \ 
  glib-2.0 >= $GLIB_REQUIRED \
  gtk+-2.0 >= $GTK_REQUIRED \ 
  libglade-2.0 >= $LIBGLADE_REQUIRED \
  gconf-2.0 >= $GCONF_REQUIRED)
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
46
47
48
AC_SUBST(VINAGRE_CFLAGS)
AC_SUBST(VINAGRE_LIBS)

Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
49
50
51
52
#*******************************************************************************
# Check for gnutls for gtk-vnc
#*******************************************************************************

Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
53
54
55
56
PKG_CHECK_MODULES(GTKVNC, [gnutls])
AC_SUBST(GTKVNC_CFLAGS)
AC_SUBST(GTKVNC_LIBS)

Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
57
#*******************************************************************************
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
58
# Check for Avahi
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
59
60
61
62
#*******************************************************************************

AVAHI_REQUIRED=0.6.17

Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
63
64
65
66
67
68
69
70
71
72
73
74
75
AC_ARG_ENABLE(avahi,
        AS_HELP_STRING([--enable-avahi],[Enable use of avahi]),
        [case "${enableval}" in
                yes) VINAGRE_ENABLE_AVAHI=yes ;;
                no)  VINAGRE_ENABLE_AVAHI=no ;;
                *) AC_MSG_ERROR(bad value ${enableval} for --enable-avahi) ;;
        esac],
        [VINAGRE_ENABLE_AVAHI=no])

AVAHI_CFLAGS=
AVAHI_LIBS=
if test "x$VINAGRE_ENABLE_AVAHI" = "xyes" ; then
    PKG_CHECK_MODULES(AVAHI,
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
76
		      [avahi-client >= $AVAHI_REQUIRED  avahi-glib >= $AVAHI_REQUIRED ])
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
77
78
79
80
81
82
    AVAHI_CFLAGS="$AVAHI_CFLAGS -DVINAGRE_HAVE_AVAHI"
fi
AC_SUBST(AVAHI_CFLAGS)
AC_SUBST(AVAHI_LIBS)
AM_CONDITIONAL(VINAGRE_AVAHI, [test "x$VINAGRE_ENABLE_AVAHI" = "xyes"])

Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
83
84
#*******************************************************************************

Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
85
86
87
88
89
90
91
92
AC_OUTPUT([
Makefile
data/Makefile
data/vinagre.desktop.in
src/Makefile
src/gtk-vnc/Makefile
po/Makefile.in
])
Jonh Wendell S. Santana's avatar
Jonh Wendell S. Santana committed
93
94
95
96
97
98
99
100
101
102
103

#*******************************************************************************

echo "
Configure summary:

	Compiler ...................:  ${CC} 
	Compiler Flags .............:  ${CFLAGS}

	Avahi support ..............:  ${VINAGRE_ENABLE_AVAHI}
"