Ah, I see!
This error message is very confusing because it suggests that libwx_gtk2ud_adv-2.7.so needs libwx_gtk2ud_html-2.7.so.0 at run-time, but that's not correct. It should only be needed at link-time.
Try something like this:
env LDFLAGS="-Wl,-rpath-link,/path/to/the/wx-libraries ./configure
This tells the linker where it can find libraries required by other libraries at link-time.
Don't confuse it with the "-L" option: They are very different. "-L" tells the linker where to find the libraries that should be linked in, while "-Wl,-rpath-link" tells the linker where to find libraries that should not be linked in, but are required by other libraries that should.
Usually it should be equivalent to add the directory with the libraries to LD_LIBRARY_PATH. Is it possible that you forgot that? I'll try to reproduce it with tomorrow's wx CVS.
From ld's man page:
-rpath-link DIR
When using ELF or SunOS, one shared library may require another.
This happens when an "ld -shared" link includes a shared library as
one of the input files.
When the linker encounters such a dependency when doing a
non-shared, non-relocatable link, it will automatically try to
locate the required shared library and include it in the link, if
it is not included explicitly. In such a case, the -rpath-link
option specifies the first set of directories to search. The
-rpath-link option may specify a sequence of directory names either
by specifying a list of names separated by colons, or by appearing
multiple times.
This option should be used with caution as it overrides the search
path that may have been hard compiled into a shared library. In
such a case it is possible to use unintentionally a different
search path than the runtime linker would do.
The linker uses the following search paths to locate required
shared libraries.
1. Any directories specified by -rpath-link options.
2. Any directories specified by -rpath options. The difference
between -rpath and -rpath-link is that directories specified by
-rpath options are included in the executable and used at run-
time, whereas the -rpath-link option is only effective at link
time. It is for the native linker only.
3. On an ELF system, if the -rpath and "rpath-link" options were
not used, search the contents of the environment variable
"LD_RUN_PATH". It is for the native linker only.
4. On SunOS, if the -rpath option was not used, search any direc-
tories specified using -L options.
5. For a native linker, the contents of the environment variable
"LD_LIBRARY_PATH".
6. For a native ELF linker, the directories in "DT_RUNPATH" or
"DT_RPATH" of a shared library are searched for shared
libraries needed by it. The "DT_RPATH" entries are ignored if
"DT_RUNPATH" entries exist.
7. The default directories, normally /lib and /usr/lib.
8. For a native linker on an ELF system, if the file
/etc/ld.so.conf exists, the list of directories found in that
file.
If the required shared library is not found, the linker will issue
a warning and continue with the link.
But the whole thing is still very strange because my executable did not become larger although I used static libraries. Usually this means that some of the libraries are not used at all. I'll try shared libraries tomorrow and look if either LD_LIBRARY_PATH or "-Wl,-rpath-link" fixes the problem.