Ticket #467 (closed defect: fixed)
Wrong detection on cairo
| Reported by: | fundawang | Owned by: | grass-dev@… |
|---|---|---|---|
| Priority: | major | Milestone: | 6.4.0 |
| Component: | Default | Version: | 6.4.0 RCs |
| Keywords: | Cc: | ||
| Platform: | Linux | CPU: | All |
Description
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.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

