[GRASS-dev] [GRASS GIS] #467: Wrong detection on cairo
GRASS GIS
trac at osgeo.org
Tue Jan 27 04:45:12 EST 2009
#467: Wrong detection on cairo
-----------------------+----------------------------------------------------
Reporter: fundawang | Owner: grass-dev at lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Keywords: | Platform: Linux
Cpu: All |
-----------------------+----------------------------------------------------
in configure.in:
{{{
ac_save_ldflags="$LDFLAGS"
LDFLAGS="$LDFLAGS $CAIROLIB"
AC_CHECK_FUNC(cairo_create,,[
AC_MSG_ERROR([*** Unable to locate cairo_create() function.])
])
LDFLAGS=${ac_save_ldflags}
}}}
but CAIROLIB is a library, not a linker flag. as Mandriva will use
LDFLAGS="-Wl,--as-needed" by default, such a wrong link order will make it
impossible to test the program:
{{{
gcc -o conftest -Wl,--as-needed -lcairo conftest.c
}}
It will produces: undefined reference to `cairo_create', because -lcairo
is considered as objects, rather than libs.
You should change ldflags to LIBS.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/467>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list