Re: Configure.in can't detect Xft libraries.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



   I was able to strip it significantly, making it around 3.5 times
   smaller. It is from Pango 1.10. The autoconf is 2.69. Xft is installed
   on: /media/34GB/Arquivos-de-Programas-Linux/xorg/Xft-2.1.8.2/

   and pango dir is on:
   /media/34GB/Arquivos-de-Programas-Linux/pango-1.10.0/.



   My latest configure command (trying to pass  Xft through
   PKG_CONFIG_PATH) it is:



   CPPFLAGS="-I/media/34GB/Arquivos-de-Programas-Linux/xorg/Xt-1.0.0/inclu
   de/ -I/media/34GB/Arquivos-de-Programas-Linux/xorg/X11-1.0.0/include/
   -I/media/34GB/Arquivos-de-Programas-Linux/xorg/Xproto-7.0.4/include/"
   LDFLAGS="-L/media/34GB/Arquivos-de-Programas-Linux/xorg/Xt-1.0.0/lib/
   -L/media/34GB/Arquivos-de-Programas-Linux/xorg/X11-1.0.0/lib/
   -L/media/34GB/Arquivos-de-Programas-Linux/xorg/ICE-1.0.0/lib/"
   ./configure
   --prefix=/media/34GB/Arquivos-de-Programas-Linux/Pango-1.10.0/
   PKG_CONFIG_PATH=/media/34GB/Arquivos-de-Programas-Linux/Fontconfig-2.4.
   0/lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/Freetype-2.2.1
   /lib/pkgconfig/:/media/34GB/Arquivos-de-Programas-Linux/Glib-2.6.6/lib/
   pkgconfig:/media/34GB/Arquivos-de-Programas-Linux/xorg/Xft-2.1.8.2/lib/
   pkgconfig/


   And "pkg-config --version" returns 0.22



   21.12.2020, 18:06, "Zack Weinberg" <zackw@xxxxxxxxx>:

     On Mon, Dec 21, 2020 at 9:45 AM alexandre schenberg
     <[1]ale.schenberg@xxxxxxxxxx> wrote:

         Hello. I am currently trying to compile pango with support to
     the Xft
         libraries, both being outside the system default search places.
         Unfortunately, pango's configure is unable do detect it, no
     matter
         which way I use to pass it.

     Thanks for the bug report.
     Pango's configure script is very complicated. Could you please try
     to
     cut it down to a short test case? The smallest possible configure.ac
     that still reproduces the phenomenon (of failing to detect Xft).
     Send
     us that, and it'll be much easier for us to experiment with it.
     Since you say that Xft is installed outside the system default
     search
     paths, it would also help to know exactly where it _is_ installed,
     and
     any other details of how your system is set up that seem like they
     might be relevant.
     zw

References

   1. mailto:ale.schenberg@xxxxxxxxxx
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.54)

dnl ==========================================================================
dnl                               Versioning              
dnl ==========================================================================

dnl Making releases:
dnl   PANGO_MICRO_VERSION += 1;
dnl   PANGO_INTERFACE_AGE += 1;
dnl   PANGO_BINARY_AGE += 1;
dnl if any functions have been added, set PANGO_INTERFACE_AGE to 0.
dnl if backwards compatibility has been broken,
dnl set PANGO_BINARY_AGE _and_ PANGO_INTERFACE_AGE to 0.

dnl
dnl We do the version number components as m4 macros
dnl so that we can base configure --help output off
dnl of them.
dnl

dnl The triplet 
m4_define([pango_major_version], [1])
m4_define([pango_minor_version], [10])
m4_define([pango_micro_version], [0])
m4_define([pango_version],
          [pango_major_version.pango_minor_version.pango_micro_version])
dnl The X.Y in -lpango-X.Y line. This is expected to stay 1.0 until Pango 2.
m4_define([pango_api_version], [1.0])
dnl Number of releases since we've added interfaces
m4_define([pango_interface_age], [0])
dnl Number of releases since we've broken binary compatibility.
m4_define([pango_binary_age],
          [m4_eval(100 * pango_minor_version + pango_micro_version)])
dnl This is the last version with which we have compatibility with
dnl with the modules for; it isn't the same as
dnl PANGO_API_VERSION.'PANGO_MICRO_VERSION - PANGO_BINARY_AGE' since we have
dnl engine only API    
m4_define([pango_module_version], [1.4.0])


AC_INIT(pango, [pango_version],
        [http://bugzilla.gnome.org/enter_bug.cgi?product=pango])



AM_INIT_AUTOMAKE
AM_CONFIG_HEADER([config.h])


PANGO_MAJOR_VERSION=pango_major_version()
PANGO_MINOR_VERSION=pango_minor_version()
PANGO_MICRO_VERSION=pango_micro_version()
PANGO_VERSION=pango_version()
PANGO_API_VERSION=pango_api_version()
PANGO_INTERFACE_AGE=pango_interface_age()
PANGO_BINARY_AGE=pango_binary_age()
PANGO_MODULE_VERSION=pango_module_version()

AC_SUBST(PANGO_MAJOR_VERSION)
AC_SUBST(PANGO_MINOR_VERSION)
AC_SUBST(PANGO_VERSION)
AC_SUBST(PANGO_API_VERSION)
AC_SUBST(PANGO_MICRO_VERSION)
AC_SUBST(PANGO_INTERFACE_AGE)
AC_SUBST(PANGO_BINARY_AGE)
AC_SUBST(PANGO_MODULE_VERSION)

dnl libtool versioning
m4_define([lt_current], [m4_eval(100 * pango_minor_version + pango_micro_version - pango_interface_age)])
m4_define([lt_revision], [pango_interface_age])
m4_define([lt_age], [m4_eval(pango_binary_age - pango_interface_age)])
LT_VERSION_INFO="lt_current():lt_revision():lt_age()"
LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)

AC_SUBST(LT_VERSION_INFO)
AC_SUBST(LT_CURRENT_MINUS_AGE)

AC_PROG_CC
	
dnl 
dnl Check for a working C++ compiler, but do not bail out, if none is found.
dnl We use this for an automated test for C++ header correctness.
dnl 
AC_CHECK_PROGS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
AC_LANG_RESTORE

AM_DISABLE_STATIC

AM_PROG_LIBTOOL


dnl declare --enable-* args and collect ac_help strings

m4_define([debug_default],
          m4_if(m4_eval(pango_minor_version() % 2), [1], [yes], [minimum]))

AC_PATH_XTRA

if test x$no_x = xyes ; then
  AC_MSG_WARN([X development libraries not found])
  have_x=false
else
  X_LIBS="$X_LIBS -lX11"
  have_x=true
  AC_DEFINE(HAVE_X, 1, [Have X libraries])
fi
AM_CONDITIONAL(HAVE_X, $have_x) 

#
# Check for fontconfig
#
have_fontconfig=false
have_freetype=false
have_xft=false

PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 1.0.1, have_fontconfig=true, :)

if $have_fontconfig ; then
  #
  # Checks for FreeType
  #
  FREETYPE_LIBS=
  FREETYPE_CFLAGS=
  AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
  if test "x$FREETYPE_CONFIG" != "xno" ; then
    FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
    FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`

    pango_save_ldflags=$LDFLAGS
    LDFLAGS="$LDFLAGS $FREETYPE_LIBS"
    AC_CHECK_LIB(freetype, FT_Get_Next_Char, have_freetype=true, :)
    LDFLAGS=$pango_save_ldflags
  fi

  FREETYPE_LIBS="$FONTCONFIG_LIBS $FREETYPE_LIBS"
  FREETYPE_CFLAGS="$FONTCONFIG_CFLAGS $FREETYPE_CFLAGS"

  AC_SUBST(FREETYPE_LIBS)
  AC_SUBST(FREETYPE_CFLAGS)

  #
  # Checks for Xft/XRender
  #
  if $have_x && $have_freetype ; then
    PKG_CHECK_MODULES(XFT, xft >= 2.0.0, have_xft=true, :)
	 AC_MSG_WARN([BUDA!!!!])
  fi
else
  AC_MSG_WARN([No fontconfig found, skipping tests for FreeType and Xft])
fi

AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype)
AM_CONDITIONAL(HAVE_XFT, $have_xft)

#
# Checks for Win32 GDI
#
have_win32=false


#
# Checks for Cairo
#
have_cairo=false
have_cairo_freetype=false
have_cairo_win32=false

#
# We must have some backend defined, in order for the pango-querymodules
# rule in pango/Makefile.am to work correctly. If you are up to writing
# a new Pango backend outside of Pango, you are up to sending the necessary
# patch to fix that rule. :-)
#
if $have_freetype || $have_x || $have_xft || $have_win32  ; then : ; else
  AC_MSG_ERROR([*** Didn't find any of FreeType, X11, or Win32.
*** Must have at least one backend to build Pango.])
fi

AC_CONFIG_FILES([Makefile ])

AC_CONFIG_FILES([tests/runtests.sh],
	        [chmod +x tests/runtests.sh])

AC_OUTPUT

backends=""
if $have_freetype && $have_fontconfig ; then backends="$backends FreeType"; fi
if $have_x ; then backends="$backends X"; fi
if $have_xft ; then backends="$backends Xft"; fi 
if $have_cairo ; then backends="$backends Cairo"; fi
if $have_win32 ; then backends="$backends Win32"; fi
   
echo "configuration:
	backends:$backends"

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux