Autoconf experts,

I'm porting gnome-meeting 2.0 onto opensolaris and I met a problem about the macro AC_CHECK_LIB.
In configure.in of pwlib ( a gnome-meeting component), there are lines:
LIBS="${LIBS} -L${with_pwlib_dir}/${libname}/"
AC_CHECK_LIB(pt, main, pwlib_libs="yes", pwlib_libs="no")

This will cause configure to run some command like this:
SUNWspro/bin/cc .....  -lpt  -Lpwlib-library-directory

cc reports that it can't find pt library even -L option tells the linker where the library is.
The root cause is -L option is *after* "-lpt" instead of  *before.

*I don't know if this is a bug of autoconf.

If it is not, does anyone know if there is a workaround?
The only workaround I know is to set pwlib library path into LD_LIBRARY_PATH. Is there a better solution?

Thanks in advance.

Brian





Reply via email to