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

Re: [XaraXtreme-dev] configure.in:305: error: possibly undefined macro: AM_GNU_GETTEXT



On Fri, Jun 02, 2006 at 03:28:10PM +0100, Alex Bligh wrote:
> Vasil,
> 
> >-AC_PROG_LIBTOOL
> >+AC_PROG_RANLIB
> 
> OK, I understand looking for ranlib, but why drop the libtool stuff?
> (not that I can immediately think what it is used for).
> 

Because I get error about it, look below.

> >@@ -162,7 +162,6 @@
> > 	if echo $WX_CPPFLAGS | grep -q '__WXGTK__' ; then 
> > 		WX_GTK="yes"
> > 		AC_MSG_RESULT([found])
> >-		PKG_CHECK_MODULES(GTK, [gtk+-2.0])
> > 	else
> > 		AC_MSG_RESULT([not found])
> > 	fi
> 
> We need the check for GTK. Reason for deletion? This puts the
> GTK libraries directly on the link line which is necessary for
> some things, as well as providing their headers on the include
> line
> 

The problem is that I get error (or at least I got some time ago when I
initially ported XaraLX to FreeBSD) about PKG_CHECK_MODULES. The port
itself has assured that gtk is available by specifying
BUILD_DEPENDS=wxgtk2-unicode>=2.6.3:${PORTSDIR}/x11-toolkits/wxgtk26-unicode

> >@@ -250,20 +249,7 @@
> > 	# GTK build, so call FTTEST function to test for FreeType
> > 	FTTEST
> > 	FT_CFLAGS="`$FTCONFIG --cflags`"
> >-
> >-	# check for the Pango package
> >-	PkgError="no"
> >-	PKG_CHECK_MODULES(PANGOX, pangox,
> >-			  [
> >-				PANGO_CFLAGS="$PANGOX_CFLAGS"
> >-			  ],
> >-			  [
> >-				PkgError="yes"
> >-			  ]
> >-			  )
> >-	if test PkgError = "yes"; then
> >-		AC_MSG_ERROR([pangox library not found])
> >-	fi
> >+	PANGO_CFLAGS=""
> 
> This looks for pango, and includes its CFLAGS which is needed
> for rendering. Surely FreeBSD supports Pango?
> 

Yes, FreeBSD supports Pango, the problem is (or was) that the
PKG_CHECK_MODULES emitted errors. The port itself has assured that
pango is installed and available on the system prior to doing
autoreconf, configure and make

> > # pass the Pango, FreeType and GTK flags (required for wxGTK font 
> > rendering)
> >-CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS $PANGO_CFLAGS $FT_CFLAGS $GTK_CFLAGS 
> >$LIBXML2_CFLAGS"
> >-CXXFLAGS="$CXXFLAGS $WX_CPPFLAGS $PANGO_CFLAGS $FT_CFLAGS $GTK_CFLAGS 
> >$LIBXML2_CFLAGS"
> >+CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS $PANGO_CFLAGS $FT_CFLAGS $GTK_CFLAGS 
> >$LIBXML2_CFLAGS $CPPFLAGS_APPEND"
> >+CXXFLAGS="$CXXFLAGS $WX_CPPFLAGS $PANGO_CFLAGS $FT_CFLAGS $GTK_CFLAGS 
> >$LIBXML2_CFLAGS $CPPFLAGS_APPEND"
> 
> Where are CPPFLAGS_APPEND defined? Should the last one be
> CXX_FLAGS_APPEND?
> 

Its defined by the port in the configure's environment the following
way:
CPPFLAGS_APPEND="`pkg-config --cflags atk fontconfig gdk-2.0 pango` -I/usr/local/include/atk-1.0/atk -I/usr/X11R6/include/gtk-2.0/gtk"
(sorry, this is a little hackish I hope to get rid of it someday...)

> >+AC_SUBST(WX_CPPFLAGS)
> 
> Where is that used?
> 

Can't remember, I will try to remove it and see what happens :-)

> Original errors:
> 
> >aclocal:configure.in:319: warning: macro `AM_GNU_GETTEXT' not found in 
> >library
> >aclocal:configure.in:320: warning: macro `AM_GNU_GETTEXT_VERSION' not 
> >found in library
> 
> Those would seem to indicate that somehow autoreconf isn't picking up
> the gettext macros. This is clearly a problem. Note at this stage it
> is a warning.
> 
> >configure.in:70: error: possibly undefined macro: AC_PROG_LIBTOOL
> >      If this token and others are legitimate, please use m4_pattern_allow.
> >      See the Autoconf documentation.
> 
> Don't know what this is used for in practice.
> 

This is why I removed the AC_PROG_LIBTOOL line, look above.

> >configure.in:319: error: possibly undefined macro: AM_GNU_GETTEXT
> >configure.in:320: error: possibly undefined macro: AM_GNU_GETTEXT_VERSION
> >autoreconf259: /usr/local/bin/autoconf259 failed with exit status: 1
> 
> Here's the same problem as above. I had thought that you were allowed
> undefined macros (they just didn't expand and gave a warning) provided
> code didn't actually pass through them. Looks like I am wrong.
> 
> You write:
> > gettext.m4 is available here:
> >   /usr/local/share/aclocal/gettext.m4
> 
> At a guess, does that define AM_GETTEXT rather than AM_GNU_GETTEXT?
> 

No, it defines AM_GNU_GETTEXT, I guess autoreconf is not including
/usr/local/share/aclocal/gettext.m4,
autoreconf -I /usr/local/share/aclocal does not help either

> But I still don't understand the necessity to delete all the pango
> stuff. How can font rendering work without it?
> 

It's just the PKG_CHECK_MODULES that was deleted, otherwise the pango is
available on the system at compile time and the build is picking it up
via the hacked CPPFLAGS_APPEND which contains the result from
`pkg-config --cflags pango`, see above.

-- 
Vasil Dimov
gro.DSBeerF@dv

Testing can show the presence of bugs, but not their absence.
                -- Edsger W. Dijkstra