| 1 |
AC_PREREQ(2.56) |
|---|
| 2 |
AC_INIT(vte, [0.12.2], |
|---|
| 3 |
[http://bugzilla.gnome.org/enter_bug.cgi?product=vte]) |
|---|
| 4 |
AC_CONFIG_SRCDIR([src/vte.c]) |
|---|
| 5 |
AM_INIT_AUTOMAKE(1.6) |
|---|
| 6 |
AM_CONFIG_HEADER([config.h]) |
|---|
| 7 |
|
|---|
| 8 |
AC_ISC_POSIX |
|---|
| 9 |
AC_PROG_CC |
|---|
| 10 |
AC_STDC_HEADERS |
|---|
| 11 |
AM_PROG_CC_STDC |
|---|
| 12 |
AM_MAINTAINER_MODE |
|---|
| 13 |
|
|---|
| 14 |
AM_PROG_LIBTOOL |
|---|
| 15 |
|
|---|
| 16 |
ALL_LINGUAS="am ang ar az be bg bn bs ca cs cy da de dz el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu id is it ja ka kn ko ku ky li lt lv mi mk ml mn ms nb ne nl nn no or pa pl pt pt_BR ro ru rw sk sl sq sr sr@Latn sv ta th tr ug uk vi wa xh zh_CN zh_HK zh_TW" |
|---|
| 17 |
|
|---|
| 18 |
AC_PROG_INTLTOOL([0.31]) |
|---|
| 19 |
GETTEXT_PACKAGE=vte |
|---|
| 20 |
AC_SUBST(GETTEXT_PACKAGE) |
|---|
| 21 |
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", |
|---|
| 22 |
[Package translatable messages domain name.]) |
|---|
| 23 |
AM_GLIB_GNU_GETTEXT |
|---|
| 24 |
AC_CHECK_DECLS(bind_textdomain_codeset,,,[#include "libintl.h"]) |
|---|
| 25 |
|
|---|
| 26 |
# On some OSs, AC_PATH_XTRA doesn't work right(?), so let the user specify |
|---|
| 27 |
# X_PRE_LIBS and X_EXTRA_LIBS to add even more libraries, and add -lX11 to |
|---|
| 28 |
# the list of libraries for grins. |
|---|
| 29 |
AC_PATH_XTRA |
|---|
| 30 |
X_CFLAGS= |
|---|
| 31 |
X_LIBS= |
|---|
| 32 |
if test "$have_x" = yes ; then |
|---|
| 33 |
if test -d "$ac_x_includes" ; then |
|---|
| 34 |
X_CFLAGS="-I$ac_x_includes $X_CFLAGS" |
|---|
| 35 |
fi |
|---|
| 36 |
X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" |
|---|
| 37 |
if test -d "$ac_x_libraries" ; then |
|---|
| 38 |
X_LIBS="-L$ac_x_libraries $X_LIBS" |
|---|
| 39 |
fi |
|---|
| 40 |
fi |
|---|
| 41 |
AC_SUBST(X_CFLAGS) |
|---|
| 42 |
AC_SUBST(X_LIBS) |
|---|
| 43 |
|
|---|
| 44 |
AC_DEFINE(GDK_MULTIHEAD_SAFE,1,[Force use of GDK's multihead-safe APIs.]) |
|---|
| 45 |
PKG_CHECK_MODULES(GLIB,glib-2.0 > 2.6.0) |
|---|
| 46 |
PKG_CHECK_MODULES(GOBJECT,[glib-2.0 gobject-2.0]) |
|---|
| 47 |
PKG_CHECK_MODULES(GTK,[glib-2.0 gobject-2.0 gtk+-2.0 >= 2.6.0]) |
|---|
| 48 |
|
|---|
| 49 |
wantedmodules="glib-2.0 gobject-2.0 gtk+-2.0 fontconfig" |
|---|
| 50 |
|
|---|
| 51 |
# Let the user specify the default terminal emulation. |
|---|
| 52 |
AC_ARG_WITH(default-emulation, |
|---|
| 53 |
AS_HELP_STRING(--with-default-emulation=xterm,default terminal type to be emulated), |
|---|
| 54 |
emulation=$withval,emulation=xterm) |
|---|
| 55 |
AC_DEFINE_UNQUOTED(VTE_DEFAULT_EMULATION,"$emulation",[The default terminal type to be emulated.]) |
|---|
| 56 |
VTE_DEFAULT_EMULATION=$emulation |
|---|
| 57 |
AC_SUBST(VTE_DEFAULT_EMULATION) |
|---|
| 58 |
|
|---|
| 59 |
# Use Xft2 if Pango has Xft2 support and it isn't disabled. |
|---|
| 60 |
if test "$have_x" = yes ; then |
|---|
| 61 |
AC_ARG_WITH(xft2,[AS_HELP_STRING(--with-xft2,enable drawing using Xft2)],with_xft2=$withval,with_xft2=yes) |
|---|
| 62 |
if test $with_xft2 = yes ; then |
|---|
| 63 |
if pkg-config --exists pangoxft '>=' 1.1.0 ; then |
|---|
| 64 |
AC_DEFINE(HAVE_XFT2,1,[Whether we have Xft2]) |
|---|
| 65 |
wantedmodules="$wantedmodules pangoxft >= 1.1.0" |
|---|
| 66 |
wantedmodules="xft >= 2.0 $wantedmodules" |
|---|
| 67 |
else |
|---|
| 68 |
AC_MSG_WARN([Xft2 not detected]) |
|---|
| 69 |
fi |
|---|
| 70 |
fi |
|---|
| 71 |
fi |
|---|
| 72 |
|
|---|
| 73 |
# Use PangoX if we have it and it isn't disabled. |
|---|
| 74 |
if test "$have_x" = yes ; then |
|---|
| 75 |
AC_ARG_WITH(pangox,[AS_HELP_STRING(--with-pangox,enable drawing using PangoX)],with_pangox=$withval,with_pangox=yes) |
|---|
| 76 |
if test $with_pangox = yes ; then |
|---|
| 77 |
if pkg-config --exists pangox ; then |
|---|
| 78 |
AC_DEFINE(HAVE_PANGOX,1,[Whether we have PangoX]) |
|---|
| 79 |
wantedmodules="$wantedmodules pangox" |
|---|
| 80 |
else |
|---|
| 81 |
AC_MSG_WARN([PangoX not detected]) |
|---|
| 82 |
fi |
|---|
| 83 |
fi |
|---|
| 84 |
fi |
|---|
| 85 |
|
|---|
| 86 |
# Use glX if we have it and it isn't disabled. |
|---|
| 87 |
if test "$have_x" = yes ; then |
|---|
| 88 |
AC_ARG_WITH(glX,[AS_HELP_STRING(--with-glX,enable drawing using glX)],with_glx=$withval,with_glx=no) |
|---|
| 89 |
if test $with_glx = yes ; then |
|---|
| 90 |
have_gl=0 |
|---|
| 91 |
have_libgl=0 |
|---|
| 92 |
AC_CHECK_HEADERS(GL/glx.h) |
|---|
| 93 |
if test $ac_cv_header_GL_glx_h = yes ; then |
|---|
| 94 |
AC_CHECK_FUNC(glXQueryExtension,[have_gl=1],AC_CHECK_LIB(GL,glXQueryExtension,[have_gl=1;have_libgl=1])) |
|---|
| 95 |
fi |
|---|
| 96 |
if test $have_gl = 1 ; then |
|---|
| 97 |
AC_DEFINE(HAVE_GL,1,[Whether we have GL and glX.]) |
|---|
| 98 |
fi |
|---|
| 99 |
if test $have_libgl = 1 ; then |
|---|
| 100 |
LIBS="-lGLU -lGL $LIBS" |
|---|
| 101 |
fi |
|---|
| 102 |
fi |
|---|
| 103 |
fi |
|---|
| 104 |
|
|---|
| 105 |
# Search for the required modules. |
|---|
| 106 |
PKG_CHECK_MODULES(VTE,[$wantedmodules]) |
|---|
| 107 |
NEEDEDPACKAGES="$wantedmodules" |
|---|
| 108 |
AC_SUBST(NEEDEDPACKAGES) |
|---|
| 109 |
|
|---|
| 110 |
# Require Freetype2. We use our local copy of the macro because packages of |
|---|
| 111 |
# freetype's development files don't always include the proper macro. |
|---|
| 112 |
VTE_CHECK_FT2(6.1.0,,[AC_MSG_ERROR([You must have freetype 2.0.2 or later to build vte.])]) |
|---|
| 113 |
|
|---|
| 114 |
# Temporarily pull in the Freetype cflags and libs for checking what's |
|---|
| 115 |
# available in this version. |
|---|
| 116 |
savecflags="$CFLAGS" |
|---|
| 117 |
CFLAGS="$CFLAGS $FT2_CFLAGS" |
|---|
| 118 |
savecppflags="$CPPFLAGS" |
|---|
| 119 |
CPPFLAGS="$CPPFLAGS $FT2_CFLAGS" |
|---|
| 120 |
if test -d "$ac_x_includes" ; then |
|---|
| 121 |
CFLAGS="$CFLAGS -I$ac_x_includes" |
|---|
| 122 |
CPPFLAGS="$CPPFLAGS -I$ac_x_includes" |
|---|
| 123 |
fi |
|---|
| 124 |
AC_CHECK_HEADERS(ft2build.h) |
|---|
| 125 |
if test x$ac_cv_header_ft2build_h != xyes ; then |
|---|
| 126 |
AC_MSG_ERROR([You must have freetype 2.0.2 or later to build vte.]) |
|---|
| 127 |
fi |
|---|
| 128 |
|
|---|
| 129 |
AC_CHECK_DECL(ft_render_mode_mono,[AC_DEFINE(HAVE_DECL_ft_render_mode_mono,1,Define if your freetype2 installation defines ft_render_mode_mono.)],,[ |
|---|
| 130 |
#ifdef HAVE_FT2BUILD_H |
|---|
| 131 |
#include <ft2build.h> |
|---|
| 132 |
#include FT_FREETYPE_H |
|---|
| 133 |
#endif |
|---|
| 134 |
]) |
|---|
| 135 |
|
|---|
| 136 |
AC_CHECK_DECL(FT_RENDER_MODE_MONO,[AC_DEFINE(HAVE_DECL_FT_RENDER_MODE_MONO,1,Define if your freetype2 installation defines FT_RENDER_MODE_MONO.)],,[ |
|---|
| 137 |
#ifdef HAVE_FT2BUILD_H |
|---|
| 138 |
#include <ft2build.h> |
|---|
| 139 |
#include FT_FREETYPE_H |
|---|
| 140 |
#endif |
|---|
| 141 |
]) |
|---|
| 142 |
|
|---|
| 143 |
AC_CHECK_DECLS(FT_LOAD_NO_HINTING,,,[ |
|---|
| 144 |
#ifdef HAVE_FT2BUILD_H |
|---|
| 145 |
#include <ft2build.h> |
|---|
| 146 |
#include FT_FREETYPE_H |
|---|
| 147 |
#endif |
|---|
| 148 |
]) |
|---|
| 149 |
|
|---|
| 150 |
AC_CHECK_DECLS(FT_RENDER_MODE_LIGHT,,,[ |
|---|
| 151 |
#ifdef HAVE_FT2BUILD_H |
|---|
| 152 |
#include <ft2build.h> |
|---|
| 153 |
#include FT_FREETYPE_H |
|---|
| 154 |
#endif |
|---|
| 155 |
]) |
|---|
| 156 |
|
|---|
| 157 |
AC_CHECK_DECLS(FT_RENDER_MODE_NORMAL,,,[ |
|---|
| 158 |
#ifdef HAVE_FT2BUILD_H |
|---|
| 159 |
#include <ft2build.h> |
|---|
| 160 |
#include FT_FREETYPE_H |
|---|
| 161 |
#endif |
|---|
| 162 |
]) |
|---|
| 163 |
|
|---|
| 164 |
AC_CHECK_DECL(FT_PIXEL_MODE_MONO,[AC_DEFINE(HAVE_DECL_FT_PIXEL_MODE_MONO,1,Define if your freetype2 build declares FT_PIXEL_MODE_MONO.)],,[ |
|---|
| 165 |
#ifdef HAVE_FT2BUILD_H |
|---|
| 166 |
#include <ft2build.h> |
|---|
| 167 |
#include FT_FREETYPE_H |
|---|
| 168 |
#endif |
|---|
| 169 |
]) |
|---|
| 170 |
AC_CHECK_DECL(ft_pixel_mode_mono,[AC_DEFINE(HAVE_DECL_ft_pixel_mode_mono,1,Define if your freetype2 build declares ft_pixel_mode_mono.)],,[ |
|---|
| 171 |
#ifdef HAVE_FT2BUILD_H |
|---|
| 172 |
#include <ft2build.h> |
|---|
| 173 |
#include FT_FREETYPE_H |
|---|
| 174 |
#endif |
|---|
| 175 |
]) |
|---|
| 176 |
|
|---|
| 177 |
AC_CHECK_DECLS(FT_PIXEL_MODE_GRAY2,,,[ |
|---|
| 178 |
#ifdef HAVE_FT2BUILD_H |
|---|
| 179 |
#include <ft2build.h> |
|---|
| 180 |
#include FT_FREETYPE_H |
|---|
| 181 |
#endif |
|---|
| 182 |
]) |
|---|
| 183 |
AC_CHECK_DECLS(FT_PIXEL_MODE_GRAY4,,,[ |
|---|
| 184 |
#ifdef HAVE_FT2BUILD_H |
|---|
| 185 |
#include <ft2build.h> |
|---|
| 186 |
#include FT_FREETYPE_H |
|---|
| 187 |
#endif |
|---|
| 188 |
]) |
|---|
| 189 |
|
|---|
| 190 |
AC_CHECK_DECL(FT_PIXEL_MODE_GRAY,[AC_DEFINE(HAVE_DECL_FT_PIXEL_MODE_GRAY,1,Define if your freetype2 build declares FT_PIXEL_MODE_GRAY.)],,[ |
|---|
| 191 |
#ifdef HAVE_FT2BUILD_H |
|---|
| 192 |
#include <ft2build.h> |
|---|
| 193 |
#include FT_FREETYPE_H |
|---|
| 194 |
#endif |
|---|
| 195 |
]) |
|---|
| 196 |
AC_CHECK_DECL(ft_pixel_mode_grays,[AC_DEFINE(HAVE_DECL_ft_pixel_mode_grays,1,Define if your freetype2 build declares ft_pixel_mode_grays.)],,[ |
|---|
| 197 |
#ifdef HAVE_FT2BUILD_H |
|---|
| 198 |
#include <ft2build.h> |
|---|
| 199 |
#include FT_FREETYPE_H |
|---|
| 200 |
#endif |
|---|
| 201 |
]) |
|---|
| 202 |
|
|---|
| 203 |
AC_CHECK_DECLS(FT_PIXEL_MODE_LCD,,,[ |
|---|
| 204 |
#ifdef HAVE_FT2BUILD_H |
|---|
| 205 |
#include <ft2build.h> |
|---|
| 206 |
#include FT_FREETYPE_H |
|---|
| 207 |
#endif |
|---|
| 208 |
]) |
|---|
| 209 |
|
|---|
| 210 |
CFLAGS="$savecflags" |
|---|
| 211 |
CPPFLAGS="$savecppflags" |
|---|
| 212 |
|
|---|
| 213 |
# Use all available features under glibc, and disable accidental use of |
|---|
| 214 |
# deprecated functionality. |
|---|
| 215 |
AC_EGREP_CPP(glibc, |
|---|
| 216 |
[ |
|---|
| 217 |
#include <stdio.h> |
|---|
| 218 |
#ifdef __GLIBC__ |
|---|
| 219 |
glibc |
|---|
| 220 |
#endif |
|---|
| 221 |
], |
|---|
| 222 |
AC_DEFINE(_GNU_SOURCE,1,[Use all glibc features.])) |
|---|
| 223 |
AC_DEFINE(_XOPEN_SOURCE_EXTENDED,1,[Needed to get declarations for msg_control and msg_controllen on Solaris]) |
|---|
| 224 |
AC_DEFINE(_XOPEN_SOURCE,1,[Needed to get declarations for msg_control and msg_controllen on Solaris]) |
|---|
| 225 |
AC_DEFINE(__EXTENSIONS__,1,[Needed to get declarations for msg_control and msg_controllen on Solaris]) |
|---|
| 226 |
|
|---|
| 227 |
AC_ARG_ENABLE(deprecation,[AS_HELP_STRING(--enable-deprecation,prohibit VTE from using deprecated GLib/Pango/GDK/GTK+ features)],usedeprecation=$enableval,usedeprecation=no) |
|---|
| 228 |
if test "$usedeprecation" = yes ; then |
|---|
| 229 |
AC_DEFINE(G_DISABLE_DEPRECATED,1,[Disable deprecated GLib features.]) |
|---|
| 230 |
AC_DEFINE(GDK_DISABLE_DEPRECATED,1,[Disable deprecated GDK features.]) |
|---|
| 231 |
AC_DEFINE(GDK_PIXBUF_DISABLE_DEPRECATED,1,[Disable deprecated gdk-pixbuf features.]) |
|---|
| 232 |
AC_DEFINE(GTK_DISABLE_DEPRECATED,1,[Disable deprecated GTK+ features.]) |
|---|
| 233 |
AC_DEFINE(PANGO_DISABLE_DEPRECATED,1,[Disable deprecated Pango features.]) |
|---|
| 234 |
fi |
|---|
| 235 |
|
|---|
| 236 |
# Miscellaneous definitions. |
|---|
| 237 |
AC_DEFINE(VTE_UTF8_BPC,6,[Maximum number of bytes used per UTF-8 character.]) |
|---|
| 238 |
AC_DEFINE(VTE_INVALID_SOURCE,-1,[A number which can never be a valid source ID.]) |
|---|
| 239 |
AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE",[Package name.]) |
|---|
| 240 |
|
|---|
| 241 |
# Check for headers. |
|---|
| 242 |
AC_CHECK_HEADERS(sys/select.h sys/termios.h sys/un.h stropts.h termios.h wchar.h) |
|---|
| 243 |
AC_HEADER_TIOCGWINSZ |
|---|
| 244 |
|
|---|
| 245 |
# Check for PTY handling functions. |
|---|
| 246 |
AC_CHECK_FUNCS(cfmakeraw getpgid getpt grantpt unlockpt ptsname ptsname_r) |
|---|
| 247 |
|
|---|
| 248 |
# Pull in the right libraries for various functions which might not be |
|---|
| 249 |
# bundled into an exploded libc. |
|---|
| 250 |
AC_CHECK_FUNC(socket,[have_socket=1],AC_CHECK_LIB(socket,socket,[have_socket=1; LIBS="$LIBS -lsocket"])) |
|---|
| 251 |
AC_CHECK_FUNC(socketpair,[have_socketpair=1],AC_CHECK_LIB(socket,socketpair,[have_socketpair=1; LIBS="$LIBS -lsocket"])) |
|---|
| 252 |
AC_CHECK_FUNC(recvmsg,[have_recvmsg=1],AC_CHECK_LIB(socket,recvmsg,[have_recvmsg=1; LIBS="$LIBS -lsocket -lnsl"])) |
|---|
| 253 |
if test x$have_socket = x1 ; then |
|---|
| 254 |
AC_DEFINE(HAVE_SOCKET,1,[Define if you have the socket function.]) |
|---|
| 255 |
fi |
|---|
| 256 |
if test x$have_socketpair = x1 ; then |
|---|
| 257 |
AC_DEFINE(HAVE_SOCKETPAIR,1,[Define if you have the socketpair function.]) |
|---|
| 258 |
fi |
|---|
| 259 |
if test x$have_recvmsg = x1 ; then |
|---|
| 260 |
AC_DEFINE(HAVE_RECVMSG,1,[Define if you have the recvmsg function.]) |
|---|
| 261 |
fi |
|---|
| 262 |
AC_CHECK_FUNC(floor,,AC_CHECK_LIB(m,floor,LIBS=["$LIBS -lm"])) |
|---|
| 263 |
|
|---|
| 264 |
# Look for ncurses or curses or termcap. |
|---|
| 265 |
AC_CHECK_HEADER(ncurses.h,[AC_CHECK_HEADER(term.h,[AC_CHECK_LIB(ncurses,tgetent,[LIBS="-lncurses $LIBS";AC_DEFINE(HAVE_NCURSES,1,[Define if you have ncurses.h and libncurses])])])]) |
|---|
| 266 |
if test x$ac_cv_lib_ncurses_tgetent != xyes ; then |
|---|
| 267 |
AC_CHECK_HEADER(curses.h,[AC_CHECK_HEADER(term.h,[AC_CHECK_LIB(curses,tgetent,[LIBS="-lcurses $LIBS";AC_DEFINE(HAVE_CURSES,1,[Define if you have curses.h and libcurses])])])]) |
|---|
| 268 |
if test x$ac_cv_lib_curses_tgetent != xyes ; then |
|---|
| 269 |
AC_CHECK_HEADER(termcap.h,[AC_CHECK_LIB(termcap,tgetent,[LIBS="-ltermcap $LIBS";AC_DEFINE(HAVE_TERMCAP,1,[Define if you have termcap.h and libtermcap])])]) |
|---|
| 270 |
if test x$ac_cv_header_termcap_h != xyes ; then |
|---|
| 271 |
AC_MSG_ERROR([You must have at least one of ncurses, curses, or libtermcap installed to build vte.]) |
|---|
| 272 |
fi |
|---|
| 273 |
fi |
|---|
| 274 |
fi |
|---|
| 275 |
|
|---|
| 276 |
# Save the names of these other libraries. |
|---|
| 277 |
OTHERCFLAGS="$X_CFLAGS" |
|---|
| 278 |
AC_SUBST(OTHERCFLAGS) |
|---|
| 279 |
OTHERLIBS="$LIBS" |
|---|
| 280 |
AC_SUBST(OTHERLIBS) |
|---|
| 281 |
|
|---|
| 282 |
# Enable debugging messages and additional run-time checks. |
|---|
| 283 |
AC_ARG_ENABLE(debugging,[AS_HELP_STRING(--enable-debugging,enable extra debugging checks and logging messages)],DEBUG=$enableval,DEBUG=no) |
|---|
| 284 |
if test x$DEBUG != x ; then |
|---|
| 285 |
if test x$DEBUG != xno ; then |
|---|
| 286 |
if test x$GCC = xyes ; then |
|---|
| 287 |
AC_CHECK_CC_OPT(-std=c99,vte_std_c99) |
|---|
| 288 |
CFLAGS="${CFLAGS} $vte_std_c99" |
|---|
| 289 |
CFLAGS="${CFLAGS} -Wall" |
|---|
| 290 |
CFLAGS="${CFLAGS} -Waggregate-return" |
|---|
| 291 |
CFLAGS="${CFLAGS} -Wcast-align" |
|---|
| 292 |
CFLAGS="${CFLAGS} -Wimplicit" |
|---|
| 293 |
CFLAGS="${CFLAGS} -Wmissing-declarations" |
|---|
| 294 |
CFLAGS="${CFLAGS} -Wmissing-prototypes" |
|---|
| 295 |
CFLAGS="${CFLAGS} -Wpointer-arith" |
|---|
| 296 |
CFLAGS="${CFLAGS} -Wstrict-prototypes" |
|---|
| 297 |
CFLAGS="${CFLAGS} -Wuninitialized" |
|---|
| 298 |
#CFLAGS="${CFLAGS} -Wsign-compare" |
|---|
| 299 |
#CFLAGS="${CFLAGS} -Wunused-value" |
|---|
| 300 |
fi |
|---|
| 301 |
VTE_DEBUG=1 |
|---|
| 302 |
fi |
|---|
| 303 |
fi |
|---|
| 304 |
if test x$VTE_DEBUG = x1 ; then |
|---|
| 305 |
AC_MSG_RESULT([enabling debug checks and messages]) |
|---|
| 306 |
AC_DEFINE(VTE_DEBUG,1,[Enable debugging messages.]) |
|---|
| 307 |
fi |
|---|
| 308 |
|
|---|
| 309 |
wcs_funcs_includes=" |
|---|
| 310 |
#ifdef HAVE_STRING_H |
|---|
| 311 |
# if !STDC_HEADERS && HAVE_MEMORY_H |
|---|
| 312 |
# include <memory.h> |
|---|
| 313 |
# endif |
|---|
| 314 |
# include <string.h> |
|---|
| 315 |
#else |
|---|
| 316 |
# ifdef HAVE_STRINGS_H |
|---|
| 317 |
# include <strings.h> |
|---|
| 318 |
# endif |
|---|
| 319 |
#endif |
|---|
| 320 |
#ifdef HAVE_WCHAR_H |
|---|
| 321 |
# include <wchar.h> |
|---|
| 322 |
#endif |
|---|
| 323 |
" |
|---|
| 324 |
|
|---|
| 325 |
AC_CHECK_TYPES(wint_t, AC_DEFINE(HAVE_WINT_T, , [Defined when the wint_t type is supported]), ,$wcs_funcs_includes) |
|---|
| 326 |
|
|---|
| 327 |
# Search for Python. |
|---|
| 328 |
BUILD_PYTHON=true |
|---|
| 329 |
AC_ARG_ENABLE(python, [AS_HELP_STRING(--enable-python,Build python bindings [default=yes])],[ |
|---|
| 330 |
if test x"$enableval" != xno ; then |
|---|
| 331 |
BUILD_PYTHON=true |
|---|
| 332 |
else |
|---|
| 333 |
BUILD_PYTHON=false |
|---|
| 334 |
fi],BUILD_PYTHON=true) |
|---|
| 335 |
|
|---|
| 336 |
if $BUILD_PYTHON ; then |
|---|
| 337 |
AM_PATH_PYTHON |
|---|
| 338 |
if test -z "$PYTHON" ; then |
|---|
| 339 |
BUILD_PYTHON=false |
|---|
| 340 |
fi |
|---|
| 341 |
fi |
|---|
| 342 |
|
|---|
| 343 |
if $BUILD_PYTHON ; then |
|---|
| 344 |
AC_MSG_CHECKING(for python >= 2.2) |
|---|
| 345 |
prog=" |
|---|
| 346 |
import sys, string |
|---|
| 347 |
minver = (2,2,0,'final',0) |
|---|
| 348 |
if sys.version_info < minver: |
|---|
| 349 |
sys.exit(1) |
|---|
| 350 |
sys.exit(0) |
|---|
| 351 |
" |
|---|
| 352 |
if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC |
|---|
| 353 |
then |
|---|
| 354 |
AC_MSG_RESULT([okay]) |
|---|
| 355 |
else |
|---|
| 356 |
BUILD_PYTHON=false |
|---|
| 357 |
AC_MSG_RESULT([too old]) |
|---|
| 358 |
fi |
|---|
| 359 |
fi |
|---|
| 360 |
|
|---|
| 361 |
if $BUILD_PYTHON ; then |
|---|
| 362 |
AM_CHECK_PYTHON_HEADERS(,BUILD_PYTHON=false) |
|---|
| 363 |
fi |
|---|
| 364 |
|
|---|
| 365 |
if $BUILD_PYTHON ; then |
|---|
| 366 |
AC_MSG_CHECKING([for pygtk-2.0]) |
|---|
| 367 |
if pkg-config --exists pygtk-2.0 ; then |
|---|
| 368 |
AC_MSG_RESULT([found]) |
|---|
| 369 |
PKG_CHECK_MODULES(PYGTK,[pygtk-2.0]) |
|---|
| 370 |
|
|---|
| 371 |
AC_PATH_PROG(PYGTK_CODEGEN, pygtk-codegen-2.0, no) |
|---|
| 372 |
if test "x$PYGTK_CODEGEN" = xno; then |
|---|
| 373 |
AC_MSG_ERROR(could not find pygtk-codegen-2.0 script) |
|---|
| 374 |
fi |
|---|
| 375 |
|
|---|
| 376 |
AC_MSG_CHECKING(for pygtk defs) |
|---|
| 377 |
PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0` |
|---|
| 378 |
AC_SUBST(PYGTK_DEFSDIR) |
|---|
| 379 |
AC_MSG_RESULT($PYGTK_DEFSDIR) |
|---|
| 380 |
else |
|---|
| 381 |
AC_MSG_RESULT([not found]) |
|---|
| 382 |
BUILD_PYTHON=false |
|---|
| 383 |
fi |
|---|
| 384 |
fi |
|---|
| 385 |
|
|---|
| 386 |
if ! $BUILD_PYTHON ; then |
|---|
| 387 |
AC_MSG_RESULT([Python bindings disabled.]) |
|---|
| 388 |
fi |
|---|
| 389 |
|
|---|
| 390 |
AC_SUBST(PYTHONREV) |
|---|
| 391 |
AC_SUBST(PYTHONMODULES) |
|---|
| 392 |
AM_CONDITIONAL(BUILD_PYTHON_MODULES, $BUILD_PYTHON) |
|---|
| 393 |
|
|---|
| 394 |
# If we can find libzvt on the system, set up to build a variant of "reflect" |
|---|
| 395 |
# which uses it. |
|---|
| 396 |
REFLECT_ZVT=false |
|---|
| 397 |
if pkg-config --exists libzvt-2.0 ; then |
|---|
| 398 |
REFLECT_ZVT=true |
|---|
| 399 |
ZVT_DEFS=-DHAVE_ZVT |
|---|
| 400 |
PKG_CHECK_MODULES(ZVT,[gtk+-2.0 libzvt-2.0]) |
|---|
| 401 |
fi |
|---|
| 402 |
AC_SUBST(ZVT_DEFS) |
|---|
| 403 |
AM_CONDITIONAL(REFLECT_USE_ZVT, $REFLECT_ZVT) |
|---|
| 404 |
|
|---|
| 405 |
mylibdir=`eval echo $libdir` |
|---|
| 406 |
mylibexecdir=`eval echo $libexecdir` |
|---|
| 407 |
mydatadir=`eval echo $datadir` |
|---|
| 408 |
if test x$exec_prefix = xNONE ; then |
|---|
| 409 |
if test x$prefix = xNONE ; then |
|---|
| 410 |
mylibdir=` echo $mylibdir | sed s,NONE,$ac_default_prefix,g` |
|---|
| 411 |
mylibexecdir=` echo $mylibexecdir | sed s,NONE,$ac_default_prefix,g` |
|---|
| 412 |
else |
|---|
| 413 |
mylibdir=` echo $mylibdir | sed s,NONE,$prefix,g` |
|---|
| 414 |
mylibexecdir=` echo $mylibexecdir | sed s,NONE,$prefix,g` |
|---|
| 415 |
fi |
|---|
| 416 |
fi |
|---|
| 417 |
if test x$prefix = xNONE ; then |
|---|
| 418 |
mydatadir=`echo $mydatadir | sed s,NONE,$ac_default_prefix,g` |
|---|
| 419 |
fi |
|---|
| 420 |
AC_DEFINE_UNQUOTED(PKGLIBDIR,"$mylibdir/$PACKAGE", |
|---|
| 421 |
[The location where package-specific helpers can be found.]) |
|---|
| 422 |
AC_DEFINE_UNQUOTED(LIBEXECDIR,"$mylibexecdir", |
|---|
| 423 |
[The location where package-specific helpers can be found.]) |
|---|
| 424 |
AC_DEFINE_UNQUOTED(DATADIR,"$mydatadir", |
|---|
| 425 |
[The location where arch-independent package-specific data can be found.]) |
|---|
| 426 |
AC_DEFINE_UNQUOTED(LOCALEDIR,"$mydatadir/locale", |
|---|
| 427 |
[The location where locale data can be found.]) |
|---|
| 428 |
|
|---|
| 429 |
AC_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) |
|---|
| 430 |
if test "$enable_gnome_pty_helper" != no; then |
|---|
| 431 |
AC_DEFINE(VTE_USE_GNOME_PTY_HELPER,1,[Define if you intend to use gnome-pty-helper.]) |
|---|
| 432 |
AC_CONFIG_SUBDIRS(gnome-pty-helper) |
|---|
| 433 |
fi |
|---|
| 434 |
AM_CONDITIONAL(BUILD_GNOME_PTY_HELPER,[test "$enable_gnome_pty_helper" != no]) |
|---|
| 435 |
|
|---|
| 436 |
################################################################################ |
|---|
| 437 |
|
|---|
| 438 |
GTK_DOC_CHECK([1.0]) |
|---|
| 439 |
|
|---|
| 440 |
################################################################################ |
|---|
| 441 |
|
|---|
| 442 |
AC_CONFIG_FILES([ |
|---|
| 443 |
Makefile |
|---|
| 444 |
src/Makefile |
|---|
| 445 |
termcaps/Makefile |
|---|
| 446 |
python/Makefile |
|---|
| 447 |
po/Makefile.in |
|---|
| 448 |
doc/Makefile |
|---|
| 449 |
doc/openi18n/Makefile |
|---|
| 450 |
doc/reference/Makefile |
|---|
| 451 |
vte.pc |
|---|
| 452 |
vte-uninstalled.pc |
|---|
| 453 |
vte.spec |
|---|
| 454 |
]) |
|---|
| 455 |
AC_OUTPUT |
|---|