diff options
| author | Kenichi Handa | 2006-06-06 03:53:23 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-06-06 03:53:23 +0000 |
| commit | 0666b4f1c98f1ea0d5cf0ba732a461516b2e50a6 (patch) | |
| tree | a0ea2f49e003e39a51ea2e52509910365becbd2d | |
| parent | f9aae29fc307aef7e5bfa92e3bd61ce152e66553 (diff) | |
| download | emacs-0666b4f1c98f1ea0d5cf0ba732a461516b2e50a6.tar.gz emacs-0666b4f1c98f1ea0d5cf0ba732a461516b2e50a6.zip | |
New args --enable-font-backend, --with-xft,
--with-freetyp. New AC_DEFINEs USE_FONT_BACKEND, HAVE_XFT,
HAVE_FREETYPE, HAVE_LIBOTF. New AC_SUBSTs XFT_LIBS,
FREETYPE_CFLAGS, FREETYPE_LIBS, FONTCONFIG_CFLAGS,
FONTCONFIG_LIBS, LIBOTF_CFLAGS, LIBOTF_LIBS.
| -rw-r--r-- | configure.in | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 86a8de19843..041bba9c1a1 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -109,6 +109,10 @@ AC_ARG_WITH(gif, | |||
| 109 | [ --with-gif use -lungif for displaying GIF images]) | 109 | [ --with-gif use -lungif for displaying GIF images]) |
| 110 | AC_ARG_WITH(png, | 110 | AC_ARG_WITH(png, |
| 111 | [ --with-png use -lpng for displaying PNG images]) | 111 | [ --with-png use -lpng for displaying PNG images]) |
| 112 | AC_ARG_WITH(freetype, | ||
| 113 | [ --with-freetype use -lfreetype for local fonts support]) | ||
| 114 | AC_ARG_WITH(xft, | ||
| 115 | [ --with-xft use -lXft for anti aliased fonts]) | ||
| 112 | AC_ARG_WITH(gtk, | 116 | AC_ARG_WITH(gtk, |
| 113 | [ --with-gtk use GTK (same as --with-x-toolkit=gtk)]) | 117 | [ --with-gtk use GTK (same as --with-x-toolkit=gtk)]) |
| 114 | AC_ARG_WITH(pkg-config-prog, | 118 | AC_ARG_WITH(pkg-config-prog, |
| @@ -125,6 +129,11 @@ AC_ARG_ENABLE(carbon-app, | |||
| 125 | specify install directory for Emacs.app on Mac OS X]], | 129 | specify install directory for Emacs.app on Mac OS X]], |
| 126 | [ carbon_appdir_x=${enableval}]) | 130 | [ carbon_appdir_x=${enableval}]) |
| 127 | 131 | ||
| 132 | AC_ARG_ENABLE(font-backend, | ||
| 133 | [ --enable-font-backend compile code of font-backend support], | ||
| 134 | USE_FONT_BACKEND=$enableval, | ||
| 135 | USE_FONT_BACKEND=no) | ||
| 136 | |||
| 128 | AC_ARG_ENABLE(asserts, | 137 | AC_ARG_ENABLE(asserts, |
| 129 | [ --enable-asserts compile code with asserts enabled], | 138 | [ --enable-asserts compile code with asserts enabled], |
| 130 | USE_XASSERTS=$enableval, | 139 | USE_XASSERTS=$enableval, |
| @@ -2269,6 +2278,90 @@ either XPointer or XPointer*.])dnl | |||
| 2269 | CFLAGS=$late_CFLAGS | 2278 | CFLAGS=$late_CFLAGS |
| 2270 | fi | 2279 | fi |
| 2271 | 2280 | ||
| 2281 | ### For font-backend | ||
| 2282 | if test "${USE_FONT_BACKEND}" = "yes"; then | ||
| 2283 | |||
| 2284 | AC_DEFINE(USE_FONT_BACKEND, 1, | ||
| 2285 | [Define to 1 if we should use font-backend.]) | ||
| 2286 | |||
| 2287 | ### Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'. | ||
| 2288 | HAVE_XFT=maybe | ||
| 2289 | if test "${HAVE_X11}" = "yes"; then | ||
| 2290 | if test "x${with_freetype}" = "xno"; then | ||
| 2291 | with_xft="no"; | ||
| 2292 | fi | ||
| 2293 | if test "x${with_xft}" != "xno"; then | ||
| 2294 | |||
| 2295 | dnl Check if --with-pkg-config-prog has been given. | ||
| 2296 | if test "X${with_pkg_config_prog}" != X; then | ||
| 2297 | PKG_CONFIG="${with_pkg_config_prog}" | ||
| 2298 | fi | ||
| 2299 | |||
| 2300 | PKG_CHECK_MODULES(XFT, xft >= 0.13.0, , HAVE_XFT=no) | ||
| 2301 | if test "$HAVE_XFT" != no; then | ||
| 2302 | OLD_CPPFLAGS="$CPPFLAGS" | ||
| 2303 | OLD_CFLAGS="$CFLAGS" | ||
| 2304 | OLD_LIBS="$LIBS" | ||
| 2305 | CPPFLAGS="$CPPFLAGS $XFT_CFLAGS" | ||
| 2306 | CFLAGS="$CFLAGS $XFT_CFLAGS" | ||
| 2307 | LIBS="$XFT_LIBS $LIBS" | ||
| 2308 | AC_CHECK_HEADER(X11/Xft/Xft.h, | ||
| 2309 | AC_CHECK_LIB(Xft, XftFontOpen, HAVE_XFT=yes, , $XFT_LIBS)) | ||
| 2310 | |||
| 2311 | if test "${HAVE_XFT}" = "yes"; then | ||
| 2312 | AC_DEFINE(HAVE_XFT, 1, [Define to 1 if you have the Xft library.]) | ||
| 2313 | AC_SUBST(XFT_LIBS) | ||
| 2314 | C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS" | ||
| 2315 | else | ||
| 2316 | CFLAGS="$OLD_CPPFLAGS" | ||
| 2317 | CFLAGS="$OLD_CFLAGS" | ||
| 2318 | LIBS="$OLD_LIBS" | ||
| 2319 | fi | ||
| 2320 | fi | ||
| 2321 | fi | ||
| 2322 | fi | ||
| 2323 | |||
| 2324 | HAVE_FREETYPE=no | ||
| 2325 | ### Use -lfreetype if available, unless `--with-freetype=no'. | ||
| 2326 | if test "${HAVE_XFT}" = "yes"; then | ||
| 2327 | dnl As we use Xft, we anyway use freetype. | ||
| 2328 | dnl In this case, there's no need of additional CFLAGS and LIBS. | ||
| 2329 | HAVE_FREETYPE=yes | ||
| 2330 | elif test "x${with_freetype}" != "xno"; then | ||
| 2331 | dnl Check if --with-pkg-config-prog has been given. | ||
| 2332 | if test "X${with_pkg_config_prog}" != X; then | ||
| 2333 | PKG_CONFIG="${with_pkg_config_prog}" | ||
| 2334 | fi | ||
| 2335 | |||
| 2336 | PKG_CHECK_MODULES(FREETYPE, freetype2, HAVE_FREETYPE=yes, HAVE_FREETYPE=no) | ||
| 2337 | if test "${HAVE_FREETYPE}" = "yes"; then | ||
| 2338 | PKG_CHECK_MODULES(FONTCONFIG, fontconfig, HAVE_FC=yes, HAVE_FC=no) | ||
| 2339 | if test "${HAVE_FC}" = "no"; then | ||
| 2340 | dnl Witout fontconfig, we can't use freetype at the moment. | ||
| 2341 | HAVE_FREETYPE=no | ||
| 2342 | fi | ||
| 2343 | fi | ||
| 2344 | fi | ||
| 2345 | if test "${HAVE_FREETYPE}" = "yes"; then | ||
| 2346 | AC_DEFINE(HAVE_FREETYPE, 1, | ||
| 2347 | [Define to 1 if you have freetype and fontconfig libraries.]) | ||
| 2348 | AC_CHECK_PROG(HAVE_LIBOTF, libotf-config, yes, no) | ||
| 2349 | if test "${HAVE_LIBOTF}" = "yes"; then | ||
| 2350 | AC_DEFINE(HAVE_LIBOTF, 1, | ||
| 2351 | [Define to 1 if you have libotf library.]) | ||
| 2352 | LIBOTF_CFLAGS=`libotf-config --cflags` | ||
| 2353 | LIBOTF_LIBS=`libotf-config --libs` | ||
| 2354 | fi | ||
| 2355 | fi | ||
| 2356 | AC_SUBST(FREETYPE_CFLAGS) | ||
| 2357 | AC_SUBST(FREETYPE_LIBS) | ||
| 2358 | AC_SUBST(FONTCONFIG_CFLAGS) | ||
| 2359 | AC_SUBST(FONTCONFIG_LIBS) | ||
| 2360 | AC_SUBST(LIBOTF_CFLAGS) | ||
| 2361 | AC_SUBST(LIBOTF_LIBS) | ||
| 2362 | |||
| 2363 | fi | ||
| 2364 | |||
| 2272 | ### Use -lXpm if available, unless `--with-xpm=no'. | 2365 | ### Use -lXpm if available, unless `--with-xpm=no'. |
| 2273 | HAVE_XPM=no | 2366 | HAVE_XPM=no |
| 2274 | if test "${HAVE_X11}" = "yes"; then | 2367 | if test "${HAVE_X11}" = "yes"; then |