1m4_define([version_major],0)
2m4_define([version_minor],28)
3m4_define([version_micro],2)
4m4_define([version_triplet],version_major.version_minor.version_micro)
5
6m4_define([so_major_adjust],9) dnl Don't change!
7
8AC_PREREQ([2.63])
9AC_INIT([vte],
10        [version_triplet],
11        [http://bugzilla.gnome.org/enter_bug.cgi?product=vte],
12        [vte])
13
14AC_CONFIG_SRCDIR([src/vte.c])
15AC_CONFIG_HEADERS([config.h])
16
17AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2])
18
19m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
20
21if test -z "$enable_maintainer_mode"; then
22  enable_maintainer_mode=yes
23fi
24AM_MAINTAINER_MODE([enable])
25
26################################################################################
27# Libtool versioning
28################################################################################
29m4_define([lt_revision], m4_if(m4_eval(version_minor%2),1,0,version_micro))
30m4_define([lt_age], m4_eval(version_minor*100+version_micro-lt_revision))
31m4_define([lt_current], m4_eval(so_major_adjust+version_major+lt_age))
32m4_define([lt_triplet],lt_current:lt_revision:lt_age)
33
34LT_VERSION_INFO="lt_triplet()"
35AC_SUBST([LT_VERSION_INFO])
36
37################################################################################
38# GTK+
39################################################################################
40
41AC_MSG_CHECKING([which gtk+ version to compile against])
42AC_ARG_WITH([gtk],
43  [AS_HELP_STRING([--with-gtk=2.0|3.0],[which gtk+ version to compile against (default: 2.0)])],
44  [case "$with_gtk" in
45     2.0|3.0) ;;
46     *) AC_MSG_ERROR([invalid gtk version specified]) ;;
47   esac],
48  [with_gtk=2.0])
49AC_MSG_RESULT([$with_gtk])
50
51case "$with_gtk" in
52  2.0) VTE_API_VERSION=0.0
53       VTE_API_MAJOR_VERSION=0
54       VTE_API_MINOR_VERSION=0
55       VTE_PC_VERSION=
56       VTE_LIBRARY_SUFFIX=
57       VTE_SEAL_CFLAGS=
58       GTK_API_VERSION=2.0
59       GTK_REQUIRED=2.20.0
60       GLADE_API_VERSION=1.0
61       ;;
62  3.0) VTE_API_VERSION=2.90
63       VTE_API_MAJOR_VERSION=2
64       VTE_API_MINOR_VERSION=90
65       VTE_PC_VERSION=-$VTE_API_VERSION
66       VTE_LIBRARY_SUFFIX=$VTE_API_VERSION
67       VTE_SEAL_CFLAGS="-DVTE_SEAL_ENABLE"
68       GTK_API_VERSION=3.0
69       GTK_REQUIRED=3.0.0
70       GLADE_API_VERSION=2.0
71       ;;
72esac
73
74AC_SUBST([VTE_API_VERSION])
75AC_SUBST([VTE_API_VERSION_U],[AS_TR_SH([$VTE_API_VERSION])])
76AC_SUBST([VTE_API_MAJOR_VERSION])
77AC_SUBST([VTE_API_MINOR_VERSION])
78AC_SUBST([VTE_PC_VERSION])
79AC_SUBST([VTE_SEAL_CFLAGS])
80AC_SUBST([GTK_API_VERSION])
81AC_SUBST([VTE_LIBRARY_SUFFIX_U],[AS_TR_SH([$VTE_LIBRARY_SUFFIX])])
82
83AM_CONDITIONAL([HAVE_GTK_2],[test "$with_gtk" = "2.0"])
84AM_CONDITIONAL([HAVE_GTK_3],[test "$with_gtk" = "3.0"])
85
86################################################################################
87
88# Check for programs
89AC_PROG_CC
90AC_HEADER_STDC
91AM_PROG_CC_C_O
92AC_PROG_SED
93
94# Initialize libtool
95LT_PREREQ([2.2])
96LT_INIT
97
98
99################################################################################
100# i18n
101################################################################################
102
103IT_PROG_INTLTOOL([0.35.0])
104
105GETTEXT_PACKAGE=vte-$VTE_API_VERSION
106AC_SUBST(GETTEXT_PACKAGE)
107AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
108                   [Package translatable messages domain name.])
109AM_GLIB_GNU_GETTEXT
110AC_CHECK_DECLS(bind_textdomain_codeset,,,[#include "libintl.h"])
111
112
113################################################################################
114# Platform checks
115################################################################################
116
117AC_MSG_CHECKING([for a win32 platform])
118platform_win32=no
119case "$host" in
120	*-*-mingw*|*-*-cygwin*)
121		platform_win32=yes
122		;;
123esac
124AC_MSG_RESULT([$platform_win32])
125AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
126
127os_win32=no
128if test "x$platform_win32" = "xyes"; then
129	AC_MSG_CHECKING([for native win32])
130	case "$host" in
131		*-*-mingw*)
132			os_win32=yes
133			;;
134	esac
135	AC_MSG_RESULT([$os_win32])
136fi
137AM_CONDITIONAL(OS_WIN32, test "x$os_win32" = "xyes")
138
139
140if test "x$platform_win32" != "xyes"; then
141	LIBTOOL_EXPORT_OPTIONS=
142else
143	LIBTOOL_EXPORT_OPTIONS='-no-undefined'
144fi
145AC_SUBST([LIBTOOL_EXPORT_OPTIONS])
146LIBTOOL_FLAGS='-as-needed'
147AC_SUBST([LIBTOOL_FLAGS])
148
149
150################################################################################
151# Compilation
152################################################################################
153
154dnl Use lots of warning flags with with gcc and compatible compilers
155dnl Copied from cairo
156AC_DEFUN([VTE_CC_TRY_FLAG], [
157  AC_MSG_CHECKING([whether $CC supports $1])
158
159  vte_save_CFLAGS="$CFLAGS"
160  CFLAGS="$CFLAGS $1"
161
162  AC_COMPILE_IFELSE([ ], [vte_cc_flag=yes], [vte_cc_flag=no])
163  CFLAGS="$vte_save_CFLAGS"
164
165  if test "x$vte_cc_flag" = "xyes"; then
166    ifelse([$2], , :, [$2])
167  else
168    ifelse([$3], , :, [$3])
169  fi
170  AC_MSG_RESULT([$vte_cc_flag])
171])
172AC_DEFUN([VTE_LD_TRY_FLAG], [
173  AC_MSG_CHECKING([whether $CC supports $1 when linking])
174
175  vte_save_LDFLAGS="$LDFLAGS"
176  LDFLAGS="$LDFLAGS $1"
177
178  AC_LINK_IFELSE([int main(void) {return 0;}],
179		[vte_ld_flag=yes], [vte_ld_flag=no])
180  LDFLAGS="$vte_save_LDFLAGS"
181
182  if test "x$vte_ld_flag" = "xyes"; then
183    ifelse([$2], , :, [$2])
184  else
185    ifelse([$3], , :, [$3])
186  fi
187  AC_MSG_RESULT([$vte_ld_flag])
188])
189
190
191dnl Note: if you change the following variable, the cache is automatically
192dnl skipped and all flags rechecked.  So there's no need to do anything
193dnl else.  If for any reason you need to force a recheck, just change
194dnl MAYBE_WARN in an ignorable way (like adding whitespace)
195
196MAYBE_WARN="-Wall -Wextra \
197-Wsign-compare -Werror-implicit-function-declaration \
198-Wpointer-arith -Wwrite-strings -Wstrict-prototypes \
199-Waggregate-return -Wcast-align -Wimplicit -Wuninitialised \
200-Wmissing-prototypes -Wmissing-declarations -Wnested-externs \
201-Wpacked -Wmissing-format-attribute -Wshadow \
202-Wstrict-aliasing=2 -Winit-self -Wunsafe-loop-optimizations \
203-Wdeclaration-after-statement -Wold-style-definition \
204-Wno-missing-field-initializers -Wno-unused-parameter \
205-fno-common -Wno-switch-enum"
206
207# invalidate cached value if MAYBE_WARN has changed
208if test "x$vte_cv_warn_maybe" != "x$MAYBE_WARN"; then
209	unset vte_cv_warn_cflags
210fi
211AC_CACHE_CHECK([for supported warning flags], vte_cv_warn_cflags, [
212	echo
213	WARN_CFLAGS=""
214
215	# Some warning options are not supported by all versions of
216	# gcc, so test all desired options against the current
217	# compiler.
218	#
219	# Note that there are some order dependencies
220	# here. Specifically, an option that disables a warning will
221	# have no net effect if a later option then enables that
222	# warnings, (perhaps implicitly). So we put some grouped
223	# options (-Wall and -Wextra) up front and the -Wno options
224	# last.
225
226	for W in $MAYBE_WARN; do
227		VTE_CC_TRY_FLAG([$W], [WARN_CFLAGS="$WARN_CFLAGS $W"])
228	done
229
230	vte_cv_warn_cflags=$WARN_CFLAGS
231	vte_cv_warn_maybe=$MAYBE_WARN
232
233	AC_MSG_CHECKING([which warning flags were supported])])
234WARN_CFLAGS=$vte_cv_warn_cflags
235AC_SUBST(WARN_CFLAGS)
236CFLAGS="$CFLAGS $WARN_CFLAGS"
237
238PYTHON_LDFLAGS=""
239for W in "-Wl,--warn-unresolved-symbols"; do
240	VTE_LD_TRY_FLAG([$W], [PYTHON_LDFLAGS="$PYTHON_LDFLAGS $W"])
241done
242AC_SUBST(PYTHON_LDFLAGS)
243
244# Enable debugging messages and additional run-time checks.
245AC_ARG_ENABLE(debug,
246	      [AS_HELP_STRING([--enable-debug],
247			      [enable extra debugging checks and logging messages]
248			      )],
249	      DEBUG=$enableval, DEBUG=no)
250if test "x$DEBUG" != "xno" ; then
251	AC_MSG_RESULT([enabling debug checks and messages])
252	AC_DEFINE(VTE_DEBUG,1,[Enable debugging messages.])
253fi
254
255##########################################################
256# Check for -Bsymbolic-functions linker flag used to avoid
257# intra-library PLT jumps, if available.
258##########################################################
259
260AC_ARG_ENABLE([Bsymbolic],
261  [AS_HELP_STRING([--disable-Bsymbolic],
262                  [disable linking with -Bsymbolic])],
263  [],[enable_Bsymbolic=yes])
264
265VTE_LDFLAGS=
266if test "$enable_Bsymbolic" != "no"; then
267  FLAG="-Wl,-Bsymbolic-functions"
268  VTE_LD_TRY_FLAG([$FLAG],
269    [VTE_LDFLAGS="$VTE_LDFLAGS $FLAG"],
270    [if test "$enable_Bsymbolic" = "auto"; then
271       AC_MSG_WARN([-Bsymbolic not supported by ld; disabling])
272       enable_Bsymbolic=no
273     else
274       AC_MSG_ERROR([-Bsymbolic requested but not supported by ld. Use --disable-Bsymbolic to disable])
275     fi])
276fi
277
278AC_SUBST([VTE_LDFLAGS])
279
280################################################################################
281
282# Disable deprecations and single includes
283# We don't use GNOME_MAINTAINER_MODE_DEFINES here since it's too much and
284# it also defines VTE's own defines.
285dnl AC_ARG_ENABLE([deprecation],
286dnl   [AS_HELP_STRING([--disable-deprecation],
287dnl                   [prohibit VTE from using deprecated GLib/Pango/ATK/GDK/GTK+ features])],
288dnl   [],[enable_deprecation=$enable_maintainer_mode])
289dnl if test "x$enable_deprecation" = xyes; then
290dnl   AC_MSG_NOTICE([disabling deprecated GLIB/PANGO/GDK/ATK/GTK+ features])
291dnl
292dnl   AC_DEFINE([ATK_DISABLE_DEPRECATED],[1],[Disable deprecated features])
293dnl   AC_DEFINE([ATK_DISABLE_SINGLE_INCLUDES],[1],[Disable single includes])
294dnl   AC_DEFINE([G_DISABLE_DEPRECATED],[1],[Disable deprecated features])
295dnl   AC_DEFINE([G_DISABLE_SINGLE_INCLUDES],[1],[Disable single includes])
296dnl   AC_DEFINE([GDK_DISABLE_DEPRECATED],[1],[Disable deprecated features])
297dnl   AC_DEFINE([GDK_DISABLE_SINGLE_INCLUDES],[1],[Disable single includes])
298dnl   AC_DEFINE([GDK_PIXBUF_DISABLE_DEPRECATED],[1],[Disable deprecated features])
299dnl   AC_DEFINE([GDK_PIXBUF_DISABLE_SINGLE_INCLUDES],[1],[Disable single includes])
300dnl   AC_DEFINE([GTK_DISABLE_DEPRECATED],[1],[Disable deprecated features])
301dnl   AC_DEFINE([GTK_DISABLE_SINGLE_INCLUDES],[1],[Disable single includes])
302dnl   AC_DEFINE([PANGO_DISABLE_DEPRECATED],[1],[Disable deprecated features])
303dnl   AC_DEFINE([PANGO_DISABLE_SINGLE_INCLUDES],[1],[Disable single includes])
304dnl fi
305
306################################################################################
307# Core
308################################################################################
309
310# Use all available features under glibc, and disable accidental use of
311# deprecated functionality.
312AC_EGREP_CPP(glibc,
313		[
314		 #include <stdio.h>
315		 #ifdef __GLIBC__
316		 glibc
317		 #endif
318		],
319		AC_DEFINE(_GNU_SOURCE,1,[Use all glibc features.]))
320
321case $host in
322*-*-solaris*)
323	AC_DEFINE(_XOPEN_SOURCE_EXTENDED,1,[Needed to get declarations for msg_control and msg_controllen on Solaris])
324	AC_DEFINE(_XOPEN_SOURCE,1,[Needed to get declarations for msg_control and msg_controllen on Solaris])
325	AC_DEFINE(__EXTENSIONS__,1,[Needed to get declarations for msg_control and msg_controllen on Solaris])
326	;;
327esac
328
329GLIB_REQUIRED=2.26.0
330PANGO_REQUIRED=1.22.0
331AC_DEFINE(GDK_MULTIHEAD_SAFE,1,[Force use of GDK's multihead-safe APIs.])
332PKG_CHECK_MODULES(GLIB,[glib-2.0 >= $GLIB_REQUIRED gobject-2.0])
333PKG_CHECK_MODULES(GTK,[glib-2.0 >= $GLIB_REQUIRED gobject-2.0 gtk+-$GTK_API_VERSION >= $GTK_REQUIRED])
334
335AC_PATH_PROG([GLIB_GENMARSHAL],[glib-genmarshal])
336AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
337
338# Let the user specify the default terminal emulation.
339AC_ARG_WITH(default-emulation,
340AS_HELP_STRING(--with-default-emulation=xterm,default terminal type to be emulated),
341emulation=$withval,emulation=xterm)
342AC_DEFINE_UNQUOTED(VTE_DEFAULT_EMULATION,"$emulation",[The default terminal type to be emulated.])
343VTE_DEFAULT_EMULATION=$emulation
344AC_SUBST(VTE_DEFAULT_EMULATION)
345AM_CONDITIONAL(VTE_DEFAULT_EMULATION, [test "$emulation" != xterm])
346
347# Check for headers.
348AC_CHECK_HEADERS(sys/select.h sys/syslimits.h sys/termios.h sys/un.h sys/wait.h stropts.h termios.h wchar.h)
349AC_HEADER_TIOCGWINSZ
350
351# Check for PTY handling functions.
352AC_CHECK_FUNCS([cfmakeraw fork setsid setpgid getpgid getpt grantpt unlockpt ptsname ptsname_r tcgetattr tcsetattr])
353
354# Pull in the right libraries for various functions which might not be
355# bundled into an exploded libc.
356AC_CHECK_FUNC(socket,[have_socket=1],AC_CHECK_LIB(socket,socket,[have_socket=1; LIBS="$LIBS -lsocket"]))
357AC_CHECK_FUNC(socketpair,[have_socketpair=1],AC_CHECK_LIB(socket,socketpair,[have_socketpair=1; LIBS="$LIBS -lsocket"]))
358AC_CHECK_FUNC(recvmsg,[have_recvmsg=1],AC_CHECK_LIB(socket,recvmsg,[have_recvmsg=1; LIBS="$LIBS -lsocket -lnsl"]))
359if test x$have_socket = x1 ; then
360	AC_DEFINE(HAVE_SOCKET,1,[Define if you have the socket function.])
361fi
362if test x$have_socketpair = x1 ; then
363	AC_DEFINE(HAVE_SOCKETPAIR,1,[Define if you have the socketpair function.])
364fi
365if test x$have_recvmsg = x1 ; then
366	AC_DEFINE(HAVE_RECVMSG,1,[Define if you have the recvmsg function.])
367fi
368AC_CHECK_FUNC(floor,,AC_CHECK_LIB(m,floor,LIBS=["$LIBS -lm"]))
369AC_CHECK_FUNCS([ceil floor])
370
371# Look for tgetent
372
373AC_CHECK_FUNC([tgetent],[vte_cv_termcap_lib=libc],
374  [AC_CHECK_LIB([ncurses],[tgetent],[vte_cv_termcap_lib=libncurses],
375    [AC_CHECK_LIB([tinfo],[tgetent],[vte_cv_termcap_lib=libtinfo],
376      [AC_CHECK_LIB([curses],[tgetent],[vte_cv_termcap_lib=libcurses],
377        [AC_CHECK_LIB([termcap],[tgetent],[vte_cv_termcap_lib=libtermcap],
378          [vte_cv_termcap_lib=])])])])])
379
380case "$vte_cv_termcap_lib" in
381  libc)       # FIXME: which headers to include here?
382              ;;
383  libncurses) # We need ncurses.h and term.h, or ncurses/curses.h and ncurses/term.h
384              AC_CHECK_HEADERS([ncurses.h term.h],[],
385                [AC_CHECK_HEADERS([ncurses/curses.h ncurses/term.h],[],
386                  [AC_MSG_ERROR([ncurses headers not found])])])
387              LIBS="-lncurses $LIBS"
388              ;;
389  libtinfo)   # Need ncurses/curses.h and ncurses/term.h
390              AC_CHECK_HEADERS([ncurses.h term.h],[],
391                [AC_CHECK_HEADERS([ncurses/curses.h ncurses/term.h],[],
392                  [AC_MSG_ERROR([ncurses headers not found])])])
393              LIBS="-ltinfo $LIBS"
394              ;;
395  libcurses)  # Need curses.h and term.h
396              AC_CHECK_HEADERS([curses.h term.h],[],
397                [AC_MSG_ERROR([curses headers not found])],
398                [[#ifdef HAVE_CURSES_H
399                  #include <curses.h>
400                  #endif]])
401              LIBS="-lcurses $LIBS"
402              ;;
403  libtermcap) # Need termcap.h
404              AC_CHECK_HEADERS([termcap.h],[],
405                [AC_MSG_ERROR([termcap headers not found])])
406              LIBS="-ltermcap $LIBS"
407              ;;
408  *)          AC_MSG_ERROR([tgetent not found in any library]) ;;
409esac
410
411# Search for the required modules.
412
413# We have a direct dependency on X11 on gdk-x11, see bug #613525
414AC_MSG_CHECKING([for GDK target])
415GDK_TARGET="$($PKG_CONFIG --variable target gdk-$GTK_API_VERSION)"
416AC_MSG_RESULT([$GDK_TARGET])
417case "$GDK_TARGET" in
418  x11) PLATFORM_PKGS="x11 cairo-xlib" ;;
419  *) PLATFORM_PKGS="" ;;
420esac
421
422VTE_PKGS="glib-2.0 >= $GLIB_REQUIRED gobject-2.0 pango >= $PANGO_REQUIRED gtk+-$GTK_API_VERSION >= $GTK_REQUIRED gobject-2.0 gio-2.0 gio-unix-2.0 $PLATFORM_PKGS"
423PKG_CHECK_MODULES([VTE],[$VTE_PKGS])
424AC_SUBST([VTE_PKGS])
425
426wcs_funcs_includes="
427#ifdef HAVE_STRING_H
428# if !STDC_HEADERS && HAVE_MEMORY_H
429#  include <memory.h>
430# endif
431# include <string.h>
432#else
433# ifdef HAVE_STRINGS_H
434#  include <strings.h>
435# endif
436#endif
437#ifdef HAVE_WCHAR_H
438# include <wchar.h>
439#endif
440"
441
442AC_CHECK_TYPES(wint_t, AC_DEFINE(HAVE_WINT_T, , [Defined when the wint_t type is supported]), ,$wcs_funcs_includes)
443
444
445################################################################################
446# Auxillary modules
447################################################################################
448
449if test "$with_gtk" = "2.0"; then
450
451# Search for Python.
452BUILD_PYTHON=true
453AC_ARG_ENABLE(python, [AS_HELP_STRING(--enable-python,Build python bindings [default=yes])],[
454if test x"$enableval" != xno ; then
455	BUILD_PYTHON=true
456else
457	BUILD_PYTHON=false
458fi],BUILD_PYTHON=true)
459
460if $BUILD_PYTHON ; then
461	AM_PATH_PYTHON
462	if test -z "$PYTHON" ; then
463		BUILD_PYTHON=false
464	fi
465fi
466
467if $BUILD_PYTHON ; then
468	AC_MSG_CHECKING(for python >= 2.2)
469	prog="
470import sys, string
471minver = (2,2,0,'final',0)
472if sys.version_info < minver:
473	sys.exit(1)
474sys.exit(0)
475"
476	if $PYTHON -c "$prog" 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
477	then
478		AC_MSG_RESULT([okay])
479	else
480		BUILD_PYTHON=false
481		AC_MSG_RESULT([too old])
482	fi
483fi
484
485if $BUILD_PYTHON ; then
486	AM_CHECK_PYTHON_HEADERS(,BUILD_PYTHON=false)
487fi
488
489if $BUILD_PYTHON ; then
490	AC_MSG_CHECKING([for pygtk-2.0])
491	if pkg-config --exists pygtk-2.0 ; then
492		AC_MSG_RESULT([found])
493		PKG_CHECK_MODULES(PYGTK,[pygtk-2.0])
494
495		AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no)
496		if test "x$PYGTK_CODEGEN" = xno; then
497		  AC_MSG_ERROR(could not find pygtk-codegen-2.0 script)
498		fi
499
500		AC_MSG_CHECKING(for pygtk defs)
501		PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
502		AC_SUBST(PYGTK_DEFSDIR)
503		AC_MSG_RESULT($PYGTK_DEFSDIR)
504	else
505		AC_MSG_RESULT([not found])
506		BUILD_PYTHON=false
507	fi
508fi
509
510if ! $BUILD_PYTHON ; then
511	AC_MSG_RESULT([Python bindings disabled.])
512fi
513
514AC_SUBST(PYTHONREV)
515AC_SUBST(PYTHONMODULES)
516
517else # with_gtk = 3.0
518  BUILD_PYTHON=false
519fi # with_gtk = 2.0
520
521AM_CONDITIONAL(BUILD_PYTHON_MODULES, $BUILD_PYTHON)
522
523################################################################################
524# GNOME PTY Helper
525################################################################################
526
527AC_ARG_ENABLE(gnome-pty-helper, [AS_HELP_STRING(--enable-gnome-pty-helper,Build a setuid helper for opening ptys [default=yes])], enable_gnome_pty_helper="$enableval", enable_gnome_pty_helper=yes)
528if test "$enable_gnome_pty_helper" != no; then
529	AC_DEFINE(VTE_USE_GNOME_PTY_HELPER,1,[Define if you intend to use gnome-pty-helper.])
530	AC_CONFIG_SUBDIRS(gnome-pty-helper)
531fi
532AM_CONDITIONAL(BUILD_GNOME_PTY_HELPER,[test "$enable_gnome_pty_helper" != no])
533
534################################################################################
535# Glade catalogue
536################################################################################
537
538AC_MSG_CHECKING([whether to install the glade catalogue])
539AC_ARG_ENABLE([glade-catalogue],
540  [AS_HELP_STRING([--disable-glade],[Disable installing the glade catalogue])],
541  [],[enable_glade_catalogue=no])
542AC_MSG_RESULT([$enable_glade_catalogue])
543
544if test "$enable_glade_catalogue" = "yes"; then
545  GLADE_CATALOGUE_DIR="$($PKG_CONFIG --variable=catalogdir gladeui-$GLADE_API_VERSION)"
546  GLADE_ICON_DIR="$($PKG_CONFIG --variable=pixmapdir gladeui-$GLADE_API_VERSION)"
547  GLADE_MODULE_DIR="$($PKG_CONFIG --variable=moduledir gladeui-$GLADE_API_VERSION)"
548
549  if test -z "$GLADE_CATALOGUE_DIR" -o -z "$GLADE_MODULE_DIR"; then
550    AC_MSG_ERROR([gladeui-$GLADE_API_VERSION not found])
551  fi
552
553  AC_SUBST([GLADE_CATALOGUE_DIR])
554  AC_SUBST([GLADE_ICON_DIR])
555  AC_SUBST([GLADE_MODULE_DIR])
556fi
557
558AM_CONDITIONAL([ENABLE_GLADE_CATALOGUE],[test "$enable_glade_catalogue" = "yes"])
559
560# *************
561# Introspection
562# *************
563
564# No automagic please!
565if test -z "$enable_introspection"; then
566  enable_introspection=no
567fi
568
569GOBJECT_INTROSPECTION_CHECK([0.9.0])
570
571################################################################################
572
573GTK_DOC_CHECK([1.13],[--flavour no-tmpl])
574
575AC_SUBST([GLIB_PREFIX],[$($PKG_CONFIG --variable=prefix glib-2.0)])
576AC_SUBST([GTK_PREFIX],[$($PKG_CONFIG --variable=prefix gtk+-$GTK_API_VERSION)])
577
578################################################################################
579
580AC_SUBST([VTE_MAJOR_VERSION],[version_major])
581AC_SUBST([VTE_MINOR_VERSION],[version_minor])
582AC_SUBST([VTE_MICRO_VERSION],[version_micro])
583
584################################################################################
585
586AC_CONFIG_FILES([
587Makefile
588src/Makefile
589src/vteversion.h
590termcaps/Makefile
591perf/Makefile
592python/Makefile
593python/pyvte.pc
594po/Makefile.in
595doc/Makefile
596doc/openi18n/Makefile
597doc/reference/Makefile
598doc/reference/version.xml
599glade/Makefile
600])
601
602AC_CONFIG_FILES([vte${VTE_PC_VERSION}.pc:vte.pc.in],[VTE_PC_VERSION=${VTE_PC_VERSION}])
603AC_CONFIG_FILES([vte${VTE_PC_VERSION}-uninstalled.pc:vte-uninstalled.pc.in],[VTE_PC_VERSION=${VTE_PC_VERSION}])
604
605AC_OUTPUT
606
607#####################
608# Print configuration
609#####################
610cat <<EOF | tee -a config.log
611
612## -------------- ##
613## Configuration. ##
614## -------------- ##
615
616Configuration for libvte $VERSION for gtk+-$GTK_API_VERSION
617	Installing Glade catalogue: $enable_glade_catalogue
618	Debugging: $DEBUG
619	Disallow deprecated features: $enable_deprecation
620EOF
621