root/branches/jingle/configure.ac

Revision 9264, 4.1 kB (checked in by asterix, 7 months ago)

set FARSIGHT_LIBS var

Line 
1AC_INIT([Gajim - A Jabber Instant Messager],
2                [0.11.1.5],[http://trac.gajim.org/],[gajim])
3AC_PREREQ([2.59])
4AM_INIT_AUTOMAKE([1.8])
5AC_CONFIG_HEADER(config.h)
6AC_CONFIG_MACRO_DIR([m4])
7AM_MAINTAINER_MODE
8
9IT_PROG_INTLTOOL([0.35.0])
10PKG_PROG_PKG_CONFIG([0.19])
11
12AM_DISABLE_STATIC
13AC_ENABLE_SHARED(yes)
14AC_ENABLE_STATIC(no)
15
16AC_ISC_POSIX
17AC_PROG_CC
18AC_PROG_INSTALL
19AC_PROG_MAKE_SET
20AC_PROG_LIBTOOL
21AC_C_CONST
22AC_CHECK_HEADERS([libintl.h])
23AC_PATH_X
24
25
26GETTEXT_PACKAGE=gajim
27AC_SUBST([GETTEXT_PACKAGE])
28AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"], [Gettext package])
29AM_GLIB_GNU_GETTEXT
30AM_NLS
31
32FARSIGHT_LIBS=`$PKG_CONFIG --libs farsight-0.1`
33AC_SUBST(FARSIGHT_LIBS)
34FARSIGHT_CFLAGS=`$PKG_CONFIG --cflags farsight-0.1`
35AC_SUBST(FARSIGHT_CFLAGS)
36
37dnl ****
38dnl pygtk and gtk+
39dnl ****
40PKG_CHECK_MODULES([PYGTK], [gtk+-2.0 >= 2.6.0 pygtk-2.0 >= 2.6.0])
41AC_SUBST(PYGTK_CFLAGS)
42AC_SUBST(PYGTK_LIBS)
43PYGTK_DEFS=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
44AC_SUBST(PYGTK_DEFS)
45
46dnl *****
47dnl dbus
48dnl *****
49AC_ARG_ENABLE([remote],
50  [  --disable-remote        enable remote control via DBus [default auto]],
51  enable_remote=$enableval, enable_remote=auto)
52
53if test "x$enable_remote" = "xauto"; then
54         PKG_CHECK_EXISTS([dbus-1],enable_remote=yes,enable_remote=no)
55fi
56
57if test "x$enable_remote" = "xyes";then
58        PKG_CHECK_MODULES([DBUS], [dbus-1 >= 0.60])
59        AC_SUBST(DBUS_CFLAGS)
60        AC_SUBST(DBUS_LIBS)
61        have_remote=true
62else
63        have_remote=false
64fi
65AM_CONDITIONAL(BUILD_REMOTE_CONTROL, $have_remote)
66
67dnl ****
68dnl gtkspell
69dnl ****
70AC_ARG_ENABLE(gtkspell,
71  [  --disable-gtkspell      build spell checking support [default auto]],
72  enable_gtkspell=$enableval, enable_gtkspell=auto)
73
74if test "x$enable_gtkspell" = "xauto";then
75        PKG_CHECK_EXISTS([gtkspell-2.0], [enable_gtkspell=yes], [enable_gtkspell=no])
76fi
77if test "x$enable_gtkspell" = "xyes";then
78        PKG_CHECK_MODULES([GTKSPELL], [gtkspell-2.0])
79        AC_SUBST(GTKSPELL_CFLAGS)
80        AC_SUBST(GTKSPELL_LIBS)
81        have_gtkspell=true
82else
83        have_gtkspell=false
84fi
85AM_CONDITIONAL(BUILD_GTKSPELL, $have_gtkspell)
86
87
88dnl ****
89dnl xscreensaver
90dnl ****
91AC_ARG_ENABLE([idle],
92  [  --disable-idle          build idle module [default auto]],
93  enable_idle=$enableval, enable_idle=yes)
94
95if test "x$enable_idle" = "xyes";then
96        PKG_CHECK_EXISTS([xscrnsaver], [have_xscrnsaver=yes], [have_xscrnsaver=no])
97
98        if test "x$have_xscrnsaver" = "xyes";then
99                PKG_CHECK_MODULES([XSCRNSAVER], xscrnsaver)
100                AC_SUBST(XSCRNSAVER_LIBS)
101                have_idle=true
102        else
103                # Checks for libraries.
104                LIBS=-L$x_libraries
105                AC_CHECK_LIB([X11], [XOpenDisplay])
106                AC_CHECK_LIB([Xext], [XMissingExtension])
107                AC_CHECK_LIB([Xss], [XScreenSaverAllocInfo])
108                XSCRNSAVER_LIBS="$LIBS"
109                AC_SUBST([XSCRNSAVER_LIBS])
110                if test "x$XSCRNSAVER_LIBS" = "x-L";then
111                        have_idle=false
112                else
113                        have_idle=true
114                fi
115        fi
116else
117        have_idle=false
118fi
119AM_CONDITIONAL(BUILD_IDLE, $have_idle)
120
121AM_PATH_PYTHON([2.4])
122if test "x$PYTHON" = "x:"; then
123        AC_MSG_ERROR([Python not found])
124fi
125
126dnl ****
127dnl tray icon
128dnl ****
129AC_ARG_ENABLE(trayicon,
130  [  --disable-trayicon      build trayicon module [default yes]],
131  enable_trayicon=$enableval, enable_trayicon=yes)
132test "x$enable_trayicon" = "xyes" && have_trayicon=true || have_trayicon=false
133AM_CONDITIONAL(BUILD_TRAYICON, $have_trayicon)
134
135ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
136AC_SUBST(ACLOCAL_AMFLAGS)
137
138AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
139AC_SUBST([PYTHON_INCLUDES])
140
141AS_AC_EXPAND(DATADIR, "${datadir}")
142
143AS_AC_EXPAND(LIBDIR, ${libdir})
144
145AS_AC_EXPAND(DOCDIR, "${docdir}")
146
147AC_SUBST(VERSION)
148AC_SUBST(PACKAGE)
149AC_SUBST(DATADIR)
150AC_SUBST(LIBDIR)
151AS_AC_EXPAND(DATADIR, "${DATADIR}")
152AC_SUBST(DOCDIR)
153AS_AC_EXPAND(DOCDIR, "${DOCDIR}")
154
155AC_CONFIG_FILES([
156        Makefile
157        data/Makefile
158        data/glade/Makefile
159        data/emoticons/Makefile
160        data/pixmaps/Makefile
161        data/iconsets/Makefile
162        data/gajim.desktop.in
163        data/defs.py
164        src/Makefile
165        src/common/Makefile
166        src/common/farsight/Makefile
167        scripts/gajim
168        scripts/gajim-remote
169        po/Makefile.in
170])
171AC_OUTPUT
172echo "
173*****************************
174  Build features:
175    spell check ...... ${have_gtkspell}
176    idle module ...... ${have_idle}
177    remote control ... ${have_remote}
178    trayicon ......... ${have_trayicon}
179*****************************"
Note: See TracBrowser for help on using the browser.