I know this is a very basic question, and I hope not too off topic. I'm new to this.
I'm looking for an example use of autoconf to optionally use a shared library, and what to instructions to give when the library is installed in a non-standard location. I'm wondering if there's a standard approach. I'm using --with-libxml2=DIR in my configure.in, but what I'm not clear on how to deal with non-standard locations that are not $DIR/include and $DIR/lib For example, to optionally install libxml2: AC_ARG_WITH(libxml2, [ --with-libxml2[=DIR] Build with libxml2 parsers. Specify optional path],[ if test "$withval" == "yes"; then LIBXML2_OBJS="parser.o" LIBXML2_LIB="-lxml2" LIBXML2_CFLAGS="-DLIBXML2" elif test "$withval" != "no"; then LIBXML2_OBJS="parser.o" LIBXML2_LIB="-R$withval/lib -L$withval/lib -lxml2" LIBXML2_CFLAGS="-I$withval/include -DLIBXML2" fi ]) AC_SUBST(LIBXML2_OBJS) AC_SUBST(LIBXML2_LIB) AC_SUBST(LIBXML2_CFLAGS) Say the non-standard locations (which are the build directories) are $HOME/libxml2-2.4.5/include $HOME/libxml2-2.4.5/.libs What instructions should I give in the INSTALL docs? LDFLAGS="-R$HOME/libxml2-2.4.5/.libs -L$HOME/libxml2-2.4.5/.libs" \ ./configure --with-libxml2=$HOME/libxml2-2.4.5 Or LD_RUN_PATH? Thanks, LD_RUN_PATH or Bill Moseley mailto:[EMAIL PROTECTED]