Mercurial > hg > xemacs-beta
comparison configure.ac @ 4152:80b3f12490a3
[xemacs-hg @ 2007-08-29 06:19:44 by michaels]
2007-08-27 Mike Sperber <mike@xemacs.org>
* configure.ac: Try to use pkg-config for finding Xft includes and
libraries. If that fails, search also in /usr/local.
author | michaels |
---|---|
date | Wed, 29 Aug 2007 06:19:54 +0000 |
parents | 9aa33376bb5e |
children | dfd878799ef0 |
comparison
equal
deleted
inserted
replaced
4151:fa9301959f02 | 4152:80b3f12490a3 |
---|---|
3488 dnl #### need to check for includes here (especially, freetype.h for v.2) | 3488 dnl #### need to check for includes here (especially, freetype.h for v.2) |
3489 | 3489 |
3490 if test "$with_xft_emacs" = "yes"; then | 3490 if test "$with_xft_emacs" = "yes"; then |
3491 AC_MSG_CHECKING([for Xrender, fontconfig, and Xft]) | 3491 AC_MSG_CHECKING([for Xrender, fontconfig, and Xft]) |
3492 xft_includes_found=no | 3492 xft_includes_found=no |
3493 AC_CHECK_HEADERS([freetype/config/ftheader.h], | 3493 dnl try pkg-config |
3494 [xft_includes_found=yes], | 3494 xft_config_prog="pkg-config xft" |
3495 [ | 3495 xft_config_ok=`$xft_config_prog --cflags 2>/dev/null` |
3496 dnl #### How about /sw/include, and /opt/local/include? | 3496 if test "$?" = 0 ; then |
3497 dnl these directories need to be the parent of the freetype directory | 3497 xft_cflags=`$xft_config_prog --cflags` |
3498 for freetype_include_top in "/usr/X11R6/include/freetype2" \ | 3498 xft_libs=`$xft_config_prog --libs` |
3499 "/usr/include/freetype2" | 3499 c_switch_site="$c_switch_site $xft_cflags" |
3500 do | 3500 ld_switch_site="$ld_switch_site $xft_libs" |
3501 if test -d $freetype_include_top; then | 3501 xft_includes_found=yes |
3502 AC_MSG_CHECKING([in ${freetype_include_top}/freetype2]) | 3502 else |
3503 dnl disable autoconf's fucking cache; why these fuckheads think it | 3503 AC_CHECK_HEADERS([freetype/config/ftheader.h], |
3504 dnl is better to be broken than to be slow, I don't know! | 3504 [xft_includes_found=yes], |
3505 dnl #### there's gotta be a better-looking way to do this!! | 3505 [ |
3506 unset "$as_ac_Header" | 3506 dnl #### How about /sw/include, and /opt/local/include? |
3507 save_c_switch_site="$c_switch_site" | 3507 dnl these directories need to be the parent of the freetype directory |
3508 c_switch_site="$c_switch_site -I${freetype_include_top}" | 3508 for freetype_include_top in "/usr/local/include/freetype2" \ |
3509 AC_CHECK_HEADERS([freetype/config/ftheader.h], | 3509 "/usr/X11R6/include/freetype2" \ |
3510 [xft_includes_found=yes], | 3510 "/usr/include/freetype2" |
3511 [c_switch_site=$save_c_switch_site]) | 3511 do |
3512 fi | 3512 if test -d $freetype_include_top; then |
3513 done]) | 3513 AC_MSG_CHECKING([in ${freetype_include_top}]) |
3514 dnl disable autoconf's fucking cache; why these fuckheads think it | |
3515 dnl is better to be broken than to be slow, I don't know! | |
3516 dnl #### there's gotta be a better-looking way to do this!! | |
3517 unset "$as_ac_Header" | |
3518 save_c_switch_site="$c_switch_site" | |
3519 c_switch_site="$c_switch_site -I${freetype_include_top}" | |
3520 AC_CHECK_HEADERS([freetype/config/ftheader.h], | |
3521 [xft_includes_found=yes], | |
3522 [c_switch_site=$save_c_switch_site]) | |
3523 fi | |
3524 done]) | |
3525 fi | |
3514 if test "$xft_includes_found" != "yes"; then | 3526 if test "$xft_includes_found" != "yes"; then |
3515 XE_DIE(["Unable to find headers for --with-xft"]) | 3527 XE_DIE(["Unable to find headers for --with-xft"]) |
3516 else | 3528 else |
3517 AC_CHECK_LIB(Xrender, XRenderQueryExtension, XE_PREPEND(-lXrender, libs_x), | 3529 AC_CHECK_LIB(Xrender, XRenderQueryExtension, XE_PREPEND(-lXrender, libs_x), |
3518 [XE_DIE(["Unable to find libXrender for --with-xft"])]) | 3530 [XE_DIE(["Unable to find libXrender for --with-xft"])]) |